diff --git a/.gitignore b/.gitignore index c4c9a28a..4ada278d 100644 --- a/.gitignore +++ b/.gitignore @@ -42,11 +42,14 @@ nbdist/ *.log *.xml.versionsBackup *.swp +hs_err_pid*.log .DS_Store node_modules /dist /doc +.yarn +logs/ # local env files .env.local @@ -58,6 +61,10 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* +# Yarn PnP +.pnp.cjs +.pnp.loader.mjs + # Editor directories and files .idea .vscode diff --git a/yanzhu-ui-vue3/.gitignore b/yanzhu-ui-vue3/.gitignore index 394faca1..e4b25d96 100644 --- a/yanzhu-ui-vue3/.gitignore +++ b/yanzhu-ui-vue3/.gitignore @@ -1,5 +1,8 @@ .DS_Store -node_modules/ +node_modules +.yarn +.pnp.cjs +.pnp.loader.mjs dist/ npm-debug.log* yarn-debug.log* diff --git a/yanzhu-ui-vue3/.yarnrc.yml b/yanzhu-ui-vue3/.yarnrc.yml new file mode 100644 index 00000000..6cc666db --- /dev/null +++ b/yanzhu-ui-vue3/.yarnrc.yml @@ -0,0 +1,13 @@ +nodeLinker: pnp + +packageExtensions: + vite-plugin-svg-icons@*: + dependencies: + fast-glob: "*" + svg-sprite: "*" + element-plus@*: + dependencies: + "@vue/shared": "*" + htm@*: + dependencies: + preact: "*" diff --git a/yanzhu-ui-vue3/package.json b/yanzhu-ui-vue3/package.json index bc6e4756..321f6425 100644 --- a/yanzhu-ui-vue3/package.json +++ b/yanzhu-ui-vue3/package.json @@ -6,11 +6,17 @@ "type": "module", "license": "MIT", "scripts": { + "predev": "node scripts/check-yarn.js", "dev": "vite", + "predev:prod": "node scripts/check-yarn.js", "dev:prod": "vite --mode production", + "prebuild:prod": "node scripts/check-yarn.js", "build:prod": "vite build && npm run pkg", + "prebuild:stage": "node scripts/check-yarn.js", "build:stage": "vite build --mode staging", + "prepkg": "node scripts/check-yarn.js", "pkg": "node make.cjs", + "prepreview": "node scripts/check-yarn.js", "preview": "vite preview" }, "repository": { @@ -20,10 +26,12 @@ "dependencies": { "@element-plus/icons-vue": "2.3.1", "@rollup/plugin-commonjs": "^28.0.0", + "@vue/reactivity": "3.4.31", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "10.11.0", "axios": "0.28.1", "bpmn-js": "^11.4.1", + "dayjs": "^1.11.19", "diagram-js": "^11.9.1", "echarts": "5.5.1", "element-plus": "^2.8.5", @@ -31,9 +39,13 @@ "file-saver": "2.0.5", "fuse.js": "6.6.2", "highlight.js": "11.7.0", + "inherits": "2.0.4", "js-base64": "^3.7.5", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", + "lodash-es": "4.17.23", + "lodash.clonedeep": "4.5.0", + "min-dash": "4.2.3", "nprogress": "0.2.0", "pinia": "2.1.7", "qs": "^6.14.0", diff --git a/yanzhu-ui-vue3/scripts/check-yarn.js b/yanzhu-ui-vue3/scripts/check-yarn.js new file mode 100755 index 00000000..12f34ca3 --- /dev/null +++ b/yanzhu-ui-vue3/scripts/check-yarn.js @@ -0,0 +1,22 @@ +#!/usr/bin/env node + +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const packageManager = process.env.npm_config_user_agent || ''; +const isYarn = packageManager.includes('yarn'); +const isPnP = fs.existsSync(__dirname + '/../.pnp.cjs'); + +if (!isYarn && isPnP) { + console.log('\x1b[33m%s\x1b[0m', '⚠️ 警告:此项目使用 Yarn 4 PnP 模式'); + console.log('\x1b[33m%s\x1b[0m', '⚠️ 请使用 yarn 命令而不是 npm'); + console.log('\x1b[36m%s\x1b[0m', '✓ 推荐命令:yarn dev'); + console.log('\x1b[36m%s\x1b[0m', '✓ 安装依赖:yarn install'); + console.log('\x1b[36m%s\x1b[0m', '✓ 添加依赖:yarn add '); + console.log(''); + process.exit(1); +} diff --git a/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue b/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue index 1c415eef..6f805702 100644 --- a/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue @@ -51,6 +51,13 @@ + + + +