升级Cypress到10.8.0

news2025/1/5 9:53:57

目录

错误信息1:Error: Webpack Compilation Error✔

 代码

错误信息2: 执行测试后,异常退出,没有报错✔

错误信息3: 执行测试后,报Webpack Compilation Error, webpack找不到✔

错误信息4:Step implementation missing ✔

错误信息5: Module not found: Error: Can't resolve '@utils/uc' 


错误信息1:Error: Webpack Compilation Error✔


./cypress/integration/AL/api.feature
Module build failed (from ./node_modules/@badeball/cypress-cucumber-preprocessor/dist/subpath-entrypoints/webpack.js):
TypeError: The "from" argument must be of type string. Received undefined

 代码

setupNodeEvents.js

const { addCucumberPreprocessorPlugin } = require("@badeball/cypress-cucumber-preprocessor");
const webpackPreprocessor = require('@cypress/webpack-preprocessor');

    const webpackOptions = {
        webpackOptions: {
            ...require('./webpack.config'),
            module: {
                rules: [
                    ...require('./webpack.config').module.rules,
                    {
                        test: /\.feature$/,
                        use: [
                            {
                                loader: require.resolve('@badeball/cypress-cucumber-preprocessor/webpack'),
                                options: {
                                    stepDefinitions: 'cypress/integration',
                                    config,
                                },
                            },
                        ],
                    },
                ],
            },
        },
        watchOptions: {},
    };

await addCucumberPreprocessorPlugin(on, config);
on('file:preprocessor', webpackPreprocessor(webpackOptions));

webpack.config.js

const webpack = require('webpack');
const path = require('path');

const definePlugin = new webpack.DefinePlugin({
  __REPORTING__: JSON.stringify(JSON.parse(process.env.REPORTING || 'false')),
});

module.exports = {
  mode: 'development',
  plugins: [definePlugin],
  module: {
    rules: [
      {
        test: /\.yml$/,
        use: 'js-yaml-loader',
      },
      {
        test: /\.txt$/,
        use: 'raw-loader',
      },
      {
        test: /\.js?$/,
        exclude: [/node_modules/],
        use: [
          {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env'],
            },
          },
        ],
      },
      {
        test: /\.feature$/,
        use: [
          {
            loader: require.resolve('@badeball/cypress-cucumber-preprocessor/webpack'),
            options: {
              stepDefinitions: 'cypress/integration',
            },
          },
        ],
      },
    ],
  },
  resolve: {
    alias: {
      '@config': path.resolve(__dirname, 'cypress/config'),
      '@common': path.resolve(__dirname, 'cypress/integration/_common/_common'),
      '@integration': path.resolve(__dirname, 'cypress/integration'),
      '@pages': path.resolve(__dirname, 'cypress/pages'),
      '@utils': path.resolve(__dirname, 'cypress/integration/_utils'),
    },
    extensions: ['.js', '.jsx', '.ts', '.tsx'],
  },
};

解决方案:错误的配置导致@badeball/cypressp-cucumber-preprocessor/dist/template.js文件以下代码在调用config时,引用projectRoot不存在

const relativeUri = path_1.default.relative(configuration.projectRoot, uri);
const webpackOptions = {
        webpackOptions: {
            ...require('./webpack.config'),
            module: {
                rules: [
                    ...require('./webpack.config').module.rules,
                    {
                        test: /\.feature$/,
                        use: [
                            {
                                loader: require.resolve('@badeball/cypress-cucumber-preprocessor/webpack'),
                                options: config,
                            },
                        ],
                    },
                ],
            },
        },
        watchOptions: {},
    };

仅config对象传给options时,该问题得到解决

错误信息2: 执行测试后,异常退出,没有报错✔

解决方案:更新CI_BUILD_ID的值,保持每次执行唯一

错误信息3: 执行测试后,报Webpack Compilation Error, webpack找不到✔

