@4399ywkf/cli 1.0.10 → 2.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/dist/templates/app/.gitignore.tpl +5 -26
- package/dist/templates/app/config/env/.env.development +3 -5
- package/dist/templates/app/config/env/.env.production +1 -2
- package/dist/templates/app/config/env/.env.public.tpl +2 -12
- package/dist/templates/app/package.json.tpl +10 -103
- package/dist/templates/app/public/index.html +1 -19
- package/dist/templates/app/src/index.css +1 -2
- package/dist/templates/app/src/pages/$.tsx +19 -0
- package/dist/templates/app/src/pages/dashboard/analytics/page.tsx +16 -0
- package/dist/templates/app/src/pages/dashboard/layout.tsx +29 -0
- package/dist/templates/app/src/pages/dashboard/page.tsx +31 -0
- package/dist/templates/app/src/pages/error.tsx +20 -0
- package/dist/templates/app/src/pages/layout.tsx +36 -0
- package/dist/templates/app/src/pages/loading.tsx +9 -0
- package/dist/templates/app/src/pages/page.tsx +47 -0
- package/dist/templates/app/src/pages/user/[id]/page.tsx +28 -0
- package/dist/templates/app/src/pages/user/page.tsx +42 -0
- package/dist/templates/app/tsconfig.json +24 -35
- package/dist/templates/app/ywkf.config.ts +71 -0
- package/package.json +42 -22
- package/dist/templates/404/index.tsx +0 -5
- package/dist/templates/404/page.tsx +0 -27
- package/dist/templates/404.png +0 -0
- package/dist/templates/404.tsx +0 -5
- package/dist/templates/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/AppTheme.tsx +0 -136
- package/dist/templates/BaseLayout.tsx +0 -15
- package/dist/templates/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/ColorScales/index.md +0 -168
- package/dist/templates/ColorScales/index.tsx +0 -70
- package/dist/templates/ColorScales/style.ts +0 -42
- package/dist/templates/ConfigProvider/index.md +0 -63
- package/dist/templates/ConfigProvider/index.tsx +0 -42
- package/dist/templates/ContentFormWrapper.tsx +0 -11
- package/dist/templates/ContentWrapper.module.less +0 -137
- package/dist/templates/ContentWrapper.tsx +0 -13
- package/dist/templates/DIRECTORY_STRUCTURE.md +0 -141
- package/dist/templates/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/FontLoader/index.md +0 -12
- package/dist/templates/FontLoader/index.tsx +0 -41
- package/dist/templates/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/GlobalProvider/index.tsx +0 -23
- package/dist/templates/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/GlobalStyle/global.ts +0 -61
- package/dist/templates/GlobalStyle/index.ts +0 -10
- package/dist/templates/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/Loading/index.tsx +0 -21
- package/dist/templates/Locale.tsx +0 -84
- package/dist/templates/MainContentWrap.tsx +0 -64
- package/dist/templates/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/ManualSlave/index.ts +0 -1
- package/dist/templates/ManualSlavePage.module.less +0 -25
- package/dist/templates/ManualSlavePage.tsx +0 -45
- package/dist/templates/Meta.tsx +0 -75
- package/dist/templates/Query.tsx +0 -12
- package/dist/templates/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/RequireAuth/index.ts +0 -1
- package/dist/templates/RequireAuth.tsx +0 -76
- package/dist/templates/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/ScaleRow.tsx +0 -74
- package/dist/templates/StyleRegistry.tsx +0 -9
- package/dist/templates/ThemeContext.tsx +0 -135
- package/dist/templates/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/ThemeProvider/index.md +0 -69
- package/dist/templates/ThemeProvider/index.ts +0 -3
- package/dist/templates/ThemeProvider/type.ts +0 -28
- package/dist/templates/ThemeProvider.tsx +0 -109
- package/dist/templates/actions.ts +0 -23
- package/dist/templates/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/antdOverride.ts +0 -89
- package/dist/templates/antdTheme.ts +0 -62
- package/dist/templates/api.ts +0 -5
- package/dist/templates/app/.browserslistrc +0 -5
- package/dist/templates/app/.i18nrc.js +0 -57
- package/dist/templates/app/.nvmrc +0 -1
- package/dist/templates/app/.vscode/settings.json +0 -88
- package/dist/templates/app/config/jwt/index.ts +0 -32
- package/dist/templates/app/config/request/error-handler.ts +0 -67
- package/dist/templates/app/config/request/index.ts +0 -172
- package/dist/templates/app/config/request/interceptors.ts +0 -118
- package/dist/templates/app/config/request/token-manager.ts +0 -23
- package/dist/templates/app/config/request/types.ts +0 -63
- package/dist/templates/app/config/router/index.tsx +0 -26
- package/dist/templates/app/config/rspack/paths.js +0 -12
- package/dist/templates/app/config/rspack/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/app/config/rspack/rspack.config.mjs +0 -187
- package/dist/templates/app/config/rspack/rspack.dev.mjs +0 -219
- package/dist/templates/app/config/rspack/rspack.prod.mjs +0 -233
- package/dist/templates/app/docs/DIRECTORY_STRUCTURE.md +0 -141
- package/dist/templates/app/docs/glossary.md +0 -11
- package/dist/templates/app/locales/zh-CN/common.json +0 -3
- package/dist/templates/app/public/404.png +0 -0
- package/dist/templates/app/public/fonts/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/app/public/fonts/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/app/public/fonts/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/app/public/images/banner_market_modal.webp +0 -0
- package/dist/templates/app/public/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/app/public/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/app/public/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/app/public/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/app/public/images/empty_topic_dark.webp +0 -0
- package/dist/templates/app/public/images/empty_topic_light.webp +0 -0
- package/dist/templates/app/public/images/screenshot_background.webp +0 -0
- package/dist/templates/app/public/images/theme_auto.webp +0 -0
- package/dist/templates/app/public/images/theme_dark.webp +0 -0
- package/dist/templates/app/public/images/theme_light.webp +0 -0
- package/dist/templates/app/react-app-env.d.ts +0 -19
- package/dist/templates/app/scripts/convert-locales-to-json.js +0 -47
- package/dist/templates/app/scripts/i18nWorkflow/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/app/scripts/i18nWorkflow/cleanUnusedKeys.ts +0 -344
- package/dist/templates/app/scripts/i18nWorkflow/const.ts +0 -18
- package/dist/templates/app/scripts/i18nWorkflow/flattenLocaleKeys.ts +0 -139
- package/dist/templates/app/scripts/i18nWorkflow/genDefaultLocale.ts +0 -19
- package/dist/templates/app/scripts/i18nWorkflow/genDiff.ts +0 -49
- package/dist/templates/app/scripts/i18nWorkflow/i18nConfig.ts +0 -7
- package/dist/templates/app/scripts/i18nWorkflow/index.ts +0 -11
- package/dist/templates/app/scripts/i18nWorkflow/protectedPatterns.ts +0 -91
- package/dist/templates/app/scripts/i18nWorkflow/utils.ts +0 -76
- package/dist/templates/app/src/bootstrap/index.ts +0 -34
- package/dist/templates/app/src/color/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/app/src/color/ColorScales/index.md +0 -168
- package/dist/templates/app/src/color/ColorScales/index.tsx +0 -70
- package/dist/templates/app/src/color/ColorScales/style.ts +0 -42
- package/dist/templates/app/src/color/colors/blue.ts +0 -66
- package/dist/templates/app/src/color/colors/cyan.ts +0 -66
- package/dist/templates/app/src/color/colors/geekblue.ts +0 -66
- package/dist/templates/app/src/color/colors/gold.ts +0 -66
- package/dist/templates/app/src/color/colors/gray.ts +0 -66
- package/dist/templates/app/src/color/colors/green.ts +0 -66
- package/dist/templates/app/src/color/colors/index.ts +0 -66
- package/dist/templates/app/src/color/colors/lime.ts +0 -66
- package/dist/templates/app/src/color/colors/magenta.ts +0 -66
- package/dist/templates/app/src/color/colors/orange.ts +0 -66
- package/dist/templates/app/src/color/colors/primary.ts +0 -66
- package/dist/templates/app/src/color/colors/purple.ts +0 -66
- package/dist/templates/app/src/color/colors/red.ts +0 -66
- package/dist/templates/app/src/color/colors/volcano.ts +0 -66
- package/dist/templates/app/src/color/colors/yellow.ts +0 -66
- package/dist/templates/app/src/color/index.ts +0 -4
- package/dist/templates/app/src/color/neutrals/index.ts +0 -30
- package/dist/templates/app/src/color/neutrals/mauve.ts +0 -66
- package/dist/templates/app/src/color/neutrals/olive.ts +0 -66
- package/dist/templates/app/src/color/neutrals/sage.ts +0 -66
- package/dist/templates/app/src/color/neutrals/sand.ts +0 -66
- package/dist/templates/app/src/color/neutrals/slate.ts +0 -66
- package/dist/templates/app/src/color/types.ts +0 -21
- package/dist/templates/app/src/components/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/app/src/components/ConfigProvider/index.md +0 -63
- package/dist/templates/app/src/components/ConfigProvider/index.tsx +0 -42
- package/dist/templates/app/src/components/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/app/src/components/FontLoader/index.md +0 -12
- package/dist/templates/app/src/components/FontLoader/index.tsx +0 -41
- package/dist/templates/app/src/components/Loading/index.tsx +0 -21
- package/dist/templates/app/src/components/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/app/src/components/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/app/src/components/ManualSlave/index.ts +0 -1
- package/dist/templates/app/src/components/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/app/src/components/RequireAuth/index.ts +0 -1
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/app/src/components/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/app/src/components/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/app/src/components/ThemeProvider/index.md +0 -69
- package/dist/templates/app/src/components/ThemeProvider/index.ts +0 -3
- package/dist/templates/app/src/components/ThemeProvider/type.ts +0 -28
- package/dist/templates/app/src/config/env.ts +0 -84
- package/dist/templates/app/src/const/constants.ts +0 -0
- package/dist/templates/app/src/const/locale.ts +0 -9
- package/dist/templates/app/src/const/system.ts +0 -1
- package/dist/templates/app/src/const/theme.ts +0 -5
- package/dist/templates/app/src/const/url.ts +0 -1
- package/dist/templates/app/src/index.tsx +0 -15
- package/dist/templates/app/src/layout/BaseLayout.tsx +0 -15
- package/dist/templates/app/src/layout/ContentFormWrapper.tsx +0 -11
- package/dist/templates/app/src/layout/ContentWrapper.module.less +0 -137
- package/dist/templates/app/src/layout/ContentWrapper.tsx +0 -13
- package/dist/templates/app/src/layout/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/app/src/layout/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/app/src/layout/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/app/src/layout/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/app/src/layout/GlobalProvider/index.tsx +0 -23
- package/dist/templates/app/src/layout/Locale.tsx +0 -85
- package/dist/templates/app/src/layout/MainContentWrap.tsx +0 -64
- package/dist/templates/app/src/layout/ThemeContext.tsx +0 -135
- package/dist/templates/app/src/locales/create.ts +0 -56
- package/dist/templates/app/src/locales/default/common.ts +0 -3
- package/dist/templates/app/src/locales/default/index.ts +0 -7
- package/dist/templates/app/src/locales/resources.ts +0 -104
- package/dist/templates/app/src/locales/utils.ts +0 -23
- package/dist/templates/app/src/micro/garfish.ts +0 -53
- package/dist/templates/app/src/pages/404/index.tsx +0 -5
- package/dist/templates/app/src/pages/404/page.tsx +0 -27
- package/dist/templates/app/src/pages/404.tsx +0 -5
- package/dist/templates/app/src/pages/base/index.tsx +0 -287
- package/dist/templates/app/src/pages/index.tsx +0 -5
- package/dist/templates/app/src/routes.tsx +0 -27
- package/dist/templates/app/src/styles/antdOverride.ts +0 -24
- package/dist/templates/app/src/styles/customTheme.ts +0 -70
- package/dist/templates/app/src/styles/global.ts +0 -53
- package/dist/templates/app/src/styles/highlighter.ts +0 -34
- package/dist/templates/app/src/styles/index.ts +0 -23
- package/dist/templates/app/src/styles/mermaid.ts +0 -7
- package/dist/templates/app/src/styles/text.ts +0 -10
- package/dist/templates/app/src/styles/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/app/src/styles/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/app/src/styles/theme/antdTheme.ts +0 -62
- package/dist/templates/app/src/styles/theme/customStylish.ts +0 -189
- package/dist/templates/app/src/styles/theme/customToken.ts +0 -93
- package/dist/templates/app/src/styles/theme/generateColorPalette.ts +0 -59
- package/dist/templates/app/src/styles/theme/token/base.ts +0 -16
- package/dist/templates/app/src/styles/theme/token/dark.ts +0 -60
- package/dist/templates/app/src/styles/theme/token/light.ts +0 -60
- package/dist/templates/app/src/types/customStylish.ts +0 -20
- package/dist/templates/app/src/types/customToken.ts +0 -70
- package/dist/templates/app/src/types/global.d.ts +0 -19
- package/dist/templates/app/src/types/index.ts +0 -21
- package/dist/templates/app/src/types/routes.ts +0 -70
- package/dist/templates/app/src/utils/convert.ts +0 -40
- package/dist/templates/app/src/utils/cookie.ts +0 -25
- package/dist/templates/app/src/utils/copyToClipboard.ts +0 -13
- package/dist/templates/app/src/utils/difference.ts +0 -26
- package/dist/templates/app/src/utils/genCdnUrl.ts +0 -30
- package/dist/templates/app/src/utils/index.ts +0 -3
- package/dist/templates/app/src/utils/locale.ts +0 -46
- package/dist/templates/app/store/middleware/createDevtools.ts +0 -23
- package/dist/templates/app/store/middleware/createHyperStorage/index.ts +0 -127
- package/dist/templates/app/store/middleware/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/app/store/middleware/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/app/store/middleware/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/app/store/middleware/createHyperStorage/type.ts +0 -27
- package/dist/templates/app/store/middleware/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/app/store/types.ts +0 -83
- package/dist/templates/app/store/user/index.tsx +0 -1
- package/dist/templates/app/store/user/indexApi.tsx +0 -5
- package/dist/templates/app/store/user/initialState.ts +0 -15
- package/dist/templates/app/store/user/slices/profile/actions.ts +0 -20
- package/dist/templates/app/store/user/slices/profile/api.ts +0 -5
- package/dist/templates/app/store/user/slices/profile/initialState.ts +0 -14
- package/dist/templates/app/store/user/slices/settings/actions.ts +0 -23
- package/dist/templates/app/store/user/slices/settings/initialState.ts +0 -32
- package/dist/templates/app/store/user/store.ts +0 -39
- package/dist/templates/app/tailwind.config.js +0 -13
- package/dist/templates/app//347/277/273/350/257/221.md +0 -9
- package/dist/templates/banner_market_modal.webp +0 -0
- package/dist/templates/base/index.tsx +0 -287
- package/dist/templates/base.ts +0 -16
- package/dist/templates/blue.ts +0 -66
- package/dist/templates/bootstrap/index.ts +0 -34
- package/dist/templates/chatmode_chat_dark.webp +0 -0
- package/dist/templates/chatmode_chat_light.webp +0 -0
- package/dist/templates/chatmode_docs_dark.webp +0 -0
- package/dist/templates/chatmode_docs_light.webp +0 -0
- package/dist/templates/cleanUnusedKeys.ts +0 -344
- package/dist/templates/color/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/color/ColorScales/index.md +0 -168
- package/dist/templates/color/ColorScales/index.tsx +0 -70
- package/dist/templates/color/ColorScales/style.ts +0 -42
- package/dist/templates/color/colors/blue.ts +0 -66
- package/dist/templates/color/colors/cyan.ts +0 -66
- package/dist/templates/color/colors/geekblue.ts +0 -66
- package/dist/templates/color/colors/gold.ts +0 -66
- package/dist/templates/color/colors/gray.ts +0 -66
- package/dist/templates/color/colors/green.ts +0 -66
- package/dist/templates/color/colors/index.ts +0 -66
- package/dist/templates/color/colors/lime.ts +0 -66
- package/dist/templates/color/colors/magenta.ts +0 -66
- package/dist/templates/color/colors/orange.ts +0 -66
- package/dist/templates/color/colors/primary.ts +0 -66
- package/dist/templates/color/colors/purple.ts +0 -66
- package/dist/templates/color/colors/red.ts +0 -66
- package/dist/templates/color/colors/volcano.ts +0 -66
- package/dist/templates/color/colors/yellow.ts +0 -66
- package/dist/templates/color/index.ts +0 -4
- package/dist/templates/color/neutrals/index.ts +0 -30
- package/dist/templates/color/neutrals/mauve.ts +0 -66
- package/dist/templates/color/neutrals/olive.ts +0 -66
- package/dist/templates/color/neutrals/sage.ts +0 -66
- package/dist/templates/color/neutrals/sand.ts +0 -66
- package/dist/templates/color/neutrals/slate.ts +0 -66
- package/dist/templates/color/types.ts +0 -21
- package/dist/templates/colors/blue.ts +0 -66
- package/dist/templates/colors/cyan.ts +0 -66
- package/dist/templates/colors/geekblue.ts +0 -66
- package/dist/templates/colors/gold.ts +0 -66
- package/dist/templates/colors/gray.ts +0 -66
- package/dist/templates/colors/green.ts +0 -66
- package/dist/templates/colors/index.ts +0 -66
- package/dist/templates/colors/lime.ts +0 -66
- package/dist/templates/colors/magenta.ts +0 -66
- package/dist/templates/colors/orange.ts +0 -66
- package/dist/templates/colors/primary.ts +0 -66
- package/dist/templates/colors/purple.ts +0 -66
- package/dist/templates/colors/red.ts +0 -66
- package/dist/templates/colors/volcano.ts +0 -66
- package/dist/templates/colors/yellow.ts +0 -66
- package/dist/templates/common.json +0 -3
- package/dist/templates/common.ts +0 -3
- package/dist/templates/components/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/components/ConfigProvider/index.md +0 -63
- package/dist/templates/components/ConfigProvider/index.tsx +0 -42
- package/dist/templates/components/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/components/FontLoader/index.md +0 -12
- package/dist/templates/components/FontLoader/index.tsx +0 -41
- package/dist/templates/components/Loading/index.tsx +0 -21
- package/dist/templates/components/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/components/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/components/ManualSlave/index.ts +0 -1
- package/dist/templates/components/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/components/RequireAuth/index.ts +0 -1
- package/dist/templates/components/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/components/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/components/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/components/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/components/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/components/ThemeProvider/index.md +0 -69
- package/dist/templates/components/ThemeProvider/index.ts +0 -3
- package/dist/templates/components/ThemeProvider/type.ts +0 -28
- package/dist/templates/config/env/.env.development +0 -5
- package/dist/templates/config/env/.env.production +0 -2
- package/dist/templates/config/env/.env.public.tpl +0 -14
- package/dist/templates/config/env.ts +0 -84
- package/dist/templates/config/jwt/index.ts +0 -32
- package/dist/templates/config/request/error-handler.ts +0 -67
- package/dist/templates/config/request/index.ts +0 -172
- package/dist/templates/config/request/interceptors.ts +0 -118
- package/dist/templates/config/request/token-manager.ts +0 -23
- package/dist/templates/config/request/types.ts +0 -63
- package/dist/templates/config/router/index.tsx +0 -26
- package/dist/templates/config/rspack/paths.js +0 -12
- package/dist/templates/config/rspack/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/config/rspack/rspack.config.mjs +0 -187
- package/dist/templates/config/rspack/rspack.dev.mjs +0 -219
- package/dist/templates/config/rspack/rspack.prod.mjs +0 -233
- package/dist/templates/const/constants.ts +0 -0
- package/dist/templates/const/locale.ts +0 -9
- package/dist/templates/const/system.ts +0 -1
- package/dist/templates/const/theme.ts +0 -5
- package/dist/templates/const/url.ts +0 -1
- package/dist/templates/const.ts +0 -18
- package/dist/templates/constants.ts +0 -0
- package/dist/templates/convert-locales-to-json.js +0 -47
- package/dist/templates/convert.ts +0 -40
- package/dist/templates/cookie.ts +0 -25
- package/dist/templates/copyToClipboard.ts +0 -13
- package/dist/templates/create.ts +0 -56
- package/dist/templates/createDevtools.ts +0 -23
- package/dist/templates/createHyperStorage/index.ts +0 -127
- package/dist/templates/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/createHyperStorage/type.ts +0 -27
- package/dist/templates/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/customStylish.ts +0 -189
- package/dist/templates/customTheme.ts +0 -70
- package/dist/templates/customToken.ts +0 -93
- package/dist/templates/cyan.ts +0 -66
- package/dist/templates/dark.ts +0 -60
- package/dist/templates/darkAlgorithm.ts +0 -47
- package/dist/templates/default/common.ts +0 -3
- package/dist/templates/default/index.ts +0 -7
- package/dist/templates/difference.ts +0 -26
- package/dist/templates/docs/DIRECTORY_STRUCTURE.md +0 -141
- package/dist/templates/docs/glossary.md +0 -11
- package/dist/templates/empty_topic_dark.webp +0 -0
- package/dist/templates/empty_topic_light.webp +0 -0
- package/dist/templates/env/.env.development +0 -5
- package/dist/templates/env/.env.production +0 -2
- package/dist/templates/env/.env.public.tpl +0 -14
- package/dist/templates/env.ts +0 -84
- package/dist/templates/error-handler.ts +0 -67
- package/dist/templates/favicon.ico +0 -0
- package/dist/templates/flattenLocaleKeys.ts +0 -139
- package/dist/templates/fonts/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/fonts/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/fonts/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/garfish.ts +0 -53
- package/dist/templates/geekblue.ts +0 -66
- package/dist/templates/genCdnUrl.ts +0 -30
- package/dist/templates/genDefaultLocale.ts +0 -19
- package/dist/templates/genDiff.ts +0 -49
- package/dist/templates/generateColorPalette.ts +0 -59
- package/dist/templates/global.d.ts +0 -19
- package/dist/templates/global.ts +0 -61
- package/dist/templates/glossary.md +0 -11
- package/dist/templates/gold.ts +0 -66
- package/dist/templates/gray.ts +0 -66
- package/dist/templates/green.ts +0 -66
- package/dist/templates/highlighter.ts +0 -34
- package/dist/templates/i18nConfig.ts +0 -7
- package/dist/templates/i18nWorkflow/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/i18nWorkflow/cleanUnusedKeys.ts +0 -344
- package/dist/templates/i18nWorkflow/const.ts +0 -18
- package/dist/templates/i18nWorkflow/flattenLocaleKeys.ts +0 -139
- package/dist/templates/i18nWorkflow/genDefaultLocale.ts +0 -19
- package/dist/templates/i18nWorkflow/genDiff.ts +0 -49
- package/dist/templates/i18nWorkflow/i18nConfig.ts +0 -7
- package/dist/templates/i18nWorkflow/index.ts +0 -11
- package/dist/templates/i18nWorkflow/protectedPatterns.ts +0 -91
- package/dist/templates/i18nWorkflow/utils.ts +0 -76
- package/dist/templates/images/banner_market_modal.webp +0 -0
- package/dist/templates/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/images/empty_topic_dark.webp +0 -0
- package/dist/templates/images/empty_topic_light.webp +0 -0
- package/dist/templates/images/screenshot_background.webp +0 -0
- package/dist/templates/images/theme_auto.webp +0 -0
- package/dist/templates/images/theme_dark.webp +0 -0
- package/dist/templates/images/theme_light.webp +0 -0
- package/dist/templates/index.css +0 -2
- package/dist/templates/index.html +0 -29
- package/dist/templates/index.md +0 -69
- package/dist/templates/index.ts +0 -10
- package/dist/templates/index.tsx +0 -287
- package/dist/templates/indexApi.tsx +0 -5
- package/dist/templates/indexedDB.ts +0 -31
- package/dist/templates/initialState.ts +0 -32
- package/dist/templates/interceptors.ts +0 -118
- package/dist/templates/jwt/index.ts +0 -32
- package/dist/templates/keyMapper.ts +0 -57
- package/dist/templates/layout/BaseLayout.tsx +0 -15
- package/dist/templates/layout/ContentFormWrapper.tsx +0 -11
- package/dist/templates/layout/ContentWrapper.module.less +0 -137
- package/dist/templates/layout/ContentWrapper.tsx +0 -13
- package/dist/templates/layout/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/layout/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/layout/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/layout/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/layout/GlobalProvider/index.tsx +0 -23
- package/dist/templates/layout/Locale.tsx +0 -85
- package/dist/templates/layout/MainContentWrap.tsx +0 -64
- package/dist/templates/layout/ThemeContext.tsx +0 -135
- package/dist/templates/light.ts +0 -60
- package/dist/templates/lightAlgorithm.ts +0 -44
- package/dist/templates/lime.ts +0 -66
- package/dist/templates/localStorage.ts +0 -23
- package/dist/templates/locale.ts +0 -46
- package/dist/templates/locales/create.ts +0 -56
- package/dist/templates/locales/default/common.ts +0 -3
- package/dist/templates/locales/default/index.ts +0 -7
- package/dist/templates/locales/resources.ts +0 -104
- package/dist/templates/locales/utils.ts +0 -23
- package/dist/templates/locales/zh-CN/common.json +0 -3
- package/dist/templates/magenta.ts +0 -66
- package/dist/templates/mauve.ts +0 -66
- package/dist/templates/mermaid.ts +0 -7
- package/dist/templates/micro/garfish.ts +0 -53
- package/dist/templates/middleware/createDevtools.ts +0 -23
- package/dist/templates/middleware/createHyperStorage/index.ts +0 -127
- package/dist/templates/middleware/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/middleware/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/middleware/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/middleware/createHyperStorage/type.ts +0 -27
- package/dist/templates/middleware/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/neutrals/index.ts +0 -30
- package/dist/templates/neutrals/mauve.ts +0 -66
- package/dist/templates/neutrals/olive.ts +0 -66
- package/dist/templates/neutrals/sage.ts +0 -66
- package/dist/templates/neutrals/sand.ts +0 -66
- package/dist/templates/neutrals/slate.ts +0 -66
- package/dist/templates/olive.ts +0 -66
- package/dist/templates/orange.ts +0 -66
- package/dist/templates/package.json.tpl +0 -128
- package/dist/templates/page.tsx +0 -27
- package/dist/templates/pages/404/index.tsx +0 -5
- package/dist/templates/pages/404/page.tsx +0 -27
- package/dist/templates/pages/404.tsx +0 -5
- package/dist/templates/pages/base/index.tsx +0 -287
- package/dist/templates/pages/index.tsx +0 -5
- package/dist/templates/paths.js +0 -12
- package/dist/templates/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/postcss.config.js +0 -6
- package/dist/templates/primary.ts +0 -66
- package/dist/templates/profile/actions.ts +0 -20
- package/dist/templates/profile/api.ts +0 -5
- package/dist/templates/profile/initialState.ts +0 -14
- package/dist/templates/protectedPatterns.ts +0 -91
- package/dist/templates/public/404.png +0 -0
- package/dist/templates/public/favicon.ico +0 -0
- package/dist/templates/public/fonts/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/public/fonts/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/public/fonts/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/public/images/banner_market_modal.webp +0 -0
- package/dist/templates/public/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/public/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/public/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/public/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/public/images/empty_topic_dark.webp +0 -0
- package/dist/templates/public/images/empty_topic_light.webp +0 -0
- package/dist/templates/public/images/screenshot_background.webp +0 -0
- package/dist/templates/public/images/theme_auto.webp +0 -0
- package/dist/templates/public/images/theme_dark.webp +0 -0
- package/dist/templates/public/images/theme_light.webp +0 -0
- package/dist/templates/public/index.html +0 -29
- package/dist/templates/purple.ts +0 -66
- package/dist/templates/react-app-env.d.ts +0 -19
- package/dist/templates/red.ts +0 -66
- package/dist/templates/request/error-handler.ts +0 -67
- package/dist/templates/request/index.ts +0 -172
- package/dist/templates/request/interceptors.ts +0 -118
- package/dist/templates/request/token-manager.ts +0 -23
- package/dist/templates/request/types.ts +0 -63
- package/dist/templates/resources.ts +0 -104
- package/dist/templates/router/index.tsx +0 -26
- package/dist/templates/routes.ts +0 -70
- package/dist/templates/routes.tsx +0 -27
- package/dist/templates/rspack/paths.js +0 -12
- package/dist/templates/rspack/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/rspack/rspack.config.mjs +0 -187
- package/dist/templates/rspack/rspack.dev.mjs +0 -219
- package/dist/templates/rspack/rspack.prod.mjs +0 -233
- package/dist/templates/rspack.config.mjs +0 -187
- package/dist/templates/rspack.dev.mjs +0 -219
- package/dist/templates/rspack.prod.mjs +0 -233
- package/dist/templates/sage.ts +0 -66
- package/dist/templates/sand.ts +0 -66
- package/dist/templates/screenshot_background.webp +0 -0
- package/dist/templates/scripts/convert-locales-to-json.js +0 -47
- package/dist/templates/scripts/i18nWorkflow/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/scripts/i18nWorkflow/cleanUnusedKeys.ts +0 -344
- package/dist/templates/scripts/i18nWorkflow/const.ts +0 -18
- package/dist/templates/scripts/i18nWorkflow/flattenLocaleKeys.ts +0 -139
- package/dist/templates/scripts/i18nWorkflow/genDefaultLocale.ts +0 -19
- package/dist/templates/scripts/i18nWorkflow/genDiff.ts +0 -49
- package/dist/templates/scripts/i18nWorkflow/i18nConfig.ts +0 -7
- package/dist/templates/scripts/i18nWorkflow/index.ts +0 -11
- package/dist/templates/scripts/i18nWorkflow/protectedPatterns.ts +0 -91
- package/dist/templates/scripts/i18nWorkflow/utils.ts +0 -76
- package/dist/templates/settings/actions.ts +0 -23
- package/dist/templates/settings/initialState.ts +0 -32
- package/dist/templates/slate.ts +0 -66
- package/dist/templates/slices/profile/actions.ts +0 -20
- package/dist/templates/slices/profile/api.ts +0 -5
- package/dist/templates/slices/profile/initialState.ts +0 -14
- package/dist/templates/slices/settings/actions.ts +0 -23
- package/dist/templates/slices/settings/initialState.ts +0 -32
- package/dist/templates/src/bootstrap/index.ts +0 -34
- package/dist/templates/src/color/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/src/color/ColorScales/index.md +0 -168
- package/dist/templates/src/color/ColorScales/index.tsx +0 -70
- package/dist/templates/src/color/ColorScales/style.ts +0 -42
- package/dist/templates/src/color/colors/blue.ts +0 -66
- package/dist/templates/src/color/colors/cyan.ts +0 -66
- package/dist/templates/src/color/colors/geekblue.ts +0 -66
- package/dist/templates/src/color/colors/gold.ts +0 -66
- package/dist/templates/src/color/colors/gray.ts +0 -66
- package/dist/templates/src/color/colors/green.ts +0 -66
- package/dist/templates/src/color/colors/index.ts +0 -66
- package/dist/templates/src/color/colors/lime.ts +0 -66
- package/dist/templates/src/color/colors/magenta.ts +0 -66
- package/dist/templates/src/color/colors/orange.ts +0 -66
- package/dist/templates/src/color/colors/primary.ts +0 -66
- package/dist/templates/src/color/colors/purple.ts +0 -66
- package/dist/templates/src/color/colors/red.ts +0 -66
- package/dist/templates/src/color/colors/volcano.ts +0 -66
- package/dist/templates/src/color/colors/yellow.ts +0 -66
- package/dist/templates/src/color/index.ts +0 -4
- package/dist/templates/src/color/neutrals/index.ts +0 -30
- package/dist/templates/src/color/neutrals/mauve.ts +0 -66
- package/dist/templates/src/color/neutrals/olive.ts +0 -66
- package/dist/templates/src/color/neutrals/sage.ts +0 -66
- package/dist/templates/src/color/neutrals/sand.ts +0 -66
- package/dist/templates/src/color/neutrals/slate.ts +0 -66
- package/dist/templates/src/color/types.ts +0 -21
- package/dist/templates/src/components/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/src/components/ConfigProvider/index.md +0 -63
- package/dist/templates/src/components/ConfigProvider/index.tsx +0 -42
- package/dist/templates/src/components/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/src/components/FontLoader/index.md +0 -12
- package/dist/templates/src/components/FontLoader/index.tsx +0 -41
- package/dist/templates/src/components/Loading/index.tsx +0 -21
- package/dist/templates/src/components/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/src/components/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/src/components/ManualSlave/index.ts +0 -1
- package/dist/templates/src/components/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/src/components/RequireAuth/index.ts +0 -1
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/src/components/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/src/components/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/src/components/ThemeProvider/index.md +0 -69
- package/dist/templates/src/components/ThemeProvider/index.ts +0 -3
- package/dist/templates/src/components/ThemeProvider/type.ts +0 -28
- package/dist/templates/src/config/env.ts +0 -84
- package/dist/templates/src/const/constants.ts +0 -0
- package/dist/templates/src/const/locale.ts +0 -9
- package/dist/templates/src/const/system.ts +0 -1
- package/dist/templates/src/const/theme.ts +0 -5
- package/dist/templates/src/const/url.ts +0 -1
- package/dist/templates/src/index.css +0 -2
- package/dist/templates/src/index.tsx +0 -15
- package/dist/templates/src/layout/BaseLayout.tsx +0 -15
- package/dist/templates/src/layout/ContentFormWrapper.tsx +0 -11
- package/dist/templates/src/layout/ContentWrapper.module.less +0 -137
- package/dist/templates/src/layout/ContentWrapper.tsx +0 -13
- package/dist/templates/src/layout/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/src/layout/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/src/layout/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/src/layout/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/src/layout/GlobalProvider/index.tsx +0 -23
- package/dist/templates/src/layout/Locale.tsx +0 -85
- package/dist/templates/src/layout/MainContentWrap.tsx +0 -64
- package/dist/templates/src/layout/ThemeContext.tsx +0 -135
- package/dist/templates/src/locales/create.ts +0 -56
- package/dist/templates/src/locales/default/common.ts +0 -3
- package/dist/templates/src/locales/default/index.ts +0 -7
- package/dist/templates/src/locales/resources.ts +0 -104
- package/dist/templates/src/locales/utils.ts +0 -23
- package/dist/templates/src/micro/garfish.ts +0 -53
- package/dist/templates/src/pages/404/index.tsx +0 -5
- package/dist/templates/src/pages/404/page.tsx +0 -27
- package/dist/templates/src/pages/404.tsx +0 -5
- package/dist/templates/src/pages/base/index.tsx +0 -287
- package/dist/templates/src/pages/index.tsx +0 -5
- package/dist/templates/src/routes.tsx +0 -27
- package/dist/templates/src/styles/antdOverride.ts +0 -24
- package/dist/templates/src/styles/customTheme.ts +0 -70
- package/dist/templates/src/styles/global.ts +0 -53
- package/dist/templates/src/styles/highlighter.ts +0 -34
- package/dist/templates/src/styles/index.ts +0 -23
- package/dist/templates/src/styles/mermaid.ts +0 -7
- package/dist/templates/src/styles/text.ts +0 -10
- package/dist/templates/src/styles/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/src/styles/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/src/styles/theme/antdTheme.ts +0 -62
- package/dist/templates/src/styles/theme/customStylish.ts +0 -189
- package/dist/templates/src/styles/theme/customToken.ts +0 -93
- package/dist/templates/src/styles/theme/generateColorPalette.ts +0 -59
- package/dist/templates/src/styles/theme/token/base.ts +0 -16
- package/dist/templates/src/styles/theme/token/dark.ts +0 -60
- package/dist/templates/src/styles/theme/token/light.ts +0 -60
- package/dist/templates/src/types/customStylish.ts +0 -20
- package/dist/templates/src/types/customToken.ts +0 -70
- package/dist/templates/src/types/global.d.ts +0 -19
- package/dist/templates/src/types/index.ts +0 -21
- package/dist/templates/src/types/routes.ts +0 -70
- package/dist/templates/src/utils/convert.ts +0 -40
- package/dist/templates/src/utils/cookie.ts +0 -25
- package/dist/templates/src/utils/copyToClipboard.ts +0 -13
- package/dist/templates/src/utils/difference.ts +0 -26
- package/dist/templates/src/utils/genCdnUrl.ts +0 -30
- package/dist/templates/src/utils/index.ts +0 -3
- package/dist/templates/src/utils/locale.ts +0 -46
- package/dist/templates/store/middleware/createDevtools.ts +0 -23
- package/dist/templates/store/middleware/createHyperStorage/index.ts +0 -127
- package/dist/templates/store/middleware/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/store/middleware/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/store/middleware/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/store/middleware/createHyperStorage/type.ts +0 -27
- package/dist/templates/store/middleware/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/store/types.ts +0 -83
- package/dist/templates/store/user/index.tsx +0 -1
- package/dist/templates/store/user/indexApi.tsx +0 -5
- package/dist/templates/store/user/initialState.ts +0 -15
- package/dist/templates/store/user/slices/profile/actions.ts +0 -20
- package/dist/templates/store/user/slices/profile/api.ts +0 -5
- package/dist/templates/store/user/slices/profile/initialState.ts +0 -14
- package/dist/templates/store/user/slices/settings/actions.ts +0 -23
- package/dist/templates/store/user/slices/settings/initialState.ts +0 -32
- package/dist/templates/store/user/store.ts +0 -39
- package/dist/templates/store.ts +0 -39
- package/dist/templates/style.ts +0 -42
- package/dist/templates/styles/antdOverride.ts +0 -24
- package/dist/templates/styles/customTheme.ts +0 -70
- package/dist/templates/styles/global.ts +0 -53
- package/dist/templates/styles/highlighter.ts +0 -34
- package/dist/templates/styles/index.ts +0 -23
- package/dist/templates/styles/mermaid.ts +0 -7
- package/dist/templates/styles/text.ts +0 -10
- package/dist/templates/styles/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/styles/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/styles/theme/antdTheme.ts +0 -62
- package/dist/templates/styles/theme/customStylish.ts +0 -189
- package/dist/templates/styles/theme/customToken.ts +0 -93
- package/dist/templates/styles/theme/generateColorPalette.ts +0 -59
- package/dist/templates/styles/theme/token/base.ts +0 -16
- package/dist/templates/styles/theme/token/dark.ts +0 -60
- package/dist/templates/styles/theme/token/light.ts +0 -60
- package/dist/templates/system.ts +0 -1
- package/dist/templates/tailwind.config.js +0 -13
- package/dist/templates/text.ts +0 -10
- package/dist/templates/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/theme/antdTheme.ts +0 -62
- package/dist/templates/theme/customStylish.ts +0 -189
- package/dist/templates/theme/customToken.ts +0 -93
- package/dist/templates/theme/generateColorPalette.ts +0 -59
- package/dist/templates/theme/token/base.ts +0 -16
- package/dist/templates/theme/token/dark.ts +0 -60
- package/dist/templates/theme/token/light.ts +0 -60
- package/dist/templates/theme.ts +0 -5
- package/dist/templates/theme_auto.webp +0 -0
- package/dist/templates/theme_dark.webp +0 -0
- package/dist/templates/theme_light.webp +0 -0
- package/dist/templates/token/base.ts +0 -16
- package/dist/templates/token/dark.ts +0 -60
- package/dist/templates/token/light.ts +0 -60
- package/dist/templates/token-manager.ts +0 -23
- package/dist/templates/tsconfig.json +0 -43
- package/dist/templates/type.ts +0 -27
- package/dist/templates/types/customStylish.ts +0 -20
- package/dist/templates/types/customToken.ts +0 -70
- package/dist/templates/types/global.d.ts +0 -19
- package/dist/templates/types/index.ts +0 -21
- package/dist/templates/types/routes.ts +0 -70
- package/dist/templates/types.ts +0 -21
- package/dist/templates/url.ts +0 -1
- package/dist/templates/urlStorage.ts +0 -85
- package/dist/templates/user/index.tsx +0 -1
- package/dist/templates/user/indexApi.tsx +0 -5
- package/dist/templates/user/initialState.ts +0 -15
- package/dist/templates/user/slices/profile/actions.ts +0 -20
- package/dist/templates/user/slices/profile/api.ts +0 -5
- package/dist/templates/user/slices/profile/initialState.ts +0 -14
- package/dist/templates/user/slices/settings/actions.ts +0 -23
- package/dist/templates/user/slices/settings/initialState.ts +0 -32
- package/dist/templates/user/store.ts +0 -39
- package/dist/templates/utils/convert.ts +0 -40
- package/dist/templates/utils/cookie.ts +0 -25
- package/dist/templates/utils/copyToClipboard.ts +0 -13
- package/dist/templates/utils/difference.ts +0 -26
- package/dist/templates/utils/genCdnUrl.ts +0 -30
- package/dist/templates/utils/index.ts +0 -3
- package/dist/templates/utils/locale.ts +0 -46
- package/dist/templates/utils.ts +0 -23
- package/dist/templates/volcano.ts +0 -66
- package/dist/templates/yellow.ts +0 -66
- package/dist/templates/zh-CN/common.json +0 -3
- package/dist/templates//347/277/273/350/257/221.md +0 -9
|
@@ -1,30 +1,9 @@
|
|
|
1
1
|
.DS_Store
|
|
2
|
-
|
|
3
|
-
.pnp
|
|
4
|
-
.pnp.js
|
|
5
|
-
.env.local
|
|
6
|
-
.env.*.local
|
|
7
|
-
.history
|
|
8
|
-
*.log*
|
|
9
|
-
|
|
10
2
|
node_modules/
|
|
11
|
-
.yarn-integrity
|
|
12
|
-
.pnpm-store/
|
|
13
|
-
*.tsbuildinfo
|
|
14
|
-
.changeset/pre.json
|
|
15
|
-
|
|
16
3
|
dist/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
output_resource/
|
|
21
|
-
log/
|
|
22
|
-
|
|
23
|
-
.vscode/**/*
|
|
24
|
-
!.vscode/settings.json
|
|
25
|
-
!.vscode/extensions.json
|
|
26
|
-
.idea/
|
|
27
|
-
|
|
28
|
-
**/*/typings/auto-generated
|
|
4
|
+
*.log*
|
|
5
|
+
.env.local
|
|
6
|
+
.env.*.local
|
|
29
7
|
|
|
30
|
-
|
|
8
|
+
# 框架生成目录(自动生成,不需要提交)
|
|
9
|
+
.ywkf/
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
NODE_ENV="production"
|
|
1
|
+
NODE_ENV="production"
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
API_PREFIX="/api"
|
|
2
|
-
API_TIMEOUT=60000
|
|
3
|
-
|
|
4
|
-
COOKIE_NAME='ywkf_jwt'
|
|
5
|
-
|
|
6
|
-
APP_CNAME='{{{ name }}}'
|
|
7
1
|
APP_NAME='{{{ name }}}'
|
|
8
|
-
|
|
2
|
+
APP_CNAME='{{{ name }}}'
|
|
9
3
|
BASENAME='/'
|
|
10
|
-
|
|
11
|
-
PUBLIC_PATH='/s{{{ name }}}/'
|
|
12
|
-
|
|
13
|
-
# 帮助中心
|
|
14
|
-
HELP_CENTER_URL="https://im-support.gz4399.com/"
|
|
4
|
+
PUBLIC_PATH='/'
|
|
@@ -3,126 +3,33 @@
|
|
|
3
3
|
"author": "{{{ author }}}",
|
|
4
4
|
"version": "{{{ version }}}",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"build": "cross-env NODE_ENV=production rspack build --config config/rspack/rspack.prod.mjs --mode production",
|
|
11
|
-
"lint": "biome check",
|
|
12
|
-
"prepare": "husky install",
|
|
13
|
-
"i18n": "npm run workflow:i18n && lobe-i18n && prettier -c --write \"locales/**\"",
|
|
14
|
-
"workflow:i18n": "tsx ./scripts/i18nWorkflow/index.ts",
|
|
15
|
-
"test:ci": "jest --coverage --watchAll=false"
|
|
6
|
+
"dev": "ywkf dev",
|
|
7
|
+
"build": "ywkf build",
|
|
8
|
+
"build:analyze": "ywkf build --analyze",
|
|
9
|
+
"lint": "biome check"
|
|
16
10
|
},
|
|
17
11
|
"engines": {
|
|
18
12
|
"node": ">=20.0.0",
|
|
19
13
|
"pnpm": ">=8.0.0"
|
|
20
14
|
},
|
|
21
15
|
"dependencies": {
|
|
16
|
+
"@4399ywkf/core": "^1.0.0",
|
|
22
17
|
"@ant-design/icons": "^6.0.0",
|
|
23
|
-
"@rspack/cli": "^1.1.8",
|
|
24
|
-
"@rspack/core": "^1.6.1",
|
|
25
|
-
"@sentry/react": "^9.27.0",
|
|
26
|
-
"@sentry/webpack-plugin": "^3.5.0",
|
|
27
|
-
"@tailwindcss/postcss": "^4.1.8",
|
|
28
18
|
"@tanstack/react-query": "^5.80.6",
|
|
29
|
-
"ahooks": "^3.8.5",
|
|
30
19
|
"antd": "^6.1.1",
|
|
31
|
-
"
|
|
32
|
-
"clsx": "^2.1.1",
|
|
33
|
-
"copy-webpack-plugin": "^13.0.1",
|
|
34
|
-
"dayjs": "^1.11.13",
|
|
35
|
-
"fast-deep-equal": "^3.1.3",
|
|
36
|
-
"garfish": "^1.19.3",
|
|
37
|
-
"i18next": "^25.2.1",
|
|
38
|
-
"i18next-browser-languagedetector": "^8.1.0",
|
|
39
|
-
"i18next-resources-to-backend": "^1.2.1",
|
|
40
|
-
"idb-keyval": "^6.2.2",
|
|
41
|
-
"lucide-react": "^0.460.0",
|
|
42
|
-
"nanoid": "^5.0.9",
|
|
43
|
-
"polished": "^4.3.1",
|
|
44
|
-
"qs": "^6.13.1",
|
|
45
|
-
"query-string": "^8.2.0",
|
|
20
|
+
"axios": "^1.9.0",
|
|
46
21
|
"react": "^19.1.0",
|
|
47
22
|
"react-dom": "^19.1.0",
|
|
48
|
-
"react-i18next": "^15.5.2",
|
|
49
|
-
"react-layout-kit": "^2.0.0",
|
|
50
|
-
"react-refresh": "^0.14.2",
|
|
51
23
|
"react-router": "^7.6.1",
|
|
52
|
-
"
|
|
53
|
-
"rtl-detect": "^1.1.2",
|
|
54
|
-
"rxjs": "^7.8.2",
|
|
55
|
-
"tailwind-merge": "^3.3.0",
|
|
56
|
-
"tailwindcss": "^4.1.8",
|
|
57
|
-
"universal-cookie": "^8.0.1",
|
|
58
|
-
"url-join": "^5.0.0",
|
|
59
|
-
"uuid": "^11.0.3",
|
|
60
|
-
"zod": "^4.2.1",
|
|
61
|
-
"zustand": "^5.0.5",
|
|
62
|
-
"zustand-utils": "^2.1.1"
|
|
24
|
+
"zustand": "^5.0.5"
|
|
63
25
|
},
|
|
64
26
|
"devDependencies": {
|
|
65
27
|
"@biomejs/biome": "2.3.2",
|
|
66
|
-
"@
|
|
67
|
-
"@rsdoctor/rspack-plugin": "^1.3.8",
|
|
68
|
-
"@rsdoctor/webpack-plugin": "^0.4.13",
|
|
69
|
-
"@rspack/cli": "^1.1.8",
|
|
70
|
-
"@rspack/core": "^1.1.8",
|
|
71
|
-
"@svgr/webpack": "^7.0.0",
|
|
72
|
-
"@types/lodash-es": "^4.17.12",
|
|
28
|
+
"@tailwindcss/postcss": "^4.1.8",
|
|
73
29
|
"@types/node": "^22.9.0",
|
|
74
30
|
"@types/react": "^19.1.6",
|
|
75
31
|
"@types/react-dom": "^19.1.6",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"@lobehub/i18n-cli": "^1.26.0",
|
|
79
|
-
"assert": "^2.1.0",
|
|
80
|
-
"autoprefixer": "^10.4.20",
|
|
81
|
-
"axios": "^1.6.8",
|
|
82
|
-
"browserify-fs": "^1.0.0",
|
|
83
|
-
"browserify-zlib": "^0.2.0",
|
|
84
|
-
"buffer": "^6.0.3",
|
|
85
|
-
"chokidar": "^4.0.3",
|
|
86
|
-
"consola": "^3.4.2",
|
|
87
|
-
"clean-webpack-plugin": "^4.0.0",
|
|
88
|
-
"cross-env": "^7.0.3",
|
|
89
|
-
"crypto-browserify": "^3.12.1",
|
|
90
|
-
"css-loader": "^6.11.0",
|
|
91
|
-
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
92
|
-
"dotenv": "^16.4.5",
|
|
93
|
-
"ejs-loader": "^0.5.0",
|
|
94
|
-
"esbuild-loader": "^4.2.2",
|
|
95
|
-
"esbuild-register": "^3.6.0",
|
|
96
|
-
"globals": "^16.3.0",
|
|
97
|
-
"html-webpack-plugin": "^5.6.3",
|
|
98
|
-
"husky": "^9.1.7",
|
|
99
|
-
"less": "^4.2.0",
|
|
100
|
-
"less-loader": "^12.2.0",
|
|
101
|
-
"lint-staged": "^16.1.6",
|
|
102
|
-
"lodash-es": "^4.17.21",
|
|
103
|
-
"mini-css-extract-plugin": "^2.9.2",
|
|
104
|
-
"moment": "^2.30.1",
|
|
105
|
-
"path-browserify": "^1.0.1",
|
|
106
|
-
"postcss": "^8.4.49",
|
|
107
|
-
"postcss-loader": "^7.3.4",
|
|
108
|
-
"process": "^0.11.10",
|
|
109
|
-
"querystring-es3": "^0.2.1",
|
|
110
|
-
"react-compiler-webpack": "^0.2.0",
|
|
111
|
-
"sass": "^1.92.0",
|
|
112
|
-
"sass-loader": "^16.0.5",
|
|
113
|
-
"stream-browserify": "^3.0.0",
|
|
114
|
-
"style-loader": "^3.3.4",
|
|
115
|
-
"terser-webpack-plugin": "^5.3.11",
|
|
116
|
-
"ts-loader": "^9.5.1",
|
|
117
|
-
"typescript": "^5.6.3",
|
|
118
|
-
"url": "^0.11.4",
|
|
119
|
-
"util": "^0.12.5",
|
|
120
|
-
"tsx": "^4.21.0",
|
|
121
|
-
"webpack-merge": "^6.0.1"
|
|
122
|
-
},
|
|
123
|
-
"lint-staged": {
|
|
124
|
-
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
|
|
125
|
-
"biome check --files-ignore-unknown=true"
|
|
126
|
-
]
|
|
32
|
+
"tailwindcss": "^4.1.8",
|
|
33
|
+
"typescript": "^5.6.3"
|
|
127
34
|
}
|
|
128
35
|
}
|
|
@@ -2,28 +2,10 @@
|
|
|
2
2
|
<html style="height: 100%">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
|
-
<meta
|
|
6
|
-
<meta name="renderer" content="webkit" />
|
|
7
|
-
<meta
|
|
8
|
-
name="viewport"
|
|
9
|
-
content="width=device-width,initial-scale=1.0,user-scalable=no"
|
|
10
|
-
/>
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
11
6
|
<title><%= title %></title>
|
|
12
7
|
</head>
|
|
13
8
|
<body style="height: 100%">
|
|
14
|
-
<!--[if lt IE 9]>
|
|
15
|
-
<p class="browsehappy">
|
|
16
|
-
You are using an <strong>outdated</strong> browser. Please
|
|
17
|
-
<a href="http://browsehappy.com/">upgrade your browser</a> to improve
|
|
18
|
-
your experience.
|
|
19
|
-
</p>
|
|
20
|
-
<![endif]-->
|
|
21
9
|
<div id="<%= mountRoot %>" style="height: 100%; width: 100%"></div>
|
|
22
|
-
<div id="notificationContainer"></div>
|
|
23
|
-
<script>
|
|
24
|
-
function push(subapp) {
|
|
25
|
-
history.pushState(null, subapp, subapp);
|
|
26
|
-
}
|
|
27
|
-
</script>
|
|
28
10
|
</body>
|
|
29
11
|
</html>
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
@variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
|
|
1
|
+
/* 基础样式 - Tailwind CSS 由 tailwindPlugin 自动注入到 .ywkf/tailwind.css */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Button, Result } from "antd";
|
|
2
|
+
import { useNavigate } from "react-router";
|
|
3
|
+
|
|
4
|
+
export default function NotFoundPage() {
|
|
5
|
+
const navigate = useNavigate();
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<Result
|
|
9
|
+
status="404"
|
|
10
|
+
title="404"
|
|
11
|
+
subTitle="页面不存在"
|
|
12
|
+
extra={
|
|
13
|
+
<Button type="primary" onClick={() => navigate("/")}>
|
|
14
|
+
返回首页
|
|
15
|
+
</Button>
|
|
16
|
+
}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Typography } from "antd";
|
|
2
|
+
|
|
3
|
+
const { Paragraph } = Typography;
|
|
4
|
+
|
|
5
|
+
export default function AnalyticsPage() {
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<Paragraph>
|
|
9
|
+
数据分析页面 — <code>src/pages/dashboard/analytics/page.tsx</code>
|
|
10
|
+
</Paragraph>
|
|
11
|
+
<Paragraph>
|
|
12
|
+
该页面与 <code>/dashboard</code> 共享 <code>dashboard/layout.tsx</code> 布局。
|
|
13
|
+
</Paragraph>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Outlet, Link, useLocation } from "react-router";
|
|
2
|
+
import { Card, Menu } from "antd";
|
|
3
|
+
|
|
4
|
+
const SUB_NAV = [
|
|
5
|
+
{ key: "/dashboard", label: <Link to="/dashboard">概览</Link> },
|
|
6
|
+
{ key: "/dashboard/analytics", label: <Link to="/dashboard/analytics">数据分析</Link> },
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
export default function DashboardLayout() {
|
|
10
|
+
const { pathname } = useLocation();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div style={{ maxWidth: 960, margin: "0 auto" }}>
|
|
14
|
+
<Card
|
|
15
|
+
title="工作台"
|
|
16
|
+
extra={
|
|
17
|
+
<Menu
|
|
18
|
+
mode="horizontal"
|
|
19
|
+
selectedKeys={[pathname]}
|
|
20
|
+
items={SUB_NAV}
|
|
21
|
+
style={{ border: "none" }}
|
|
22
|
+
/>
|
|
23
|
+
}
|
|
24
|
+
>
|
|
25
|
+
<Outlet />
|
|
26
|
+
</Card>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Typography, Card, Row, Col, Statistic } from "antd";
|
|
2
|
+
|
|
3
|
+
const { Paragraph } = Typography;
|
|
4
|
+
|
|
5
|
+
export default function DashboardPage() {
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<Paragraph>
|
|
9
|
+
这是 <code>/dashboard</code> 的默认页面(<code>page.tsx</code>),
|
|
10
|
+
与 <code>layout.tsx</code> 配合实现嵌套布局。
|
|
11
|
+
</Paragraph>
|
|
12
|
+
<Row gutter={16}>
|
|
13
|
+
<Col span={8}>
|
|
14
|
+
<Card>
|
|
15
|
+
<Statistic title="用户总数" value={1128} />
|
|
16
|
+
</Card>
|
|
17
|
+
</Col>
|
|
18
|
+
<Col span={8}>
|
|
19
|
+
<Card>
|
|
20
|
+
<Statistic title="今日活跃" value={93} suffix="/ 1128" />
|
|
21
|
+
</Card>
|
|
22
|
+
</Col>
|
|
23
|
+
<Col span={8}>
|
|
24
|
+
<Card>
|
|
25
|
+
<Statistic title="系统健康" value="99.9" suffix="%" />
|
|
26
|
+
</Card>
|
|
27
|
+
</Col>
|
|
28
|
+
</Row>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Button, Result } from "antd";
|
|
2
|
+
import { useRouteError, useNavigate } from "react-router";
|
|
3
|
+
|
|
4
|
+
export default function RootError() {
|
|
5
|
+
const error = useRouteError() as Error;
|
|
6
|
+
const navigate = useNavigate();
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<Result
|
|
10
|
+
status="error"
|
|
11
|
+
title="页面出错了"
|
|
12
|
+
subTitle={error?.message || "发生了未知错误"}
|
|
13
|
+
extra={
|
|
14
|
+
<Button type="primary" onClick={() => navigate("/")}>
|
|
15
|
+
返回首页
|
|
16
|
+
</Button>
|
|
17
|
+
}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Outlet, Link, useLocation } from "react-router";
|
|
2
|
+
import { Layout, Menu } from "antd";
|
|
3
|
+
|
|
4
|
+
const { Header, Content, Footer } = Layout;
|
|
5
|
+
|
|
6
|
+
const NAV_ITEMS = [
|
|
7
|
+
{ key: "/", label: <Link to="/">首页</Link> },
|
|
8
|
+
{ key: "/dashboard", label: <Link to="/dashboard">工作台</Link> },
|
|
9
|
+
{ key: "/user", label: <Link to="/user">用户管理</Link> },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export default function RootLayout() {
|
|
13
|
+
const { pathname } = useLocation();
|
|
14
|
+
const activeKey = NAV_ITEMS.find((item) => pathname.startsWith(item.key) && item.key !== "/")?.key
|
|
15
|
+
|| (pathname === "/" ? "/" : "");
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Layout style={{ minHeight: "100vh" }}>
|
|
19
|
+
<Header style={{ display: "flex", alignItems: "center" }}>
|
|
20
|
+
<Menu
|
|
21
|
+
theme="dark"
|
|
22
|
+
mode="horizontal"
|
|
23
|
+
selectedKeys={[activeKey]}
|
|
24
|
+
style={{ flex: 1 }}
|
|
25
|
+
items={NAV_ITEMS}
|
|
26
|
+
/>
|
|
27
|
+
</Header>
|
|
28
|
+
<Content style={{ padding: "24px 48px" }}>
|
|
29
|
+
<Outlet />
|
|
30
|
+
</Content>
|
|
31
|
+
<Footer style={{ textAlign: "center" }}>
|
|
32
|
+
YWKF Framework ©{new Date().getFullYear()}
|
|
33
|
+
</Footer>
|
|
34
|
+
</Layout>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Typography, Space, Card } from "antd";
|
|
2
|
+
import { Link } from "react-router";
|
|
3
|
+
|
|
4
|
+
const { Title, Paragraph } = Typography;
|
|
5
|
+
|
|
6
|
+
export default function HomePage() {
|
|
7
|
+
return (
|
|
8
|
+
<div style={{ maxWidth: 720, margin: "0 auto" }}>
|
|
9
|
+
<Title>Welcome to YWKF Framework</Title>
|
|
10
|
+
<Paragraph>
|
|
11
|
+
应用由 <code>@4399ywkf/core</code> 驱动,采用 Modern.js 风格的文件约定路由。
|
|
12
|
+
</Paragraph>
|
|
13
|
+
|
|
14
|
+
<Space direction="vertical" size="middle" style={{ width: "100%" }}>
|
|
15
|
+
<Card title="路由文件约定">
|
|
16
|
+
<ul>
|
|
17
|
+
<li><code>page.tsx</code> — 页面内容</li>
|
|
18
|
+
<li><code>layout.tsx</code> — 布局组件(使用 Outlet)</li>
|
|
19
|
+
<li><code>loading.tsx</code> — 加载状态(Suspense fallback)</li>
|
|
20
|
+
<li><code>error.tsx</code> — 错误边界</li>
|
|
21
|
+
<li><code>$.tsx</code> — 通配 / 404 路由</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</Card>
|
|
24
|
+
|
|
25
|
+
<Card title="目录约定">
|
|
26
|
+
<ul>
|
|
27
|
+
<li><code>[id]/</code> — 动态路由(<code>/:id</code>)</li>
|
|
28
|
+
<li><code>[id$]/</code> — 可选动态路由(<code>/:id?</code>)</li>
|
|
29
|
+
<li><code>[...slug]/</code> — 全匹配路由(<code>/*</code>)</li>
|
|
30
|
+
<li><code>__auth/</code> — 无路径布局(路由分组,不生成 URL 片段)</li>
|
|
31
|
+
<li><code>user.profile/</code> — 扁平路由(<code>/user/profile</code>)</li>
|
|
32
|
+
</ul>
|
|
33
|
+
</Card>
|
|
34
|
+
|
|
35
|
+
<Card title="本模板包含的示例路由">
|
|
36
|
+
<ul>
|
|
37
|
+
<li><Link to="/">/</Link> — 首页(当前页面)</li>
|
|
38
|
+
<li><Link to="/dashboard">/dashboard</Link> — 工作台(嵌套布局 + 子路由)</li>
|
|
39
|
+
<li><Link to="/user">/user</Link> — 用户列表</li>
|
|
40
|
+
<li><Link to="/user/42">/user/42</Link> — 动态路由示例</li>
|
|
41
|
+
<li><Link to="/not-exist">/not-exist</Link> — 404 通配路由</li>
|
|
42
|
+
</ul>
|
|
43
|
+
</Card>
|
|
44
|
+
</Space>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Typography, Descriptions, Button } from "antd";
|
|
2
|
+
import { useParams, useNavigate } from "react-router";
|
|
3
|
+
|
|
4
|
+
const { Title } = Typography;
|
|
5
|
+
|
|
6
|
+
export default function UserDetailPage() {
|
|
7
|
+
const { id } = useParams<{ id: string }>();
|
|
8
|
+
const navigate = useNavigate();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div style={{ maxWidth: 720, margin: "0 auto" }}>
|
|
12
|
+
<Title level={2}>用户详情</Title>
|
|
13
|
+
<Descriptions bordered column={1}>
|
|
14
|
+
<Descriptions.Item label="用户 ID">{id}</Descriptions.Item>
|
|
15
|
+
<Descriptions.Item label="路由路径">
|
|
16
|
+
<code>/user/[id]/page.tsx</code> → <code>/user/:id</code>
|
|
17
|
+
</Descriptions.Item>
|
|
18
|
+
<Descriptions.Item label="说明">
|
|
19
|
+
目录名 <code>[id]</code> 会被解析为动态路由参数,
|
|
20
|
+
使用 <code>useParams()</code> 获取值。
|
|
21
|
+
</Descriptions.Item>
|
|
22
|
+
</Descriptions>
|
|
23
|
+
<div style={{ marginTop: 16 }}>
|
|
24
|
+
<Button onClick={() => navigate("/user")}>返回列表</Button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Typography, Table, Button } from "antd";
|
|
2
|
+
import { Link } from "react-router";
|
|
3
|
+
|
|
4
|
+
const { Title } = Typography;
|
|
5
|
+
|
|
6
|
+
const MOCK_USERS = [
|
|
7
|
+
{ id: 1, name: "张三", role: "管理员" },
|
|
8
|
+
{ id: 2, name: "李四", role: "编辑" },
|
|
9
|
+
{ id: 42, name: "王五", role: "用户" },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const columns = [
|
|
13
|
+
{ title: "ID", dataIndex: "id", key: "id" },
|
|
14
|
+
{ title: "姓名", dataIndex: "name", key: "name" },
|
|
15
|
+
{ title: "角色", dataIndex: "role", key: "role" },
|
|
16
|
+
{
|
|
17
|
+
title: "操作",
|
|
18
|
+
key: "action",
|
|
19
|
+
render: (_: unknown, record: (typeof MOCK_USERS)[0]) => (
|
|
20
|
+
<Link to={`/user/${record.id}`}>查看详情</Link>
|
|
21
|
+
),
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export default function UserListPage() {
|
|
26
|
+
return (
|
|
27
|
+
<div style={{ maxWidth: 720, margin: "0 auto" }}>
|
|
28
|
+
<Title level={2}>用户列表</Title>
|
|
29
|
+
<Table
|
|
30
|
+
dataSource={MOCK_USERS}
|
|
31
|
+
columns={columns}
|
|
32
|
+
rowKey="id"
|
|
33
|
+
pagination={false}
|
|
34
|
+
/>
|
|
35
|
+
<div style={{ marginTop: 16 }}>
|
|
36
|
+
<Button type="link">
|
|
37
|
+
<Link to="/user/42">直接访问 /user/42(动态路由)</Link>
|
|
38
|
+
</Button>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -1,43 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"lib": ["es5", "dom", "dom.iterable", "esnext"], // TypeScript 包含内置 JS API 的一组默认类型定义(如Math),以及浏览器环境中找到的内容的类型定义(如document)
|
|
3
|
+
"target": "es2020",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
16
15
|
"paths": {
|
|
17
16
|
"@/*": ["./src/*"],
|
|
18
|
-
"@shared/*": ["./shared/*"],
|
|
19
|
-
"@config/*": ["./config/*"],
|
|
20
17
|
"@store/*": ["./store/*"],
|
|
21
|
-
"@
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
"@ywkf/request": ["./.ywkf/request.ts"],
|
|
19
|
+
"@ywkf/store": ["./.ywkf/store.ts"]
|
|
20
|
+
}
|
|
24
21
|
},
|
|
25
|
-
"exclude": [
|
|
26
|
-
"**/node_modules",
|
|
27
|
-
"**/examples",
|
|
28
|
-
"**/dist",
|
|
29
|
-
"**/fixtures",
|
|
30
|
-
"**/*.test.ts",
|
|
31
|
-
"**/*.e2e.ts",
|
|
32
|
-
"**/templates",
|
|
33
|
-
"ui"
|
|
34
|
-
], // 指定解析时应跳过的文件名或模式数组include。
|
|
35
22
|
"include": [
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"config
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
23
|
+
"src/**/*",
|
|
24
|
+
"store/**/*",
|
|
25
|
+
".ywkf/**/*",
|
|
26
|
+
"ywkf.config.ts"
|
|
27
|
+
],
|
|
28
|
+
"exclude": [
|
|
29
|
+
"node_modules",
|
|
30
|
+
"dist"
|
|
31
|
+
]
|
|
43
32
|
}
|