@moluoxixi/create-app 2.0.431 → 2.0.433
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/LICENSE.txt +21 -21
- package/README.md +200 -200
- package/package.json +9 -6
- package/templates/common/base/.env +7 -7
- package/templates/common/base/.env.development +5 -5
- package/templates/common/base/.env.production +5 -5
- package/templates/common/base/_gitignore +42 -42
- package/templates/common/base/node_modules/.bin/autoprefixer +2 -2
- package/templates/common/base/node_modules/.bin/jiti +2 -2
- package/templates/common/base/node_modules/.bin/sass +2 -2
- package/templates/common/base/node_modules/.bin/tsc +2 -2
- package/templates/common/base/node_modules/.bin/tsserver +2 -2
- package/templates/common/base/node_modules/.bin/tsx +2 -2
- package/templates/common/base/node_modules/.bin/uuid +2 -2
- package/templates/common/base/node_modules/.bin/vite +2 -2
- package/templates/common/base/package.json +56 -56
- package/templates/common/base/scripts/build.mts +36 -36
- package/templates/common/base/src/apis/index.ts +7 -7
- package/templates/common/base/src/apis/request.ts +43 -43
- package/templates/common/base/src/apis/services/example.ts +61 -61
- package/templates/common/base/src/apis/services/user.ts +33 -33
- package/templates/common/base/src/apis/types/common.ts +43 -43
- package/templates/common/base/src/apis/types/example.ts +29 -29
- package/templates/common/base/src/apis/types/index.ts +7 -7
- package/templates/common/base/src/apis/types/user.ts +39 -39
- package/templates/common/base/src/assets/fonts/index.css +6 -6
- package/templates/common/base/src/assets/styles/base.scss +33 -33
- package/templates/common/base/src/assets/styles/custom.scss +20 -20
- package/templates/common/base/src/assets/styles/main.scss +8 -8
- package/templates/common/base/src/assets/styles/tailwind.scss +3 -3
- package/templates/common/base/src/constants/index.ts +28 -28
- package/templates/common/base/src/utils/index.ts +87 -87
- package/templates/common/base/vite/index.ts +53 -53
- package/templates/common/base/vite.config.ts +54 -54
- package/templates/common/features/eslint/eslint.config.ts +20 -20
- package/templates/common/features/eslint/node_modules/.bin/eslint +2 -2
- package/templates/common/features/eslint/package.json +7 -7
- package/templates/common/features/husky/.cz-config.cjs +35 -35
- package/templates/common/features/husky/.husky/commit-msg +9 -9
- package/templates/common/features/husky/.husky/install.mjs +9 -9
- package/templates/common/features/husky/.husky/pre-commit +4 -4
- package/templates/common/features/husky/commitlint.config.ts +32 -32
- package/templates/common/features/husky/node_modules/.bin/commitizen +2 -2
- package/templates/common/features/husky/node_modules/.bin/commitlint +2 -2
- package/templates/common/features/husky/node_modules/.bin/cz +2 -2
- package/templates/common/features/husky/node_modules/.bin/cz-cust +2 -2
- package/templates/common/features/husky/node_modules/.bin/cz-customizable +2 -2
- package/templates/common/features/husky/node_modules/.bin/git-cz +2 -2
- package/templates/common/features/husky/node_modules/.bin/husky +2 -2
- package/templates/common/features/husky/node_modules/.bin/lint-staged +2 -2
- package/templates/common/features/husky/package.json +29 -31
- package/templates/react/base/env.d.ts +19 -19
- package/templates/react/base/index.html +13 -13
- package/templates/react/base/package.json +15 -15
- package/templates/react/base/src/App.tsx +18 -18
- package/templates/react/base/src/main/index.ts +34 -34
- package/templates/react/base/src/main.tsx +34 -34
- package/templates/react/base/src/pages/about/index.tsx +14 -14
- package/templates/react/base/src/pages/home/index.tsx +14 -14
- package/templates/react/base/tsconfig.app.json +17 -17
- package/templates/react/base/tsconfig.base.json +22 -22
- package/templates/react/base/tsconfig.json +11 -11
- package/templates/react/base/tsconfig.node.json +15 -15
- package/templates/react/features/ant-design/package.json +7 -7
- package/templates/react/features/ant-design/src/main/features/ant-design.ts +21 -21
- package/templates/react/features/i18n/package.json +7 -7
- package/templates/react/features/i18n/src/locales/index.ts +26 -26
- package/templates/react/features/i18n/src/locales/lang/en.ts +29 -29
- package/templates/react/features/i18n/src/locales/lang/es.ts +29 -29
- package/templates/react/features/i18n/src/locales/lang/zh.ts +29 -29
- package/templates/react/features/i18n/src/main/features/i18n.ts +19 -19
- package/templates/react/features/manualRoutes/package.json +6 -6
- package/templates/react/features/manualRoutes/src/router/index.tsx +29 -29
- package/templates/react/features/manualRoutes/src/router/routes.tsx +35 -35
- package/templates/react/features/pageRoutes/package.json +5 -5
- package/templates/react/features/pageRoutes/src/router/index.tsx +30 -30
- package/templates/react/features/sentry/package.json +7 -7
- package/templates/react/features/sentry/src/main/features/sentry.ts +20 -20
- package/templates/react/features/sentry/src/utils/sentry.ts +39 -39
- package/templates/react/features/sentry/vite/features/sentry.ts +39 -39
- package/templates/react/features/zustand/package.json +5 -5
- package/templates/react/features/zustand/src/apis/types/user.ts +39 -39
- package/templates/react/features/zustand/src/stores/index.ts +5 -5
- package/templates/react/features/zustand/src/stores/user.ts +55 -55
- package/templates/react/features/zustand/src/types/stores.ts +21 -21
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
- package/templates/react/micro-frontends/qiankun/base/package.json +8 -8
- package/templates/react/micro-frontends/qiankun/base/src/main/index.ts +34 -34
- package/templates/react/micro-frontends/qiankun/base/src/main.tsx +69 -69
- package/templates/react/micro-frontends/qiankun/base/vite/index.ts +53 -53
- package/templates/vue/base/env.d.ts +26 -26
- package/templates/vue/base/index.html +13 -13
- package/templates/vue/base/node_modules/.bin/vue-tsc +2 -2
- package/templates/vue/base/src/App.vue +13 -13
- package/templates/vue/base/src/directives/index.ts +35 -35
- package/templates/vue/base/src/layouts/index.ts +26 -26
- package/templates/vue/base/src/main/index.ts +36 -36
- package/templates/vue/base/src/main.ts +34 -34
- package/templates/vue/base/src/pages/about/index.vue +30 -30
- package/templates/vue/base/src/pages/home/index.vue +30 -30
- package/templates/vue/base/src/utils/index.ts +5 -5
- package/templates/vue/base/src/utils/modifyComponent.tsx +43 -43
- package/templates/vue/features/ant-design-vue/package.json +8 -8
- package/templates/vue/features/ant-design-vue/src/layouts/AntDesign.vue +85 -85
- package/templates/vue/features/ant-design-vue/src/main/features/ant-design-vue.ts +18 -18
- package/templates/vue/features/element-plus/package.json +10 -10
- package/templates/vue/features/element-plus/src/assets/styles/base.scss +69 -69
- package/templates/vue/features/element-plus/src/assets/styles/custom.scss +20 -20
- package/templates/vue/features/element-plus/src/assets/styles/element.scss +27 -27
- package/templates/vue/features/element-plus/src/assets/styles/main.scss +9 -9
- package/templates/vue/features/element-plus/src/assets/styles/tailwind.scss +3 -3
- package/templates/vue/features/element-plus/src/components/SubMenu/index.ts +8 -8
- package/templates/vue/features/element-plus/src/layouts/element.vue +117 -117
- package/templates/vue/features/element-plus/src/main/features/element-plus.ts +23 -23
- package/templates/vue/features/element-plus/src/stores/index.ts +6 -6
- package/templates/vue/features/element-plus/src/stores/modules/system.ts +51 -51
- package/templates/vue/features/element-plus/vite/features/element-plus.ts +35 -35
- package/templates/vue/features/i18n/package.json +7 -7
- package/templates/vue/features/i18n/src/locales/index.ts +23 -23
- package/templates/vue/features/i18n/src/locales/lang/en.ts +29 -29
- package/templates/vue/features/i18n/src/locales/lang/es.ts +29 -29
- package/templates/vue/features/i18n/src/locales/lang/zh.ts +29 -29
- package/templates/vue/features/i18n/src/main/features/i18n.ts +19 -19
- package/templates/vue/features/manualRoutes/package.json +12 -12
- package/templates/vue/features/manualRoutes/src/router/index.ts +34 -34
- package/templates/vue/features/manualRoutes/src/router/layout.vue +15 -15
- package/templates/vue/features/manualRoutes/src/router/routes.ts +26 -26
- package/templates/vue/features/manualRoutes/src/stores/index.ts +6 -6
- package/templates/vue/features/manualRoutes/src/stores/modules/system.ts +51 -51
- package/templates/vue/features/pageRoutes/package.json +12 -12
- package/templates/vue/features/pageRoutes/src/router/index.ts +35 -35
- package/templates/vue/features/pageRoutes/src/router/layout.vue +15 -15
- package/templates/vue/features/pageRoutes/src/stores/index.ts +6 -6
- package/templates/vue/features/pageRoutes/src/stores/modules/system.ts +51 -51
- package/templates/vue/features/pinia/package.json +8 -8
- package/templates/vue/features/pinia/src/main/features/pinia.ts +19 -19
- package/templates/vue/features/pinia/src/stores/index.ts +6 -6
- package/templates/vue/features/pinia/src/stores/modules/system.ts +51 -51
- package/templates/vue/features/pinia/src/stores/modules/user.ts +41 -41
- package/templates/vue/features/sentry/package.json +10 -10
- package/templates/vue/features/sentry/src/main/features/sentry.ts +22 -22
- package/templates/vue/features/sentry/src/stores/index.ts +13 -13
- package/templates/vue/features/sentry/src/utils/sentry.ts +44 -44
- package/templates/vue/features/sentry/vite/features/sentry.ts +39 -39
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
- package/templates/vue/micro-frontends/qiankun/base/package.json +8 -8
- package/templates/vue/micro-frontends/qiankun/base/src/main/index.ts +36 -36
- package/templates/vue/micro-frontends/qiankun/base/src/main.ts +70 -70
- package/templates/vue/micro-frontends/qiankun/base/vite/index.ts +53 -53
- package/templates/vue/micro-frontends/qiankun/features/element-plus/package.json +10 -10
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/base.scss +69 -69
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/custom.scss +20 -20
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/element/fixQiankun.scss +10 -10
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/element/index.scss +29 -29
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/main.scss +9 -9
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/tailwind.scss +3 -3
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/index.ts +8 -8
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/_types/index.ts +1 -1
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/_types/props.ts +16 -16
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/index.vue +60 -60
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/layouts/element.vue +120 -120
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/main/features/element-plus.ts +24 -24
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/stores/index.ts +6 -6
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/stores/modules/system.ts +51 -51
- package/templates/vue/micro-frontends/qiankun/features/element-plus/vite/features/element-plus.ts +35 -35
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/package.json +14 -14
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/router/index.ts +60 -60
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/router/layout.vue +15 -15
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/router/routes.ts +26 -26
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/stores/index.ts +6 -6
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/stores/modules/system.ts +51 -51
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/package.json +14 -14
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/src/router/index.ts +61 -61
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/src/stores/index.ts +6 -6
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/src/stores/modules/system.ts +51 -51
- package/dist/generators/react.d.ts +0 -12
- package/dist/generators/react.js +0 -14
- package/dist/generators/vue.d.ts +0 -12
- package/dist/generators/vue.js +0 -14
- package/dist/types/ejs.d.ts +0 -10
- package/dist/types/ejs.js +0 -4
- package/dist/types/viteConfig.d.ts +0 -19
- package/dist/types/viteConfig.js +0 -5
- package/dist/utils/ejs.d.ts +0 -20
- package/dist/utils/ejs.js +0 -31
- package/dist/utils/featureMapping.d.ts +0 -23
- package/dist/utils/featureMapping.js +0 -76
- package/dist/utils/generateFrameworkProject.d.ts +0 -15
- package/dist/utils/generateFrameworkProject.js +0 -67
- package/dist/utils/prompts.d.ts +0 -17
- package/dist/utils/prompts.js +0 -235
- package/dist/utils/renderFeatures.d.ts +0 -56
- package/dist/utils/renderFeatures.js +0 -160
- package/dist/utils/renderTemplate.d.ts +0 -18
- package/dist/utils/renderTemplate.js +0 -174
- package/dist/utils/routeModeMapping.d.ts +0 -14
- package/dist/utils/routeModeMapping.js +0 -15
- package/dist/utils/viteConfigRender.d.ts +0 -16
- package/dist/utils/viteConfigRender.js +0 -17
- package/templates/common/base/node_modules/.bin/autoprefixer.CMD +0 -12
- package/templates/common/base/node_modules/.bin/autoprefixer.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/browserslist +0 -17
- package/templates/common/base/node_modules/.bin/browserslist.CMD +0 -12
- package/templates/common/base/node_modules/.bin/browserslist.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/jiti.CMD +0 -12
- package/templates/common/base/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/parser +0 -17
- package/templates/common/base/node_modules/.bin/parser.CMD +0 -12
- package/templates/common/base/node_modules/.bin/parser.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/rollup +0 -17
- package/templates/common/base/node_modules/.bin/rollup.CMD +0 -12
- package/templates/common/base/node_modules/.bin/rollup.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/sass.CMD +0 -12
- package/templates/common/base/node_modules/.bin/sass.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/terser +0 -17
- package/templates/common/base/node_modules/.bin/terser.CMD +0 -12
- package/templates/common/base/node_modules/.bin/terser.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/tsc.CMD +0 -12
- package/templates/common/base/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/common/base/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/tsx.CMD +0 -12
- package/templates/common/base/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/uuid.CMD +0 -12
- package/templates/common/base/node_modules/.bin/uuid.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/vite.CMD +0 -12
- package/templates/common/base/node_modules/.bin/vite.ps1 +0 -41
- package/templates/common/base/node_modules/.bin/yaml +0 -17
- package/templates/common/base/node_modules/.bin/yaml.CMD +0 -12
- package/templates/common/base/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/common/features/eslint/node_modules/.bin/browserslist +0 -17
- package/templates/common/features/eslint/node_modules/.bin/browserslist.CMD +0 -12
- package/templates/common/features/eslint/node_modules/.bin/browserslist.ps1 +0 -41
- package/templates/common/features/eslint/node_modules/.bin/eslint.CMD +0 -12
- package/templates/common/features/eslint/node_modules/.bin/eslint.ps1 +0 -41
- package/templates/common/features/eslint/node_modules/.bin/jiti +0 -17
- package/templates/common/features/eslint/node_modules/.bin/jiti.CMD +0 -12
- package/templates/common/features/eslint/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/common/features/eslint/node_modules/.bin/tsc +0 -17
- package/templates/common/features/eslint/node_modules/.bin/tsc.CMD +0 -12
- package/templates/common/features/eslint/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/common/features/eslint/node_modules/.bin/tsserver +0 -17
- package/templates/common/features/eslint/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/common/features/eslint/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/commitizen.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/commitizen.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/commitlint.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/commitlint.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/cz-cust.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/cz-cust.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/cz-customizable.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/cz-customizable.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/cz.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/cz.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/git-cz.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/git-cz.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/husky.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/husky.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/lint-staged.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/lint-staged.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/tsc +0 -17
- package/templates/common/features/husky/node_modules/.bin/tsc.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/common/features/husky/node_modules/.bin/tsserver +0 -17
- package/templates/common/features/husky/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/common/features/husky/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/browserslist +0 -17
- package/templates/react/base/node_modules/.bin/browserslist.CMD +0 -12
- package/templates/react/base/node_modules/.bin/browserslist.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/jiti +0 -17
- package/templates/react/base/node_modules/.bin/jiti.CMD +0 -12
- package/templates/react/base/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/parser +0 -17
- package/templates/react/base/node_modules/.bin/parser.CMD +0 -12
- package/templates/react/base/node_modules/.bin/parser.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/rollup +0 -17
- package/templates/react/base/node_modules/.bin/rollup.CMD +0 -12
- package/templates/react/base/node_modules/.bin/rollup.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/sass +0 -17
- package/templates/react/base/node_modules/.bin/sass.CMD +0 -12
- package/templates/react/base/node_modules/.bin/sass.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/terser +0 -17
- package/templates/react/base/node_modules/.bin/terser.CMD +0 -12
- package/templates/react/base/node_modules/.bin/terser.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/tsc +0 -17
- package/templates/react/base/node_modules/.bin/tsc.CMD +0 -12
- package/templates/react/base/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/tsserver +0 -17
- package/templates/react/base/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/react/base/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/tsx +0 -17
- package/templates/react/base/node_modules/.bin/tsx.CMD +0 -12
- package/templates/react/base/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/vite +0 -17
- package/templates/react/base/node_modules/.bin/vite.CMD +0 -12
- package/templates/react/base/node_modules/.bin/vite.ps1 +0 -41
- package/templates/react/base/node_modules/.bin/yaml +0 -17
- package/templates/react/base/node_modules/.bin/yaml.CMD +0 -12
- package/templates/react/base/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/react/features/i18n/node_modules/.bin/tsc +0 -17
- package/templates/react/features/i18n/node_modules/.bin/tsc.CMD +0 -12
- package/templates/react/features/i18n/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/react/features/i18n/node_modules/.bin/tsserver +0 -17
- package/templates/react/features/i18n/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/react/features/i18n/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/react/features/pageRoutes/node_modules/.bin/jiti +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/jiti.CMD +0 -12
- package/templates/react/features/pageRoutes/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/react/features/pageRoutes/node_modules/.bin/sass +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/sass.CMD +0 -12
- package/templates/react/features/pageRoutes/node_modules/.bin/sass.ps1 +0 -41
- package/templates/react/features/pageRoutes/node_modules/.bin/terser +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/terser.CMD +0 -12
- package/templates/react/features/pageRoutes/node_modules/.bin/terser.ps1 +0 -41
- package/templates/react/features/pageRoutes/node_modules/.bin/tsx +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/tsx.CMD +0 -12
- package/templates/react/features/pageRoutes/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/react/features/pageRoutes/node_modules/.bin/vite +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/vite.CMD +0 -12
- package/templates/react/features/pageRoutes/node_modules/.bin/vite.ps1 +0 -41
- package/templates/react/features/pageRoutes/node_modules/.bin/yaml +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/yaml.CMD +0 -12
- package/templates/react/features/pageRoutes/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsc +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsc.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsserver +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsx +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsx.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite.ps1 +0 -41
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml.CMD +0 -12
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/browserslist +0 -17
- package/templates/vue/base/node_modules/.bin/browserslist.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/browserslist.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/jiti +0 -17
- package/templates/vue/base/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/parser +0 -17
- package/templates/vue/base/node_modules/.bin/parser.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/parser.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/rollup +0 -17
- package/templates/vue/base/node_modules/.bin/rollup.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/rollup.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/sass +0 -17
- package/templates/vue/base/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/terser +0 -17
- package/templates/vue/base/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/tsc +0 -17
- package/templates/vue/base/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/tsserver +0 -17
- package/templates/vue/base/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/tsx +0 -17
- package/templates/vue/base/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/vite +0 -17
- package/templates/vue/base/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/vue-tsc.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/vue-tsc.ps1 +0 -41
- package/templates/vue/base/node_modules/.bin/yaml +0 -17
- package/templates/vue/base/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/base/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/features/ant-design-vue/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/ant-design-vue/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/ant-design-vue/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/ant-design-vue/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/ant-design-vue/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/ant-design-vue/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/element-plus/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/element-plus/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/element-plus/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/element-plus/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/i18n/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/i18n/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/i18n/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/i18n/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/i18n/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/i18n/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/jiti +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/sass +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/terser +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsx +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/vite +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/features/manualRoutes/node_modules/.bin/yaml +0 -17
- package/templates/vue/features/manualRoutes/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/features/manualRoutes/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/jiti +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/sass +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/terser +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsx +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/vite +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/features/pageRoutes/node_modules/.bin/yaml +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/features/pageRoutes/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/features/pinia/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/pinia/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/pinia/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/pinia/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/pinia/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/pinia/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/sentry/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/sentry/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/sentry/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/sentry/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsc +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsserver +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsx +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsc +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsserver +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsx +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsc +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsserver +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsx +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml +0 -17
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsc +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsserver +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsx +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml.ps1 +0 -41
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 通用类型定义
|
|
3
|
-
* API 响应通用类型
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 分页参数类型
|
|
8
|
-
*/
|
|
9
|
-
export interface PaginationParamsType {
|
|
10
|
-
/** 页码 */
|
|
11
|
-
page: number
|
|
12
|
-
/** 每页数量 */
|
|
13
|
-
pageSize: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 分页响应类型
|
|
18
|
-
*/
|
|
19
|
-
export interface PaginationResponseType<T> {
|
|
20
|
-
/** 数据列表 */
|
|
21
|
-
list: T[]
|
|
22
|
-
/** 总记录数 */
|
|
23
|
-
total: number
|
|
24
|
-
/** 当前页码 */
|
|
25
|
-
page: number
|
|
26
|
-
/** 每页数量 */
|
|
27
|
-
pageSize: number
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 通用响应类型
|
|
32
|
-
*/
|
|
33
|
-
export interface ApiResponseType<T = unknown> {
|
|
34
|
-
/** 响应码 */
|
|
35
|
-
code: number
|
|
36
|
-
/** 响应消息 */
|
|
37
|
-
message: string
|
|
38
|
-
/** 响应数据 */
|
|
39
|
-
data: T
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** 列表响应类型 */
|
|
43
|
-
export interface ListResponseType<T> extends ApiResponseType<PaginationResponseType<T>> {}
|
|
1
|
+
/**
|
|
2
|
+
* 通用类型定义
|
|
3
|
+
* API 响应通用类型
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 分页参数类型
|
|
8
|
+
*/
|
|
9
|
+
export interface PaginationParamsType {
|
|
10
|
+
/** 页码 */
|
|
11
|
+
page: number
|
|
12
|
+
/** 每页数量 */
|
|
13
|
+
pageSize: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 分页响应类型
|
|
18
|
+
*/
|
|
19
|
+
export interface PaginationResponseType<T> {
|
|
20
|
+
/** 数据列表 */
|
|
21
|
+
list: T[]
|
|
22
|
+
/** 总记录数 */
|
|
23
|
+
total: number
|
|
24
|
+
/** 当前页码 */
|
|
25
|
+
page: number
|
|
26
|
+
/** 每页数量 */
|
|
27
|
+
pageSize: number
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 通用响应类型
|
|
32
|
+
*/
|
|
33
|
+
export interface ApiResponseType<T = unknown> {
|
|
34
|
+
/** 响应码 */
|
|
35
|
+
code: number
|
|
36
|
+
/** 响应消息 */
|
|
37
|
+
message: string
|
|
38
|
+
/** 响应数据 */
|
|
39
|
+
data: T
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** 列表响应类型 */
|
|
43
|
+
export interface ListResponseType<T> extends ApiResponseType<PaginationResponseType<T>> {}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 示例类型定义
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 示例数据类型
|
|
7
|
-
*/
|
|
8
|
-
export interface ExampleItemType {
|
|
9
|
-
/** 示例 ID */
|
|
10
|
-
id: string
|
|
11
|
-
/** 示例名称 */
|
|
12
|
-
name: string
|
|
13
|
-
/** 示例描述 */
|
|
14
|
-
description: string
|
|
15
|
-
/** 创建时间 */
|
|
16
|
-
createdAt: string
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 创建示例参数类型
|
|
21
|
-
* 排除 id 和 createdAt 字段
|
|
22
|
-
*/
|
|
23
|
-
export type CreateExampleParamsType = Omit<ExampleItemType, 'id' | 'createdAt'>
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* 更新示例参数类型
|
|
27
|
-
* 所有字段可选
|
|
28
|
-
*/
|
|
29
|
-
export type UpdateExampleParamsType = Partial<ExampleItemType>
|
|
1
|
+
/**
|
|
2
|
+
* 示例类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 示例数据类型
|
|
7
|
+
*/
|
|
8
|
+
export interface ExampleItemType {
|
|
9
|
+
/** 示例 ID */
|
|
10
|
+
id: string
|
|
11
|
+
/** 示例名称 */
|
|
12
|
+
name: string
|
|
13
|
+
/** 示例描述 */
|
|
14
|
+
description: string
|
|
15
|
+
/** 创建时间 */
|
|
16
|
+
createdAt: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 创建示例参数类型
|
|
21
|
+
* 排除 id 和 createdAt 字段
|
|
22
|
+
*/
|
|
23
|
+
export type CreateExampleParamsType = Omit<ExampleItemType, 'id' | 'createdAt'>
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 更新示例参数类型
|
|
27
|
+
* 所有字段可选
|
|
28
|
+
*/
|
|
29
|
+
export type UpdateExampleParamsType = Partial<ExampleItemType>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API 类型导出
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export * from './common'
|
|
6
|
-
export * from './example'
|
|
7
|
-
export * from './user'
|
|
1
|
+
/**
|
|
2
|
+
* API 类型导出
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './common'
|
|
6
|
+
export * from './example'
|
|
7
|
+
export * from './user'
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 用户类型定义
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 用户信息类型
|
|
7
|
-
*/
|
|
8
|
-
export interface UserInfoType {
|
|
9
|
-
/** 用户 ID */
|
|
10
|
-
id: string
|
|
11
|
-
/** 用户名 */
|
|
12
|
-
username: string
|
|
13
|
-
/** 邮箱 */
|
|
14
|
-
email: string
|
|
15
|
-
/** 头像 URL(可选) */
|
|
16
|
-
avatar?: string
|
|
17
|
-
/** 角色列表 */
|
|
18
|
-
roles: string[]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 登录参数类型
|
|
23
|
-
*/
|
|
24
|
-
export interface LoginParamsType {
|
|
25
|
-
/** 用户名 */
|
|
26
|
-
username: string
|
|
27
|
-
/** 密码 */
|
|
28
|
-
password: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 登录响应类型
|
|
33
|
-
*/
|
|
34
|
-
export interface LoginResponseType {
|
|
35
|
-
/** 认证 token */
|
|
36
|
-
token: string
|
|
37
|
-
/** 用户信息 */
|
|
38
|
-
userInfo: UserInfoType
|
|
39
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 用户类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 用户信息类型
|
|
7
|
+
*/
|
|
8
|
+
export interface UserInfoType {
|
|
9
|
+
/** 用户 ID */
|
|
10
|
+
id: string
|
|
11
|
+
/** 用户名 */
|
|
12
|
+
username: string
|
|
13
|
+
/** 邮箱 */
|
|
14
|
+
email: string
|
|
15
|
+
/** 头像 URL(可选) */
|
|
16
|
+
avatar?: string
|
|
17
|
+
/** 角色列表 */
|
|
18
|
+
roles: string[]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 登录参数类型
|
|
23
|
+
*/
|
|
24
|
+
export interface LoginParamsType {
|
|
25
|
+
/** 用户名 */
|
|
26
|
+
username: string
|
|
27
|
+
/** 密码 */
|
|
28
|
+
password: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 登录响应类型
|
|
33
|
+
*/
|
|
34
|
+
export interface LoginResponseType {
|
|
35
|
+
/** 认证 token */
|
|
36
|
+
token: string
|
|
37
|
+
/** 用户信息 */
|
|
38
|
+
userInfo: UserInfoType
|
|
39
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 字体配置
|
|
3
|
-
* 自定义字体导入
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/* 可在此添加自定义字体 */
|
|
1
|
+
/**
|
|
2
|
+
* 字体配置
|
|
3
|
+
* 自定义字体导入
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* 可在此添加自定义字体 */
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
// 这里定义变量
|
|
3
|
-
/* 文字颜色 */
|
|
4
|
-
--text-color: #2a3651;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
::-webkit-scrollbar {
|
|
8
|
-
width: 6px;
|
|
9
|
-
height: 6px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
::-webkit-scrollbar-thumb {
|
|
13
|
-
background-color: #dddee0; /* 设置滑块的颜色 */
|
|
14
|
-
border-radius: 5px; /* 设置滑块的圆角 */
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
body {
|
|
18
|
-
color: var(--text-color);
|
|
19
|
-
transition:
|
|
20
|
-
color 0.5s,
|
|
21
|
-
background-color 0.5s;
|
|
22
|
-
font-size: 14px;
|
|
23
|
-
font-family: SourceHanSans-Regular, serif;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
#app {
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 0;
|
|
29
|
-
font-weight: normal;
|
|
30
|
-
background: #f1f2f4;
|
|
31
|
-
height: 100%;
|
|
32
|
-
overflow-y: auto;
|
|
33
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
// 这里定义变量
|
|
3
|
+
/* 文字颜色 */
|
|
4
|
+
--text-color: #2a3651;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
::-webkit-scrollbar {
|
|
8
|
+
width: 6px;
|
|
9
|
+
height: 6px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
::-webkit-scrollbar-thumb {
|
|
13
|
+
background-color: #dddee0; /* 设置滑块的颜色 */
|
|
14
|
+
border-radius: 5px; /* 设置滑块的圆角 */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body {
|
|
18
|
+
color: var(--text-color);
|
|
19
|
+
transition:
|
|
20
|
+
color 0.5s,
|
|
21
|
+
background-color 0.5s;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-family: SourceHanSans-Regular, serif;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#app {
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
font-weight: normal;
|
|
30
|
+
background: #f1f2f4;
|
|
31
|
+
height: 100%;
|
|
32
|
+
overflow-y: auto;
|
|
33
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.text-bold {
|
|
2
|
-
font-family: SourceHanSans-Semibold, serif;
|
|
3
|
-
font-weight: bold;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.text-medium {
|
|
7
|
-
font-family: SourceHanSans-Medium, serif;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.text-regular {
|
|
11
|
-
font-family: SourceHanSans-Regular, serif;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.text-light {
|
|
15
|
-
font-family: SourceHanSans-Light, serif;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.box-shadow {
|
|
19
|
-
box-shadow: 0 2px 10px 0 rgb(52 81 212 / 20%);
|
|
20
|
-
}
|
|
1
|
+
.text-bold {
|
|
2
|
+
font-family: SourceHanSans-Semibold, serif;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.text-medium {
|
|
7
|
+
font-family: SourceHanSans-Medium, serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.text-regular {
|
|
11
|
+
font-family: SourceHanSans-Regular, serif;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.text-light {
|
|
15
|
+
font-family: SourceHanSans-Light, serif;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.box-shadow {
|
|
19
|
+
box-shadow: 0 2px 10px 0 rgb(52 81 212 / 20%);
|
|
20
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 主样式文件
|
|
3
|
-
* 导入所有样式
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
@use './base.scss';
|
|
7
|
-
@use './custom.scss';
|
|
8
|
-
@use './tailwind.scss';
|
|
1
|
+
/**
|
|
2
|
+
* 主样式文件
|
|
3
|
+
* 导入所有样式
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@use './base.scss';
|
|
7
|
+
@use './custom.scss';
|
|
8
|
+
@use './tailwind.scss';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@tailwind base;
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 常量定义
|
|
3
|
-
* 项目通用常量
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/** 本地存储键名 */
|
|
7
|
-
export const STORAGE_KEYS = {
|
|
8
|
-
TOKEN: 'token',
|
|
9
|
-
USER_INFO: 'userInfo',
|
|
10
|
-
LANGUAGE: 'language',
|
|
11
|
-
THEME: 'theme',
|
|
12
|
-
} as const
|
|
13
|
-
|
|
14
|
-
/** 响应码 */
|
|
15
|
-
export const RESPONSE_CODE = {
|
|
16
|
-
SUCCESS: 200,
|
|
17
|
-
UNAUTHORIZED: 401,
|
|
18
|
-
FORBIDDEN: 403,
|
|
19
|
-
NOT_FOUND: 404,
|
|
20
|
-
SERVER_ERROR: 500,
|
|
21
|
-
} as const
|
|
22
|
-
|
|
23
|
-
/** 分页默认配置 */
|
|
24
|
-
export const PAGINATION = {
|
|
25
|
-
DEFAULT_PAGE: 1,
|
|
26
|
-
DEFAULT_PAGE_SIZE: 10,
|
|
27
|
-
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
|
|
28
|
-
} as const
|
|
1
|
+
/**
|
|
2
|
+
* 常量定义
|
|
3
|
+
* 项目通用常量
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** 本地存储键名 */
|
|
7
|
+
export const STORAGE_KEYS = {
|
|
8
|
+
TOKEN: 'token',
|
|
9
|
+
USER_INFO: 'userInfo',
|
|
10
|
+
LANGUAGE: 'language',
|
|
11
|
+
THEME: 'theme',
|
|
12
|
+
} as const
|
|
13
|
+
|
|
14
|
+
/** 响应码 */
|
|
15
|
+
export const RESPONSE_CODE = {
|
|
16
|
+
SUCCESS: 200,
|
|
17
|
+
UNAUTHORIZED: 401,
|
|
18
|
+
FORBIDDEN: 403,
|
|
19
|
+
NOT_FOUND: 404,
|
|
20
|
+
SERVER_ERROR: 500,
|
|
21
|
+
} as const
|
|
22
|
+
|
|
23
|
+
/** 分页默认配置 */
|
|
24
|
+
export const PAGINATION = {
|
|
25
|
+
DEFAULT_PAGE: 1,
|
|
26
|
+
DEFAULT_PAGE_SIZE: 10,
|
|
27
|
+
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
|
|
28
|
+
} as const
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 工具函数
|
|
3
|
-
* 通用工具方法
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 延迟执行
|
|
8
|
-
* @param ms 延迟毫秒数
|
|
9
|
-
* @returns Promise,在指定时间后 resolve
|
|
10
|
-
*/
|
|
11
|
-
export function sleep(ms: number): Promise<void> {
|
|
12
|
-
return new Promise(resolve => setTimeout(resolve, ms))
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 深拷贝
|
|
17
|
-
* @param obj 要拷贝的对象
|
|
18
|
-
* @returns 深拷贝后的新对象
|
|
19
|
-
*/
|
|
20
|
-
export function deepClone<T>(obj: T): T {
|
|
21
|
-
return JSON.parse(JSON.stringify(obj))
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 防抖函数
|
|
26
|
-
* @param fn 要防抖的函数
|
|
27
|
-
* @param delay 延迟时间(毫秒)
|
|
28
|
-
* @returns 防抖后的函数
|
|
29
|
-
*/
|
|
30
|
-
export function debounce<T extends (...args: unknown[]) => unknown>(
|
|
31
|
-
fn: T,
|
|
32
|
-
delay: number,
|
|
33
|
-
): (...args: Parameters<T>) => void {
|
|
34
|
-
let timer: ReturnType<typeof setTimeout> | null = null
|
|
35
|
-
return function (this: unknown, ...args: Parameters<T>) {
|
|
36
|
-
if (timer) {
|
|
37
|
-
clearTimeout(timer)
|
|
38
|
-
}
|
|
39
|
-
timer = setTimeout(() => {
|
|
40
|
-
fn.apply(this, args)
|
|
41
|
-
}, delay)
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* 节流函数
|
|
47
|
-
* @param fn 要节流的函数
|
|
48
|
-
* @param delay 间隔时间(毫秒)
|
|
49
|
-
* @returns 节流后的函数
|
|
50
|
-
*/
|
|
51
|
-
export function throttle<T extends (...args: unknown[]) => unknown>(
|
|
52
|
-
fn: T,
|
|
53
|
-
delay: number,
|
|
54
|
-
): (...args: Parameters<T>) => void {
|
|
55
|
-
let lastTime = 0
|
|
56
|
-
return function (this: unknown, ...args: Parameters<T>) {
|
|
57
|
-
const now = Date.now()
|
|
58
|
-
if (now - lastTime >= delay) {
|
|
59
|
-
lastTime = now
|
|
60
|
-
fn.apply(this, args)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 格式化日期
|
|
67
|
-
* @param date 日期(Date 对象、时间戳或日期字符串)
|
|
68
|
-
* @param format 格式字符串,默认为 'YYYY-MM-DD HH:mm:ss'
|
|
69
|
-
* @returns 格式化后的日期字符串
|
|
70
|
-
*/
|
|
71
|
-
export function formatDate(date: Date | string | number, format = 'YYYY-MM-DD HH:mm:ss'): string {
|
|
72
|
-
const d = new Date(date)
|
|
73
|
-
const year = d.getFullYear()
|
|
74
|
-
const month = String(d.getMonth() + 1).padStart(2, '0')
|
|
75
|
-
const day = String(d.getDate()).padStart(2, '0')
|
|
76
|
-
const hours = String(d.getHours()).padStart(2, '0')
|
|
77
|
-
const minutes = String(d.getMinutes()).padStart(2, '0')
|
|
78
|
-
const seconds = String(d.getSeconds()).padStart(2, '0')
|
|
79
|
-
|
|
80
|
-
return format
|
|
81
|
-
.replace('YYYY', String(year))
|
|
82
|
-
.replace('MM', month)
|
|
83
|
-
.replace('DD', day)
|
|
84
|
-
.replace('HH', hours)
|
|
85
|
-
.replace('mm', minutes)
|
|
86
|
-
.replace('ss', seconds)
|
|
87
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 工具函数
|
|
3
|
+
* 通用工具方法
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 延迟执行
|
|
8
|
+
* @param ms 延迟毫秒数
|
|
9
|
+
* @returns Promise,在指定时间后 resolve
|
|
10
|
+
*/
|
|
11
|
+
export function sleep(ms: number): Promise<void> {
|
|
12
|
+
return new Promise(resolve => setTimeout(resolve, ms))
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 深拷贝
|
|
17
|
+
* @param obj 要拷贝的对象
|
|
18
|
+
* @returns 深拷贝后的新对象
|
|
19
|
+
*/
|
|
20
|
+
export function deepClone<T>(obj: T): T {
|
|
21
|
+
return JSON.parse(JSON.stringify(obj))
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 防抖函数
|
|
26
|
+
* @param fn 要防抖的函数
|
|
27
|
+
* @param delay 延迟时间(毫秒)
|
|
28
|
+
* @returns 防抖后的函数
|
|
29
|
+
*/
|
|
30
|
+
export function debounce<T extends (...args: unknown[]) => unknown>(
|
|
31
|
+
fn: T,
|
|
32
|
+
delay: number,
|
|
33
|
+
): (...args: Parameters<T>) => void {
|
|
34
|
+
let timer: ReturnType<typeof setTimeout> | null = null
|
|
35
|
+
return function (this: unknown, ...args: Parameters<T>) {
|
|
36
|
+
if (timer) {
|
|
37
|
+
clearTimeout(timer)
|
|
38
|
+
}
|
|
39
|
+
timer = setTimeout(() => {
|
|
40
|
+
fn.apply(this, args)
|
|
41
|
+
}, delay)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 节流函数
|
|
47
|
+
* @param fn 要节流的函数
|
|
48
|
+
* @param delay 间隔时间(毫秒)
|
|
49
|
+
* @returns 节流后的函数
|
|
50
|
+
*/
|
|
51
|
+
export function throttle<T extends (...args: unknown[]) => unknown>(
|
|
52
|
+
fn: T,
|
|
53
|
+
delay: number,
|
|
54
|
+
): (...args: Parameters<T>) => void {
|
|
55
|
+
let lastTime = 0
|
|
56
|
+
return function (this: unknown, ...args: Parameters<T>) {
|
|
57
|
+
const now = Date.now()
|
|
58
|
+
if (now - lastTime >= delay) {
|
|
59
|
+
lastTime = now
|
|
60
|
+
fn.apply(this, args)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 格式化日期
|
|
67
|
+
* @param date 日期(Date 对象、时间戳或日期字符串)
|
|
68
|
+
* @param format 格式字符串,默认为 'YYYY-MM-DD HH:mm:ss'
|
|
69
|
+
* @returns 格式化后的日期字符串
|
|
70
|
+
*/
|
|
71
|
+
export function formatDate(date: Date | string | number, format = 'YYYY-MM-DD HH:mm:ss'): string {
|
|
72
|
+
const d = new Date(date)
|
|
73
|
+
const year = d.getFullYear()
|
|
74
|
+
const month = String(d.getMonth() + 1).padStart(2, '0')
|
|
75
|
+
const day = String(d.getDate()).padStart(2, '0')
|
|
76
|
+
const hours = String(d.getHours()).padStart(2, '0')
|
|
77
|
+
const minutes = String(d.getMinutes()).padStart(2, '0')
|
|
78
|
+
const seconds = String(d.getSeconds()).padStart(2, '0')
|
|
79
|
+
|
|
80
|
+
return format
|
|
81
|
+
.replace('YYYY', String(year))
|
|
82
|
+
.replace('MM', month)
|
|
83
|
+
.replace('DD', day)
|
|
84
|
+
.replace('HH', hours)
|
|
85
|
+
.replace('mm', minutes)
|
|
86
|
+
.replace('ss', seconds)
|
|
87
|
+
}
|