Error: Webpack Compilation Error
multi ./cypress/integration/AA/Join/Join.feature
Module not found: Error: Can't resolve '@badeball/cypress-cucumber-preprocessor/webpack' in 'F:\github\llp-cypress'
resolve '@badeball/cypress-cucumber-preprocessor/webpack' in 'F:\github\llp-cypress'
  Parsed request is a module
  using description file: F:\github\llp-cypress\package.json (relative path: .)
    Looked for and couldn't find the file at the following paths:
[F:\github\node_modules]
[F:\node_modules]
[F:\github\llp-cypress\node_modules\@badeball\cypress-cucumber-preprocessor\webpack]
[F:\github\llp-cypress\node_modules\@badeball\cypress-cucumber-preprocessor\webpack.js]
[F:\github\llp-cypress\node_modules\@badeball\cypress-cucumber-preprocessor\webpack.json]

    at handle (F:\github\llp-cypress\node_modules\@cypress\webpack-preprocessor\dist\index.js:180:23)
    at finalCallback (F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:257:39)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:306:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:304:22
    at Compiler.emitRecords (F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:499:39)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:298:10
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:482:27
    at F:\github\llp-cypress\node_modules\neo-async\async.js:2818:7
    at done (F:\github\llp-cypress\node_modules\neo-async\async.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:464:33
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:187:23)

This occurred while Cypress was compiling and bundling your test code. This is usually caused by:

- A missing file or dependency
- A syntax error in the file or one of its dependencies

Fix the error in your code and re-run your tests.
 

解决方案:

1.当前使用@cypress/webpack-preprocessor 5.5.0版本(2020-11-30)过旧,可能与cypress 10.8.0(2022-09-13)不兼容,升级到@cypress/webpack-preprocessor 5.12.0后,该报错消失,但是出现错误信息1

2.需要传入config给webpackOptions,即

const webpackOptions = {
        webpackOptions: {
            ...require('./webpack.config'),
            module: {
                rules: [
                    ...require('./webpack.config').module.rules,
                    {
                        test: /\.feature$/,
                        use: [
                            {
                                loader: require.resolve('@badeball/cypress-cucumber-preprocessor/webpack'),
                                options: {
                                    stepDefinitions: 'cypress/integration',
                                    config,
                                },
                            },
                        ],
                    },
                ],
            },
        },
        watchOptions: {},
    };

错误信息4:Step implementation missing ✔

  1) Verify existing user
       user logs in portal by UC:
     Error:
Step implementation missing for ""LOGIN_USER:3:EMAIL" has logged in Portal".

We tried searching for files containing step definitions using the following search pattern templates:

  - ./cypress/integration

These templates resolved to the following search patterns:

  - ./cypress/integration

These patterns matched **no files** containing step definitions. This almost certainly means that you have misconfigured `stepDefinitions`.

You can implement it using the suggestion(s) below.

  Given("{string} has logged in Portal", function (string) {
    return "pending";
  });
 

解决方案:将以下配置更新到package.json

"cypress-cucumber-preprocessor": {
    "nonGlobalStepDefinitions": true,
    "stepDefinitions": "cypress/integration/**/*.js"
  },

错误信息5: Module not found: Error: Can't resolve '@utils/uc' ✔

./cypress/integration/_common/_common/_common_actions.js
Module not found: Error: Can't resolve '@utils/uc' in 'F:\github\llp-cypress\cypress\integration\_common\_common'
resolve '@utils/uc' in 'F:\github\llp-cypress\cypress\integration\_common\_common'
  Parsed request is a module
  using description file: F:\github\llp-cypress\package.json (relative path: ./cypress/integration/_common/_common)
    Field 'browser' doesn't contain a valid alias configuration
    Looked for and couldn't find the file at the following paths:
