refactor: naive-ui版本升级,naive全局API挂载方式修改

This commit is contained in:
thelostword
2022-10-28 18:15:51 +08:00
parent c0d3e11346
commit c504e61d70
13 changed files with 201 additions and 179 deletions

View File

@@ -41,7 +41,7 @@
"lodash-es": "^4.17.21",
"mitt": "^2.1.0",
"mockjs": "^1.1.0",
"naive-ui": "^2.28.4",
"naive-ui": "^2.33.5",
"pinia": "^2.0.14",
"qs": "^6.10.3",
"vfonts": "^0.1.0",

228
pnpm-lock.yaml generated
View File

@@ -1,4 +1,4 @@
lockfileVersion: 5.3
lockfileVersion: 5.4
specifiers:
'@commitlint/cli': ^12.1.4
@@ -41,7 +41,7 @@ specifiers:
lodash-es: ^4.17.21
mitt: ^2.1.0
mockjs: ^1.1.0
naive-ui: ^2.28.4
naive-ui: ^2.33.5
pinia: ^2.0.14
postcss: ^8.4.13
prettier: ^2.6.2
@@ -82,8 +82,8 @@ dependencies:
lodash-es: 4.17.21
mitt: 2.1.0
mockjs: 1.1.0
naive-ui: 2.28.4_vue@3.2.33
pinia: 2.0.14_typescript@4.6.4+vue@3.2.33
naive-ui: 2.33.5_vue@3.2.33
pinia: 2.0.14_ytvqwwdyss532bvoq2clv4ed5m
qs: 6.10.3
vfonts: 0.1.0
vue: 3.2.33
@@ -96,12 +96,12 @@ devDependencies:
'@commitlint/config-conventional': 12.1.4
'@types/lodash': 4.14.182
'@types/node': 15.14.9
'@typescript-eslint/eslint-plugin': 4.33.0_5e731fab734ce085fc02cd0ecce6c061
'@typescript-eslint/parser': 4.33.0_eslint@7.32.0+typescript@4.6.4
'@typescript-eslint/eslint-plugin': 4.33.0_lzzr7k3tjtqil7aczuhmzzwame
'@typescript-eslint/parser': 4.33.0_e4zyhrvfnqudwdx5bevnvkluy4
'@vitejs/plugin-vue': 1.10.2_vite@2.9.8
'@vitejs/plugin-vue-jsx': 1.3.10
'@vue/compiler-sfc': 3.2.33
'@vue/eslint-config-typescript': 7.0.0_f2c1c083ca9f8be5792c7dca889a98e3
'@vue/eslint-config-typescript': 7.0.0_ouruxyytcwyhkqobi3chucf3me
autoprefixer: 10.4.7_postcss@8.4.13
commitizen: 4.2.4
core-js: 3.22.5
@@ -109,8 +109,8 @@ devDependencies:
eslint: 7.32.0
eslint-config-prettier: 8.5.0_eslint@7.32.0
eslint-define-config: 1.0.9
eslint-plugin-jest: 24.7.0_d82317357d846caee0597ee585a8a89b
eslint-plugin-prettier: 3.4.1_2544802fe0b6e1e28814bd742f96f471
eslint-plugin-jest: 24.7.0_3arronl5qrwk5yczp3sylkfitm
eslint-plugin-prettier: 3.4.1_evcial7aw3q6fcauxv2c7fxuoe
eslint-plugin-vue: 7.20.0_eslint@7.32.0
esno: 0.7.3
gh-pages: 3.2.3
@@ -128,7 +128,7 @@ devDependencies:
stylelint-config-standard: 22.0.0_stylelint@13.13.1
stylelint-order: 4.1.0_stylelint@13.13.1
stylelint-scss: 3.21.0_stylelint@13.13.1
tailwindcss: 2.2.19_1479244b7b1ab8346eed707106c1912f
tailwindcss: 2.2.19_cr4sis33dk4di3xnobyqnqmrf4
typescript: 4.6.4
unplugin-vue-components: 0.17.21_vite@2.9.8+vue@3.2.33
vite: 2.9.8_less@4.1.2
@@ -336,7 +336,6 @@ packages:
/@babel/helper-validator-identifier/7.16.7:
resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==}
engines: {node: '>=6.9.0'}
dev: true
/@babel/helper-validator-option/7.16.7:
resolution: {integrity: sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==}
@@ -367,6 +366,8 @@ packages:
resolution: {integrity: sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ==}
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
'@babel/types': 7.17.10
/@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.17.10:
resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
@@ -544,7 +545,6 @@ packages:
dependencies:
'@babel/helper-validator-identifier': 7.16.7
to-fast-properties: 2.0.0
dev: true
/@bcoe/v8-coverage/0.2.3:
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
@@ -649,10 +649,10 @@ packages:
'@commitlint/execute-rule': 16.2.1
'@commitlint/resolve-extends': 16.2.1
'@commitlint/types': 16.2.1
'@types/node': 15.14.9
'@types/node': 17.0.32
chalk: 4.1.2
cosmiconfig: 7.0.1
cosmiconfig-typescript-loader: 1.0.9_45c533f94194dbe6bbe742a6dc894b44
cosmiconfig-typescript-loader: 1.0.9_sm5zkxj4s52nbddwl76qwfh6ya
lodash: 4.17.21
resolve-from: 5.0.0
typescript: 4.6.4
@@ -760,16 +760,16 @@ packages:
dev: true
optional: true
/@css-render/plugin-bem/0.15.9_css-render@0.15.9:
resolution: {integrity: sha512-xASEmYIX91Pow7YPzpAZ0eyrRNINVX7j9ITNbLt88gJHRLap3P1dv3hTSLtUZTxYXVHTklZ/SfJQ9FIO3jRahg==}
/@css-render/plugin-bem/0.15.11_css-render@0.15.11:
resolution: {integrity: sha512-Bn8qadYPIz5DhZ4obTGHOJzeziQH6kY0+Fk5AEvwuuy378SLwwvXuuoechLjBHcgKkPCM03Oo4dDSGP/6NMdyw==}
peerDependencies:
css-render: ~0.15.9
css-render: ~0.15.11
dependencies:
css-render: 0.15.9
css-render: 0.15.11
dev: false
/@css-render/vue3-ssr/0.15.9_vue@3.2.33:
resolution: {integrity: sha512-b3wvEIZYjToOEAV/oUqVtcg+MPF/iSZB9VmVF7fMAAAfvVTc2kB4TZDhGZCMkGjGZxOUm1jia7q/Z9FJnJGLKw==}
/@css-render/vue3-ssr/0.15.11_vue@3.2.33:
resolution: {integrity: sha512-n+SuqLPbY30FUTM8slX75OaEG+c8XlTOFrAklekX2XQGvBbz9XdBE6hTEgGlV5kPcTMqTJeCG7Vzhs9/29VC7w==}
peerDependencies:
vue: ^3.0.11
dependencies:
@@ -1118,7 +1118,7 @@ packages:
'@sinonjs/commons': 1.8.3
dev: true
/@stylelint/postcss-css-in-js/0.37.3_4f7b71a942b8b7a555b8adf78f88122b:
/@stylelint/postcss-css-in-js/0.37.3_j55xdkkcxc32kvnyvx3y7casfm:
resolution: {integrity: sha512-scLk3cSH1H9KggSniseb2KNAU5D9FWc3H7BxCSAIdtU9OWIyw0zkEZ9qEKHryRM+SExYXRKNb7tOOVNAsQ3iwg==}
peerDependencies:
postcss: '>=7.0.0'
@@ -1126,12 +1126,12 @@ packages:
dependencies:
'@babel/core': 7.17.10
postcss: 7.0.39
postcss-syntax: 0.36.2_postcss@7.0.39
postcss-syntax: 0.36.2_kei4jy7wdgbhc236h4oijypxom
transitivePeerDependencies:
- supports-color
dev: true
/@stylelint/postcss-markdown/0.36.2_4f7b71a942b8b7a555b8adf78f88122b:
/@stylelint/postcss-markdown/0.36.2_j55xdkkcxc32kvnyvx3y7casfm:
resolution: {integrity: sha512-2kGbqUVJUGE8dM+bMzXG/PYUWKkjLIkRLWNh39OaADkiabDRdw8ATFCgbMz5xdIcvwspPAluSL7uY+ZiTWdWmQ==}
deprecated: 'Use the original unforked package instead: postcss-markdown'
peerDependencies:
@@ -1139,7 +1139,7 @@ packages:
postcss-syntax: '>=0.36.2'
dependencies:
postcss: 7.0.39
postcss-syntax: 0.36.2_postcss@7.0.39
postcss-syntax: 0.36.2_kei4jy7wdgbhc236h4oijypxom
remark: 13.0.0
unist-util-find-all-after: 3.0.2
transitivePeerDependencies:
@@ -1226,13 +1226,6 @@ packages:
'@types/istanbul-lib-report': 3.0.0
dev: true
/@types/jest/27.5.0:
resolution: {integrity: sha512-9RBFx7r4k+msyj/arpfaa0WOOEcaAZNmN+j80KFbFCoSqCJGHTz7YMAMGQW9Xmqm5w6l5c25vbSjMwlikJi5+g==}
dependencies:
jest-matcher-utils: 27.5.1
pretty-format: 27.5.1
dev: false
/@types/json-schema/7.0.11:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
dev: true
@@ -1311,7 +1304,7 @@ packages:
'@types/yargs-parser': 21.0.0
dev: true
/@typescript-eslint/eslint-plugin/4.33.0_5e731fab734ce085fc02cd0ecce6c061:
/@typescript-eslint/eslint-plugin/4.33.0_lzzr7k3tjtqil7aczuhmzzwame:
resolution: {integrity: sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -1322,8 +1315,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/experimental-utils': 4.33.0_eslint@7.32.0+typescript@4.6.4
'@typescript-eslint/parser': 4.33.0_eslint@7.32.0+typescript@4.6.4
'@typescript-eslint/experimental-utils': 4.33.0_e4zyhrvfnqudwdx5bevnvkluy4
'@typescript-eslint/parser': 4.33.0_e4zyhrvfnqudwdx5bevnvkluy4
'@typescript-eslint/scope-manager': 4.33.0
debug: 4.3.4
eslint: 7.32.0
@@ -1337,7 +1330,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/experimental-utils/4.33.0_eslint@7.32.0+typescript@4.6.4:
/@typescript-eslint/experimental-utils/4.33.0_e4zyhrvfnqudwdx5bevnvkluy4:
resolution: {integrity: sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -1355,7 +1348,7 @@ packages:
- typescript
dev: true
/@typescript-eslint/parser/4.33.0_eslint@7.32.0+typescript@4.6.4:
/@typescript-eslint/parser/4.33.0_e4zyhrvfnqudwdx5bevnvkluy4:
resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -1507,7 +1500,7 @@ packages:
resolution: {integrity: sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ==}
dev: false
/@vue/eslint-config-typescript/7.0.0_f2c1c083ca9f8be5792c7dca889a98e3:
/@vue/eslint-config-typescript/7.0.0_ouruxyytcwyhkqobi3chucf3me:
resolution: {integrity: sha512-UxUlvpSrFOoF8aQ+zX1leYiEBEm7CZmXYn/ZEM1zwSadUzpamx56RB4+Htdjisv1mX2tOjBegNUqH3kz2OL+Aw==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -1515,11 +1508,16 @@ packages:
'@typescript-eslint/parser': ^4.4.0
eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
eslint-plugin-vue: ^5.2.3 || ^6.0.0 || ^7.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/eslint-plugin': 4.33.0_5e731fab734ce085fc02cd0ecce6c061
'@typescript-eslint/parser': 4.33.0_eslint@7.32.0+typescript@4.6.4
'@typescript-eslint/eslint-plugin': 4.33.0_lzzr7k3tjtqil7aczuhmzzwame
'@typescript-eslint/parser': 4.33.0_e4zyhrvfnqudwdx5bevnvkluy4
eslint: 7.32.0
eslint-plugin-vue: 7.20.0_eslint@7.32.0
typescript: 4.6.4
vue-eslint-parser: 7.11.0_eslint@7.32.0
transitivePeerDependencies:
- supports-color
@@ -1538,14 +1536,12 @@ packages:
resolution: {integrity: sha512-62Sq0mp9/0bLmDuxuLD5CIaMG2susFAGARLuZ/5jkU1FCf9EDbwUuF+BO8Ub3Rbodx0ziIecM/NsmyjardBxfQ==}
dependencies:
'@vue/shared': 3.2.33
dev: false
/@vue/runtime-core/3.2.33:
resolution: {integrity: sha512-N2D2vfaXsBPhzCV3JsXQa2NECjxP3eXgZlFqKh4tgakp3iX6LCGv76DLlc+IfFZq+TW10Y8QUfeihXOupJ1dGw==}
dependencies:
'@vue/reactivity': 3.2.33
'@vue/shared': 3.2.33
dev: false
/@vue/runtime-dom/3.2.33:
resolution: {integrity: sha512-LSrJ6W7CZTSUygX5s8aFkraDWlO6K4geOwA3quFF2O+hC3QuAMZt/0Xb7JKE3C4JD4pFwCSO7oCrZmZ0BIJUnw==}
@@ -1553,7 +1549,6 @@ packages:
'@vue/runtime-core': 3.2.33
'@vue/shared': 3.2.33
csstype: 2.6.20
dev: false
/@vue/server-renderer/3.2.33_vue@3.2.33:
resolution: {integrity: sha512-4jpJHRD4ORv8PlbYi+/MfP8ec1okz6rybe36MdpkDrGIdEItHEUyaHSKvz+ptNEyQpALmmVfRteHkU9F8vxOew==}
@@ -1563,7 +1558,6 @@ packages:
'@vue/compiler-ssr': 3.2.33
'@vue/shared': 3.2.33
vue: 3.2.33
dev: false
/@vue/shared/3.2.33:
resolution: {integrity: sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg==}
@@ -1720,6 +1714,7 @@ packages:
/ansi-regex/5.0.1:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
dev: true
/ansi-styles/3.2.1:
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
@@ -1733,10 +1728,12 @@ packages:
engines: {node: '>=8'}
dependencies:
color-convert: 2.0.1
dev: true
/ansi-styles/5.2.0:
resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
engines: {node: '>=10'}
dev: true
/anymatch/3.1.2:
resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==}
@@ -2099,6 +2096,7 @@ packages:
dependencies:
ansi-styles: 4.3.0
supports-color: 7.2.0
dev: true
/change-case/4.1.2:
resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==}
@@ -2239,6 +2237,7 @@ packages:
engines: {node: '>=7.0.0'}
dependencies:
color-name: 1.1.4
dev: true
/color-name/1.1.3:
resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=}
@@ -2246,6 +2245,7 @@ packages:
/color-name/1.1.4:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
dev: true
/color-string/1.9.1:
resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==}
@@ -2289,7 +2289,6 @@ packages:
/commander/9.2.0:
resolution: {integrity: sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==}
engines: {node: ^12.20.0 || >=14}
dev: false
/commitizen/4.2.4:
resolution: {integrity: sha512-LlZChbDzg3Ir3O2S7jSo/cgWp5/QwylQVr59K4xayVq8S4/RdKzSyJkghAiZZHfhh5t4pxunUoyeg0ml1q/7aw==}
@@ -2338,6 +2337,8 @@ packages:
finalhandler: 1.1.2
parseurl: 1.3.3
utils-merge: 1.0.1
transitivePeerDependencies:
- supports-color
dev: true
/constant-case/3.0.4:
@@ -2374,8 +2375,8 @@ packages:
engines: {node: '>=10'}
hasBin: true
dependencies:
is-text-path: 1.0.1
JSONStream: 1.3.5
is-text-path: 1.0.1
lodash: 4.17.21
meow: 8.1.2
split2: 3.2.2
@@ -2399,16 +2400,16 @@ packages:
requiresBuild: true
dev: true
/cosmiconfig-typescript-loader/1.0.9_45c533f94194dbe6bbe742a6dc894b44:
/cosmiconfig-typescript-loader/1.0.9_sm5zkxj4s52nbddwl76qwfh6ya:
resolution: {integrity: sha512-tRuMRhxN4m1Y8hP9SNYfz7jRwt8lZdWxdjg/ohg5esKmsndJIn4yT96oJVcf5x0eA11taXl+sIp+ielu529k6g==}
engines: {node: '>=12', npm: '>=6'}
peerDependencies:
'@types/node': '*'
typescript: '>=3'
dependencies:
'@types/node': 15.14.9
'@types/node': 17.0.32
cosmiconfig: 7.0.1
ts-node: 10.7.0_45c533f94194dbe6bbe742a6dc894b44
ts-node: 10.7.0_sm5zkxj4s52nbddwl76qwfh6ya
typescript: 4.6.4
transitivePeerDependencies:
- '@swc/core'
@@ -2445,8 +2446,8 @@ packages:
resolution: {integrity: sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=}
dev: true
/css-render/0.15.9:
resolution: {integrity: sha512-FMVcWsVipKEBR/mVf1+pIjCRQdztILVKxbp8TN5/Vf0Q/fdTq0OIb8JRW/pk7PP1eeWnB/ejQ0MNBe7ELjLblg==}
/css-render/0.15.11:
resolution: {integrity: sha512-hnLrHPUndVUTF5nmNPRey6hpixK02IPUGdEsm2xRjvJuewToyrVFx9Nmai8rgfVzhTFo5SJVh2PHAtzaIV8JKw==}
dependencies:
'@emotion/hash': 0.8.0
'@types/node': 17.0.32
@@ -2480,7 +2481,6 @@ packages:
/csstype/2.6.20:
resolution: {integrity: sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==}
dev: false
/csstype/3.0.11:
resolution: {integrity: sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==}
@@ -2532,12 +2532,22 @@ packages:
/debug/2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: 2.0.0
dev: true
/debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: 2.1.3
dev: true
@@ -2658,6 +2668,7 @@ packages:
/diff-sequences/27.5.1:
resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dev: true
/diff/4.0.2:
resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}
@@ -3111,7 +3122,7 @@ packages:
resolution: {integrity: sha512-LRzNlRo9sv43BAXY+nhZIUCZLRisTMEXXSqlGc2uZ8emAGyJv3FDSew2MIVRMwThexEjVxjNmeqduaexJ/GT3Q==}
dev: true
/eslint-plugin-jest/24.7.0_d82317357d846caee0597ee585a8a89b:
/eslint-plugin-jest/24.7.0_3arronl5qrwk5yczp3sylkfitm:
resolution: {integrity: sha512-wUxdF2bAZiYSKBclsUMrYHH6WxiBreNjyDxbRv345TIvPeoCEgPNEn3Sa+ZrSqsf1Dl9SqqSREXMHExlMMu1DA==}
engines: {node: '>=10'}
peerDependencies:
@@ -3121,15 +3132,15 @@ packages:
'@typescript-eslint/eslint-plugin':
optional: true
dependencies:
'@typescript-eslint/eslint-plugin': 4.33.0_5e731fab734ce085fc02cd0ecce6c061
'@typescript-eslint/experimental-utils': 4.33.0_eslint@7.32.0+typescript@4.6.4
'@typescript-eslint/eslint-plugin': 4.33.0_lzzr7k3tjtqil7aczuhmzzwame
'@typescript-eslint/experimental-utils': 4.33.0_e4zyhrvfnqudwdx5bevnvkluy4
eslint: 7.32.0
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/eslint-plugin-prettier/3.4.1_2544802fe0b6e1e28814bd742f96f471:
/eslint-plugin-prettier/3.4.1_evcial7aw3q6fcauxv2c7fxuoe:
resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==}
engines: {node: '>=6.0.0'}
peerDependencies:
@@ -3319,8 +3330,8 @@ packages:
resolution: {integrity: sha1-teEHm1n7XhuidxwKmTvgYKWMmbo=}
dev: false
/evtd/0.2.3:
resolution: {integrity: sha512-tmiT1YUVqFjTY+BSBOAskL83xNx41iUfpvKP6Gcd/xMHjg3mnER98jXGXJyKnxCG19uPc6EhZiUC+MUyvoqCtw==}
/evtd/0.2.4:
resolution: {integrity: sha512-qaeGN5bx63s/AXgQo8gj6fBkxge+OoLddLniox5qtLAEY5HSnuSlISXVPxnSae1dWblvTh4/HoMIB+mbMsvZzw==}
dev: false
/execa/4.1.0:
@@ -3492,6 +3503,8 @@ packages:
parseurl: 1.3.3
statuses: 1.5.0
unpipe: 1.0.0
transitivePeerDependencies:
- supports-color
dev: true
/find-cache-dir/3.3.2:
@@ -3839,6 +3852,7 @@ packages:
/has-flag/4.0.0:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
dev: true
/has-property-descriptors/1.0.0:
resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
@@ -4010,7 +4024,7 @@ packages:
dev: true
/image-size/0.5.5:
resolution: {integrity: sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=}
resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==}
engines: {node: '>=0.10.0'}
hasBin: true
requiresBuild: true
@@ -4453,6 +4467,7 @@ packages:
diff-sequences: 27.5.1
jest-get-type: 27.5.1
pretty-format: 27.5.1
dev: true
/jest-docblock/27.5.1:
resolution: {integrity: sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==}
@@ -4505,6 +4520,7 @@ packages:
/jest-get-type/27.5.1:
resolution: {integrity: sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dev: true
/jest-haste-map/27.5.1:
resolution: {integrity: sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==}
@@ -4567,6 +4583,7 @@ packages:
jest-diff: 27.5.1
jest-get-type: 27.5.1
pretty-format: 27.5.1
dev: true
/jest-message-util/27.5.1:
resolution: {integrity: sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==}
@@ -4953,6 +4970,8 @@ packages:
mime: 1.6.0
needle: 2.9.1
source-map: 0.6.1
transitivePeerDependencies:
- supports-color
dev: true
/leven/3.1.0:
@@ -5332,7 +5351,6 @@ packages:
hasBin: true
dependencies:
commander: 9.2.0
dev: false
/modern-normalize/1.1.0:
resolution: {integrity: sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA==}
@@ -5372,29 +5390,29 @@ packages:
resolution: {integrity: sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=}
dev: true
/naive-ui/2.28.4_vue@3.2.33:
resolution: {integrity: sha512-zPQycH302C1jx/1Qq16XCWXZ17Suuwn3IVO4dEYaSkRcFfSZmzlZjwoLYFDQo50el0xIeHeWzHuyG5TrLzklcw==}
/naive-ui/2.33.5_vue@3.2.33:
resolution: {integrity: sha512-O87zwOduut3Xk9NzGIX+LZYr6sW/Y0oGuNJ6T2dka+14CtHD9iidi8gdxg6obhMpzdwa3SnlxO7nzDLqmXVUwA==}
peerDependencies:
vue: ^3.0.0
dependencies:
'@css-render/plugin-bem': 0.15.9_css-render@0.15.9
'@css-render/vue3-ssr': 0.15.9_vue@3.2.33
'@css-render/plugin-bem': 0.15.11_css-render@0.15.11
'@css-render/vue3-ssr': 0.15.11_vue@3.2.33
'@types/lodash': 4.14.182
'@types/lodash-es': 4.17.6
async-validator: 4.1.1
css-render: 0.15.9
css-render: 0.15.11
date-fns: 2.28.0
date-fns-tz: 1.3.4_date-fns@2.28.0
evtd: 0.2.3
evtd: 0.2.4
highlight.js: 11.5.1
lodash: 4.17.21
lodash-es: 4.17.21
seemly: 0.3.3
seemly: 0.3.6
treemate: 0.3.11
vdirs: 0.1.8_vue@3.2.33
vooks: 0.2.12_vue@3.2.33
vue: 3.2.33
vueuc: 0.4.32_vue@3.2.33
vueuc: 0.4.49_vue@3.2.33
dev: false
/nanoid/3.3.4:
@@ -5415,6 +5433,8 @@ packages:
debug: 3.2.7
iconv-lite: 0.4.24
sax: 1.2.4
transitivePeerDependencies:
- supports-color
dev: true
optional: true
@@ -5733,7 +5753,7 @@ packages:
dev: true
optional: true
/pinia/2.0.14_typescript@4.6.4+vue@3.2.33:
/pinia/2.0.14_ytvqwwdyss532bvoq2clv4ed5m:
resolution: {integrity: sha512-0nPuZR4TetT/WcLN+feMSjWJku3SQU7dBbXC6uw+R6FLQJCsg+/0pzXyD82T1FmAYe0lsx+jnEDQ1BLgkRKlxA==}
peerDependencies:
'@vue/composition-api': ^1.4.0
@@ -5781,7 +5801,7 @@ packages:
semver-compare: 1.0.0
dev: true
/postcss-html/0.36.0_4f7b71a942b8b7a555b8adf78f88122b:
/postcss-html/0.36.0_j55xdkkcxc32kvnyvx3y7casfm:
resolution: {integrity: sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==}
peerDependencies:
postcss: '>=5.0.0'
@@ -5789,7 +5809,7 @@ packages:
dependencies:
htmlparser2: 3.10.1
postcss: 7.0.39
postcss-syntax: 0.36.2_postcss@7.0.39
postcss-syntax: 0.36.2_kei4jy7wdgbhc236h4oijypxom
dev: true
/postcss-js/3.0.3:
@@ -5879,12 +5899,31 @@ packages:
postcss: 7.0.39
dev: true
/postcss-syntax/0.36.2_postcss@7.0.39:
/postcss-syntax/0.36.2_kei4jy7wdgbhc236h4oijypxom:
resolution: {integrity: sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==}
peerDependencies:
postcss: '>=5.0.0'
postcss-html: '*'
postcss-jsx: '*'
postcss-less: '*'
postcss-markdown: '*'
postcss-scss: '*'
peerDependenciesMeta:
postcss-html:
optional: true
postcss-jsx:
optional: true
postcss-less:
optional: true
postcss-markdown:
optional: true
postcss-scss:
optional: true
dependencies:
postcss: 7.0.39
postcss-html: 0.36.0_j55xdkkcxc32kvnyvx3y7casfm
postcss-less: 3.1.4
postcss-scss: 2.1.1
dev: true
/postcss-value-parser/3.3.1:
@@ -5941,6 +5980,7 @@ packages:
ansi-regex: 5.0.1
ansi-styles: 5.2.0
react-is: 17.0.2
dev: true
/pretty-hrtime/1.0.3:
resolution: {integrity: sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=}
@@ -6063,6 +6103,7 @@ packages:
/react-is/17.0.2:
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
dev: true
/read-pkg-up/7.0.1:
resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==}
@@ -6314,10 +6355,8 @@ packages:
xmlchars: 2.2.0
dev: true
/seemly/0.3.3:
resolution: {integrity: sha512-mAyqemz41e9HiZPMXAn7NtTExJgztwco5cdZjrt/iViU/oFeav+Q8K1c93M/tIZZ00QkT65JMr4xXQk7Vv5hWQ==}
dependencies:
'@types/jest': 27.5.0
/seemly/0.3.6:
resolution: {integrity: sha512-lEV5VB8BUKTo/AfktXJcy+JeXns26ylbMkIUco8CYREsQijuz4mrXres2Q+vMLdwkuLxJdIPQ8IlCIxLYm71Yw==}
dev: false
/semver-compare/1.0.0:
@@ -6666,8 +6705,8 @@ packages:
engines: {node: '>=10.13.0'}
hasBin: true
dependencies:
'@stylelint/postcss-css-in-js': 0.37.3_4f7b71a942b8b7a555b8adf78f88122b
'@stylelint/postcss-markdown': 0.36.2_4f7b71a942b8b7a555b8adf78f88122b
'@stylelint/postcss-css-in-js': 0.37.3_j55xdkkcxc32kvnyvx3y7casfm
'@stylelint/postcss-markdown': 0.36.2_j55xdkkcxc32kvnyvx3y7casfm
autoprefixer: 9.8.8
balanced-match: 2.0.0
chalk: 4.1.2
@@ -6693,7 +6732,7 @@ packages:
micromatch: 4.0.5
normalize-selector: 0.2.0
postcss: 7.0.39
postcss-html: 0.36.0_4f7b71a942b8b7a555b8adf78f88122b
postcss-html: 0.36.0_j55xdkkcxc32kvnyvx3y7casfm
postcss-less: 3.1.4
postcss-media-query-parser: 0.2.3
postcss-resolve-nested-selector: 0.1.1
@@ -6701,7 +6740,7 @@ packages:
postcss-sass: 0.4.4
postcss-scss: 2.1.1
postcss-selector-parser: 6.0.10
postcss-syntax: 0.36.2_postcss@7.0.39
postcss-syntax: 0.36.2_kei4jy7wdgbhc236h4oijypxom
postcss-value-parser: 4.2.0
resolve-from: 5.0.0
slash: 3.0.0
@@ -6715,6 +6754,8 @@ packages:
v8-compile-cache: 2.3.0
write-file-atomic: 3.0.3
transitivePeerDependencies:
- postcss-jsx
- postcss-markdown
- supports-color
dev: true
@@ -6736,6 +6777,7 @@ packages:
engines: {node: '>=8'}
dependencies:
has-flag: 4.0.0
dev: true
/supports-color/8.1.1:
resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
@@ -6776,7 +6818,7 @@ packages:
strip-ansi: 6.0.1
dev: true
/tailwindcss/2.2.19_1479244b7b1ab8346eed707106c1912f:
/tailwindcss/2.2.19_cr4sis33dk4di3xnobyqnqmrf4:
resolution: {integrity: sha512-6Ui7JSVtXadtTUo2NtkBBacobzWiQYVjYW0ZnKaP9S1ZCKQ0w7KVNz+YSDI/j7O7KCMHbOkz94ZMQhbT9pOqjw==}
engines: {node: '>=12.13.0'}
hasBin: true
@@ -6892,9 +6934,8 @@ packages:
dev: true
/to-fast-properties/2.0.0:
resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=}
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'}
dev: true
/to-regex-range/5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
@@ -6945,7 +6986,7 @@ packages:
resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==}
dev: true
/ts-node/10.7.0_45c533f94194dbe6bbe742a6dc894b44:
/ts-node/10.7.0_sm5zkxj4s52nbddwl76qwfh6ya:
resolution: {integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==}
hasBin: true
peerDependencies:
@@ -6964,7 +7005,7 @@ packages:
'@tsconfig/node12': 1.0.9
'@tsconfig/node14': 1.0.1
'@tsconfig/node16': 1.0.2
'@types/node': 15.14.9
'@types/node': 17.0.32
acorn: 8.7.1
acorn-walk: 8.2.0
arg: 4.1.3
@@ -7053,11 +7094,11 @@ packages:
resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/unified/9.2.2:
resolution: {integrity: sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==}
dependencies:
'@types/unist': 2.0.6
bail: 1.0.5
extend: 3.0.2
is-buffer: 2.0.5
@@ -7207,7 +7248,7 @@ packages:
peerDependencies:
vue: ^3.0.11
dependencies:
evtd: 0.2.3
evtd: 0.2.4
vue: 3.2.33
dev: false
@@ -7327,7 +7368,7 @@ packages:
peerDependencies:
vue: ^3.0.0
dependencies:
evtd: 0.2.3
evtd: 0.2.4
vue: 3.2.33
dev: false
@@ -7391,7 +7432,6 @@ packages:
'@vue/runtime-dom': 3.2.33
'@vue/server-renderer': 3.2.33_vue@3.2.33
'@vue/shared': 3.2.33
dev: false
/vuedraggable/4.1.0_vue@3.2.33:
resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
@@ -7402,16 +7442,16 @@ packages:
vue: 3.2.33
dev: false
/vueuc/0.4.32_vue@3.2.33:
resolution: {integrity: sha512-Bmiuhn7g5O+dzW3eX2EghsG7CiocpLwRtgbX7aiILja9K0wjxVYrJqMOiYwCxB6pvO91JDywwINpFshMZru9/g==}
/vueuc/0.4.49_vue@3.2.33:
resolution: {integrity: sha512-WarAC44a/Yx78CxkAgROYLq+LkAeCGA/6wHidVoFmHLbzyF3SiP2nzRNGD/8zJeJInXv18EnWK6A//eGgMMq8w==}
peerDependencies:
vue: ^3.0.11
dependencies:
'@css-render/vue3-ssr': 0.15.9_vue@3.2.33
'@css-render/vue3-ssr': 0.15.11_vue@3.2.33
'@juggle/resize-observer': 3.3.1
css-render: 0.15.9
evtd: 0.2.3
seemly: 0.3.3
css-render: 0.15.11
evtd: 0.2.4
seemly: 0.3.6
vdirs: 0.1.8_vue@3.2.33
vooks: 0.2.12_vue@3.2.33
vue: 3.2.33

View File

@@ -1,27 +1,23 @@
<!--
* @Author: thelostword
* @Date: 2022-10-25 15:43:12
* @LastEditors: thelostword
* @LastEditTime: 2022-10-28 18:10:57
* @FilePath: \naive-ui-admin\src\components\Application\Application.vue
-->
<template>
<n-loading-bar-provider>
<n-dialog-provider>
<DialogContent />
<n-notification-provider>
<n-message-provider>
<MessageContent />
<slot name="default"></slot>
</n-message-provider>
</n-notification-provider>
</n-dialog-provider>
</n-loading-bar-provider>
<n-dialog-provider>
<n-notification-provider>
<n-message-provider>
<slot name="default"></slot>
</n-message-provider>
</n-notification-provider>
</n-dialog-provider>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import {
NDialogProvider,
NNotificationProvider,
NMessageProvider,
NLoadingBarProvider,
} from 'naive-ui';
import { MessageContent } from '@/components/MessageContent';
import { DialogContent } from '@/components/DialogContent';
import { NDialogProvider, NNotificationProvider, NMessageProvider } from 'naive-ui';
export default defineComponent({
name: 'Application',
@@ -29,9 +25,6 @@
NDialogProvider,
NNotificationProvider,
NMessageProvider,
NLoadingBarProvider,
MessageContent,
DialogContent,
},
setup() {
return {};

View File

@@ -1,3 +0,0 @@
import DialogContent from './index.vue';
export { DialogContent };

View File

@@ -1,12 +0,0 @@
<template></template>
<script lang="ts">
import { useDialog } from 'naive-ui';
export default {
name: 'DialogContent',
setup() {
//挂载在 window 方便与在js中使用
window['$dialog'] = useDialog();
},
};
</script>

View File

@@ -1,3 +0,0 @@
import LoadingContent from './index.vue';
export { LoadingContent };

View File

@@ -1,12 +0,0 @@
<template></template>
<script lang="ts">
import { useLoadingBar } from 'naive-ui';
export default {
name: 'LoadingContent',
setup() {
//挂载在 window 方便与在js中使用
window['$loading'] = useLoadingBar();
},
};
</script>

View File

@@ -1,3 +0,0 @@
import MessageContent from './index.vue';
export { MessageContent };

View File

@@ -1,12 +0,0 @@
<template></template>
<script lang="ts">
import { useMessage } from 'naive-ui';
export default {
name: 'MessageContent',
setup() {
//挂载在 window 方便与在js中使用
window['$message'] = useMessage();
},
};
</script>

View File

@@ -77,7 +77,6 @@
import { PageHeader } from './components/Header';
import { useProjectSetting } from '@/hooks/setting/useProjectSetting';
import { useDesignSetting } from '@/hooks/setting/useDesignSetting';
import { useLoadingBar } from 'naive-ui';
import { useRoute } from 'vue-router';
import { useProjectSettingStore } from '@/store/modules/projectSetting';
@@ -185,9 +184,6 @@
onMounted(() => {
checkMobileMode();
window.addEventListener('resize', watchWidth);
//挂载在 window 方便与在js中使用
window['$loading'] = useLoadingBar();
window['$loading'].finish();
});
</script>

View File

@@ -1,14 +1,18 @@
/*
* @Author: thelostword
* @Date: 2022-10-25 15:43:13
* @LastEditors: thelostword
* @LastEditTime: 2022-10-28 18:03:36
* @FilePath: \naive-ui-admin\src\main.ts
*/
import './styles/tailwind.css';
import { createApp } from 'vue';
import { setupNaive, setupDirectives } from '@/plugins';
import App from './App.vue';
import router, { setupRouter } from './router';
import { setupStore } from '@/store';
import { setupNaive, setupDirectives } from '@/plugins';
import { AppProvider } from '@/components/Application';
async function bootstrap() {
const appProvider = createApp(AppProvider);
const app = createApp(App);
// 注册全局常用的 naive-ui 组件
@@ -26,9 +30,6 @@ async function bootstrap() {
// 挂载状态管理
setupStore(app);
//优先挂载一下 Provider 解决路由守卫Axios中可使用DialogMessage 等之类组件
appProvider.mount('#appProvider', true);
// 挂载路由
await setupRouter(app);

View File

@@ -1,5 +1,42 @@
/*
* @Author: thelostword
* @Date: 2022-10-28 17:13:52
* @LastEditors: thelostword
* @LastEditTime: 2022-10-28 18:01:54
* @FilePath: \naive-ui-admin\src\plugins\naive.ts
*/
import type { App } from 'vue';
import * as NaiveUI from 'naive-ui';
import { computed } from 'vue';
import { useDesignSettingStore } from '@/store/modules/designSetting';
import { store } from '@/store';
import { lighten } from '@/utils/index';
// NaiveUI 全局方法注册
const designStore = useDesignSettingStore(store);
const configProviderPropsRef = computed(() => ({
theme: designStore.darkTheme ? NaiveUI.darkTheme : undefined,
themeOverrides: {
common: {
primaryColor: designStore.appTheme,
primaryColorHover: lighten(designStore.appTheme, 6),
primaryColorPressed: lighten(designStore.appTheme, 6),
},
LoadingBar: {
colorLoading: designStore.appTheme,
},
},
}));
const { message, dialog, notification, loadingBar } = NaiveUI.createDiscreteApi(
['message', 'dialog', 'notification', 'loadingBar'],
{
configProviderProps: configProviderPropsRef,
}
);
window['$message'] = message;
window['$dialog'] = dialog;
window['$notification'] = notification;
window['$loading'] = loadingBar;
const naive = NaiveUI.create({
components: [

View File

@@ -63,7 +63,7 @@
<script lang="ts" setup>
import { h, reactive, ref } from 'vue';
import { useMessage } from 'naive-ui';
// import { useMessage } from 'naive-ui';
import { BasicTable, TableAction } from '@/components/Table';
import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
import { getTableList } from '@/api/table/list';
@@ -216,7 +216,7 @@
const router = useRouter();
const formRef: any = ref(null);
const message = useMessage();
// const message = useMessage();
const actionRef = ref();
const showModal = ref(false);
@@ -279,7 +279,7 @@
},
],
select: (key) => {
message.info(`您点击了,${key} 按钮`);
window['$message'].info(`您点击了,${key} 按钮`);
},
});
},
@@ -312,13 +312,13 @@
formBtnLoading.value = true;
formRef.value.validate((errors) => {
if (!errors) {
message.success('新建成功');
window['$message'].success('新建成功');
setTimeout(() => {
showModal.value = false;
reloadTable();
});
} else {
message.error('请填写完整信息');
window['$message'].error('请填写完整信息');
}
formBtnLoading.value = false;
});
@@ -331,7 +331,7 @@
function handleDelete(record: Recordable) {
console.log('点击了删除', record);
message.info('点击了删除');
window['$message'].info('点击了删除');
}
function handleSubmit(values: Recordable) {