Commit 3e1ce8b76aeb53f336c3977bbf67f59a44f983ef
1 parent
cbb6a379
perf: add aotu components
Showing
14 changed files
with
170 additions
and
61 deletions
yudao-ui-admin-vue3/package.json
| ... | ... | @@ -38,8 +38,8 @@ |
| 38 | 38 | "echarts-wordcloud": "^2.0.0", |
| 39 | 39 | "element-plus": "2.2.21", |
| 40 | 40 | "intro.js": "^6.0.0", |
| 41 | - "jsencrypt": "^3.3.1", | |
| 42 | 41 | "js-cookie": "^3.0.1", |
| 42 | + "jsencrypt": "^3.3.1", | |
| 43 | 43 | "lodash-es": "^4.17.21", |
| 44 | 44 | "mitt": "^3.0.0", |
| 45 | 45 | "nprogress": "^0.2.0", |
| ... | ... | @@ -94,6 +94,7 @@ |
| 94 | 94 | "stylelint-config-standard": "^29.0.0", |
| 95 | 95 | "stylelint-order": "^5.0.0", |
| 96 | 96 | "typescript": "4.8.4", |
| 97 | + "unplugin-vue-components": "^0.22.9", | |
| 97 | 98 | "unplugin-vue-macros": "^0.16.3", |
| 98 | 99 | "vite": "3.2.4", |
| 99 | 100 | "vite-plugin-compression": "^0.5.1", | ... | ... |
yudao-ui-admin-vue3/pnpm-lock.yaml
| ... | ... | @@ -59,6 +59,7 @@ specifiers: |
| 59 | 59 | stylelint-config-standard: ^29.0.0 |
| 60 | 60 | stylelint-order: ^5.0.0 |
| 61 | 61 | typescript: 4.8.4 |
| 62 | + unplugin-vue-components: ^0.22.9 | |
| 62 | 63 | unplugin-vue-macros: ^0.16.3 |
| 63 | 64 | url: ^0.11.0 |
| 64 | 65 | vite: 3.2.4 |
| ... | ... | @@ -150,6 +151,7 @@ devDependencies: |
| 150 | 151 | stylelint-config-standard: 29.0.0_stylelint@14.15.0 |
| 151 | 152 | stylelint-order: 5.0.0_stylelint@14.15.0 |
| 152 | 153 | typescript: 4.8.4 |
| 154 | + unplugin-vue-components: 0.22.9_rollup@3.3.0+vue@3.2.45 | |
| 153 | 155 | unplugin-vue-macros: 0.16.3_drqowttw7xgwfzqyhu6wuedde4 |
| 154 | 156 | vite: 3.2.4_mp5lu76ee5qtwstsyca37sdhqi |
| 155 | 157 | vite-plugin-compression: 0.5.1_vite@3.2.4 |
| ... | ... | @@ -963,6 +965,21 @@ packages: |
| 963 | 965 | picomatch: 2.3.1 |
| 964 | 966 | dev: true |
| 965 | 967 | |
| 968 | + /@rollup/pluginutils/5.0.2_rollup@3.3.0: | |
| 969 | + resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} | |
| 970 | + engines: {node: '>=14.0.0'} | |
| 971 | + peerDependencies: | |
| 972 | + rollup: ^1.20.0||^2.0.0||^3.0.0 | |
| 973 | + peerDependenciesMeta: | |
| 974 | + rollup: | |
| 975 | + optional: true | |
| 976 | + dependencies: | |
| 977 | + '@types/estree': 1.0.0 | |
| 978 | + estree-walker: 2.0.2 | |
| 979 | + picomatch: 2.3.1 | |
| 980 | + rollup: 3.3.0 | |
| 981 | + dev: true | |
| 982 | + | |
| 966 | 983 | /@sxzz/popperjs-es/2.11.7: |
| 967 | 984 | resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==} |
| 968 | 985 | dev: false |
| ... | ... | @@ -6829,6 +6846,32 @@ packages: |
| 6829 | 6846 | vite: 3.2.4_mp5lu76ee5qtwstsyca37sdhqi |
| 6830 | 6847 | dev: true |
| 6831 | 6848 | |
| 6849 | + /unplugin-vue-components/0.22.9_rollup@3.3.0+vue@3.2.45: | |
| 6850 | + resolution: {integrity: sha512-qBvooq3EgpjtYicxeccRUGUBBQCCw9rJ0kHPZPOSJd8TBZViSv86vuKLTRDHPyjWtclwOIkVStZJfPdJFhYUMw==} | |
| 6851 | + engines: {node: '>=14'} | |
| 6852 | + peerDependencies: | |
| 6853 | + '@babel/parser': ^7.15.8 | |
| 6854 | + vue: 2 || 3 | |
| 6855 | + peerDependenciesMeta: | |
| 6856 | + '@babel/parser': | |
| 6857 | + optional: true | |
| 6858 | + dependencies: | |
| 6859 | + '@antfu/utils': 0.6.0 | |
| 6860 | + '@rollup/pluginutils': 5.0.2_rollup@3.3.0 | |
| 6861 | + chokidar: 3.5.3 | |
| 6862 | + debug: 4.3.4 | |
| 6863 | + fast-glob: 3.2.12 | |
| 6864 | + local-pkg: 0.4.2 | |
| 6865 | + magic-string: 0.26.7 | |
| 6866 | + minimatch: 5.1.0 | |
| 6867 | + resolve: 1.22.1 | |
| 6868 | + unplugin: 0.10.2 | |
| 6869 | + vue: 3.2.45 | |
| 6870 | + transitivePeerDependencies: | |
| 6871 | + - rollup | |
| 6872 | + - supports-color | |
| 6873 | + dev: true | |
| 6874 | + | |
| 6832 | 6875 | /unplugin-vue-define-options/0.12.7: |
| 6833 | 6876 | resolution: {integrity: sha512-relFORVPLDs4dd3ogEti5YyAqQ62XEieRgLu/OrDIRZdSZQ942pydf9ilfLFiFwCUt+EES/2Xl4EERtgP1T/og==} |
| 6834 | 6877 | engines: {node: '>=14.19.0'} | ... | ... |
yudao-ui-admin-vue3/src/auto-components.d.ts
0 → 100644
| 1 | +// generated by unplugin-vue-components | |
| 2 | +// We suggest you to commit this file into source control | |
| 3 | +// Read more: https://github.com/vuejs/core/pull/3399 | |
| 4 | +import '@vue/runtime-core' | |
| 5 | + | |
| 6 | +export {} | |
| 7 | + | |
| 8 | +declare module '@vue/runtime-core' { | |
| 9 | + export interface GlobalComponents { | |
| 10 | + Backtop: typeof import('./components/Backtop/src/Backtop.vue')['default'] | |
| 11 | + Breadcrumb: typeof import('./components/Breadcrumb/src/Breadcrumb.vue')['default'] | |
| 12 | + Collapse: typeof import('./components/Collapse/src/Collapse.vue')['default'] | |
| 13 | + ColorRadioPicker: typeof import('./components/Setting/src/components/ColorRadioPicker.vue')['default'] | |
| 14 | + ConfigGlobal: typeof import('./components/ConfigGlobal/src/ConfigGlobal.vue')['default'] | |
| 15 | + ContentDetailWrap: typeof import('./components/ContentDetailWrap/src/ContentDetailWrap.vue')['default'] | |
| 16 | + ContentWrap: typeof import('./components/ContentWrap/src/ContentWrap.vue')['default'] | |
| 17 | + ContextMenu: typeof import('./components/ContextMenu/src/ContextMenu.vue')['default'] | |
| 18 | + CountTo: typeof import('./components/CountTo/src/CountTo.vue')['default'] | |
| 19 | + Crontab: typeof import('./components/Crontab/src/Crontab.vue')['default'] | |
| 20 | + Descriptions: typeof import('./components/Descriptions/src/Descriptions.vue')['default'] | |
| 21 | + Dialog: typeof import('./components/Dialog/src/Dialog.vue')['default'] | |
| 22 | + DictTag: typeof import('./components/DictTag/src/DictTag.vue')['default'] | |
| 23 | + Echart: typeof import('./components/Echart/src/Echart.vue')['default'] | |
| 24 | + Editor: typeof import('./components/Editor/src/Editor.vue')['default'] | |
| 25 | + ElButton: typeof import('element-plus/es')['ElButton'] | |
| 26 | + ElCard: typeof import('element-plus/es')['ElCard'] | |
| 27 | + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] | |
| 28 | + ElCol: typeof import('element-plus/es')['ElCol'] | |
| 29 | + ElForm: typeof import('element-plus/es')['ElForm'] | |
| 30 | + ElFormItem: typeof import('element-plus/es')['ElFormItem'] | |
| 31 | + ElInput: typeof import('element-plus/es')['ElInput'] | |
| 32 | + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] | |
| 33 | + ElOption: typeof import('element-plus/es')['ElOption'] | |
| 34 | + ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] | |
| 35 | + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] | |
| 36 | + ElRow: typeof import('element-plus/es')['ElRow'] | |
| 37 | + ElSelect: typeof import('element-plus/es')['ElSelect'] | |
| 38 | + ElSwitch: typeof import('element-plus/es')['ElSwitch'] | |
| 39 | + ElTag: typeof import('element-plus/es')['ElTag'] | |
| 40 | + ElTransfer: typeof import('element-plus/es')['ElTransfer'] | |
| 41 | + ElTree: typeof import('element-plus/es')['ElTree'] | |
| 42 | + ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] | |
| 43 | + ElUpload: typeof import('element-plus/es')['ElUpload'] | |
| 44 | + Error: typeof import('./components/Error/src/Error.vue')['default'] | |
| 45 | + Footer: typeof import('./components/Footer/src/Footer.vue')['default'] | |
| 46 | + Form: typeof import('./components/Form/src/Form.vue')['default'] | |
| 47 | + Highlight: typeof import('./components/Highlight/src/Highlight.vue')['default'] | |
| 48 | + Icon: typeof import('./components/Icon/src/Icon.vue')['default'] | |
| 49 | + IconSelect: typeof import('./components/Icon/src/IconSelect.vue')['default'] | |
| 50 | + IFrame: typeof import('./components/IFrame/src/IFrame.vue')['default'] | |
| 51 | + ImageViewer: typeof import('./components/ImageViewer/src/ImageViewer.vue')['default'] | |
| 52 | + Infotip: typeof import('./components/Infotip/src/Infotip.vue')['default'] | |
| 53 | + InputPassword: typeof import('./components/InputPassword/src/InputPassword.vue')['default'] | |
| 54 | + InterfaceDisplay: typeof import('./components/Setting/src/components/InterfaceDisplay.vue')['default'] | |
| 55 | + LayoutRadioPicker: typeof import('./components/Setting/src/components/LayoutRadioPicker.vue')['default'] | |
| 56 | + LocaleDropdown: typeof import('./components/LocaleDropdown/src/LocaleDropdown.vue')['default'] | |
| 57 | + Logo: typeof import('./components/Logo/src/Logo.vue')['default'] | |
| 58 | + Menu: typeof import('./components/Menu/src/Menu.vue')['default'] | |
| 59 | + Qrcode: typeof import('./components/Qrcode/src/Qrcode.vue')['default'] | |
| 60 | + RouterLink: typeof import('vue-router')['RouterLink'] | |
| 61 | + RouterView: typeof import('vue-router')['RouterView'] | |
| 62 | + Screenfull: typeof import('./components/Screenfull/src/Screenfull.vue')['default'] | |
| 63 | + Search: typeof import('./components/Search/src/Search.vue')['default'] | |
| 64 | + Setting: typeof import('./components/Setting/src/Setting.vue')['default'] | |
| 65 | + SizeDropdown: typeof import('./components/SizeDropdown/src/SizeDropdown.vue')['default'] | |
| 66 | + Sticky: typeof import('./components/Sticky/src/Sticky.vue')['default'] | |
| 67 | + Table: typeof import('./components/Table/src/Table.vue')['default'] | |
| 68 | + TabMenu: typeof import('./components/TabMenu/src/TabMenu.vue')['default'] | |
| 69 | + TagsView: typeof import('./components/TagsView/src/TagsView.vue')['default'] | |
| 70 | + ThemeSwitch: typeof import('./components/ThemeSwitch/src/ThemeSwitch.vue')['default'] | |
| 71 | + Tooltip: typeof import('./components/Tooltip/src/Tooltip.vue')['default'] | |
| 72 | + UserInfo: typeof import('./components/UserInfo/src/UserInfo.vue')['default'] | |
| 73 | + Verify: typeof import('./components/Verifition/src/Verify.vue')['default'] | |
| 74 | + VerifyPoints: typeof import('./components/Verifition/src/Verify/VerifyPoints.vue')['default'] | |
| 75 | + VerifySlide: typeof import('./components/Verifition/src/Verify/VerifySlide.vue')['default'] | |
| 76 | + XButton: typeof import('./components/XButton/src/XButton.vue')['default'] | |
| 77 | + XModal: typeof import('./components/XModal/src/XModal.vue')['default'] | |
| 78 | + XTextButton: typeof import('./components/XButton/src/XTextButton.vue')['default'] | |
| 79 | + } | |
| 80 | + export interface ComponentCustomProperties { | |
| 81 | + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] | |
| 82 | + } | |
| 83 | +} | ... | ... |
yudao-ui-admin-vue3/src/views/system/dept/index.vue
| ... | ... | @@ -103,11 +103,10 @@ |
| 103 | 103 | </template> |
| 104 | 104 | <script setup lang="ts"> |
| 105 | 105 | import { useI18n } from '@/hooks/web/useI18n' |
| 106 | -import { ElInput, ElCard, ElTree, ElTreeSelect, ElSelect, ElOption } from 'element-plus' | |
| 107 | 106 | import { handleTree } from '@/utils/tree' |
| 108 | 107 | import { onMounted, ref, unref, watch } from 'vue' |
| 109 | 108 | import * as DeptApi from '@/api/system/dept' |
| 110 | -import { Form, FormExpose } from '@/components/Form' | |
| 109 | +import { FormExpose } from '@/components/Form' | |
| 111 | 110 | import { modelSchema, rules } from './dept.data' |
| 112 | 111 | import { DeptVO } from '@/api/system/dept/types' |
| 113 | 112 | import { useMessage } from '@/hooks/web/useMessage' | ... | ... |
yudao-ui-admin-vue3/src/views/system/dict/index.vue
| ... | ... | @@ -159,11 +159,9 @@ import { ref, unref, onMounted } from 'vue' |
| 159 | 159 | import { DICT_TYPE } from '@/utils/dict' |
| 160 | 160 | import { useI18n } from '@/hooks/web/useI18n' |
| 161 | 161 | import { FormExpose } from '@/components/Form' |
| 162 | -import { ElInput, ElTag } from 'element-plus' | |
| 163 | 162 | import * as DictTypeSchemas from './dict.type' |
| 164 | 163 | import * as DictDataSchemas from './dict.data' |
| 165 | 164 | import { useTable } from '@/hooks/web/useTable' |
| 166 | -import { ElCard, ElMessage } from 'element-plus' | |
| 167 | 165 | import * as DictTypeApi from '@/api/system/dict/dict.type' |
| 168 | 166 | import * as DictDataApi from '@/api/system/dict/dict.data' |
| 169 | 167 | import { DictDataVO, DictTypeVO } from '@/api/system/dict/types' | ... | ... |
yudao-ui-admin-vue3/src/views/system/menu/index.vue
| ... | ... | @@ -247,20 +247,7 @@ |
| 247 | 247 | import { onMounted, reactive, ref } from 'vue' |
| 248 | 248 | import { useI18n } from '@/hooks/web/useI18n' |
| 249 | 249 | import { useMessage } from '@/hooks/web/useMessage' |
| 250 | -import { | |
| 251 | - ElRow, | |
| 252 | - ElCol, | |
| 253 | - ElForm, | |
| 254 | - ElFormItem, | |
| 255 | - ElInput, | |
| 256 | - ElInputNumber, | |
| 257 | - ElSelect, | |
| 258 | - ElTreeSelect, | |
| 259 | - ElOption, | |
| 260 | - ElRadioGroup, | |
| 261 | - ElRadioButton, | |
| 262 | - FormInstance | |
| 263 | -} from 'element-plus' | |
| 250 | +import { FormInstance } from 'element-plus' | |
| 264 | 251 | import { Tooltip } from '@/components/Tooltip' |
| 265 | 252 | import { IconSelect } from '@/components/Icon' |
| 266 | 253 | import { VxeTableInstance } from 'vxe-table' | ... | ... |
yudao-ui-admin-vue3/src/views/system/role/index.vue
| ... | ... | @@ -143,25 +143,16 @@ |
| 143 | 143 | </template> |
| 144 | 144 | <script setup lang="ts"> |
| 145 | 145 | import { onMounted, reactive, ref, unref } from 'vue' |
| 146 | -import { | |
| 147 | - ElForm, | |
| 148 | - ElFormItem, | |
| 149 | - ElSelect, | |
| 150 | - ElOption, | |
| 151 | - ElTree, | |
| 152 | - ElCard, | |
| 153 | - ElSwitch, | |
| 154 | - ElTag | |
| 155 | -} from 'element-plus' | |
| 156 | -import { DICT_TYPE, getDictOptions } from '@/utils/dict' | |
| 146 | +import { ElTree } from 'element-plus' | |
| 157 | 147 | import { useI18n } from '@/hooks/web/useI18n' |
| 158 | 148 | import { useMessage } from '@/hooks/web/useMessage' |
| 149 | +import { useVxeGrid } from '@/hooks/web/useVxeGrid' | |
| 159 | 150 | import { FormExpose } from '@/components/Form' |
| 160 | -import { rules, allSchemas } from './role.data' | |
| 151 | +import { VxeGridInstance } from 'vxe-table' | |
| 161 | 152 | import { handleTree } from '@/utils/tree' |
| 162 | 153 | import { SystemDataScopeEnum } from '@/utils/constants' |
| 163 | -import { useVxeGrid } from '@/hooks/web/useVxeGrid' | |
| 164 | -import { VxeGridInstance } from 'vxe-table' | |
| 154 | +import { DICT_TYPE, getDictOptions } from '@/utils/dict' | |
| 155 | +import { rules, allSchemas } from './role.data' | |
| 165 | 156 | import * as RoleApi from '@/api/system/role' |
| 166 | 157 | import { listSimpleMenusApi } from '@/api/system/menu' |
| 167 | 158 | import { listSimpleDeptApi } from '@/api/system/dept' |
| ... | ... | @@ -170,6 +161,7 @@ import type { |
| 170 | 161 | PermissionAssignRoleDataScopeReqVO, |
| 171 | 162 | PermissionAssignRoleMenuReqVO |
| 172 | 163 | } from '@/api/system/permission/types' |
| 164 | + | |
| 173 | 165 | const { t } = useI18n() // 国际化 |
| 174 | 166 | const message = useMessage() // 消息弹窗 |
| 175 | 167 | // 列表相关的变量 | ... | ... |
yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
| ... | ... | @@ -114,7 +114,7 @@ |
| 114 | 114 | <script setup lang="ts"> |
| 115 | 115 | import { onMounted, ref, unref } from 'vue' |
| 116 | 116 | import dayjs from 'dayjs' |
| 117 | -import { ElMessage, ElTag, ElSelect, ElOption } from 'element-plus' | |
| 117 | +import { useMessage } from '@/hooks/web/useMessage' | |
| 118 | 118 | import { DICT_TYPE } from '@/utils/dict' |
| 119 | 119 | import { useTable } from '@/hooks/web/useTable' |
| 120 | 120 | import { useI18n } from '@/hooks/web/useI18n' |
| ... | ... | @@ -122,7 +122,9 @@ import { FormExpose } from '@/components/Form' |
| 122 | 122 | import type { SensitiveWordVO } from '@/api/system/sensitiveWord/types' |
| 123 | 123 | import { rules, allSchemas } from './sensitiveWord.data' |
| 124 | 124 | import * as SensitiveWordApi from '@/api/system/sensitiveWord' |
| 125 | + | |
| 125 | 126 | const { t } = useI18n() // 国际化 |
| 127 | +const message = useMessage() // 消息弹窗 | |
| 126 | 128 | |
| 127 | 129 | // ========== 列表相关 ========== |
| 128 | 130 | const { register, tableObject, methods } = useTable<SensitiveWordVO>({ |
| ... | ... | @@ -180,10 +182,10 @@ const submitForm = async () => { |
| 180 | 182 | data.tags = tags.value |
| 181 | 183 | if (actionType.value === 'create') { |
| 182 | 184 | await SensitiveWordApi.createSensitiveWordApi(data) |
| 183 | - ElMessage.success(t('common.createSuccess')) | |
| 185 | + message.success(t('common.createSuccess')) | |
| 184 | 186 | } else { |
| 185 | 187 | await SensitiveWordApi.updateSensitiveWordApi(data) |
| 186 | - ElMessage.success(t('common.updateSuccess')) | |
| 188 | + message.success(t('common.updateSuccess')) | |
| 187 | 189 | } |
| 188 | 190 | // 操作成功,重新加载列表 |
| 189 | 191 | dialogVisible.value = false | ... | ... |
yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue
| ... | ... | @@ -118,7 +118,6 @@ import { useMessage } from '@/hooks/web/useMessage' |
| 118 | 118 | import { useVxeGrid } from '@/hooks/web/useVxeGrid' |
| 119 | 119 | import { VxeGridInstance } from 'vxe-table' |
| 120 | 120 | import { FormExpose } from '@/components/Form' |
| 121 | -import { ElForm, ElFormItem, ElInput } from 'element-plus' | |
| 122 | 121 | // 业务相关的 import |
| 123 | 122 | import * as SmsTemplateApi from '@/api/system/sms/smsTemplate' |
| 124 | 123 | import { rules, allSchemas } from './sms.template.data' | ... | ... |
yudao-ui-admin-vue3/src/views/system/tenant/index.vue
| ... | ... | @@ -124,17 +124,19 @@ |
| 124 | 124 | <script setup lang="ts"> |
| 125 | 125 | import { ref, unref, onMounted } from 'vue' |
| 126 | 126 | import dayjs from 'dayjs' |
| 127 | -import { ElMessage, ElTag, ElSelect, ElOption } from 'element-plus' | |
| 128 | 127 | import { DICT_TYPE } from '@/utils/dict' |
| 129 | 128 | import { useTable } from '@/hooks/web/useTable' |
| 130 | 129 | import { useI18n } from '@/hooks/web/useI18n' |
| 130 | +import { useMessage } from '@/hooks/web/useMessage' | |
| 131 | 131 | import { FormExpose } from '@/components/Form' |
| 132 | 132 | import type { TenantVO } from '@/api/system/tenant/types' |
| 133 | 133 | import { rules, allSchemas } from './tenant.data' |
| 134 | 134 | import * as TenantApi from '@/api/system/tenant' |
| 135 | 135 | import { getTenantPackageList } from '@/api/system/tenantPackage' |
| 136 | 136 | import { TenantPackageVO } from '@/api/system/tenantPackage/types' |
| 137 | + | |
| 137 | 138 | const { t } = useI18n() // 国际化 |
| 139 | +const message = useMessage() // 消息弹窗 | |
| 138 | 140 | |
| 139 | 141 | // ========== 列表相关 ========== |
| 140 | 142 | const { register, tableObject, methods } = useTable<TenantVO>({ |
| ... | ... | @@ -205,11 +207,11 @@ const submitForm = async () => { |
| 205 | 207 | if (actionType.value === 'create') { |
| 206 | 208 | data.expireTime = dayjs(data.expireTime).valueOf().toString() |
| 207 | 209 | await TenantApi.createTenantApi(data) |
| 208 | - ElMessage.success(t('common.createSuccess')) | |
| 210 | + message.success(t('common.createSuccess')) | |
| 209 | 211 | } else { |
| 210 | 212 | data.expireTime = dayjs(data.expireTime).valueOf().toString() |
| 211 | 213 | await TenantApi.updateTenantApi(data) |
| 212 | - ElMessage.success(t('common.updateSuccess')) | |
| 214 | + message.success(t('common.updateSuccess')) | |
| 213 | 215 | } |
| 214 | 216 | // 操作成功,重新加载列表 |
| 215 | 217 | dialogVisible.value = false | ... | ... |
yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
| ... | ... | @@ -94,13 +94,16 @@ import { handleTree } from '@/utils/tree' |
| 94 | 94 | import { DICT_TYPE } from '@/utils/dict' |
| 95 | 95 | import { useTable } from '@/hooks/web/useTable' |
| 96 | 96 | import { useI18n } from '@/hooks/web/useI18n' |
| 97 | +import { useMessage } from '@/hooks/web/useMessage' | |
| 97 | 98 | import { FormExpose } from '@/components/Form' |
| 98 | 99 | import { TenantPackageVO } from '@/api/system/tenantPackage/types' |
| 99 | -import { ElMessage, ElCard, ElSwitch, ElTree } from 'element-plus' | |
| 100 | 100 | import { rules, allSchemas } from './tenantPackage.data' |
| 101 | 101 | import * as TenantPackageApi from '@/api/system/tenantPackage' |
| 102 | 102 | import { listSimpleMenusApi } from '@/api/system/menu' |
| 103 | + | |
| 104 | +import { ElTree } from 'element-plus' | |
| 103 | 105 | const { t } = useI18n() // 国际化 |
| 106 | +const message = useMessage() // 消息弹窗 | |
| 104 | 107 | |
| 105 | 108 | const defaultProps = { |
| 106 | 109 | children: 'children', |
| ... | ... | @@ -174,10 +177,10 @@ const submitForm = async () => { |
| 174 | 177 | data.menuIds = treeRef.value!.getCheckedKeys(false) as string[] |
| 175 | 178 | if (actionType.value === 'create') { |
| 176 | 179 | await TenantPackageApi.createTenantPackageTypeApi(data) |
| 177 | - ElMessage.success(t('common.createSuccess')) | |
| 180 | + message.success(t('common.createSuccess')) | |
| 178 | 181 | } else { |
| 179 | 182 | await TenantPackageApi.updateTenantPackageTypeApi(data) |
| 180 | - ElMessage.success(t('common.updateSuccess')) | |
| 183 | + message.success(t('common.updateSuccess')) | |
| 181 | 184 | } |
| 182 | 185 | // 操作成功,重新加载列表 |
| 183 | 186 | dialogVisible.value = false | ... | ... |
yudao-ui-admin-vue3/src/views/system/user/index.vue
| ... | ... | @@ -237,23 +237,6 @@ |
| 237 | 237 | </template> |
| 238 | 238 | <script setup lang="ts"> |
| 239 | 239 | import { nextTick, onMounted, reactive, ref, unref, watch } from 'vue' |
| 240 | -import { | |
| 241 | - ElTag, | |
| 242 | - ElInput, | |
| 243 | - ElCard, | |
| 244 | - ElTree, | |
| 245 | - ElTreeSelect, | |
| 246 | - ElSelect, | |
| 247 | - ElOption, | |
| 248 | - ElTransfer, | |
| 249 | - ElForm, | |
| 250 | - ElFormItem, | |
| 251 | - ElUpload, | |
| 252 | - ElSwitch, | |
| 253 | - ElCheckbox, | |
| 254 | - UploadInstance, | |
| 255 | - UploadRawFile | |
| 256 | -} from 'element-plus' | |
| 257 | 240 | import { handleTree } from '@/utils/tree' |
| 258 | 241 | import { useI18n } from '@/hooks/web/useI18n' |
| 259 | 242 | import { FormExpose } from '@/components/Form' |
| ... | ... | @@ -272,6 +255,7 @@ import { getAccessToken, getTenantId } from '@/utils/auth' |
| 272 | 255 | import { useMessage } from '@/hooks/web/useMessage' |
| 273 | 256 | import { VxeGridInstance } from 'vxe-table' |
| 274 | 257 | import { useVxeGrid } from '@/hooks/web/useVxeGrid' |
| 258 | +import { ElTree, UploadInstance, UploadRawFile } from 'element-plus' | |
| 275 | 259 | |
| 276 | 260 | const { t } = useI18n() // 国际化 |
| 277 | 261 | const message = useMessage() // 消息弹窗 | ... | ... |
yudao-ui-admin-vue3/tsconfig.json
yudao-ui-admin-vue3/vite.config.ts
| ... | ... | @@ -6,6 +6,8 @@ import WindiCSS from 'vite-plugin-windicss' |
| 6 | 6 | import VueJsx from '@vitejs/plugin-vue-jsx' |
| 7 | 7 | import EslintPlugin from 'vite-plugin-eslint' |
| 8 | 8 | import VueI18n from '@intlify/vite-plugin-vue-i18n' |
| 9 | +import Components from 'unplugin-vue-components/vite' | |
| 10 | +import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' | |
| 9 | 11 | import { createStyleImportPlugin, ElementPlusResolve, VxeTableResolve } from 'vite-plugin-style-import' |
| 10 | 12 | import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' |
| 11 | 13 | import PurgeIcons from 'vite-plugin-purge-icons' |
| ... | ... | @@ -71,6 +73,20 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { |
| 71 | 73 | } |
| 72 | 74 | }] |
| 73 | 75 | }), |
| 76 | + Components({ | |
| 77 | + // 要搜索组件的目录的相对路径 | |
| 78 | + dirs: ['src/components'], | |
| 79 | + // 组件的有效文件扩展名 | |
| 80 | + extensions: ['vue', 'md'], | |
| 81 | + // 搜索子目录 | |
| 82 | + deep: true, | |
| 83 | + include: [/\.vue$/, /\.vue\?vue/], | |
| 84 | + // 生成自定义 `auto-components.d.ts` 全局声明 | |
| 85 | + dts: 'src/auto-components.d.ts', | |
| 86 | + // 自定义组件的解析器 | |
| 87 | + resolvers: [ElementPlusResolver()], | |
| 88 | + exclude: [/[\\/]node_modules[\\/]/] | |
| 89 | + }), | |
| 74 | 90 | EslintPlugin({ |
| 75 | 91 | cache: false, |
| 76 | 92 | include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件 | ... | ... |