create-meadminjs 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +3 -0
- package/bin/index.js +3 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +97 -0
- package/dist/file-zuupOgeh.js +78 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +98 -0
- package/package.json +38 -0
- package/template/meadmin/.editorconfig +11 -0
- package/template/meadmin/.env +21 -0
- package/template/meadmin/.eslintrc.json +7 -0
- package/template/meadmin/.husky/pre-commit +4 -0
- package/template/meadmin/.mocharc.json +6 -0
- package/template/meadmin/.prettierignore +30 -0
- package/template/meadmin/.prettierrc.cjs +47 -0
- package/template/meadmin/.vscode/extensions.json +3 -0
- package/template/meadmin/.vscode/settings.json +28 -0
- package/template/meadmin/README.md +41 -0
- package/template/meadmin/bootstrap.js +2 -0
- package/template/meadmin/meadmin.sql +571 -0
- package/template/meadmin/nx.json +10 -0
- package/template/meadmin/packageTemplate.json +80 -0
- package/template/meadmin/pnpm-workspace.yaml +4 -0
- package/template/meadmin/public/admin/.gitkeep +0 -0
- package/template/meadmin/public/index/.gitkeep +0 -0
- package/template/meadmin/public/index/images/layout/bannerCode.jpg +0 -0
- package/template/meadmin/public/index/images/layout/bannerGift.jpg +0 -0
- package/template/meadmin/public/index/images/layout/bannerManage.jpg +0 -0
- package/template/meadmin/src/app/admin/controller/base.controller.ts +6 -0
- package/template/meadmin/src/app/admin/controller/example/demo.controller.ts +98 -0
- package/template/meadmin/src/app/admin/controller/file.controller.ts +105 -0
- package/template/meadmin/src/app/admin/controller/login.controller.ts +81 -0
- package/template/meadmin/src/app/admin/controller/system/admin.controller.ts +73 -0
- package/template/meadmin/src/app/admin/controller/system/menu.controller.ts +80 -0
- package/template/meadmin/src/app/admin/controller/system/role.controller.ts +81 -0
- package/template/meadmin/src/app/admin/controller/user.controller.ts +86 -0
- package/template/meadmin/src/app/admin/controller/userFile.controller.ts +84 -0
- package/template/meadmin/src/app/admin/dto/captchaResult.dto.ts +8 -0
- package/template/meadmin/src/app/admin/dto/example/demoCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/example/demoQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/example/demoUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/fileCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/fileQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/fileUp.dto.ts +28 -0
- package/template/meadmin/src/app/admin/dto/fileUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/loginCaptchaParam.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/loginInfoResult.dto.ts +24 -0
- package/template/meadmin/src/app/admin/dto/loginParam.dto.ts +13 -0
- package/template/meadmin/src/app/admin/dto/loginResult.dto.ts +10 -0
- package/template/meadmin/src/app/admin/dto/system/adminCreate.dto.ts +14 -0
- package/template/meadmin/src/app/admin/dto/system/adminQuery.dto.ts +30 -0
- package/template/meadmin/src/app/admin/dto/system/adminUpdate.dto.ts +24 -0
- package/template/meadmin/src/app/admin/dto/system/menuCreate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/system/menuQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/system/menuTreeAllResult.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/system/menuUpdate.dto.ts +8 -0
- package/template/meadmin/src/app/admin/dto/system/roleCreate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/system/roleQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/system/roleTreeAllResult.dto.ts +12 -0
- package/template/meadmin/src/app/admin/dto/system/roleUpdate.dto.ts +14 -0
- package/template/meadmin/src/app/admin/dto/userCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/userFileCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/userFileQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/userFileUp.dto.ts +28 -0
- package/template/meadmin/src/app/admin/dto/userFileUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/userQuery.dto.ts +26 -0
- package/template/meadmin/src/app/admin/dto/userUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/middleware/admin.middleware.ts +41 -0
- package/template/meadmin/src/app/admin/service/example/demo.service.ts +260 -0
- package/template/meadmin/src/app/admin/service/file.service.ts +123 -0
- package/template/meadmin/src/app/admin/service/login.serveice.ts +209 -0
- package/template/meadmin/src/app/admin/service/system/admin.service.ts +206 -0
- package/template/meadmin/src/app/admin/service/system/menu.service.ts +133 -0
- package/template/meadmin/src/app/admin/service/system/role.service.ts +161 -0
- package/template/meadmin/src/app/admin/service/user.service.ts +205 -0
- package/template/meadmin/src/app/admin/service/userFile.service.ts +126 -0
- package/template/meadmin/src/app/home.controller.ts +19 -0
- package/template/meadmin/src/app/index/controller/base.controller.ts +6 -0
- package/template/meadmin/src/app/index/controller/file.controller.ts +116 -0
- package/template/meadmin/src/app/index/controller/index.controller.ts +70 -0
- package/template/meadmin/src/app/index/controller/login.controller.ts +81 -0
- package/template/meadmin/src/app/index/controller/user.controller.ts +43 -0
- package/template/meadmin/src/app/index/dto/captchaResult.dto.ts +8 -0
- package/template/meadmin/src/app/index/dto/fileCreate.dto.ts +9 -0
- package/template/meadmin/src/app/index/dto/fileQuery.dto.ts +20 -0
- package/template/meadmin/src/app/index/dto/fileUp.dto.ts +28 -0
- package/template/meadmin/src/app/index/dto/fileUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/index/dto/loginCaptchaParam.dto.ts +9 -0
- package/template/meadmin/src/app/index/dto/loginParam.dto.ts +13 -0
- package/template/meadmin/src/app/index/dto/loginResult.dto.ts +10 -0
- package/template/meadmin/src/app/index/dto/userCreate.dto.ts +26 -0
- package/template/meadmin/src/app/index/dto/userUpdate.dto.ts +33 -0
- package/template/meadmin/src/app/index/middleware/index.middleware.ts +28 -0
- package/template/meadmin/src/app/index/service/file.service.ts +127 -0
- package/template/meadmin/src/app/index/service/login.serveice.ts +178 -0
- package/template/meadmin/src/app/index/service/user.service.ts +87 -0
- package/template/meadmin/src/config/config.default.ts +154 -0
- package/template/meadmin/src/config/config.unittest.ts +7 -0
- package/template/meadmin/src/config/database.ts +30 -0
- package/template/meadmin/src/configuration.ts +107 -0
- package/template/meadmin/src/controller/api.controller.ts +21 -0
- package/template/meadmin/src/decorators/admin/permission.ts +41 -0
- package/template/meadmin/src/decorators/index/permission.ts +37 -0
- package/template/meadmin/src/decorators/index.ts +61 -0
- package/template/meadmin/src/decorators/sequelize.ts +65 -0
- package/template/meadmin/src/decorators/swagger.ts +170 -0
- package/template/meadmin/src/decorators/transactions.ts +42 -0
- package/template/meadmin/src/dict/code.enum.ts +8 -0
- package/template/meadmin/src/dto/page.dto.ts +16 -0
- package/template/meadmin/src/entities/abstract/adminBase.entity.ts +35 -0
- package/template/meadmin/src/entities/abstract/adminTree.entity.ts +258 -0
- package/template/meadmin/src/entities/abstract/base.entity.ts +69 -0
- package/template/meadmin/src/entities/abstract/indexBase.entity.ts +39 -0
- package/template/meadmin/src/entities/exampleBook.entity.ts +22 -0
- package/template/meadmin/src/entities/exampleDemo.entity.ts +104 -0
- package/template/meadmin/src/entities/file.entity.ts +68 -0
- package/template/meadmin/src/entities/systemAdmin.entity.ts +164 -0
- package/template/meadmin/src/entities/systemMenu.entity.ts +161 -0
- package/template/meadmin/src/entities/systemRole.entity.ts +99 -0
- package/template/meadmin/src/entities/user.entity.ts +160 -0
- package/template/meadmin/src/entities/userFile.entity.ts +68 -0
- package/template/meadmin/src/fileManage/index.ts +12 -0
- package/template/meadmin/src/fileManage/storage/base.ts +6 -0
- package/template/meadmin/src/fileManage/storage/local.ts +93 -0
- package/template/meadmin/src/filter/badRequest.filter.ts +14 -0
- package/template/meadmin/src/filter/default.filter.ts +28 -0
- package/template/meadmin/src/filter/forbidden.filter.ts +15 -0
- package/template/meadmin/src/filter/index.ts +6 -0
- package/template/meadmin/src/filter/notfound.filter.ts +10 -0
- package/template/meadmin/src/filter/unauthorized.filter.ts +15 -0
- package/template/meadmin/src/filter/validate.filter.ts +23 -0
- package/template/meadmin/src/helper/dotenv.ts +13 -0
- package/template/meadmin/src/helper/dto.ts +195 -0
- package/template/meadmin/src/helper/snowflake.ts +50 -0
- package/template/meadmin/src/helper/utils.ts +57 -0
- package/template/meadmin/src/interface.ts +12 -0
- package/template/meadmin/src/locales/en.json +13 -0
- package/template/meadmin/src/logger.ts +24 -0
- package/template/meadmin/src/middleware/report.middleware.ts +23 -0
- package/template/meadmin/src/response/apiBase.res.ts +12 -0
- package/template/meadmin/src/response/apiError.res.ts +6 -0
- package/template/meadmin/src/response/apiPage.res.ts +19 -0
- package/template/meadmin/src/response/apiSuccess.res.ts +17 -0
- package/template/meadmin/src/ruleType/index.ts +3 -0
- package/template/meadmin/src/ruleType/string.ts +29 -0
- package/template/meadmin/src/service/dataSourceManager.service.ts +55 -0
- package/template/meadmin/src/service/response.service.ts +65 -0
- package/template/meadmin/src/types/decorator.ts +31 -0
- package/template/meadmin/src/types/entity.ts +209 -0
- package/template/meadmin/src/types/fileManage.ts +48 -0
- package/template/meadmin/src/types/koa.interface.ts +12 -0
- package/template/meadmin/src/types/uploadOptions.ts +7 -0
- package/template/meadmin/test/controller/api.test.ts +17 -0
- package/template/meadmin/test/controller/home.test.ts +18 -0
- package/template/meadmin/test/setup.ts +15 -0
- package/template/meadmin/test/tsconfig.json +19 -0
- package/template/meadmin/tsconfig.json +28 -0
- package/template/meadmin/types/mwtsc.d.ts +9 -0
- package/template/meadmin/uploadFile/admin/.gitkeep +0 -0
- package/template/meadmin/uploadFile/index/.gitkeep +0 -0
- package/template/meadmin/view/admin/.prettierignore +28 -0
- package/template/meadmin/view/admin/.prettierrc.cjs +4 -0
- package/template/meadmin/view/admin/cli/autoImport.ts +3 -0
- package/template/meadmin/view/admin/eslint.config.js +91 -0
- package/template/meadmin/view/admin/index.html +65 -0
- package/template/meadmin/view/admin/packageTemplate.json +123 -0
- package/template/meadmin/view/admin/plugins/autoComponents.ts +10 -0
- package/template/meadmin/view/admin/plugins/autoImport.ts +64 -0
- package/template/meadmin/view/admin/plugins/autoImportApi.ts +14 -0
- package/template/meadmin/view/admin/plugins/babel.ts +25 -0
- package/template/meadmin/view/admin/plugins/index.ts +107 -0
- package/template/meadmin/view/admin/plugins/svgLoader.ts +22 -0
- package/template/meadmin/view/admin/plugins/vueSetUpExtend.ts +5 -0
- package/template/meadmin/view/admin/public/favicon.ico +0 -0
- package/template/meadmin/view/admin/public/logo.png +0 -0
- package/template/meadmin/view/admin/public/logo.svg +1 -0
- package/template/meadmin/view/admin/src/App.vue +46 -0
- package/template/meadmin/view/admin/src/api/api.model.ts +11 -0
- package/template/meadmin/view/admin/src/api/example/demo.ts +189 -0
- package/template/meadmin/view/admin/src/api/file.ts +124 -0
- package/template/meadmin/view/admin/src/api/login.ts +55 -0
- package/template/meadmin/view/admin/src/api/system/admin.ts +111 -0
- package/template/meadmin/view/admin/src/api/system/menu.ts +125 -0
- package/template/meadmin/view/admin/src/api/system/role.ts +111 -0
- package/template/meadmin/view/admin/src/api/user.ts +106 -0
- package/template/meadmin/view/admin/src/api/userFile.ts +121 -0
- package/template/meadmin/view/admin/src/app.ts +13 -0
- package/template/meadmin/view/admin/src/assets/images/404.svg +339 -0
- package/template/meadmin/view/admin/src/assets/images/captcha.png +0 -0
- package/template/meadmin/view/admin/src/components/meButton.vue +39 -0
- package/template/meadmin/view/admin/src/components/meComponent.ts +73 -0
- package/template/meadmin/view/admin/src/components/meDarkSwitch.vue +36 -0
- package/template/meadmin/view/admin/src/components/meDialog/hooks/minMax.ts +163 -0
- package/template/meadmin/view/admin/src/components/meDialog/index.vue +86 -0
- package/template/meadmin/view/admin/src/components/meFilesView.vue +52 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/Suspense.ts +15 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/apiAsyncComponent.ts +3 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/component.ts +5 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/componentPublicInstance.ts +6 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/devtools.ts +43 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/errorHandling.ts +17 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/renderer.ts +103 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/shapeFlags.ts +13 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/vnode.ts +9 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/index.ts +347 -0
- package/template/meadmin/view/admin/src/components/meLocaleSelect.vue +34 -0
- package/template/meadmin/view/admin/src/components/meNumber.vue +74 -0
- package/template/meadmin/view/admin/src/components/meSearchForm.vue +175 -0
- package/template/meadmin/view/admin/src/components/meSearchMenu/index.vue +87 -0
- package/template/meadmin/view/admin/src/components/meSearchMenu/useSearchMenu.ts +87 -0
- package/template/meadmin/view/admin/src/components/meSelectFile/index.vue +87 -0
- package/template/meadmin/view/admin/src/components/meSelectFile/meSelectFile.ts +3 -0
- package/template/meadmin/view/admin/src/components/meSelectList.vue +80 -0
- package/template/meadmin/view/admin/src/components/meSelectUserFile/index.vue +96 -0
- package/template/meadmin/view/admin/src/components/meSelectUserFile/meSelectUserFile.ts +3 -0
- package/template/meadmin/view/admin/src/components/meSetting.vue +20 -0
- package/template/meadmin/view/admin/src/components/meSettingMenu.vue +152 -0
- package/template/meadmin/view/admin/src/components/meSizeSelect.vue +28 -0
- package/template/meadmin/view/admin/src/components/meUpload.vue +114 -0
- package/template/meadmin/view/admin/src/components/meUploadUserFile.vue +114 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/components/pagination.vue +67 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/directives/resize.ts +31 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/index.vue +287 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/install.ts +30 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/util.ts +11 -0
- package/template/meadmin/view/admin/src/components/meWangEditor/index.vue +121 -0
- package/template/meadmin/view/admin/src/components/meWangEditor/meWangEditor.scss +24 -0
- package/template/meadmin/view/admin/src/components/page.vue +24 -0
- package/template/meadmin/view/admin/src/components/service/meImageViewer.ts +23 -0
- package/template/meadmin/view/admin/src/config/index.ts +11 -0
- package/template/meadmin/view/admin/src/config/locale.ts +245 -0
- package/template/meadmin/view/admin/src/config/login.ts +5 -0
- package/template/meadmin/view/admin/src/config/theme.ts +19 -0
- package/template/meadmin/view/admin/src/dict/configEnum.ts +5 -0
- package/template/meadmin/view/admin/src/dict/eventEnmu.ts +14 -0
- package/template/meadmin/view/admin/src/dict/menuModeEnum.ts +5 -0
- package/template/meadmin/view/admin/src/dict/pageEnum.ts +6 -0
- package/template/meadmin/view/admin/src/directives/clickOutside.ts +2 -0
- package/template/meadmin/view/admin/src/entry-client.ts +8 -0
- package/template/meadmin/view/admin/src/entry-server.ts +69 -0
- package/template/meadmin/view/admin/src/env.d.ts +6 -0
- package/template/meadmin/view/admin/src/event/index.ts +30 -0
- package/template/meadmin/view/admin/src/event/module.ts +1 -0
- package/template/meadmin/view/admin/src/event/modules/core.ts +27 -0
- package/template/meadmin/view/admin/src/hooks/actionModel.ts +54 -0
- package/template/meadmin/view/admin/src/hooks/core/computedProxy.ts +10 -0
- package/template/meadmin/view/admin/src/hooks/index.ts +24 -0
- package/template/meadmin/view/admin/src/icons/index.ts +52 -0
- package/template/meadmin/view/admin/src/icons/svg/dashboard.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/moon.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/size.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/sunny.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/translation.svg +5 -0
- package/template/meadmin/view/admin/src/layout/components/expand.vue +18 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/tagBar/components/contextmenu.vue +180 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/tagBar/index.vue +322 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/left.vue +59 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/right/components/messageBox.vue +82 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/right/components/user.vue +53 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/right/index.vue +44 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/topMenu.vue +33 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/index.vue +30 -0
- package/template/meadmin/view/admin/src/layout/components/header/index.vue +15 -0
- package/template/meadmin/view/admin/src/layout/components/menu/components/menuItem.vue +72 -0
- package/template/meadmin/view/admin/src/layout/components/menu/index.vue +147 -0
- package/template/meadmin/view/admin/src/layout/components/page.vue +33 -0
- package/template/meadmin/view/admin/src/layout/components/title.vue +21 -0
- package/template/meadmin/view/admin/src/layout/index.vue +104 -0
- package/template/meadmin/view/admin/src/locales/helper.ts +127 -0
- package/template/meadmin/view/admin/src/locales/hooks.ts +50 -0
- package/template/meadmin/view/admin/src/locales/i18n.ts +16 -0
- package/template/meadmin/view/admin/src/locales/lang/en/default.json +65 -0
- package/template/meadmin/view/admin/src/locales/lang/en/index.ts +7 -0
- package/template/meadmin/view/admin/src/locales/lang/en/meTable.json +7 -0
- package/template/meadmin/view/admin/src/locales/lang/en/meVxeTable.ts +11 -0
- package/template/meadmin/view/admin/src/locales/lang/en/menu.json +1 -0
- package/template/meadmin/view/admin/src/locales/lang/en/rule.json +12 -0
- package/template/meadmin/view/admin/src/locales/lang/zh-cn/default.json +6 -0
- package/template/meadmin/view/admin/src/locales/lang/zh-cn/index.ts +7 -0
- package/template/meadmin/view/admin/src/locales/lang/zh-cn/meVxeTable.ts +2 -0
- package/template/meadmin/view/admin/src/main.ts +21 -0
- package/template/meadmin/view/admin/src/router/constant.ts +2 -0
- package/template/meadmin/view/admin/src/router/guard/index.ts +52 -0
- package/template/meadmin/view/admin/src/router/index.ts +115 -0
- package/template/meadmin/view/admin/src/setElGlobel.ts +16 -0
- package/template/meadmin/view/admin/src/store/index.ts +8 -0
- package/template/meadmin/view/admin/src/store/modules/global.ts +66 -0
- package/template/meadmin/view/admin/src/store/modules/route.ts +69 -0
- package/template/meadmin/view/admin/src/store/modules/setting.ts +46 -0
- package/template/meadmin/view/admin/src/store/modules/user.ts +115 -0
- package/template/meadmin/view/admin/src/styles/element-plus.scss +40 -0
- package/template/meadmin/view/admin/src/styles/index.scss +122 -0
- package/template/meadmin/view/admin/src/styles/transition.scss +33 -0
- package/template/meadmin/view/admin/src/styles/variables.scss +5 -0
- package/template/meadmin/view/admin/src/utils/fileMd5Work.ts +109 -0
- package/template/meadmin/view/admin/src/utils/fileUpload.ts +154 -0
- package/template/meadmin/view/admin/src/utils/formatting.ts +62 -0
- package/template/meadmin/view/admin/src/utils/helper.ts +315 -0
- package/template/meadmin/view/admin/src/utils/loading.ts +63 -0
- package/template/meadmin/view/admin/src/utils/log.ts +8 -0
- package/template/meadmin/view/admin/src/utils/mitt.ts +152 -0
- package/template/meadmin/view/admin/src/utils/nProgress.ts +31 -0
- package/template/meadmin/view/admin/src/utils/permission.ts +76 -0
- package/template/meadmin/view/admin/src/utils/request.ts +152 -0
- package/template/meadmin/view/admin/src/utils/userFileUpload.ts +154 -0
- package/template/meadmin/view/admin/src/utils/validate.ts +17 -0
- package/template/meadmin/view/admin/src/views/404.vue +50 -0
- package/template/meadmin/view/admin/src/views/example/demo/components/addOrUp.vue +118 -0
- package/template/meadmin/view/admin/src/views/example/demo/components/info.vue +56 -0
- package/template/meadmin/view/admin/src/views/example/demo/dict.ts +8 -0
- package/template/meadmin/view/admin/src/views/example/demo/index.vue +126 -0
- package/template/meadmin/view/admin/src/views/example/demo/lang/dict.ts +8 -0
- package/template/meadmin/view/admin/src/views/example/demo/lang/en.json +14 -0
- package/template/meadmin/view/admin/src/views/file/components/add.vue +24 -0
- package/template/meadmin/view/admin/src/views/file/components/info.vue +51 -0
- package/template/meadmin/view/admin/src/views/file/components/up.vue +72 -0
- package/template/meadmin/view/admin/src/views/file/index.vue +132 -0
- package/template/meadmin/view/admin/src/views/file/lang/en.json +11 -0
- package/template/meadmin/view/admin/src/views/login/components/header.vue +20 -0
- package/template/meadmin/view/admin/src/views/login/index.vue +163 -0
- package/template/meadmin/view/admin/src/views/redirect.vue +12 -0
- package/template/meadmin/view/admin/src/views/system/admin/components/addOrUp.vue +111 -0
- package/template/meadmin/view/admin/src/views/system/admin/components/info.vue +75 -0
- package/template/meadmin/view/admin/src/views/system/admin/dict.ts +7 -0
- package/template/meadmin/view/admin/src/views/system/admin/index.vue +145 -0
- package/template/meadmin/view/admin/src/views/system/admin/lang/en.json +19 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/components/addOrUp.vue +145 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/components/info.vue +68 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/dict.ts +36 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/index.vue +162 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/lang/en.json +20 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/components/addOrUp.vue +94 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/components/info.vue +59 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/dict.ts +7 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/index.vue +153 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/lang/en.json +14 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/index.vue +59 -0
- package/template/meadmin/view/admin/src/views/user/components/addOrUp.vue +120 -0
- package/template/meadmin/view/admin/src/views/user/components/info.vue +56 -0
- package/template/meadmin/view/admin/src/views/user/dict.ts +7 -0
- package/template/meadmin/view/admin/src/views/user/file/components/add.vue +24 -0
- package/template/meadmin/view/admin/src/views/user/file/components/info.vue +54 -0
- package/template/meadmin/view/admin/src/views/user/file/components/up.vue +82 -0
- package/template/meadmin/view/admin/src/views/user/file/index.vue +148 -0
- package/template/meadmin/view/admin/src/views/user/file/lang/en.json +17 -0
- package/template/meadmin/view/admin/src/views/user/index.vue +145 -0
- package/template/meadmin/view/admin/src/views/user/lang/en.json +18 -0
- package/template/meadmin/view/admin/template/components.d.ts +9 -0
- package/template/meadmin/view/admin/template/directives.d.ts +6 -0
- package/template/meadmin/view/admin/template/meIconComponents.d.ts +6 -0
- package/template/meadmin/view/admin/tsconfig.json +33 -0
- package/template/meadmin/view/admin/tsconfig.node.json +17 -0
- package/template/meadmin/view/admin/types/api.d.ts +15 -0
- package/template/meadmin/view/admin/types/auto-imports.d.ts +302 -0
- package/template/meadmin/view/admin/types/global.d.ts +60 -0
- package/template/meadmin/view/admin/types/globalComponents.d.ts +13 -0
- package/template/meadmin/view/admin/types/melIconComponents.d.d.ts +9 -0
- package/template/meadmin/view/admin/types/vue-router.d.ts +39 -0
- package/template/meadmin/view/admin/types/vueCustomProperties .d.ts +6 -0
- package/template/meadmin/view/admin/types/vueExtendType.d.ts +43 -0
- package/template/meadmin/view/admin/vite.config.ts +110 -0
- package/template/meadmin/view/index/.prettierignore +28 -0
- package/template/meadmin/view/index/.prettierrc.cjs +4 -0
- package/template/meadmin/view/index/README.md +84 -0
- package/template/meadmin/view/index/cli/autoImport.ts +3 -0
- package/template/meadmin/view/index/eslint.config.js +91 -0
- package/template/meadmin/view/index/index.html +22 -0
- package/template/meadmin/view/index/packageTemplate.json +122 -0
- package/template/meadmin/view/index/plugins/autoComponents.ts +10 -0
- package/template/meadmin/view/index/plugins/autoImport.ts +64 -0
- package/template/meadmin/view/index/plugins/autoImportApi.ts +14 -0
- package/template/meadmin/view/index/plugins/babel.ts +25 -0
- package/template/meadmin/view/index/plugins/index.ts +103 -0
- package/template/meadmin/view/index/plugins/svgLoader.ts +22 -0
- package/template/meadmin/view/index/plugins/vueSetUpExtend.ts +5 -0
- package/template/meadmin/view/index/public/favicon.ico +0 -0
- package/template/meadmin/view/index/public/logo.png +0 -0
- package/template/meadmin/view/index/public/logo.svg +1 -0
- package/template/meadmin/view/index/src/App.vue +30 -0
- package/template/meadmin/view/index/src/api/api.model.ts +11 -0
- package/template/meadmin/view/index/src/api/file.ts +123 -0
- package/template/meadmin/view/index/src/api/index.ts +25 -0
- package/template/meadmin/view/index/src/api/login.ts +72 -0
- package/template/meadmin/view/index/src/api/user.ts +42 -0
- package/template/meadmin/view/index/src/app.ts +39 -0
- package/template/meadmin/view/index/src/assets/images/404.svg +339 -0
- package/template/meadmin/view/index/src/assets/images/avatar.jpg +0 -0
- package/template/meadmin/view/index/src/components/meButton.vue +34 -0
- package/template/meadmin/view/index/src/components/meDialog/hooks/minMax.ts +166 -0
- package/template/meadmin/view/index/src/components/meDialog/index.vue +86 -0
- package/template/meadmin/view/index/src/components/meNumber.vue +74 -0
- package/template/meadmin/view/index/src/components/meSelectFile/index.vue +92 -0
- package/template/meadmin/view/index/src/components/meSelectFile/meSelectFile.ts +3 -0
- package/template/meadmin/view/index/src/components/meUpAvatar.vue +166 -0
- package/template/meadmin/view/index/src/components/meUpload.vue +111 -0
- package/template/meadmin/view/index/src/components/meVxeTable/components/pagination.vue +67 -0
- package/template/meadmin/view/index/src/components/meVxeTable/directives/resize.ts +31 -0
- package/template/meadmin/view/index/src/components/meVxeTable/index.vue +286 -0
- package/template/meadmin/view/index/src/components/meVxeTable/install.ts +18 -0
- package/template/meadmin/view/index/src/components/meVxeTable/util.ts +11 -0
- package/template/meadmin/view/index/src/components/meWangEditor/index.vue +121 -0
- package/template/meadmin/view/index/src/components/meWangEditor/meWangEditor.scss +24 -0
- package/template/meadmin/view/index/src/components/service/meImageViewer.ts +23 -0
- package/template/meadmin/view/index/src/config/index.ts +2 -0
- package/template/meadmin/view/index/src/config/login.ts +5 -0
- package/template/meadmin/view/index/src/dict/eventEnmu.ts +13 -0
- package/template/meadmin/view/index/src/dict/pageEnum.ts +8 -0
- package/template/meadmin/view/index/src/directives/clickOutside.ts +2 -0
- package/template/meadmin/view/index/src/entry-client.ts +8 -0
- package/template/meadmin/view/index/src/entry-server.ts +83 -0
- package/template/meadmin/view/index/src/env.d.ts +6 -0
- package/template/meadmin/view/index/src/event/index.ts +23 -0
- package/template/meadmin/view/index/src/hooks/actionModel.ts +54 -0
- package/template/meadmin/view/index/src/hooks/core/computedProxy.ts +10 -0
- package/template/meadmin/view/index/src/hooks/index.ts +24 -0
- package/template/meadmin/view/index/src/icons/index.ts +52 -0
- package/template/meadmin/view/index/src/icons/svg/dashboard.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/moon.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/size.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/sunny.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/translation.svg +5 -0
- package/template/meadmin/view/index/src/layout/default/components/footer.vue +22 -0
- package/template/meadmin/view/index/src/layout/default/components/header/components/menuItem.vue +69 -0
- package/template/meadmin/view/index/src/layout/default/components/header/components/user.vue +55 -0
- package/template/meadmin/view/index/src/layout/default/components/header/index.vue +53 -0
- package/template/meadmin/view/index/src/layout/default/index.vue +63 -0
- package/template/meadmin/view/index/src/layout/default/layout.scss +1 -0
- package/template/meadmin/view/index/src/layout/default/page.vue +11 -0
- package/template/meadmin/view/index/src/layout/layoutRoute.vue +13 -0
- package/template/meadmin/view/index/src/main.ts +28 -0
- package/template/meadmin/view/index/src/router/guard/index.ts +53 -0
- package/template/meadmin/view/index/src/router/index.ts +73 -0
- package/template/meadmin/view/index/src/router/routes/001-index.ts +42 -0
- package/template/meadmin/view/index/src/router/routes/002-demo.ts +12 -0
- package/template/meadmin/view/index/src/router/routes/003-user.ts +27 -0
- package/template/meadmin/view/index/src/router/routes/demo/001-demo.ts +36 -0
- package/template/meadmin/view/index/src/setElGlobel.ts +7 -0
- package/template/meadmin/view/index/src/store/index.ts +11 -0
- package/template/meadmin/view/index/src/store/module.ts +5 -0
- package/template/meadmin/view/index/src/store/modules/global.ts +52 -0
- package/template/meadmin/view/index/src/store/modules/route.ts +20 -0
- package/template/meadmin/view/index/src/store/modules/user.ts +98 -0
- package/template/meadmin/view/index/src/styles/element-plus.scss +40 -0
- package/template/meadmin/view/index/src/styles/index.scss +122 -0
- package/template/meadmin/view/index/src/styles/transition.scss +33 -0
- package/template/meadmin/view/index/src/styles/variables.scss +6 -0
- package/template/meadmin/view/index/src/utils/cookies.ts +59 -0
- package/template/meadmin/view/index/src/utils/fileMd5Work.ts +109 -0
- package/template/meadmin/view/index/src/utils/fileUpload.ts +156 -0
- package/template/meadmin/view/index/src/utils/helper.ts +261 -0
- package/template/meadmin/view/index/src/utils/loading.ts +71 -0
- package/template/meadmin/view/index/src/utils/log.ts +8 -0
- package/template/meadmin/view/index/src/utils/mitt.ts +152 -0
- package/template/meadmin/view/index/src/utils/nProgress.ts +52 -0
- package/template/meadmin/view/index/src/utils/request.ts +182 -0
- package/template/meadmin/view/index/src/utils/server.ts +73 -0
- package/template/meadmin/view/index/src/utils/validate.ts +17 -0
- package/template/meadmin/view/index/src/views/404.vue +50 -0
- package/template/meadmin/view/index/src/views/index/index.vue +137 -0
- package/template/meadmin/view/index/src/views/login/components/login.vue +117 -0
- package/template/meadmin/view/index/src/views/login/components/register.vue +192 -0
- package/template/meadmin/view/index/src/views/login/index.vue +147 -0
- package/template/meadmin/view/index/src/views/promiseError.vue +48 -0
- package/template/meadmin/view/index/src/views/redirect.vue +9 -0
- package/template/meadmin/view/index/src/views/user/components/editPass.vue +83 -0
- package/template/meadmin/view/index/src/views/user/components/userInfo.vue +91 -0
- package/template/meadmin/view/index/src/views/user/index.vue +67 -0
- package/template/meadmin/view/index/template/components.d.ts +9 -0
- package/template/meadmin/view/index/template/directives.d.ts +6 -0
- package/template/meadmin/view/index/template/meIconComponents.d.ts +6 -0
- package/template/meadmin/view/index/tsconfig.json +33 -0
- package/template/meadmin/view/index/tsconfig.node.json +17 -0
- package/template/meadmin/view/index/types/api.d.ts +15 -0
- package/template/meadmin/view/index/types/auto-imports.d.ts +301 -0
- package/template/meadmin/view/index/types/components.d.ts +25 -0
- package/template/meadmin/view/index/types/directives.d.ts +7 -0
- package/template/meadmin/view/index/types/global.d.ts +51 -0
- package/template/meadmin/view/index/types/globalComponents.d.ts +14 -0
- package/template/meadmin/view/index/types/meIconComponents.d.ts +11 -0
- package/template/meadmin/view/index/types/vue-router.d.ts +17 -0
- package/template/meadmin/view/index/types/vueCustomProperties .d.ts +6 -0
- package/template/meadmin/view/index/types/vueExtendType.d.ts +43 -0
- package/template/meadmin/view/index/vite.config.ts +92 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"forceConsistentCasingInFileNames": true,
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"composite": true,
|
|
7
|
+
"module": "nodenext",
|
|
8
|
+
"moduleResolution": "nodenext",
|
|
9
|
+
"allowSyntheticDefaultImports": true
|
|
10
|
+
},
|
|
11
|
+
"include": ["vite.config.ts", "./plugins/*.ts", "./cli/*.ts"],
|
|
12
|
+
"ts-node": {
|
|
13
|
+
"compilerOptions": {
|
|
14
|
+
"module": "NodeNext"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
// Generated by unplugin-auto-import
|
|
6
|
+
// biome-ignore lint: disable
|
|
7
|
+
export {}
|
|
8
|
+
declare global {
|
|
9
|
+
const EffectScope: typeof import('vue').EffectScope
|
|
10
|
+
const ElLoading: typeof import('element-plus/es').ElLoading
|
|
11
|
+
const ElMessage: typeof import('element-plus/es').ElMessage
|
|
12
|
+
const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
|
|
13
|
+
const asyncComputed: typeof import('@vueuse/core').asyncComputed
|
|
14
|
+
const autoResetRef: typeof import('@vueuse/core').autoResetRef
|
|
15
|
+
const computed: typeof import('vue').computed
|
|
16
|
+
const computedAsync: typeof import('@vueuse/core').computedAsync
|
|
17
|
+
const computedEager: typeof import('@vueuse/core').computedEager
|
|
18
|
+
const computedInject: typeof import('@vueuse/core').computedInject
|
|
19
|
+
const computedWithControl: typeof import('@vueuse/core').computedWithControl
|
|
20
|
+
const controlledComputed: typeof import('@vueuse/core').controlledComputed
|
|
21
|
+
const controlledRef: typeof import('@vueuse/core').controlledRef
|
|
22
|
+
const createApp: typeof import('vue').createApp
|
|
23
|
+
const createEventHook: typeof import('@vueuse/core').createEventHook
|
|
24
|
+
const createGlobalState: typeof import('@vueuse/core').createGlobalState
|
|
25
|
+
const createInjectionState: typeof import('@vueuse/core').createInjectionState
|
|
26
|
+
const createPinia: typeof import('pinia').createPinia
|
|
27
|
+
const createReactiveFn: typeof import('@vueuse/core').createReactiveFn
|
|
28
|
+
const createSharedComposable: typeof import('@vueuse/core').createSharedComposable
|
|
29
|
+
const createUnrefFn: typeof import('@vueuse/core').createUnrefFn
|
|
30
|
+
const customRef: typeof import('vue').customRef
|
|
31
|
+
const debouncedRef: typeof import('@vueuse/core').debouncedRef
|
|
32
|
+
const debouncedWatch: typeof import('@vueuse/core').debouncedWatch
|
|
33
|
+
const defineAsyncComponent: typeof import('vue').defineAsyncComponent
|
|
34
|
+
const defineComponent: typeof import('vue').defineComponent
|
|
35
|
+
const defineStore: typeof import('pinia').defineStore
|
|
36
|
+
const eagerComputed: typeof import('@vueuse/core').eagerComputed
|
|
37
|
+
const effectScope: typeof import('vue').effectScope
|
|
38
|
+
const extendRef: typeof import('@vueuse/core').extendRef
|
|
39
|
+
const getActivePinia: typeof import('pinia').getActivePinia
|
|
40
|
+
const getCurrentInstance: typeof import('vue').getCurrentInstance
|
|
41
|
+
const getCurrentScope: typeof import('vue').getCurrentScope
|
|
42
|
+
const getCurrentWatcher: typeof import('vue').getCurrentWatcher
|
|
43
|
+
const h: typeof import('vue').h
|
|
44
|
+
const ignorableWatch: typeof import('@vueuse/core').ignorableWatch
|
|
45
|
+
const inject: typeof import('vue').inject
|
|
46
|
+
const isDefined: typeof import('@vueuse/core').isDefined
|
|
47
|
+
const isProxy: typeof import('vue').isProxy
|
|
48
|
+
const isReactive: typeof import('vue').isReactive
|
|
49
|
+
const isReadonly: typeof import('vue').isReadonly
|
|
50
|
+
const isRef: typeof import('vue').isRef
|
|
51
|
+
const isShallow: typeof import('vue').isShallow
|
|
52
|
+
const makeDestructurable: typeof import('@vueuse/core').makeDestructurable
|
|
53
|
+
const mapActions: typeof import('pinia').mapActions
|
|
54
|
+
const mapGetters: typeof import('pinia').mapGetters
|
|
55
|
+
const mapState: typeof import('pinia').mapState
|
|
56
|
+
const mapStores: typeof import('pinia').mapStores
|
|
57
|
+
const mapWritableState: typeof import('pinia').mapWritableState
|
|
58
|
+
const markRaw: typeof import('vue').markRaw
|
|
59
|
+
const nextTick: typeof import('vue').nextTick
|
|
60
|
+
const onActivated: typeof import('vue').onActivated
|
|
61
|
+
const onBeforeMount: typeof import('vue').onBeforeMount
|
|
62
|
+
const onBeforeRouteLeave: typeof import('vue-router').onBeforeRouteLeave
|
|
63
|
+
const onBeforeRouteUpdate: typeof import('vue-router').onBeforeRouteUpdate
|
|
64
|
+
const onBeforeUnmount: typeof import('vue').onBeforeUnmount
|
|
65
|
+
const onBeforeUpdate: typeof import('vue').onBeforeUpdate
|
|
66
|
+
const onClickOutside: typeof import('@vueuse/core').onClickOutside
|
|
67
|
+
const onDeactivated: typeof import('vue').onDeactivated
|
|
68
|
+
const onErrorCaptured: typeof import('vue').onErrorCaptured
|
|
69
|
+
const onKeyStroke: typeof import('@vueuse/core').onKeyStroke
|
|
70
|
+
const onLongPress: typeof import('@vueuse/core').onLongPress
|
|
71
|
+
const onMounted: typeof import('vue').onMounted
|
|
72
|
+
const onRenderTracked: typeof import('vue').onRenderTracked
|
|
73
|
+
const onRenderTriggered: typeof import('vue').onRenderTriggered
|
|
74
|
+
const onScopeDispose: typeof import('vue').onScopeDispose
|
|
75
|
+
const onServerPrefetch: typeof import('vue').onServerPrefetch
|
|
76
|
+
const onStartTyping: typeof import('@vueuse/core').onStartTyping
|
|
77
|
+
const onUnmounted: typeof import('vue').onUnmounted
|
|
78
|
+
const onUpdated: typeof import('vue').onUpdated
|
|
79
|
+
const onWatcherCleanup: typeof import('vue').onWatcherCleanup
|
|
80
|
+
const pausableWatch: typeof import('@vueuse/core').pausableWatch
|
|
81
|
+
const provide: typeof import('vue').provide
|
|
82
|
+
const reactify: typeof import('@vueuse/core').reactify
|
|
83
|
+
const reactifyObject: typeof import('@vueuse/core').reactifyObject
|
|
84
|
+
const reactive: typeof import('vue').reactive
|
|
85
|
+
const reactiveComputed: typeof import('@vueuse/core').reactiveComputed
|
|
86
|
+
const reactiveOmit: typeof import('@vueuse/core').reactiveOmit
|
|
87
|
+
const reactivePick: typeof import('@vueuse/core').reactivePick
|
|
88
|
+
const readonly: typeof import('vue').readonly
|
|
89
|
+
const ref: typeof import('vue').ref
|
|
90
|
+
const refAutoReset: typeof import('@vueuse/core').refAutoReset
|
|
91
|
+
const refDebounced: typeof import('@vueuse/core').refDebounced
|
|
92
|
+
const refDefault: typeof import('@vueuse/core').refDefault
|
|
93
|
+
const refThrottled: typeof import('@vueuse/core').refThrottled
|
|
94
|
+
const refWithControl: typeof import('@vueuse/core').refWithControl
|
|
95
|
+
const resolveComponent: typeof import('vue').resolveComponent
|
|
96
|
+
const resolveRef: typeof import('@vueuse/core').resolveRef
|
|
97
|
+
const resolveUnref: typeof import('@vueuse/core').resolveUnref
|
|
98
|
+
const setActivePinia: typeof import('pinia').setActivePinia
|
|
99
|
+
const setMapStoreSuffix: typeof import('pinia').setMapStoreSuffix
|
|
100
|
+
const shallowReactive: typeof import('vue').shallowReactive
|
|
101
|
+
const shallowReadonly: typeof import('vue').shallowReadonly
|
|
102
|
+
const shallowRef: typeof import('vue').shallowRef
|
|
103
|
+
const storeToRefs: typeof import('pinia').storeToRefs
|
|
104
|
+
const syncRef: typeof import('@vueuse/core').syncRef
|
|
105
|
+
const syncRefs: typeof import('@vueuse/core').syncRefs
|
|
106
|
+
const templateRef: typeof import('@vueuse/core').templateRef
|
|
107
|
+
const throttledRef: typeof import('@vueuse/core').throttledRef
|
|
108
|
+
const throttledWatch: typeof import('@vueuse/core').throttledWatch
|
|
109
|
+
const toRaw: typeof import('vue').toRaw
|
|
110
|
+
const toReactive: typeof import('@vueuse/core').toReactive
|
|
111
|
+
const toRef: typeof import('vue').toRef
|
|
112
|
+
const toRefs: typeof import('vue').toRefs
|
|
113
|
+
const toValue: typeof import('vue').toValue
|
|
114
|
+
const triggerRef: typeof import('vue').triggerRef
|
|
115
|
+
const tryOnBeforeMount: typeof import('@vueuse/core').tryOnBeforeMount
|
|
116
|
+
const tryOnBeforeUnmount: typeof import('@vueuse/core').tryOnBeforeUnmount
|
|
117
|
+
const tryOnMounted: typeof import('@vueuse/core').tryOnMounted
|
|
118
|
+
const tryOnScopeDispose: typeof import('@vueuse/core').tryOnScopeDispose
|
|
119
|
+
const tryOnUnmounted: typeof import('@vueuse/core').tryOnUnmounted
|
|
120
|
+
const unref: typeof import('vue').unref
|
|
121
|
+
const unrefElement: typeof import('@vueuse/core').unrefElement
|
|
122
|
+
const until: typeof import('@vueuse/core').until
|
|
123
|
+
const useActiveElement: typeof import('@vueuse/core').useActiveElement
|
|
124
|
+
const useArrayEvery: typeof import('@vueuse/core').useArrayEvery
|
|
125
|
+
const useArrayFilter: typeof import('@vueuse/core').useArrayFilter
|
|
126
|
+
const useArrayFind: typeof import('@vueuse/core').useArrayFind
|
|
127
|
+
const useArrayFindIndex: typeof import('@vueuse/core').useArrayFindIndex
|
|
128
|
+
const useArrayFindLast: typeof import('@vueuse/core').useArrayFindLast
|
|
129
|
+
const useArrayJoin: typeof import('@vueuse/core').useArrayJoin
|
|
130
|
+
const useArrayMap: typeof import('@vueuse/core').useArrayMap
|
|
131
|
+
const useArrayReduce: typeof import('@vueuse/core').useArrayReduce
|
|
132
|
+
const useArraySome: typeof import('@vueuse/core').useArraySome
|
|
133
|
+
const useArrayUnique: typeof import('@vueuse/core').useArrayUnique
|
|
134
|
+
const useAsyncQueue: typeof import('@vueuse/core').useAsyncQueue
|
|
135
|
+
const useAsyncState: typeof import('@vueuse/core').useAsyncState
|
|
136
|
+
const useAttrs: typeof import('vue').useAttrs
|
|
137
|
+
const useBase64: typeof import('@vueuse/core').useBase64
|
|
138
|
+
const useBattery: typeof import('@vueuse/core').useBattery
|
|
139
|
+
const useBluetooth: typeof import('@vueuse/core').useBluetooth
|
|
140
|
+
const useBreakpoints: typeof import('@vueuse/core').useBreakpoints
|
|
141
|
+
const useBroadcastChannel: typeof import('@vueuse/core').useBroadcastChannel
|
|
142
|
+
const useBrowserLocation: typeof import('@vueuse/core').useBrowserLocation
|
|
143
|
+
const useCached: typeof import('@vueuse/core').useCached
|
|
144
|
+
const useClipboard: typeof import('@vueuse/core').useClipboard
|
|
145
|
+
const useCloned: typeof import('@vueuse/core').useCloned
|
|
146
|
+
const useColorMode: typeof import('@vueuse/core').useColorMode
|
|
147
|
+
const useConfirmDialog: typeof import('@vueuse/core').useConfirmDialog
|
|
148
|
+
const useCounter: typeof import('@vueuse/core').useCounter
|
|
149
|
+
const useCssModule: typeof import('vue').useCssModule
|
|
150
|
+
const useCssVar: typeof import('@vueuse/core').useCssVar
|
|
151
|
+
const useCssVars: typeof import('vue').useCssVars
|
|
152
|
+
const useCurrentElement: typeof import('@vueuse/core').useCurrentElement
|
|
153
|
+
const useCycleList: typeof import('@vueuse/core').useCycleList
|
|
154
|
+
const useDark: typeof import('@vueuse/core').useDark
|
|
155
|
+
const useDateFormat: typeof import('@vueuse/core').useDateFormat
|
|
156
|
+
const useDebounce: typeof import('@vueuse/core').useDebounce
|
|
157
|
+
const useDebounceFn: typeof import('@vueuse/core').useDebounceFn
|
|
158
|
+
const useDebouncedRefHistory: typeof import('@vueuse/core').useDebouncedRefHistory
|
|
159
|
+
const useDeviceMotion: typeof import('@vueuse/core').useDeviceMotion
|
|
160
|
+
const useDeviceOrientation: typeof import('@vueuse/core').useDeviceOrientation
|
|
161
|
+
const useDevicePixelRatio: typeof import('@vueuse/core').useDevicePixelRatio
|
|
162
|
+
const useDevicesList: typeof import('@vueuse/core').useDevicesList
|
|
163
|
+
const useDisplayMedia: typeof import('@vueuse/core').useDisplayMedia
|
|
164
|
+
const useDocumentVisibility: typeof import('@vueuse/core').useDocumentVisibility
|
|
165
|
+
const useDraggable: typeof import('@vueuse/core').useDraggable
|
|
166
|
+
const useDropZone: typeof import('@vueuse/core').useDropZone
|
|
167
|
+
const useElementBounding: typeof import('@vueuse/core').useElementBounding
|
|
168
|
+
const useElementByPoint: typeof import('@vueuse/core').useElementByPoint
|
|
169
|
+
const useElementHover: typeof import('@vueuse/core').useElementHover
|
|
170
|
+
const useElementSize: typeof import('@vueuse/core').useElementSize
|
|
171
|
+
const useElementVisibility: typeof import('@vueuse/core').useElementVisibility
|
|
172
|
+
const useEventBus: typeof import('@vueuse/core').useEventBus
|
|
173
|
+
const useEventListener: typeof import('@vueuse/core').useEventListener
|
|
174
|
+
const useEventSource: typeof import('@vueuse/core').useEventSource
|
|
175
|
+
const useEyeDropper: typeof import('@vueuse/core').useEyeDropper
|
|
176
|
+
const useFavicon: typeof import('@vueuse/core').useFavicon
|
|
177
|
+
const useFetch: typeof import('@vueuse/core').useFetch
|
|
178
|
+
const useFileDialog: typeof import('@vueuse/core').useFileDialog
|
|
179
|
+
const useFileSystemAccess: typeof import('@vueuse/core').useFileSystemAccess
|
|
180
|
+
const useFocus: typeof import('@vueuse/core').useFocus
|
|
181
|
+
const useFocusWithin: typeof import('@vueuse/core').useFocusWithin
|
|
182
|
+
const useFps: typeof import('@vueuse/core').useFps
|
|
183
|
+
const useFullscreen: typeof import('@vueuse/core').useFullscreen
|
|
184
|
+
const useGamepad: typeof import('@vueuse/core').useGamepad
|
|
185
|
+
const useGeolocation: typeof import('@vueuse/core').useGeolocation
|
|
186
|
+
const useId: typeof import('vue').useId
|
|
187
|
+
const useIdle: typeof import('@vueuse/core').useIdle
|
|
188
|
+
const useImage: typeof import('@vueuse/core').useImage
|
|
189
|
+
const useInfiniteScroll: typeof import('@vueuse/core').useInfiniteScroll
|
|
190
|
+
const useIntersectionObserver: typeof import('@vueuse/core').useIntersectionObserver
|
|
191
|
+
const useInterval: typeof import('@vueuse/core').useInterval
|
|
192
|
+
const useIntervalFn: typeof import('@vueuse/core').useIntervalFn
|
|
193
|
+
const useKeyModifier: typeof import('@vueuse/core').useKeyModifier
|
|
194
|
+
const useLastChanged: typeof import('@vueuse/core').useLastChanged
|
|
195
|
+
const useLink: typeof import('vue-router').useLink
|
|
196
|
+
const useLocalStorage: typeof import('@vueuse/core').useLocalStorage
|
|
197
|
+
const useMagicKeys: typeof import('@vueuse/core').useMagicKeys
|
|
198
|
+
const useManualRefHistory: typeof import('@vueuse/core').useManualRefHistory
|
|
199
|
+
const useMediaControls: typeof import('@vueuse/core').useMediaControls
|
|
200
|
+
const useMediaQuery: typeof import('@vueuse/core').useMediaQuery
|
|
201
|
+
const useMemoize: typeof import('@vueuse/core').useMemoize
|
|
202
|
+
const useMemory: typeof import('@vueuse/core').useMemory
|
|
203
|
+
const useModel: typeof import('vue').useModel
|
|
204
|
+
const useMounted: typeof import('@vueuse/core').useMounted
|
|
205
|
+
const useMouse: typeof import('@vueuse/core').useMouse
|
|
206
|
+
const useMouseInElement: typeof import('@vueuse/core').useMouseInElement
|
|
207
|
+
const useMousePressed: typeof import('@vueuse/core').useMousePressed
|
|
208
|
+
const useMutationObserver: typeof import('@vueuse/core').useMutationObserver
|
|
209
|
+
const useNavigatorLanguage: typeof import('@vueuse/core').useNavigatorLanguage
|
|
210
|
+
const useNetwork: typeof import('@vueuse/core').useNetwork
|
|
211
|
+
const useNow: typeof import('@vueuse/core').useNow
|
|
212
|
+
const useObjectUrl: typeof import('@vueuse/core').useObjectUrl
|
|
213
|
+
const useOffsetPagination: typeof import('@vueuse/core').useOffsetPagination
|
|
214
|
+
const useOnline: typeof import('@vueuse/core').useOnline
|
|
215
|
+
const usePageLeave: typeof import('@vueuse/core').usePageLeave
|
|
216
|
+
const useParallax: typeof import('@vueuse/core').useParallax
|
|
217
|
+
const usePermission: typeof import('@vueuse/core').usePermission
|
|
218
|
+
const usePointer: typeof import('@vueuse/core').usePointer
|
|
219
|
+
const usePointerLock: typeof import('@vueuse/core').usePointerLock
|
|
220
|
+
const usePointerSwipe: typeof import('@vueuse/core').usePointerSwipe
|
|
221
|
+
const usePreferredColorScheme: typeof import('@vueuse/core').usePreferredColorScheme
|
|
222
|
+
const usePreferredContrast: typeof import('@vueuse/core').usePreferredContrast
|
|
223
|
+
const usePreferredDark: typeof import('@vueuse/core').usePreferredDark
|
|
224
|
+
const usePreferredLanguages: typeof import('@vueuse/core').usePreferredLanguages
|
|
225
|
+
const usePreferredReducedMotion: typeof import('@vueuse/core').usePreferredReducedMotion
|
|
226
|
+
const usePrevious: typeof import('@vueuse/core').usePrevious
|
|
227
|
+
const useRafFn: typeof import('@vueuse/core').useRafFn
|
|
228
|
+
const useRefHistory: typeof import('@vueuse/core').useRefHistory
|
|
229
|
+
const useResizeObserver: typeof import('@vueuse/core').useResizeObserver
|
|
230
|
+
const useRoute: typeof import('vue-router').useRoute
|
|
231
|
+
const useRouter: typeof import('vue-router').useRouter
|
|
232
|
+
const useScreenOrientation: typeof import('@vueuse/core').useScreenOrientation
|
|
233
|
+
const useScreenSafeArea: typeof import('@vueuse/core').useScreenSafeArea
|
|
234
|
+
const useScriptTag: typeof import('@vueuse/core').useScriptTag
|
|
235
|
+
const useScroll: typeof import('@vueuse/core').useScroll
|
|
236
|
+
const useScrollLock: typeof import('@vueuse/core').useScrollLock
|
|
237
|
+
const useSessionStorage: typeof import('@vueuse/core').useSessionStorage
|
|
238
|
+
const useShare: typeof import('@vueuse/core').useShare
|
|
239
|
+
const useSlots: typeof import('vue').useSlots
|
|
240
|
+
const useSorted: typeof import('@vueuse/core').useSorted
|
|
241
|
+
const useSpeechRecognition: typeof import('@vueuse/core').useSpeechRecognition
|
|
242
|
+
const useSpeechSynthesis: typeof import('@vueuse/core').useSpeechSynthesis
|
|
243
|
+
const useStepper: typeof import('@vueuse/core').useStepper
|
|
244
|
+
const useStorage: typeof import('@vueuse/core').useStorage
|
|
245
|
+
const useStorageAsync: typeof import('@vueuse/core').useStorageAsync
|
|
246
|
+
const useStyleTag: typeof import('@vueuse/core').useStyleTag
|
|
247
|
+
const useSupported: typeof import('@vueuse/core').useSupported
|
|
248
|
+
const useSwipe: typeof import('@vueuse/core').useSwipe
|
|
249
|
+
const useTemplateRef: typeof import('vue').useTemplateRef
|
|
250
|
+
const useTemplateRefsList: typeof import('@vueuse/core').useTemplateRefsList
|
|
251
|
+
const useTextDirection: typeof import('@vueuse/core').useTextDirection
|
|
252
|
+
const useTextSelection: typeof import('@vueuse/core').useTextSelection
|
|
253
|
+
const useTextareaAutosize: typeof import('@vueuse/core').useTextareaAutosize
|
|
254
|
+
const useThrottle: typeof import('@vueuse/core').useThrottle
|
|
255
|
+
const useThrottleFn: typeof import('@vueuse/core').useThrottleFn
|
|
256
|
+
const useThrottledRefHistory: typeof import('@vueuse/core').useThrottledRefHistory
|
|
257
|
+
const useTimeAgo: typeof import('@vueuse/core').useTimeAgo
|
|
258
|
+
const useTimeout: typeof import('@vueuse/core').useTimeout
|
|
259
|
+
const useTimeoutFn: typeof import('@vueuse/core').useTimeoutFn
|
|
260
|
+
const useTimeoutPoll: typeof import('@vueuse/core').useTimeoutPoll
|
|
261
|
+
const useTimestamp: typeof import('@vueuse/core').useTimestamp
|
|
262
|
+
const useTitle: typeof import('@vueuse/core').useTitle
|
|
263
|
+
const useToNumber: typeof import('@vueuse/core').useToNumber
|
|
264
|
+
const useToString: typeof import('@vueuse/core').useToString
|
|
265
|
+
const useToggle: typeof import('@vueuse/core').useToggle
|
|
266
|
+
const useTransition: typeof import('@vueuse/core').useTransition
|
|
267
|
+
const useUrlSearchParams: typeof import('@vueuse/core').useUrlSearchParams
|
|
268
|
+
const useUserMedia: typeof import('@vueuse/core').useUserMedia
|
|
269
|
+
const useVModel: typeof import('@vueuse/core').useVModel
|
|
270
|
+
const useVModels: typeof import('@vueuse/core').useVModels
|
|
271
|
+
const useVibrate: typeof import('@vueuse/core').useVibrate
|
|
272
|
+
const useVirtualList: typeof import('@vueuse/core').useVirtualList
|
|
273
|
+
const useWakeLock: typeof import('@vueuse/core').useWakeLock
|
|
274
|
+
const useWebNotification: typeof import('@vueuse/core').useWebNotification
|
|
275
|
+
const useWebSocket: typeof import('@vueuse/core').useWebSocket
|
|
276
|
+
const useWebWorker: typeof import('@vueuse/core').useWebWorker
|
|
277
|
+
const useWebWorkerFn: typeof import('@vueuse/core').useWebWorkerFn
|
|
278
|
+
const useWindowFocus: typeof import('@vueuse/core').useWindowFocus
|
|
279
|
+
const useWindowScroll: typeof import('@vueuse/core').useWindowScroll
|
|
280
|
+
const useWindowSize: typeof import('@vueuse/core').useWindowSize
|
|
281
|
+
const watch: typeof import('vue').watch
|
|
282
|
+
const watchArray: typeof import('@vueuse/core').watchArray
|
|
283
|
+
const watchAtMost: typeof import('@vueuse/core').watchAtMost
|
|
284
|
+
const watchDebounced: typeof import('@vueuse/core').watchDebounced
|
|
285
|
+
const watchEffect: typeof import('vue').watchEffect
|
|
286
|
+
const watchIgnorable: typeof import('@vueuse/core').watchIgnorable
|
|
287
|
+
const watchOnce: typeof import('@vueuse/core').watchOnce
|
|
288
|
+
const watchPausable: typeof import('@vueuse/core').watchPausable
|
|
289
|
+
const watchPostEffect: typeof import('vue').watchPostEffect
|
|
290
|
+
const watchSyncEffect: typeof import('vue').watchSyncEffect
|
|
291
|
+
const watchThrottled: typeof import('@vueuse/core').watchThrottled
|
|
292
|
+
const watchTriggerable: typeof import('@vueuse/core').watchTriggerable
|
|
293
|
+
const watchWithFilter: typeof import('@vueuse/core').watchWithFilter
|
|
294
|
+
const whenever: typeof import('@vueuse/core').whenever
|
|
295
|
+
}
|
|
296
|
+
// for type re-export
|
|
297
|
+
declare global {
|
|
298
|
+
// @ts-ignore
|
|
299
|
+
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
|
300
|
+
import('vue')
|
|
301
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare module 'vue' {
|
|
2
|
+
export interface GlobalComponents {
|
|
3
|
+
MeButton: typeof import('../src/components/meButton.vue')['default'];
|
|
4
|
+
MeNumber: typeof import('../src/components/meNumber.vue')['default'];
|
|
5
|
+
MeUpAvatar: typeof import('../src/components/meUpAvatar.vue')['default'];
|
|
6
|
+
MeUpload: typeof import('../src/components/meUpload.vue')['default'];
|
|
7
|
+
MeDialog: typeof import('../src/components/meDialog/index.vue')['default'];
|
|
8
|
+
MeSelectFile: typeof import('../src/components/meSelectFile/index.vue')['default'];
|
|
9
|
+
MeVxeTable: typeof import('../src/components/meVxeTable/index.vue')['default'];
|
|
10
|
+
MeWangEditor: typeof import('../src/components/meWangEditor/index.vue')['default'];
|
|
11
|
+
//code
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
type MeButtonInstance = InstanceType<typeof import('../src/components/meButton.vue')['default']>;
|
|
16
|
+
type MeNumberInstance = InstanceType<typeof import('../src/components/meNumber.vue')['default']>;
|
|
17
|
+
type MeUpAvatarInstance = InstanceType<typeof import('../src/components/meUpAvatar.vue')['default']>;
|
|
18
|
+
type MeUploadInstance = InstanceType<typeof import('../src/components/meUpload.vue')['default']>;
|
|
19
|
+
type MeDialogInstance = InstanceType<typeof import('../src/components/meDialog/index.vue')['default']>;
|
|
20
|
+
type MeSelectFileInstance = InstanceType<typeof import('../src/components/meSelectFile/index.vue')['default']>;
|
|
21
|
+
type MeVxeTableInstance = InstanceType<typeof import('../src/components/meVxeTable/index.vue')['default']>;
|
|
22
|
+
type MeWangEditorInstance = InstanceType<typeof import('../src/components/meWangEditor/index.vue')['default']>;
|
|
23
|
+
//typeCode
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ElTable } from 'element-plus';
|
|
2
|
+
import { DefineComponent, Prop } from 'vue';
|
|
3
|
+
declare global {
|
|
4
|
+
//unplugin-auto-import的Element是在页面加载到的时候才生成类型,这里全局声明一下
|
|
5
|
+
const ElLoading: typeof import('element-plus/es')['ElLoading'];
|
|
6
|
+
const ElMessage: typeof import('element-plus/es')['ElMessage'];
|
|
7
|
+
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'];
|
|
8
|
+
const ElNotification: typeof import('element-plus/es')['ElNotification'];
|
|
9
|
+
// svg-icon /el-cion-*组件定义
|
|
10
|
+
type Icon = DefineComponent<{
|
|
11
|
+
size: (StringConstructor | NumberConstructor)[];
|
|
12
|
+
color: StringConstructor;
|
|
13
|
+
}>;
|
|
14
|
+
|
|
15
|
+
/* eslint-disable */
|
|
16
|
+
declare const __SSR__: boolean;
|
|
17
|
+
declare const __DEV__: boolean;
|
|
18
|
+
declare const __COMPAT__: boolean;
|
|
19
|
+
|
|
20
|
+
// Feature flags
|
|
21
|
+
declare const __FEATURE_PROD_DEVTOOLS__: boolean;
|
|
22
|
+
declare const __FEATURE_SUSPENSE__: boolean;
|
|
23
|
+
|
|
24
|
+
type ComponentProps<Component> = {
|
|
25
|
+
-readonly [K in keyof Omit<InstanceType<Component>['$props'], keyof InstanceType<DefineComponent>['$props']>]: InstanceType<Component>['$props'][K];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//将 对象类型 转化为合法的组件props声明类型
|
|
29
|
+
type ComponentObjectPropsOptionsFromData<P = Record<string, unknown>> = {
|
|
30
|
+
[K in keyof P]-?: undefined extends P[K] ? Prop<P[K] | undefined> : Prop<P[K]>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//判断是否是字符串
|
|
34
|
+
type IsStringLiteral<T> = T extends string ? (string extends T ? false : true) : false;
|
|
35
|
+
//将数组类型emit转化为对象函数类型emit
|
|
36
|
+
type ArrayEmitsOptionsToFns<T extends any[]> = {
|
|
37
|
+
[K in T[0]]: IsStringLiteral<K> extends true ? (...args: T extends [e: infer E, ...args: infer P] ? (K extends E ? P : never) : never) => void : never;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type ELTableInstance = InstanceType<typeof ElTable> & {
|
|
41
|
+
getSelectionIndexs: () => number[]; //获取选中行的索引
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
type KeyOfMap<T extends Map> = Parameters<T['get']>[0];
|
|
45
|
+
|
|
46
|
+
type ValueOfMap<T extends Map> = ReturnType<T['get']>;
|
|
47
|
+
|
|
48
|
+
declare interface Window {
|
|
49
|
+
__serverCache: Record<string, Array<any>>;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare module 'vue' {
|
|
2
|
+
export interface GlobalComponents {
|
|
3
|
+
LayoutMenuItem: typeof import('../src/layout/components/menu/components/menuItem.vue')['default'];
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
import { StateTree } from 'pinia';
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
__pinia?: Record<string, StateTree>;
|
|
10
|
+
__ssrVersion: string;
|
|
11
|
+
}
|
|
12
|
+
type TestIndex = number;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare module 'vue-router' {
|
|
2
|
+
export interface RouteMeta extends Record<string | number | symbol, unknown> {
|
|
3
|
+
// 标题设置该路由在侧边栏和面包屑中展示的名字
|
|
4
|
+
title: string;
|
|
5
|
+
// 外链
|
|
6
|
+
isLink?: boolean;
|
|
7
|
+
//需要登录才能访问
|
|
8
|
+
needLogin?: boolean;
|
|
9
|
+
//菜单不展示
|
|
10
|
+
hideMenu?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface _RouteRecordBase {
|
|
13
|
+
// 没有需要展示的子集(会动态计算不要设置默认值)
|
|
14
|
+
noShowingChildren?: boolean;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { MessageImport } from '@/locales/I18n';
|
|
2
|
+
declare module 'vue' {
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
type LifecycleHook<TFn = Function> = TFn[] | null;
|
|
5
|
+
export declare interface ComponentOptionsBase {
|
|
6
|
+
langImport?: MessageImport;
|
|
7
|
+
}
|
|
8
|
+
export interface ComponentInternalInstance {
|
|
9
|
+
ctx: Record<string, unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* suspense related
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
suspense: SuspenseBoundary | null;
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
da: LifecycleHook;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
a: LifecycleHook;
|
|
23
|
+
}
|
|
24
|
+
export interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = { [key: string]: any }> {
|
|
25
|
+
/**
|
|
26
|
+
* SFC only. This is assigned to:
|
|
27
|
+
* - Slot fragment vnodes with :slotted SFC styles.
|
|
28
|
+
* - Component vnodes (during patch/hydration) so that its root node can
|
|
29
|
+
* inherit the component's slotScopeIds
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
slotScopeIds: string[] | null;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
ssContent: VNode | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface ComponentCustomProperties {
|
|
40
|
+
$permission: (key: string | string[]) => boolean;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { resolve } from 'path';
|
|
2
|
+
import { ConfigEnv, UserConfigExport } from 'vite';
|
|
3
|
+
import plugins from './plugins/index.js';
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
function pathResolve(dir: string) {
|
|
6
|
+
return resolve(import.meta.dirname, '.', dir);
|
|
7
|
+
}
|
|
8
|
+
export default async (configEnv: ConfigEnv): Promise<UserConfigExport> => {
|
|
9
|
+
const config = {
|
|
10
|
+
root: import.meta.dirname,
|
|
11
|
+
base: process.env.VIEW_INDEX_PATH_PRE,
|
|
12
|
+
envPrefix: 'VIEW_INDEX_',
|
|
13
|
+
plugins: await plugins(configEnv),
|
|
14
|
+
css: {
|
|
15
|
+
preprocessorOptions: {
|
|
16
|
+
scss: {
|
|
17
|
+
additionalData: `@use "@/styles/variables.scss" as *;`,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
resolve: {
|
|
22
|
+
alias: [
|
|
23
|
+
// /@/xxxx => src/xxxx
|
|
24
|
+
{
|
|
25
|
+
find: /@\//,
|
|
26
|
+
replacement: pathResolve('src') + '/',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
|
30
|
+
},
|
|
31
|
+
define: {
|
|
32
|
+
__SSR__: `true`,
|
|
33
|
+
__DEV__: configEnv.mode === 'development' ? `true` : `false`,
|
|
34
|
+
__COMPAT__: `false`,
|
|
35
|
+
__FEATURE_SUSPENSE__: `true`,
|
|
36
|
+
__FEATURE_PROD_DEVTOOLS__: `false`,
|
|
37
|
+
},
|
|
38
|
+
server: {
|
|
39
|
+
warmup: {
|
|
40
|
+
//提前转换和缓存文件以进行预热。可以在服务器启动时提高初始页面加载速度,并防止转换瀑布
|
|
41
|
+
clientFiles: [
|
|
42
|
+
//仅在客户端使用的文件,路径相对于root
|
|
43
|
+
'./src/main.ts',
|
|
44
|
+
'./src/utils/request.ts',
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
experimental: {
|
|
49
|
+
//ssr需求代码
|
|
50
|
+
renderBuiltUrl(filename, { hostType, type, ssr }) {
|
|
51
|
+
if (ssr && type === 'asset' && hostType === 'js') {
|
|
52
|
+
return {
|
|
53
|
+
runtime: `__ssr_vue_processAssetPath(${JSON.stringify(filename)})`,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
build: {
|
|
59
|
+
rollupOptions: {},
|
|
60
|
+
emptyOutDir: true,
|
|
61
|
+
},
|
|
62
|
+
optimizeDeps: {
|
|
63
|
+
//因为项目中很多用到了自动引入和动态加载,所以vite首次扫描依赖项会扫描不全,这里强制扫描src下全局,并加载element-plus。
|
|
64
|
+
entries: ['src/**/*.{ts,tsx,vue}', './index.html'],
|
|
65
|
+
include: [
|
|
66
|
+
'element-plus/es/components/loading/style/css',
|
|
67
|
+
'element-plus/es/components/message/style/css',
|
|
68
|
+
'element-plus/es/components/message-box/style/css',
|
|
69
|
+
'element-plus/es/components/notification/style/css',
|
|
70
|
+
'node_modules/element-plus/es/index.mjs',
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
if (!configEnv.isSsrBuild) {
|
|
75
|
+
config.build.rollupOptions = {
|
|
76
|
+
experimentalLogSideEffects: false,
|
|
77
|
+
output: {
|
|
78
|
+
experimentalMinChunkSize: 20 * 1024,
|
|
79
|
+
manualChunks(id: string) {
|
|
80
|
+
if (['vue', 'vue-router', 'pinia', 'vue-request', 'jquery', 'axios'].some((v) => new RegExp(`.*node_modules/.*${v}.*`).test(id))) {
|
|
81
|
+
return 'core';
|
|
82
|
+
}
|
|
83
|
+
if (['@element-plus/icons-vue'].some((v) => new RegExp(`.*node_modules/.*${v}.*`).test(id))) {
|
|
84
|
+
return 'elIcon';
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return config;
|
|
92
|
+
};
|