From adc82644cb7898d5bb8f7255f5381e16cd73faa6 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Fri, 29 Mar 2024 20:17:51 +0800 Subject: [PATCH 1/4] chore(deps): update --- .nvmrc | 2 +- package.json | 4 +-- pnpm-lock.yaml | 70 +++++++++++++++++++++++++------------------------- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.nvmrc b/.nvmrc index 2efc7e111..3f3309893 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.11.1 \ No newline at end of file +v20.12.0 \ No newline at end of file diff --git a/package.json b/package.json index 616366ac4..65f31cc4c 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "dayjs": "^1.11.10", "echarts": "^5.5.0", "el-table-infinite-scroll": "^3.0.3", - "element-plus": "^2.6.2", + "element-plus": "^2.6.3", "intro.js": "^7.2.0", "js-cookie": "^3.0.5", "jsbarcode": "^3.11.6", @@ -164,7 +164,7 @@ "svgo": "^3.2.0", "tailwindcss": "^3.4.3", "typescript": "^5.4.3", - "vite": "^5.2.6", + "vite": "^5.2.7", "vite-plugin-cdn-import": "^0.3.5", "vite-plugin-compression": "^0.5.1", "vite-plugin-fake-server": "^2.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f230dd7f5..a144f5547 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,10 +22,10 @@ dependencies: version: 1.2.23 '@pureadmin/descriptions': specifier: ^1.2.1 - version: 1.2.1(echarts@5.5.0)(element-plus@2.6.2)(typescript@5.4.3) + version: 1.2.1(echarts@5.5.0)(element-plus@2.6.3)(typescript@5.4.3) '@pureadmin/table': specifier: ^3.1.2 - version: 3.1.2(element-plus@2.6.2)(typescript@5.4.3) + version: 3.1.2(element-plus@2.6.3)(typescript@5.4.3) '@pureadmin/utils': specifier: ^2.4.7 version: 2.4.7(echarts@5.5.0)(vue@3.4.21) @@ -78,8 +78,8 @@ dependencies: specifier: ^3.0.3 version: 3.0.3(typescript@5.4.3) element-plus: - specifier: ^2.6.2 - version: 2.6.2(vue@3.4.21) + specifier: ^2.6.3 + version: 2.6.3(vue@3.4.21) intro.js: specifier: ^7.2.0 version: 7.2.0 @@ -115,7 +115,7 @@ dependencies: version: 3.19.6 plus-pro-components: specifier: ^0.0.5 - version: 0.0.5(element-plus@2.6.2)(vue@3.4.21) + version: 0.0.5(element-plus@2.6.3)(vue@3.4.21) qrcode: specifier: ^1.5.3 version: 1.5.3 @@ -258,10 +258,10 @@ devDependencies: version: 7.4.0(eslint@8.57.0)(typescript@5.4.3) '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.6)(vue@3.4.21) + version: 5.0.4(vite@5.2.7)(vue@3.4.21) '@vitejs/plugin-vue-jsx': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.6)(vue@3.4.21) + version: 3.1.0(vite@5.2.7)(vue@3.4.21) autoprefixer: specifier: ^10.4.19 version: 10.4.19(postcss@8.4.38) @@ -350,14 +350,14 @@ devDependencies: specifier: ^5.4.3 version: 5.4.3 vite: - specifier: ^5.2.6 - version: 5.2.6(@types/node@20.11.30)(sass@1.72.0) + specifier: ^5.2.7 + version: 5.2.7(@types/node@20.11.30)(sass@1.72.0) vite-plugin-cdn-import: specifier: ^0.3.5 version: 0.3.5(rollup@2.79.1) vite-plugin-compression: specifier: ^0.5.1 - version: 0.5.1(vite@5.2.6) + version: 0.5.1(vite@5.2.7) vite-plugin-fake-server: specifier: ^2.1.1 version: 2.1.1 @@ -1629,7 +1629,7 @@ packages: pathe: 1.1.2 picocolors: 1.0.0 source-map-js: 1.2.0 - unplugin: 1.10.0 + unplugin: 1.10.1 vue-i18n: 9.10.2(vue@3.4.21) transitivePeerDependencies: - rollup @@ -2015,26 +2015,26 @@ packages: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} dev: false - /@pureadmin/descriptions@1.2.1(echarts@5.5.0)(element-plus@2.6.2)(typescript@5.4.3): + /@pureadmin/descriptions@1.2.1(echarts@5.5.0)(element-plus@2.6.3)(typescript@5.4.3): resolution: {integrity: sha512-7jDJuqz8xnhcmwXdWQnBzOYeX2WK27TRFaVgs9AdiRr+DnKb9W+krHByJwQtxo5lg4qyRh4/IWQGEMfhC2ljeQ==} peerDependencies: element-plus: ^2.0.0 dependencies: '@element-plus/icons-vue': 2.3.1(vue@3.4.21) '@pureadmin/utils': 2.4.7(echarts@5.5.0)(vue@3.4.21) - element-plus: 2.6.2(vue@3.4.21) + element-plus: 2.6.3(vue@3.4.21) vue: 3.4.21(typescript@5.4.3) transitivePeerDependencies: - echarts - typescript dev: false - /@pureadmin/table@3.1.2(element-plus@2.6.2)(typescript@5.4.3): + /@pureadmin/table@3.1.2(element-plus@2.6.3)(typescript@5.4.3): resolution: {integrity: sha512-6GrZCjBDFn/kKjn/HGkx0BH9RiArg5QktPN2u5PNpzHBhZZXWMoFcKCkysWLfDdWfpCowQWgnOpr0KjTPEgT0A==} peerDependencies: element-plus: ^2.0.0 dependencies: - element-plus: 2.6.2(vue@3.4.21) + element-plus: 2.6.3(vue@3.4.21) vue: 3.4.21(typescript@5.4.3) transitivePeerDependencies: - typescript @@ -2591,7 +2591,7 @@ packages: nanoid: 3.3.7 dev: false - /@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.6)(vue@3.4.21): + /@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.7)(vue@3.4.21): resolution: {integrity: sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2601,20 +2601,20 @@ packages: '@babel/core': 7.24.3 '@babel/plugin-transform-typescript': 7.24.1(@babel/core@7.24.3) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.3) - vite: 5.2.6(@types/node@20.11.30)(sass@1.72.0) + vite: 5.2.7(@types/node@20.11.30)(sass@1.72.0) vue: 3.4.21(typescript@5.4.3) transitivePeerDependencies: - supports-color dev: true - /@vitejs/plugin-vue@5.0.4(vite@5.2.6)(vue@3.4.21): + /@vitejs/plugin-vue@5.0.4(vite@5.2.7)(vue@3.4.21): resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.2.6(@types/node@20.11.30)(sass@1.72.0) + vite: 5.2.7(@types/node@20.11.30)(sass@1.72.0) vue: 3.4.21(typescript@5.4.3) dev: true @@ -3508,7 +3508,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001600 - electron-to-chromium: 1.4.720 + electron-to-chromium: 1.4.721 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) @@ -4552,15 +4552,15 @@ packages: resolution: {integrity: sha512-cmMHg4MxrNOV2dFziV3ISRo+rM/3tAH8TE3wWMGKd4ucjvk21Bfb6MJfPuNAicLOkq4fYZm+J+mr0NmDPnvolQ==} dependencies: core-js: 3.36.1 - element-plus: 2.6.2(vue@3.4.21) + element-plus: 2.6.3(vue@3.4.21) vue: 3.4.21(typescript@5.4.3) transitivePeerDependencies: - '@vue/composition-api' - typescript dev: false - /electron-to-chromium@1.4.720: - resolution: {integrity: sha512-5zwcKNkOj3GN0jBzpcpGonNPkn667VJpQwRYWdo/TiJEHTQswZyA/vALhZFiAXgL5NuK9UarX1tbdvXu3hG6Yw==} + /electron-to-chromium@1.4.721: + resolution: {integrity: sha512-k1x2r6foI8iJOp+1qTxbbrrWMsOiHkzGBYwYigaq+apO1FSqtn44KTo3Sy69qt7CRr7149zTcsDvH7MUKsOuIQ==} /element-plus@2.1.4(@types/lodash-es@4.17.12)(vue@3.4.21): resolution: {integrity: sha512-pcwgDbKUrzyWbixYB/zIbLPLBQ/NPGPJnGXJ+jYozUSthPW4SuriaUGJKgbAE6PDBAtw3IodiT2E2GbiaZLxww==} @@ -4585,8 +4585,8 @@ packages: - '@vue/composition-api' dev: false - /element-plus@2.6.2(vue@3.4.21): - resolution: {integrity: sha512-WFMv1v83l437Xu+GeeM+ytxd9VUQpR4418BowvTVIPYItsoj6yK0ITIuSv19iCesF405FbAOaCIHXhJch0ilFA==} + /element-plus@2.6.3(vue@3.4.21): + resolution: {integrity: sha512-U4L/mr+1r+EmAUYUHrs0V/8hHMdBGP07rPymSC72LZCN4jK1UwygQYICegTQ5us4mxeqBvW6wfoEfo003fwCqw==} peerDependencies: vue: ^3.2.0 dependencies: @@ -7375,14 +7375,14 @@ packages: mlly: 1.6.1 pathe: 1.1.2 - /plus-pro-components@0.0.5(element-plus@2.6.2)(vue@3.4.21): + /plus-pro-components@0.0.5(element-plus@2.6.3)(vue@3.4.21): resolution: {integrity: sha512-kNheJk3pVs/atgfpeTAlaLg5GFZXUXe0NkHbnPOyUu05znbh8clgS9eEeCNpAglPY1fcYaXpVNgqOJIJ72EOSQ==} peerDependencies: element-plus: ^2.3.4 vue: ^3.2.0 dependencies: '@element-plus/icons-vue': 2.3.1(vue@3.4.21) - element-plus: 2.6.2(vue@3.4.21) + element-plus: 2.6.3(vue@3.4.21) lodash-es: 4.17.21 sortablejs: 1.15.2 vue: 3.4.21(typescript@5.4.3) @@ -9289,7 +9289,7 @@ packages: acorn: 8.11.3 estree-walker: 3.0.3 magic-string: 0.30.8 - unplugin: 1.10.0 + unplugin: 1.10.1 dev: false optional: true @@ -9316,7 +9316,7 @@ packages: pkg-types: 1.0.3 scule: 1.3.0 strip-literal: 1.3.0 - unplugin: 1.10.0 + unplugin: 1.10.1 transitivePeerDependencies: - rollup dev: false @@ -9332,8 +9332,8 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unplugin@1.10.0: - resolution: {integrity: sha512-CuZtvvO8ua2Wl+9q2jEaqH6m3DoQ38N7pvBYQbbaeNlWGvK2l6GHiKi29aIHDPoSxdUzQ7Unevf1/ugil5X6Pg==} + /unplugin@1.10.1: + resolution: {integrity: sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg==} engines: {node: '>=14.0.0'} dependencies: acorn: 8.11.3 @@ -9435,7 +9435,7 @@ packages: - rollup dev: true - /vite-plugin-compression@0.5.1(vite@5.2.6): + /vite-plugin-compression@0.5.1(vite@5.2.7): resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} peerDependencies: vite: '>=2.0.0' @@ -9443,7 +9443,7 @@ packages: chalk: 4.1.2 debug: 4.3.4 fs-extra: 10.1.0 - vite: 5.2.6(@types/node@20.11.30)(sass@1.72.0) + vite: 5.2.7(@types/node@20.11.30)(sass@1.72.0) transitivePeerDependencies: - supports-color dev: true @@ -9475,8 +9475,8 @@ packages: vue: 3.4.21(typescript@5.4.3) dev: true - /vite@5.2.6(@types/node@20.11.30)(sass@1.72.0): - resolution: {integrity: sha512-FPtnxFlSIKYjZ2eosBQamz4CbyrTizbZ3hnGJlh/wMtCrlp1Hah6AzBLjGI5I2urTfNnpovpHdrL6YRuBOPnCA==} + /vite@5.2.7(@types/node@20.11.30)(sass@1.72.0): + resolution: {integrity: sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: From 53e3e601fb80ce7e2032f9f77e54338eef52cdf9 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Sat, 30 Mar 2024 23:45:56 +0800 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20=E5=8D=87=E7=BA=A7=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=EF=BC=8C=E7=9B=B8=E5=85=B3=E5=85=BC=E5=AE=B9=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/plugins.ts | 3 +- package.json | 8 +-- pnpm-lock.yaml | 125 +++++++++++++++++++++++++---------------------- 3 files changed, 71 insertions(+), 65 deletions(-) diff --git a/build/plugins.ts b/build/plugins.ts index e9005cff3..04568ac6e 100644 --- a/build/plugins.ts +++ b/build/plugins.ts @@ -24,8 +24,7 @@ export function getPluginsList( // jsx、tsx语法支持 vueJsx(), VueI18nPlugin({ - runtimeOnly: true, - compositionOnly: true, + jitCompilation: false, include: [pathResolve("../locales/**")] }), viteBuildInfo(), diff --git a/package.json b/package.json index 65f31cc4c..2302f64bb 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@amap/amap-jsapi-loader": "^1.0.1", "@howdyjs/mouse-menu": "^2.1.3", - "@infectoone/vue-ganttastic": "^2.3.1", + "@infectoone/vue-ganttastic": "^2.3.2", "@logicflow/core": "^1.2.23", "@logicflow/extension": "^1.2.23", "@pureadmin/descriptions": "^1.2.1", @@ -84,7 +84,7 @@ "path": "^0.12.7", "pinia": "^2.1.7", "pinyin-pro": "^3.19.6", - "plus-pro-components": "^0.0.5", + "plus-pro-components": "^0.0.7", "qrcode": "^1.5.3", "qs": "^6.12.0", "responsive-storage": "^2.2.0", @@ -120,13 +120,13 @@ "@iconify-icons/ep": "^1.2.12", "@iconify-icons/ri": "^1.2.10", "@iconify/vue": "^4.1.1", - "@intlify/unplugin-vue-i18n": "^2.0.0", + "@intlify/unplugin-vue-i18n": "^4.0.0", "@pureadmin/theme": "^3.2.0", "@types/dagre": "^0.7.52", "@types/gradient-string": "^1.1.5", "@types/intro.js": "^5.1.5", "@types/js-cookie": "^3.0.6", - "@types/node": "^20.11.30", + "@types/node": "^20.12.2", "@types/nprogress": "^0.2.3", "@types/qrcode": "^1.5.5", "@types/qs": "^6.9.14", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a144f5547..79ad4f6f1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^2.1.3 version: 2.1.3(vue@3.4.21) '@infectoone/vue-ganttastic': - specifier: ^2.3.1 - version: 2.3.1(dayjs@1.11.10)(vue@3.4.21) + specifier: ^2.3.2 + version: 2.3.2(dayjs@1.11.10)(vue@3.4.21) '@logicflow/core': specifier: ^1.2.23 version: 1.2.23 @@ -114,8 +114,8 @@ dependencies: specifier: ^3.19.6 version: 3.19.6 plus-pro-components: - specifier: ^0.0.5 - version: 0.0.5(element-plus@2.6.3)(vue@3.4.21) + specifier: ^0.0.7 + version: 0.0.7(element-plus@2.6.3)(vue@3.4.21) qrcode: specifier: ^1.5.3 version: 1.5.3 @@ -195,7 +195,7 @@ dependencies: devDependencies: '@commitlint/cli': specifier: ^19.2.1 - version: 19.2.1(@types/node@20.11.30)(typescript@5.4.3) + version: 19.2.1(@types/node@20.12.2)(typescript@5.4.3) '@commitlint/config-conventional': specifier: ^19.1.0 version: 19.1.0 @@ -218,8 +218,8 @@ devDependencies: specifier: ^4.1.1 version: 4.1.1(vue@3.4.21) '@intlify/unplugin-vue-i18n': - specifier: ^2.0.0 - version: 2.0.0(rollup@2.79.1)(vue-i18n@9.10.2) + specifier: ^4.0.0 + version: 4.0.0(rollup@2.79.1)(vue-i18n@9.10.2) '@pureadmin/theme': specifier: ^3.2.0 version: 3.2.0 @@ -236,8 +236,8 @@ devDependencies: specifier: ^3.0.6 version: 3.0.6 '@types/node': - specifier: ^20.11.30 - version: 20.11.30 + specifier: ^20.12.2 + version: 20.12.2 '@types/nprogress': specifier: ^0.2.3 version: 0.2.3 @@ -351,7 +351,7 @@ devDependencies: version: 5.4.3 vite: specifier: ^5.2.7 - version: 5.2.7(@types/node@20.11.30)(sass@1.72.0) + version: 5.2.7(@types/node@20.12.2)(sass@1.72.0) vite-plugin-cdn-import: specifier: ^0.3.5 version: 0.3.5(rollup@2.79.1) @@ -799,14 +799,14 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: false - /@commitlint/cli@19.2.1(@types/node@20.11.30)(typescript@5.4.3): + /@commitlint/cli@19.2.1(@types/node@20.12.2)(typescript@5.4.3): resolution: {integrity: sha512-cbkYUJsLqRomccNxvoJTyv5yn0bSy05BBizVyIcLACkRbVUqYorC351Diw/XFSWC/GtpwiwT2eOvQgFZa374bg==} engines: {node: '>=v18'} hasBin: true dependencies: '@commitlint/format': 19.0.3 '@commitlint/lint': 19.1.0 - '@commitlint/load': 19.2.0(@types/node@20.11.30)(typescript@5.4.3) + '@commitlint/load': 19.2.0(@types/node@20.12.2)(typescript@5.4.3) '@commitlint/read': 19.2.1 '@commitlint/types': 19.0.3 execa: 8.0.1 @@ -875,7 +875,7 @@ packages: '@commitlint/types': 19.0.3 dev: true - /@commitlint/load@19.2.0(@types/node@20.11.30)(typescript@5.4.3): + /@commitlint/load@19.2.0(@types/node@20.12.2)(typescript@5.4.3): resolution: {integrity: sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==} engines: {node: '>=v18'} dependencies: @@ -885,7 +885,7 @@ packages: '@commitlint/types': 19.0.3 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.4.3) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.30)(cosmiconfig@9.0.0)(typescript@5.4.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.12.2)(cosmiconfig@9.0.0)(typescript@5.4.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -1547,8 +1547,8 @@ packages: vue: 3.4.21(typescript@5.4.3) dev: true - /@infectoone/vue-ganttastic@2.3.1(dayjs@1.11.10)(vue@3.4.21): - resolution: {integrity: sha512-2P53V2N3SagJhqDMogcfpm50qIhqxEINufJBdWUGGZutnEquLg4CQThHysJsNZ11tght8TUPlBM10wHnZAMGiQ==} + /@infectoone/vue-ganttastic@2.3.2(dayjs@1.11.10)(vue@3.4.21): + resolution: {integrity: sha512-krxHdlZvo4cdS4axQ99qb756RzwieI7LcyY2vAIehJ5Sxd/jz5Pu/vTplTC0Rxqj8T4v1knYPK9uvTMkQYWYng==} peerDependencies: dayjs: ^1.11.5 vue: ^3.2.40 @@ -1560,8 +1560,8 @@ packages: - '@vue/composition-api' dev: false - /@intlify/bundle-utils@7.5.1(vue-i18n@9.10.2): - resolution: {integrity: sha512-UovJl10oBIlmYEcWw+VIHdKY5Uv5sdPG0b/b6bOYxGLln3UwB75+2dlc0F3Fsa0RhoznQ5Rp589/BZpABpE4Xw==} + /@intlify/bundle-utils@8.0.0(vue-i18n@9.10.2): + resolution: {integrity: sha512-1B++zykRnMwQ+20SpsZI1JCnV/YJt9Oq7AGlEurzkWJOFtFAVqaGc/oV36PBRYeiKnTbY9VYfjBimr2Vt42wLQ==} engines: {node: '>= 14.16'} peerDependencies: petite-vue-i18n: '*' @@ -1578,7 +1578,6 @@ packages: escodegen: 2.1.0 estree-walker: 2.0.2 jsonc-eslint-parser: 2.4.0 - magic-string: 0.30.8 mlly: 1.6.1 source-map-js: 1.2.0 vue-i18n: 9.10.2(vue@3.4.21) @@ -1603,8 +1602,8 @@ packages: resolution: {integrity: sha512-ttHCAJkRy7R5W2S9RVnN9KYQYPIpV2+GiS79T4EE37nrPyH6/1SrOh3bmdCRC1T3ocL8qCDx7x2lBJ0xaITU7Q==} engines: {node: '>= 16'} - /@intlify/unplugin-vue-i18n@2.0.0(rollup@2.79.1)(vue-i18n@9.10.2): - resolution: {integrity: sha512-1oKvm92L9l2od2H9wKx2ZvR4tzn7gUtd7bPLI7AWUmm7U9H1iEypndt5d985ypxGsEs0gToDaKTrytbBIJwwSg==} + /@intlify/unplugin-vue-i18n@4.0.0(rollup@2.79.1)(vue-i18n@9.10.2): + resolution: {integrity: sha512-q2Mhqa/mLi0tulfLFO4fMXXvEbkSZpI5yGhNNsLTNJJ41icEGUuyDe+j5zRZIKSkOJRgX6YbCyibTDJdRsukmw==} engines: {node: '>= 14.16'} peerDependencies: petite-vue-i18n: '*' @@ -1618,7 +1617,7 @@ packages: vue-i18n-bridge: optional: true dependencies: - '@intlify/bundle-utils': 7.5.1(vue-i18n@9.10.2) + '@intlify/bundle-utils': 8.0.0(vue-i18n@9.10.2) '@intlify/shared': 9.10.2 '@rollup/pluginutils': 5.1.0(rollup@2.79.1) '@vue/compiler-sfc': 3.4.21 @@ -1669,7 +1668,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -1690,7 +1689,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 @@ -1727,7 +1726,7 @@ packages: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 jest-mock: 27.5.1 dev: false @@ -1737,7 +1736,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 20.11.30 + '@types/node': 20.12.2 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -1766,7 +1765,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1850,7 +1849,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.2 '@types/yargs': 16.0.9 chalk: 4.1.2 dev: false @@ -1955,7 +1954,7 @@ packages: hash-sum: 2.0.0 ignore: 5.3.1 jiti: 1.21.0 - knitwork: 1.0.0 + knitwork: 1.1.0 mlly: 1.6.1 pathe: 1.1.2 pkg-types: 1.0.3 @@ -2074,6 +2073,7 @@ packages: /@rollup/pluginutils@5.1.0(rollup@2.79.1): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} + requiresBuild: true peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: @@ -2281,7 +2281,7 @@ packages: /@types/conventional-commits-parser@5.0.0: resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.2 dev: true /@types/dagre@0.7.52: @@ -2298,7 +2298,7 @@ packages: /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.2 dev: false /@types/gradient-string@1.1.5: @@ -2349,8 +2349,8 @@ packages: resolution: {integrity: sha512-qL0hyIMNPow317QWW/63RvL1x5MVMV+Ru3NaY9f/CuEpCqrmb7WeuK2071ZY5hczOnm38qExWM2i2WtkXLSqFw==} dev: false - /@types/node@20.11.30: - resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + /@types/node@20.12.2: + resolution: {integrity: sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==} dependencies: undici-types: 5.26.5 @@ -2365,7 +2365,7 @@ packages: /@types/qrcode@1.5.5: resolution: {integrity: sha512-CdfBi/e3Qk+3Z/fXYShipBT13OJ2fDO2Q2w5CIP5anLTLIndQG9z6P1cnm+8zCWSpm5dnxMFd/uREtb0EXuQzg==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.2 dev: true /@types/qs@6.9.14: @@ -2601,7 +2601,7 @@ packages: '@babel/core': 7.24.3 '@babel/plugin-transform-typescript': 7.24.1(@babel/core@7.24.3) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.3) - vite: 5.2.7(@types/node@20.11.30)(sass@1.72.0) + vite: 5.2.7(@types/node@20.12.2)(sass@1.72.0) vue: 3.4.21(typescript@5.4.3) transitivePeerDependencies: - supports-color @@ -2614,7 +2614,7 @@ packages: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.2.7(@types/node@20.11.30)(sass@1.72.0) + vite: 5.2.7(@types/node@20.12.2)(sass@1.72.0) vue: 3.4.21(typescript@5.4.3) dev: true @@ -3508,7 +3508,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001600 - electron-to-chromium: 1.4.721 + electron-to-chromium: 1.4.722 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) @@ -3919,7 +3919,7 @@ packages: requiresBuild: true dev: false - /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.30)(cosmiconfig@9.0.0)(typescript@5.4.3): + /cosmiconfig-typescript-loader@5.0.0(@types/node@20.12.2)(cosmiconfig@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} engines: {node: '>=v16'} peerDependencies: @@ -3927,7 +3927,7 @@ packages: cosmiconfig: '>=8.2' typescript: '>=4' dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.2 cosmiconfig: 9.0.0(typescript@5.4.3) jiti: 1.21.0 typescript: 5.4.3 @@ -4559,8 +4559,8 @@ packages: - typescript dev: false - /electron-to-chromium@1.4.721: - resolution: {integrity: sha512-k1x2r6foI8iJOp+1qTxbbrrWMsOiHkzGBYwYigaq+apO1FSqtn44KTo3Sy69qt7CRr7149zTcsDvH7MUKsOuIQ==} + /electron-to-chromium@1.4.722: + resolution: {integrity: sha512-5nLE0TWFFpZ80Crhtp4pIp8LXCztjYX41yUcV6b+bKR2PqzjskTMOOlBi1VjBHlvHwS+4gar7kNKOrsbsewEZQ==} /element-plus@2.1.4(@types/lodash-es@4.17.12)(vue@3.4.21): resolution: {integrity: sha512-pcwgDbKUrzyWbixYB/zIbLPLBQ/NPGPJnGXJ+jYozUSthPW4SuriaUGJKgbAE6PDBAtw3IodiT2E2GbiaZLxww==} @@ -5864,7 +5864,7 @@ packages: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -5989,7 +5989,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0 @@ -6007,7 +6007,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 jest-mock: 27.5.1 jest-util: 27.5.1 dev: false @@ -6023,7 +6023,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.9 - '@types/node': 20.11.30 + '@types/node': 20.12.2 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -6045,7 +6045,7 @@ packages: '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 chalk: 4.1.2 co: 4.6.0 expect: 27.5.1 @@ -6100,7 +6100,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 dev: false /jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -6156,7 +6156,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 chalk: 4.1.2 emittery: 0.8.1 graceful-fs: 4.2.11 @@ -6213,7 +6213,7 @@ packages: resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.2 graceful-fs: 4.2.11 dev: false @@ -6252,7 +6252,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -6277,7 +6277,7 @@ packages: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.11.30 + '@types/node': 20.12.2 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 @@ -6288,7 +6288,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.2 merge-stream: 2.0.0 supports-color: 8.1.1 dev: false @@ -6467,8 +6467,8 @@ packages: engines: {node: '>=6'} dev: false - /knitwork@1.0.0: - resolution: {integrity: sha512-dWl0Dbjm6Xm+kDxhPQJsCBTxrJzuGl0aP9rhr+TG8D3l+GL90N8O8lYUi7dTSAN2uuDqCtNgb6aEuQH5wsiV8Q==} + /knitwork@1.1.0: + resolution: {integrity: sha512-oHnmiBUVHz1V+URE77PNot2lv3QiYU2zQf1JjOVkMt3YDKGbu8NAFr+c4mcNOhdsGrB/VpVbRwPwhiXrPhxQbw==} requiresBuild: true dev: false optional: true @@ -6890,6 +6890,7 @@ packages: /mlly@1.6.1: resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} + requiresBuild: true dependencies: acorn: 8.11.3 pathe: 1.1.2 @@ -7299,6 +7300,7 @@ packages: /pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + requiresBuild: true /pdfjs-dist@3.11.174: resolution: {integrity: sha512-TdTZPf1trZ8/UFu5Cx/GXB7GZM30LT+wWUNfsi6Bq8ePLnb+woNKtDymI2mxZYBpMbonNFqKmiz684DIfnd8dA==} @@ -7370,13 +7372,14 @@ packages: /pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + requiresBuild: true dependencies: jsonc-parser: 3.2.1 mlly: 1.6.1 pathe: 1.1.2 - /plus-pro-components@0.0.5(element-plus@2.6.3)(vue@3.4.21): - resolution: {integrity: sha512-kNheJk3pVs/atgfpeTAlaLg5GFZXUXe0NkHbnPOyUu05znbh8clgS9eEeCNpAglPY1fcYaXpVNgqOJIJ72EOSQ==} + /plus-pro-components@0.0.7(element-plus@2.6.3)(vue@3.4.21): + resolution: {integrity: sha512-VPSbcjkMEb7e3+0Yf3VLr/CWDh4vzs+luvTd+X28jAbQTuPcYsD+SE2hvitZI/R4F3AZLzdxspxZkbMTJ6VDdw==} peerDependencies: element-plus: ^2.3.4 vue: ^3.2.0 @@ -9281,6 +9284,7 @@ packages: /ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} + requiresBuild: true /unctx@2.3.1: resolution: {integrity: sha512-PhKke8ZYauiqh3FEMVNm7ljvzQiph0Mt3GBRve03IJm7ukfaON2OBK795tLwhbyfzknuRRkW0+Ze+CQUmzOZ+A==} @@ -9335,6 +9339,7 @@ packages: /unplugin@1.10.1: resolution: {integrity: sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg==} engines: {node: '>=14.0.0'} + requiresBuild: true dependencies: acorn: 8.11.3 chokidar: 3.6.0 @@ -9443,7 +9448,7 @@ packages: chalk: 4.1.2 debug: 4.3.4 fs-extra: 10.1.0 - vite: 5.2.7(@types/node@20.11.30)(sass@1.72.0) + vite: 5.2.7(@types/node@20.12.2)(sass@1.72.0) transitivePeerDependencies: - supports-color dev: true @@ -9475,7 +9480,7 @@ packages: vue: 3.4.21(typescript@5.4.3) dev: true - /vite@5.2.7(@types/node@20.11.30)(sass@1.72.0): + /vite@5.2.7(@types/node@20.12.2)(sass@1.72.0): resolution: {integrity: sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -9503,7 +9508,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.2 esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.13.2 @@ -9756,9 +9761,11 @@ packages: /webpack-sources@3.2.3: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} + requiresBuild: true /webpack-virtual-modules@0.6.1: resolution: {integrity: sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==} + requiresBuild: true /whatwg-encoding@1.0.5: resolution: {integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==} From e0f52fc379d0c6a71a0306a6e89a740ca356fbcf Mon Sep 17 00:00:00 2001 From: hb0730 <1278032416@qq.com> Date: Sun, 31 Mar 2024 12:37:10 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E5=88=86=E6=AE=B5=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=99=A8=E7=BB=84=E4=BB=B6=E6=B7=BB=E5=8A=A0=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E7=A6=81=E7=94=A8=E5=B1=9E=E6=80=A7`disabled`=20(#104?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: segmented component global disabled --- src/components/ReSegmented/src/index.tsx | 21 +++++++++++++++------ src/views/components/segmented.vue | 3 +++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/components/ReSegmented/src/index.tsx b/src/components/ReSegmented/src/index.tsx index 2c66b58fb..5d20005e0 100644 --- a/src/components/ReSegmented/src/index.tsx +++ b/src/components/ReSegmented/src/index.tsx @@ -34,9 +34,14 @@ const props = { type: Boolean, default: false }, - /** 控件尺寸 */ + /** 控件尺寸 */ size: { type: String as PropType<"small" | "default" | "large"> + }, + /** 是否全局禁用,默认 `false` */ + disabled: { + type: Boolean, + default: false } }; @@ -57,7 +62,7 @@ export default defineComponent({ : ref(0); function handleChange({ option, index }, event: Event) { - if (option.disabled) return; + if (props.disabled || option.disabled) return; event.preventDefault(); isNumber(props.modelValue) ? emit("update:modelValue", index) @@ -67,6 +72,7 @@ export default defineComponent({ } function handleMouseenter({ option, index }, event: Event) { + if (props.disabled) return; event.preventDefault(); curMouseActive.value = index; if (option.disabled || curIndex.value === index) { @@ -79,6 +85,7 @@ export default defineComponent({ } function handleMouseleave(_, event: Event) { + if (props.disabled) return; event.preventDefault(); curMouseActive.value = -1; } @@ -124,14 +131,16 @@ export default defineComponent({ ref={`labelRef${index}`} class={[ "pure-segmented-item", - option?.disabled && "pure-segmented-item-disabled" + (props.disabled || option?.disabled) && + "pure-segmented-item-disabled" ]} style={{ background: curMouseActive.value === index ? segmentedItembg.value : "", - color: - !option.disabled && - (curIndex.value === index || curMouseActive.value === index) + color: props.disabled + ? null + : !option.disabled && + (curIndex.value === index || curMouseActive.value === index) ? isDark.value ? "rgba(255, 255, 255, 0.85)" : "rgba(0,0,0,.88)" diff --git a/src/views/components/segmented.vue b/src/views/components/segmented.vue index 98bda096b..d13f2e371 100644 --- a/src/views/components/segmented.vue +++ b/src/views/components/segmented.vue @@ -240,6 +240,9 @@ watch(size, val => (dynamicSize.value = size.value));
禁用
全局禁用
+block 属性(将宽度调整为父元素宽度)