[F:\github\llp-cypress\cypress\integration\_common\_common\node_modules]
[F:\github\llp-cypress\cypress\integration\_common\node_modules]
[F:\github\llp-cypress\cypress\integration\node_modules]
[F:\github\llp-cypress\cypress\node_modules]
[F:\github\node_modules]
[F:\node_modules]
[F:\github\llp-cypress\node_modules\@utils\uc]
[F:\github\llp-cypress\node_modules\@utils\uc.ts]
[F:\github\llp-cypress\node_modules\@utils\uc.js]
 @ ./cypress/integration/_common/_common/_common_actions.js 2:0-32
 @ ./cypress/integration/AA/login/demo.feature
 @ multi ./cypress/integration/AA/login/demo.feature
    at handle (F:\github\llp-cypress\node_modules\@cypress\webpack-preprocessor\dist\index.js:180:23)
    at finalCallback (F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:257:39)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:306:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:304:22
    at Compiler.emitRecords (F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:499:39)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:298:10
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:482:27
    at F:\github\llp-cypress\node_modules\neo-async\async.js:2818:7
    at done (F:\github\llp-cypress\node_modules\neo-async\async.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:464:33
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:187:23)

This occurred while Cypress was compiling and bundling your test code. This is usually caused by:

- A missing file or dependency
- A syntax error in the file or one of its dependencies

Fix the error in your code and re-run your tests.
原因分析:webpack未引入别名配置

解决方案:在webpack.config.js中加入resolve.alias的配置,完整配置如下

const webpack = require('webpack');
const path = require('path');

const definePlugin = new webpack.DefinePlugin({
  __REPORTING__: JSON.stringify(JSON.parse(process.env.REPORTING || 'false')),
});

module.exports = {
  mode: 'development',
  plugins: [definePlugin],
  module: {
    rules: [
      {
        test: /\.yml$/,
        use: 'js-yaml-loader',
      },
      {
        test: /\.txt$/,
        use: 'raw-loader',
      },
      {
        test: /\.jsx?$/,
        exclude: [/node_modules/],
        use: [
          {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env'],
            },
          },
        ],
      },
    ],
  },
  resolve: {
    extensions: [".ts", ".js"],
    alias: {
      '@config': path.resolve(__dirname, 'cypress/config'),
      '@common': path.resolve(__dirname, 'cypress/integration/_common/_common'),
      '@integration': path.resolve(__dirname, 'cypress/integration'),
      '@pages': path.resolve(__dirname, 'cypress/pages'),
      '@utils': path.resolve(__dirname, 'cypress/integration/_utils'),
    },
  },
};

错误信息6: Missing class properties transform

Error: Webpack Compilation Error
./cypress/pages/_common/common_page.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: F:\github\llp-cypress\cypress\pages\_common\common_page.js: Missing class properties transform.
  4 | // The abstract base page class
  5 | class CommonPage {
> 6 |   static commonSelectors = commonSelectors;
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  7 |
  8 |   visit() {
  9 |     throw new Error('Not Implemented');
 @ ./cypress/pages/index.js 1:0-47 76:18-28
 @ ./cypress/integration/AA/login/login_steps.js
 @ ./cypress/integration/AA/login/login.feature
    at handle (F:\github\llp-cypress\node_modules\@cypress\webpack-preprocessor\dist\index.js:180:23)
    at finalCallback (F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:257:39)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:306:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:304:22
    at Compiler.emitRecords (F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:499:39)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:298:10
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:482:27
    at F:\github\llp-cypress\node_modules\neo-async\async.js:2818:7
    at done (F:\github\llp-cypress\node_modules\neo-async\async.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\github\llp-cypress\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (F:\github\llp-cypress\node_modules\tapable\lib\Hook.js:154:20)
    at F:\github\llp-cypress\node_modules\webpack\lib\Compiler.js:464:33
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
    at C:\Users\Administrator\AppData\Local\Cypress\Cache\10.8.0\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:187:23)

This occurred while Cypress was compiling and bundling your test code. This is usually caused by:

- A missing file or dependency
- A syntax error in the file or one of its dependencies

Fix the error in your code and re-run your tests.
 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2269762.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

pd虚拟机 [po] Parallels Desktop 20 激活 for Mac [jie] 安装教程【支持M芯片】

文章目录 效果图一、下载软件二、安装运行⚠️注意事项&#xff1a;1、前往 系统设置–> 隐私与安全性 –> 完整磁盘访问权限&#xff0c;中允许终端&#xff1a;2、安装运行【ParallelsDesktop-20.1.2-55742.dmg】&#xff0c;运行【安装.app】3、将【Patch】文件夹拖到…

windows11安装软件时选择文件路径只有桌面及子文件夹怎么解决方法

现象&#xff1a;当桌面文件夹、文件总数超过一定数量时(具体个数不详&#xff0c;个人猜测可能跟系统架构或内存有关)点击应用程序中“浏览”按钮时&#xff0c;只能看到桌面文件夹&#xff0c;其他盘符看不到。一个巨硬愚蠢的bug。定期清理下桌面吧&#xff0c;习惯下载到桌面…

SpringCloud源码-openFeign

LoadBalancer默认只有nacos服务发现器 openFeign与springcloud loadbalancer的结合点 openFeign通过spring cloud loadbalancer进行负载均衡&#xff0c;spring cloud loadbalancer通过discovery client获取nacos的机器列表&#xff0c;然后底层进行负载均衡。

开源架构中的数据库选择优化版

上一篇文章推荐&#xff1a; 开源架构学习指南&#xff1a;文档与资源的智慧锦囊&#xff08;New&#xff09; 我管理的社区推荐&#xff1a;【青云交社区】和【架构师社区】 推荐技术圈福利社群&#xff1a;点击快速加入 开源架构中的数据库选择优化版 一、引言二、关系型开源…

Listwise 排序之 LambdaRank:最大化 NDCG 的秘诀

Listwise系列相关文章&#xff08;置顶&#xff09; 1.Listwise 模型时间线梳理 2.Listwise 排序之 LambdaRank&#xff1a;最大化 NDCG 的秘诀 引言 LambdaRank 是一种用于排序学习&#xff08;Learning to Rank, LTR&#xff09;的模型&#xff0c;特别适用于推荐系统和信息…

汉化SecureCRT9.1

我个人觉得&#xff0c;SecureCRT是最好用的ssh远程工具软件&#xff0c;但是这个软件没有中文版本&#xff0c;我这种英文水平糟糕的人用起来&#xff0c;略有不便&#xff0c;因为一直没有在网上找到合适的汉化版本&#xff0c;于是有自己做一个汉化版本的计划。 前几日&…

我在广州学 Mysql 系列——插入、更新与删除数据详解以及实例

ℹ️大家好&#xff0c;我是练小杰&#xff0c;今天是2024年12月30号&#xff0c;明天就是2024最后一天了&#xff01;&#xff01; 本文将讲述MYSQL数据库的插入&#xff0c;更新以及删除数据~~ 复习&#xff1a;&#x1f449;【有关Mysql数据库的单表&#xff0c;多表查询的练…

HarmonyOS Next ArkUI ListListItem笔记

学习目标&#xff1a; List和ListItem的使用 学习内容&#xff1a; import { NewsInfo, newsInfoList } from ../viewmodel/NewsInfoclass DividerTmp {strokeWidth: Length 1startMargin: Length 60endMargin: Length 10color: ResourceColor #ffe9f0f0constructor(str…

机器人C++开源库The Robotics Library (RL)使用手册(四)

建立自己的机器人3D模型和运动学模型 这里以国产机器人天机TR8为例,使用最普遍的DH运动学模型,结合RL所需的描述文件,进行生成。 最终,需要的有两个文件,一个是.wrl三维模型描述文件;一个是.xml运动学模型描述文件。 1、通过STEP/STP三维文件生成wrl三维文件 机器人的…

游戏引擎学习第70天

这一节没讲什么主要是关于接下来要干的任务 开发过程概览 我们正在进行最后的总结&#xff0c;并计划接下来的步骤。目前的目标是创建一个包含所有必要组件的游戏引擎原型版本&#xff0c;目的是让这些部分能够协同工作并展现预期效果。通过这一过程&#xff0c;可以实验和探…

Android笔试面试题AI答之Android基础(8)

Android入门请看《Android应用开发项目式教程》&#xff0c;视频、源码、答疑&#xff0c;手把手教 文章目录 1.Android新建工程需要注意的地方有哪些&#xff1f;**1. 选择合适的项目模板****2. 配置项目基本信息****3. 选择最低 SDK 版本****4. 配置构建工具****5. 选择编程…

传统听写与大模型听写比对

在快节奏的现代生活中&#xff0c;听写技能仍然是学习语言和提升认知能力的重要环节。然而&#xff0c;传统的听写练习往往枯燥乏味&#xff0c;且效率不高。现在&#xff0c;随着人工智能技术的发展&#xff0c;大模型听写工具的问世&#xff0c;为传统听写带来了革命性的变革…

赛博周刊·2024年度工具精选(画板二维码类)

一、画板类 1、Excalidraw 一款好用的手绘工具&#xff0c;无需注册&#xff0c;支持多人协作。GitHub项目地址&#xff1a;https://github.com/excalidraw/excalidraw。 2、 Floating Whiteboard 一个在线的网页白板工具。 3、BoardOS&#xff1a;在线实时白板协作系统 一…

论文研读:Text2Video-Zero 无需微调,仅改动<文生图模型>推理函数实现文生视频(Arxiv 2023-03-23)

论文名&#xff1a;Text2Video-Zero: Text-to-Image Diffusion Models are Zero-Shot Video Generators 1. 摘要 1.1 方法总结 通过潜空间插值, 实现动作连续帧。 以第一帧为锚定&#xff0c;替换原模型的self-attention&#xff0c;改为cross-attention 实现 保证图片整体场…

Spring自动化创建脚本-解放繁琐的初始化配置!!!(自动化SSM整合)

一、实现功能(原创&#xff0c;转载请告知) 1.自动配置pom配置文件 2.自动识别数据库及数据表&#xff0c;创建Entity、Dao、Service、Controller等 3.自动创建database.properties、mybatis-config.xml等数据库文件 4.自动创建spring-dao.xml spring-mvc.xml …

Unity3D仿星露谷物语开发12之创建道具列表

1、目标 道具是游戏的核心部分&#xff0c;道具包括你可以拾取的东西&#xff0c;你可以使用的工具和你能种的东西等。 本节就是创建道具的信息类。同时了解ScriptableObject类的使用。 2、创建道具枚举类 修改Assets -> Scripts -> Enums.cs脚本&#xff0c; 新增如…

华为配置 之 RIP

简介&#xff1a; RIP&#xff08;路由信息协议&#xff09;是一种广泛使用的内部网关协议&#xff0c;基于距离向量算法来决定路径。它通过向全网广播路由控制信息来动态交换网络拓扑信息&#xff0c;从而计算出最佳路由路径。RIP易于配置和理解&#xff0c;非常适用于小型网络…

使用new String(“yupi”)语句在Java中会创建多少个对象?

在 Java 编程中&#xff0c;字符串的处理是一个常见且重要的部分。理解字符串对象的创建和内存管理对于编写高效和优化的代码至关重要。当我们在 Java 中使用 new String("yupi") 语句时&#xff0c;实际上会涉及到多个对象的创建。本文将详细解释这一过程&#xff0…

vue使用el-select下拉框自定义复选框

在 Vue 开发中&#xff0c;高效且美观的组件能极大地提升用户体验和开发效率。在vue中使用elementplus 的 el-select下拉框实现了一个自定义的多选下拉框组件。 一、代码功能概述 这段代码创建了一个可多选的下拉框组件&#xff0c;通过el-select和el-checkbox-group结合的方…

Python基于EasyOCR进行路灯控制箱图像文本识别项目实战

说明&#xff1a;这是一个机器学习实战项目&#xff08;附带数据代码文档视频讲解&#xff09;&#xff0c;如需数据代码文档视频讲解可以直接到文章最后关注获取。 1.项目背景 随着城市化进程的加快&#xff0c;智能城市建设成为了现代社会发展的重要方向。路灯作为城市基础设…