From 5ce39851367ddb25674f7e0eb6773bcdb4dddda9 Mon Sep 17 00:00:00 2001 From: li875147827 <3122907793@qq.com> Date: Thu, 1 Feb 2024 17:11:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 14 + .env | 5 + .env.development | 5 + .env.site | 5 + .env.test | 5 + .eslintignore | 14 + .eslintrc | 112 +++++ .gitattributes | 6 + .github/ISSUE_TEMPLATE/bug-report.zh-CN.yml | 79 ++++ .github/ISSUE_TEMPLATE/config.yml | 5 + .../ISSUE_TEMPLATE/feature-report.zh-CN.yml | 30 ++ .github/PULL_REQUEST_TEMPLATE.md | 52 +++ .github/dependabot.yml | 20 + .github/workflows/issue-assignees.temp.yml | 52 +++ .github/workflows/issue-help-wanted.temp.yml | 22 + .../workflows/issue-mark-duplicate.temp.yml | 19 + .github/workflows/issue-reply.temp.yml | 21 + .github/workflows/issue-synchronize.temp.yml | 17 + .github/workflows/pr-spelling.template.yml | 12 + .github/workflows/preview-publish.yml | 15 + .github/workflows/pull-request.yml | 14 + .gitignore | 28 ++ .husky/commit-msg | 8 + .husky/pre-commit | 8 + .husky/prepare-commit-msg | 10 + .npmrc | 3 + .prettierrc.js | 39 ++ .stylelintignore | 8 + .vscode/extensions.json | 3 + .vscode/settings.json | 36 ++ LICENSE | 21 + README-zh_CN.md | 117 +++++ README.md | 94 ++++ commitlint.config.js | 11 + docs/starter.png | Bin 0 -> 86639 bytes index.html | 25 ++ mock/index.ts | 368 ++++++++++++++++ package.json | 95 +++++ public/favicon.ico | Bin 0 -> 16958 bytes src/App.vue | 24 ++ src/api/detail.ts | 19 + src/api/list.ts | 19 + src/api/model/detailModel.ts | 23 + src/api/model/listModel.ts | 26 ++ src/api/model/permissionModel.ts | 22 + src/api/permission.ts | 12 + src/assets/assets-empty.svg | 6 + src/assets/assets-login-bg-black.png | Bin 0 -> 807777 bytes src/assets/assets-login-bg-white.png | Bin 0 -> 995753 bytes src/assets/assets-logo-full.svg | 39 ++ src/assets/assets-product-1.svg | 7 + src/assets/assets-product-2.svg | 7 + src/assets/assets-product-3.svg | 7 + src/assets/assets-product-4.svg | 7 + src/assets/assets-result-403.svg | 32 ++ src/assets/assets-result-404.svg | 36 ++ src/assets/assets-result-500.svg | 52 +++ src/assets/assets-result-ie.svg | 33 ++ src/assets/assets-result-maintenance.svg | 49 +++ src/assets/assets-result-wifi.svg | 23 + src/assets/assets-setting-auto.svg | 13 + src/assets/assets-setting-dark.svg | 5 + src/assets/assets-setting-light.svg | 13 + src/assets/assets-t-logo.svg | 41 ++ src/assets/assets-tencent-logo.png | Bin 0 -> 11383 bytes src/components/color/index.vue | 33 ++ src/components/common-table/index.vue | 338 +++++++++++++++ src/components/product-card/index.vue | 122 ++++++ src/components/result/index.vue | 98 +++++ src/components/thumbnail/index.vue | 43 ++ src/components/trend/index.vue | 99 +++++ src/config/color.ts | 30 ++ src/config/global.ts | 1 + src/config/style.ts | 14 + src/constants/index.ts | 37 ++ src/hooks/event/useWindowSizeFn.ts | 34 ++ src/hooks/index.ts | 60 +++ src/layouts/blank.vue | 12 + src/layouts/components/Breadcrumb.vue | 52 +++ src/layouts/components/Content.vue | 61 +++ src/layouts/components/Footer.vue | 15 + src/layouts/components/FrameBlank.vue | 10 + src/layouts/components/FrameContent.vue | 100 +++++ src/layouts/components/Header.vue | 327 ++++++++++++++ src/layouts/components/LayoutContent.vue | 172 ++++++++ src/layouts/components/LayoutHeader.vue | 36 ++ src/layouts/components/LayoutSideNav.vue | 40 ++ src/layouts/components/MenuContent.vue | 112 +++++ src/layouts/components/Notice.vue | 195 +++++++++ src/layouts/components/Search.vue | 130 ++++++ src/layouts/components/SideNav.vue | 127 ++++++ src/layouts/frame/index.vue | 25 ++ src/layouts/frame/useFrameKeepAlive.ts | 54 +++ src/layouts/index.vue | 75 ++++ src/layouts/setting.vue | 354 ++++++++++++++++ src/locales/index.ts | 67 +++ src/locales/lang/en_US/components.ts | 37 ++ src/locales/lang/en_US/index.ts | 54 +++ src/locales/lang/en_US/layout.ts | 52 +++ .../lang/en_US/pages/dashboard-base.ts | 62 +++ .../lang/en_US/pages/dashboard-detail.ts | 45 ++ src/locales/lang/en_US/pages/detail-base.ts | 20 + src/locales/lang/en_US/pages/detail-card.ts | 43 ++ src/locales/lang/en_US/pages/detail-deploy.ts | 32 ++ .../lang/en_US/pages/detail-secondary.ts | 9 + src/locales/lang/en_US/pages/form-base.ts | 27 ++ src/locales/lang/en_US/pages/form-step.ts | 53 +++ src/locales/lang/en_US/pages/index.ts | 33 ++ src/locales/lang/en_US/pages/list-base.ts | 25 ++ src/locales/lang/en_US/pages/list-card.ts | 13 + src/locales/lang/en_US/pages/list-filter.ts | 1 + src/locales/lang/en_US/pages/list-tree.ts | 3 + src/locales/lang/en_US/pages/login.ts | 26 ++ src/locales/lang/en_US/pages/result.ts | 43 ++ src/locales/lang/en_US/pages/user.ts | 23 + src/locales/lang/zh_CN/components.ts | 38 ++ src/locales/lang/zh_CN/index.ts | 47 ++ src/locales/lang/zh_CN/layout.ts | 52 +++ .../lang/zh_CN/pages/dashboard-base.ts | 63 +++ .../lang/zh_CN/pages/dashboard-detail.ts | 44 ++ src/locales/lang/zh_CN/pages/detail-base.ts | 20 + src/locales/lang/zh_CN/pages/detail-card.ts | 43 ++ src/locales/lang/zh_CN/pages/detail-deploy.ts | 32 ++ .../lang/zh_CN/pages/detail-secondary.ts | 9 + src/locales/lang/zh_CN/pages/form-base.ts | 27 ++ src/locales/lang/zh_CN/pages/form-step.ts | 54 +++ src/locales/lang/zh_CN/pages/index.ts | 33 ++ src/locales/lang/zh_CN/pages/list-base.ts | 25 ++ src/locales/lang/zh_CN/pages/list-card.ts | 13 + src/locales/lang/zh_CN/pages/list-filter.ts | 1 + src/locales/lang/zh_CN/pages/list-tree.ts | 3 + src/locales/lang/zh_CN/pages/login.ts | 27 ++ src/locales/lang/zh_CN/pages/result.ts | 43 ++ src/locales/lang/zh_CN/pages/user.ts | 22 + src/locales/useLocale.ts | 28 ++ src/main.ts | 21 + .../dashboard/base/components/MiddleChart.vue | 204 +++++++++ .../base/components/OutputOverview.vue | 221 ++++++++++ .../dashboard/base/components/RankList.vue | 181 ++++++++ .../dashboard/base/components/TopPanel.vue | 292 +++++++++++++ src/pages/dashboard/base/constants.ts | 84 ++++ src/pages/dashboard/base/index.ts | 400 ++++++++++++++++++ src/pages/dashboard/base/index.vue | 31 ++ src/pages/dashboard/detail/constants.ts | 52 +++ src/pages/dashboard/detail/index.ts | 271 ++++++++++++ src/pages/dashboard/detail/index.vue | 276 ++++++++++++ src/pages/list/base/index.vue | 283 +++++++++++++ src/pages/list/tree/constants.ts | 86 ++++ src/pages/list/tree/index.vue | 70 +++ src/pages/login/components/Header.vue | 62 +++ src/pages/login/components/Login.vue | 158 +++++++ src/pages/login/components/Register.vue | 128 ++++++ src/pages/login/index.less | 194 +++++++++ src/pages/login/index.vue | 47 ++ src/pages/user/constants.ts | 70 +++ src/pages/user/index.less | 191 +++++++++ src/pages/user/index.ts | 149 +++++++ src/pages/user/index.vue | 188 ++++++++ src/permission.ts | 82 ++++ src/router/index.ts | 87 ++++ src/router/modules/homepage.ts | 45 ++ src/router/modules/list.ts | 44 ++ src/store/index.ts | 15 + src/store/modules/notification.ts | 60 +++ src/store/modules/permission-fe.ts | 70 +++ src/store/modules/permission.ts | 124 ++++++ src/store/modules/setting.ts | 95 +++++ src/store/modules/tabs-router.ts | 89 ++++ src/store/modules/user.ts | 87 ++++ src/style/font-family.less | 7 + src/style/index.less | 2 + src/style/layout.less | 215 ++++++++++ src/style/reset.less | 38 ++ src/style/variables.less | 26 ++ src/types/axios.d.ts | 98 +++++ src/types/env.d.ts | 5 + src/types/globals.d.ts | 18 + src/types/interface.d.ts | 78 ++++ src/utils/charts.ts | 40 ++ src/utils/color.ts | 119 ++++++ src/utils/date.ts | 12 + src/utils/request/Axios.ts | 293 +++++++++++++ src/utils/request/AxiosCancel.ts | 67 +++ src/utils/request/AxiosTransform.ts | 64 +++ src/utils/request/index.ts | 206 +++++++++ src/utils/request/utils.ts | 54 +++ src/utils/route/constant.ts | 14 + src/utils/route/index.ts | 110 +++++ stylelint.config.js | 28 ++ tsconfig.json | 31 ++ vite.config.ts | 52 +++ 191 files changed, 12045 insertions(+) create mode 100644 .editorconfig create mode 100644 .env create mode 100644 .env.development create mode 100644 .env.site create mode 100644 .env.test create mode 100644 .eslintignore create mode 100644 .eslintrc create mode 100644 .gitattributes create mode 100644 .github/ISSUE_TEMPLATE/bug-report.zh-CN.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-report.zh-CN.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/issue-assignees.temp.yml create mode 100644 .github/workflows/issue-help-wanted.temp.yml create mode 100644 .github/workflows/issue-mark-duplicate.temp.yml create mode 100644 .github/workflows/issue-reply.temp.yml create mode 100644 .github/workflows/issue-synchronize.temp.yml create mode 100644 .github/workflows/pr-spelling.template.yml create mode 100644 .github/workflows/preview-publish.yml create mode 100644 .github/workflows/pull-request.yml create mode 100644 .gitignore create mode 100644 .husky/commit-msg create mode 100644 .husky/pre-commit create mode 100644 .husky/prepare-commit-msg create mode 100644 .npmrc create mode 100644 .prettierrc.js create mode 100644 .stylelintignore create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 LICENSE create mode 100644 README-zh_CN.md create mode 100644 README.md create mode 100644 commitlint.config.js create mode 100644 docs/starter.png create mode 100644 index.html create mode 100644 mock/index.ts create mode 100644 package.json create mode 100644 public/favicon.ico create mode 100644 src/App.vue create mode 100644 src/api/detail.ts create mode 100644 src/api/list.ts create mode 100644 src/api/model/detailModel.ts create mode 100644 src/api/model/listModel.ts create mode 100644 src/api/model/permissionModel.ts create mode 100644 src/api/permission.ts create mode 100644 src/assets/assets-empty.svg create mode 100644 src/assets/assets-login-bg-black.png create mode 100644 src/assets/assets-login-bg-white.png create mode 100644 src/assets/assets-logo-full.svg create mode 100644 src/assets/assets-product-1.svg create mode 100644 src/assets/assets-product-2.svg create mode 100644 src/assets/assets-product-3.svg create mode 100644 src/assets/assets-product-4.svg create mode 100644 src/assets/assets-result-403.svg create mode 100644 src/assets/assets-result-404.svg create mode 100644 src/assets/assets-result-500.svg create mode 100644 src/assets/assets-result-ie.svg create mode 100644 src/assets/assets-result-maintenance.svg create mode 100644 src/assets/assets-result-wifi.svg create mode 100644 src/assets/assets-setting-auto.svg create mode 100644 src/assets/assets-setting-dark.svg create mode 100644 src/assets/assets-setting-light.svg create mode 100644 src/assets/assets-t-logo.svg create mode 100644 src/assets/assets-tencent-logo.png create mode 100644 src/components/color/index.vue create mode 100644 src/components/common-table/index.vue create mode 100644 src/components/product-card/index.vue create mode 100644 src/components/result/index.vue create mode 100644 src/components/thumbnail/index.vue create mode 100644 src/components/trend/index.vue create mode 100644 src/config/color.ts create mode 100644 src/config/global.ts create mode 100644 src/config/style.ts create mode 100644 src/constants/index.ts create mode 100644 src/hooks/event/useWindowSizeFn.ts create mode 100644 src/hooks/index.ts create mode 100644 src/layouts/blank.vue create mode 100644 src/layouts/components/Breadcrumb.vue create mode 100644 src/layouts/components/Content.vue create mode 100644 src/layouts/components/Footer.vue create mode 100644 src/layouts/components/FrameBlank.vue create mode 100644 src/layouts/components/FrameContent.vue create mode 100644 src/layouts/components/Header.vue create mode 100644 src/layouts/components/LayoutContent.vue create mode 100644 src/layouts/components/LayoutHeader.vue create mode 100644 src/layouts/components/LayoutSideNav.vue create mode 100644 src/layouts/components/MenuContent.vue create mode 100644 src/layouts/components/Notice.vue create mode 100644 src/layouts/components/Search.vue create mode 100644 src/layouts/components/SideNav.vue create mode 100644 src/layouts/frame/index.vue create mode 100644 src/layouts/frame/useFrameKeepAlive.ts create mode 100644 src/layouts/index.vue create mode 100644 src/layouts/setting.vue create mode 100644 src/locales/index.ts create mode 100644 src/locales/lang/en_US/components.ts create mode 100644 src/locales/lang/en_US/index.ts create mode 100644 src/locales/lang/en_US/layout.ts create mode 100644 src/locales/lang/en_US/pages/dashboard-base.ts create mode 100644 src/locales/lang/en_US/pages/dashboard-detail.ts create mode 100644 src/locales/lang/en_US/pages/detail-base.ts create mode 100644 src/locales/lang/en_US/pages/detail-card.ts create mode 100644 src/locales/lang/en_US/pages/detail-deploy.ts create mode 100644 src/locales/lang/en_US/pages/detail-secondary.ts create mode 100644 src/locales/lang/en_US/pages/form-base.ts create mode 100644 src/locales/lang/en_US/pages/form-step.ts create mode 100644 src/locales/lang/en_US/pages/index.ts create mode 100644 src/locales/lang/en_US/pages/list-base.ts create mode 100644 src/locales/lang/en_US/pages/list-card.ts create mode 100644 src/locales/lang/en_US/pages/list-filter.ts create mode 100644 src/locales/lang/en_US/pages/list-tree.ts create mode 100644 src/locales/lang/en_US/pages/login.ts create mode 100644 src/locales/lang/en_US/pages/result.ts create mode 100644 src/locales/lang/en_US/pages/user.ts create mode 100644 src/locales/lang/zh_CN/components.ts create mode 100644 src/locales/lang/zh_CN/index.ts create mode 100644 src/locales/lang/zh_CN/layout.ts create mode 100644 src/locales/lang/zh_CN/pages/dashboard-base.ts create mode 100644 src/locales/lang/zh_CN/pages/dashboard-detail.ts create mode 100644 src/locales/lang/zh_CN/pages/detail-base.ts create mode 100644 src/locales/lang/zh_CN/pages/detail-card.ts create mode 100644 src/locales/lang/zh_CN/pages/detail-deploy.ts create mode 100644 src/locales/lang/zh_CN/pages/detail-secondary.ts create mode 100644 src/locales/lang/zh_CN/pages/form-base.ts create mode 100644 src/locales/lang/zh_CN/pages/form-step.ts create mode 100644 src/locales/lang/zh_CN/pages/index.ts create mode 100644 src/locales/lang/zh_CN/pages/list-base.ts create mode 100644 src/locales/lang/zh_CN/pages/list-card.ts create mode 100644 src/locales/lang/zh_CN/pages/list-filter.ts create mode 100644 src/locales/lang/zh_CN/pages/list-tree.ts create mode 100644 src/locales/lang/zh_CN/pages/login.ts create mode 100644 src/locales/lang/zh_CN/pages/result.ts create mode 100644 src/locales/lang/zh_CN/pages/user.ts create mode 100644 src/locales/useLocale.ts create mode 100644 src/main.ts create mode 100644 src/pages/dashboard/base/components/MiddleChart.vue create mode 100644 src/pages/dashboard/base/components/OutputOverview.vue create mode 100644 src/pages/dashboard/base/components/RankList.vue create mode 100644 src/pages/dashboard/base/components/TopPanel.vue create mode 100644 src/pages/dashboard/base/constants.ts create mode 100644 src/pages/dashboard/base/index.ts create mode 100644 src/pages/dashboard/base/index.vue create mode 100644 src/pages/dashboard/detail/constants.ts create mode 100644 src/pages/dashboard/detail/index.ts create mode 100644 src/pages/dashboard/detail/index.vue create mode 100644 src/pages/list/base/index.vue create mode 100644 src/pages/list/tree/constants.ts create mode 100644 src/pages/list/tree/index.vue create mode 100644 src/pages/login/components/Header.vue create mode 100644 src/pages/login/components/Login.vue create mode 100644 src/pages/login/components/Register.vue create mode 100644 src/pages/login/index.less create mode 100644 src/pages/login/index.vue create mode 100644 src/pages/user/constants.ts create mode 100644 src/pages/user/index.less create mode 100644 src/pages/user/index.ts create mode 100644 src/pages/user/index.vue create mode 100644 src/permission.ts create mode 100644 src/router/index.ts create mode 100644 src/router/modules/homepage.ts create mode 100644 src/router/modules/list.ts create mode 100644 src/store/index.ts create mode 100644 src/store/modules/notification.ts create mode 100644 src/store/modules/permission-fe.ts create mode 100644 src/store/modules/permission.ts create mode 100644 src/store/modules/setting.ts create mode 100644 src/store/modules/tabs-router.ts create mode 100644 src/store/modules/user.ts create mode 100644 src/style/font-family.less create mode 100644 src/style/index.less create mode 100644 src/style/layout.less create mode 100644 src/style/reset.less create mode 100644 src/style/variables.less create mode 100644 src/types/axios.d.ts create mode 100644 src/types/env.d.ts create mode 100644 src/types/globals.d.ts create mode 100644 src/types/interface.d.ts create mode 100644 src/utils/charts.ts create mode 100644 src/utils/color.ts create mode 100644 src/utils/date.ts create mode 100644 src/utils/request/Axios.ts create mode 100644 src/utils/request/AxiosCancel.ts create mode 100644 src/utils/request/AxiosTransform.ts create mode 100644 src/utils/request/index.ts create mode 100644 src/utils/request/utils.ts create mode 100644 src/utils/route/constant.ts create mode 100644 src/utils/route/index.ts create mode 100644 stylelint.config.js create mode 100644 tsconfig.json create mode 100644 vite.config.ts diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4fc13c7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.{ts,js,vue,css}] +indent_size = 2 diff --git a/.env b/.env new file mode 100644 index 0000000..2dd71fd --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +# 打包路径 根据项目不同按需配置 +VITE_BASE_URL = / +VITE_IS_REQUEST_PROXY = true +VITE_API_URL = https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com +VITE_API_URL_PREFIX = /api \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..d475e5c --- /dev/null +++ b/.env.development @@ -0,0 +1,5 @@ +# 打包路径 +VITE_BASE_URL = / +VITE_IS_REQUEST_PROXY = true +VITE_API_URL = https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com +VITE_API_URL_PREFIX = /api \ No newline at end of file diff --git a/.env.site b/.env.site new file mode 100644 index 0000000..7e1e855 --- /dev/null +++ b/.env.site @@ -0,0 +1,5 @@ +# 打包路径 根据项目不同按需配置 +VITE_BASE_URL = https://static.tdesign.tencent.com/starter/vue-next/ +VITE_IS_REQUEST_PROXY = true +VITE_API_URL = https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com +VITE_API_URL_PREFIX = /api \ No newline at end of file diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..d278ac2 --- /dev/null +++ b/.env.test @@ -0,0 +1,5 @@ +# 打包路径 根据项目不同按需配置 +VITE_BASE_URL = / +VITE_IS_REQUEST_PROXY = true +VITE_API_URL = https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com +VITE_API_URL_PREFIX = /api \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..66eb01a --- /dev/null +++ b/.eslintignore @@ -0,0 +1,14 @@ +snapshot* +dist +lib +es +esm +node_modules +src/_common +static +cypress +script/test/cypress +_site +temp* +static/ +!.prettierrc.js \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..0ebc597 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,112 @@ +{ + "extends": [ + "plugin:@typescript-eslint/recommended", + "eslint-config-airbnb-base", + "@vue/typescript/recommended", + "plugin:vue/vue3-recommended", + "plugin:vue-scoped-css/base", + "plugin:prettier/recommended" + ], + "env": { + "browser": true, + "node": true, + "jest": true, + "es6": true + }, + "globals": { + "defineProps": "readonly", + "defineEmits": "readonly" + }, + "plugins": ["vue", "@typescript-eslint", "simple-import-sort"], + "parserOptions": { + "parser": "@typescript-eslint/parser", + "sourceType": "module", + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "jsx": true + } + }, + "settings": { + "import/extensions": [".js", ".jsx", ".ts", ".tsx"] + }, + "rules": { + "no-console": "off", + "no-continue": "off", + "no-restricted-syntax": "off", + "no-plusplus": "off", + "no-param-reassign": "off", + "no-shadow": "off", + "guard-for-in": "off", + + "import/extensions": "off", + "import/no-unresolved": "off", + "import/no-extraneous-dependencies": "off", + "import/prefer-default-export": "off", + "import/first": "off", // https://github.com/vuejs/vue-eslint-parser/issues/58 + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "vue/first-attribute-linebreak": 0, + + + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ], + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ], + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/ban-types": "off", + "class-methods-use-this": "off", // 因为AxiosCancel必须实例化而能静态化所以加的规则,如果有办法解决可以取消 + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error" + }, + "overrides": [ + { + "files": ["*.vue"], + "rules": { + "vue/component-name-in-template-casing": [2, "kebab-case"], + "vue/require-default-prop": 0, + "vue/multi-word-component-names": 0, + "vue/no-reserved-props": 0, + "vue/no-v-html": 0, + "vue-scoped-css/enforce-style-type": ["error", { "allows": ["scoped"] }] + } + }, + { + "files": ["*.ts", "*.tsx"], // https://github.com/typescript-eslint eslint-recommended + "rules": { + "constructor-super": "off", // ts(2335) & ts(2377) + "getter-return": "off", // ts(2378) + "no-const-assign": "off", // ts(2588) + "no-dupe-args": "off", // ts(2300) + "no-dupe-class-members": "off", // ts(2393) & ts(2300) + "no-dupe-keys": "off", // ts(1117) + "no-func-assign": "off", // ts(2539) + "no-import-assign": "off", // ts(2539) & ts(2540) + "no-new-symbol": "off", // ts(2588) + "no-obj-calls": "off", // ts(2349) + "no-redeclare": "off", // ts(2451) + "no-setter-return": "off", // ts(2408) + "no-this-before-super": "off", // ts(2376) + "no-undef": "off", // ts(2304) + "no-unreachable": "off", // ts(7027) + "no-unsafe-negation": "off", // ts(2365) & ts(2360) & ts(2358) + "no-var": "error", // ts transpiles let/const to var, so no need for vars any more + "prefer-const": "error", // ts provides better types with const + "prefer-rest-params": "error", // ts provides better types with rest args over arguments + "prefer-spread": "error", // ts transpiles spread to apply, so no need for manual apply + "valid-typeof": "off" // ts(2367) + } + } + ] +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..326caac --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +*.ts text eol=lf +*.vue text eol=lf +*.tsx text eol=lf +*.jsx text eol=lf +*.html text eol=lf +*.json text eol=lf \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml b/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml new file mode 100644 index 0000000..549408b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml @@ -0,0 +1,79 @@ +name: 反馈 Bug +description: 通过 github 模板进行 Bug 反馈。 +title: "[组件名称] 描述问题的标题" +body: + - type: markdown + attributes: + value: | + # 欢迎你的参与 + tdesign-vue-next-starter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区: + + 在发布一个 Issue 前,请确保: + - 在 [常见问题](https://tdesign.tencent.com/about/faq)、[更新日志](https://github.com/Tencent/tdesign-vue-next-starter/blob/main/CHANGELOG.md) 和 [旧Issue列表](https://github.com/Tencent/tdesign-vue-next-starter/issues?q=is%3Aissue) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正) + - 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。 + + - type: input + id: version + attributes: + label: tdesign-vue-next-starter 版本 + description: 请检查在最新项目版本中能否重现此 issue。 + placeholder: 请填写 + validations: + required: true + + - type: input + id: reproduce + attributes: + label: 重现链接 + description: 请提供尽可能精简的 CodePen、CodeSandbox 或 GitHub 仓库的链接。请不要填无关链接,否则你的 Issue 将被关闭。 + placeholder: 请填写 + + - type: textarea + id: reproduceSteps + attributes: + label: 重现步骤 + description: 请清晰的描述重现该 Issue 的步骤,这能帮助我们快速定位问题。没有清晰重现步骤将不会被修复,标有 'need reproduction' 的 Issue 在 7 天内不提供相关步骤,将被关闭。 + placeholder: 请填写 + + - type: textarea + id: expect + attributes: + label: 期望结果 + placeholder: 请填写 + + - type: textarea + id: actual + attributes: + label: 实际结果 + placeholder: 请填写 + + - type: input + id: frameworkVersion + attributes: + label: 框架版本 + placeholder: Vue(3.2.0) + + - type: input + id: browsersVersion + attributes: + label: 浏览器版本 + placeholder: Chrome(8.213.231.123) + + - type: input + id: systemVersion + attributes: + label: 系统版本 + placeholder: MacOS(11.2.3) + + - type: input + id: nodeVersion + attributes: + label: Node版本 + placeholder: 请填写 + + - type: textarea + id: remarks + attributes: + label: 补充说明 + description: 可以是遇到这个 bug 的业务场景、上下文等信息。 + placeholder: 请填写 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..c2d6d05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: 使用 issue-helper 新建 + url: https://Tencent.github.io/tdesign/issue-helper/?lang=zh-CN&repo=Tencent/tdesign-vue-next-starter + about: 使用 https://Tencent.github.io/tdesign/issue-helper/ 创建 issue,其中包含 bug 和 feature,表单提交更加严格。 diff --git a/.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml b/.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml new file mode 100644 index 0000000..4409353 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml @@ -0,0 +1,30 @@ +name: 反馈新功能 +description: 通过 github 模板进行新功能反馈。 +title: "[组件名称] 描述问题的标题" +body: + - type: markdown + attributes: + value: | + # 欢迎你的参与 + tdesign-vue-next-starter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区: + + 在发布一个 Issue 前,请确保: + - 在 [常见问题](https://tdesign.tencent.com/about/faq)、[更新日志](https://github.com/Tencent/tdesign-vue-next-starter/blob/main/CHANGELOG.md) 和 [旧Issue列表](https://github.com/Tencent/tdesign-vue-next-starter/issues?q=is%3Aissue) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正) + - 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。 + + - type: textarea + id: functionContent + attributes: + label: 这个功能解决了什么问题 + description: 请详尽说明这个需求的用例和场景。最重要的是:解释清楚是怎样的用户体验需求催生了这个功能上的需求。我们将考虑添加在现有 API 无法轻松实现的功能。新功能的用例也应当足够常见。 + placeholder: 请填写 + validations: + required: true + + - type: textarea + id: functionalExpectations + attributes: + label: 你建议的方案是什么 + placeholder: 请填写 + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a97d15e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,52 @@ + + +### 🤔 这个 PR 的性质是? + +- [ ] 日常 bug 修复 +- [ ] 新特性提交 +- [ ] 文档改进 +- [ ] 演示代码改进 +- [ ] 组件样式/交互改进 +- [ ] CI/CD 改进 +- [ ] 重构 +- [ ] 代码风格优化 +- [ ] 测试用例 +- [ ] 分支合并 +- [ ] 其他 + +### 🔗 相关 Issue + + + +### 💡 需求背景和解决方案 + + + +### 📝 更新日志 + + + +- fix(组件名称): 处理问题或特性描述 ... + +- [ ] 本条 PR 不需要纳入 Changelog + +### ☑️ 请求合并前的自查清单 + +⚠️ 请自检并全部**勾选全部选项**。⚠️ + +- [ ] 文档已补充或无须补充 +- [ ] 代码演示已提供或无须提供 +- [ ] TypeScript 定义已补充或无须补充 +- [ ] Changelog 已提供或无须提供 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c37a937 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +# Basic dependabot.yml file with +# minimum configuration for two package managers + +version: 2 +updates: + # Enable version updates for npm + - package-ecosystem: "npm" + # Look for `package.json` and `lock` files in the `root` directory + directory: "/" + # Check the npm registry for updates every day (weekdays) + schedule: + interval: "monthly" + + # Enable version updates for Docker + - package-ecosystem: "docker" + # Look for a `Dockerfile` in the `root` directory + directory: "/" + # Check for updates once a week + schedule: + interval: "monthly" diff --git a/.github/workflows/issue-assignees.temp.yml b/.github/workflows/issue-assignees.temp.yml new file mode 100644 index 0000000..83d5d6b --- /dev/null +++ b/.github/workflows/issue-assignees.temp.yml @@ -0,0 +1,52 @@ +# force copy from tencent/tdesign +name: Issue Add Assigness + +on: + issues: + types: [opened, edited] + +jobs: + mark-duplicate: + runs-on: ubuntu-latest + steps: + - uses: wow-actions/auto-comment@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + issuesOpened: | + 👋 @{{ author }},感谢给 TDesign 提出了 issue。 + 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。 + + # https://docs.github.com/cn/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issues + - uses: 94dreamer/issue-assignees@main + id: assignees + with: + project_name: ${{github.event.repository.name}} + issue_title: ${{github.event.issue.title}} + + - run: echo ${{ steps.assignees.outputs.contributors }} + - name: Add assigness + if: steps.assignees.outputs.contributors != '' + uses: actions-cool/issues-helper@v3 + with: + actions: 'add-assignees' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + assignees: ${{ steps.assignees.outputs.contributors }} + + - run: | + contributors=${{ steps.assignees.outputs.contributors }} + contributorstring=${contributors//,/ @} + echo "::set-output name=string::@$contributorstring" + id: contributors + + - name: 通知贡献者 + if: steps.assignees.outputs.contributors != '' + uses: actions-cool/maintain-one-comment@v2.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + body: | + ♥️ 有劳 ${{ steps.contributors.outputs.string }} 尽快确认问题。 + 确认有效后将下一步计划和可能需要的时间回复给 @${{ github.event.issue.user.login }} 。 + + number: ${{ github.event.issue.number }} + body-include: "" diff --git a/.github/workflows/issue-help-wanted.temp.yml b/.github/workflows/issue-help-wanted.temp.yml new file mode 100644 index 0000000..94e9bbd --- /dev/null +++ b/.github/workflows/issue-help-wanted.temp.yml @@ -0,0 +1,22 @@ +# force copy from tencent/tdesign +name: Issue Help wanted +on: + issues: + types: + - labeled +jobs: + add-comment: + if: github.event.label.name == 'help wanted' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Add comment + uses: peter-evans/create-or-update-comment@v1 + with: + issue-number: ${{ github.event.issue.number }} + body: | + 任何人都可以处理此问题。 + **请务必在您的 `pull request` 中引用此问题。** :sparkles: + 感谢你的贡献! :sparkles: + reactions: heart \ No newline at end of file diff --git a/.github/workflows/issue-mark-duplicate.temp.yml b/.github/workflows/issue-mark-duplicate.temp.yml new file mode 100644 index 0000000..3017723 --- /dev/null +++ b/.github/workflows/issue-mark-duplicate.temp.yml @@ -0,0 +1,19 @@ +# force copy from tencent/tdesign +# 当在 issue 的 comment 回复类似 `Duplicate of #111` 这样的话,issue 将被自动打上 重复提交标签 并且 cloese +name: Issue Mark Duplicate + +on: + issue_comment: + types: [created, edited] + +jobs: + mark-duplicate: + runs-on: ubuntu-latest + steps: + - name: mark-duplicate + uses: actions-cool/issues-helper@v2 + with: + actions: "mark-duplicate" + token: ${{ secrets.GITHUB_TOKEN }} + duplicate-labels: "duplicate" + close-issue: true diff --git a/.github/workflows/issue-reply.temp.yml b/.github/workflows/issue-reply.temp.yml new file mode 100644 index 0000000..271a94f --- /dev/null +++ b/.github/workflows/issue-reply.temp.yml @@ -0,0 +1,21 @@ +# force copy from tencent/tdesign +# 当被打上 Need Reproduce 标签时候,自动提示需要重现实例 + +name: ISSUE_REPLY + +on: + issues: + types: [labeled] + +jobs: + issue-reply: + runs-on: ubuntu-latest + steps: + - name: Need Reproduce + if: github.event.label.name == 'Need Reproduce' + uses: actions-cool/issues-helper@v2 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + 你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://codesandbox.io/) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。 diff --git a/.github/workflows/issue-synchronize.temp.yml b/.github/workflows/issue-synchronize.temp.yml new file mode 100644 index 0000000..4ca7de1 --- /dev/null +++ b/.github/workflows/issue-synchronize.temp.yml @@ -0,0 +1,17 @@ +# force copy from tencent/tdesign +name: Issue Add Assigness + +on: + issues: + types: [opened, reopened] + +jobs: + mark-duplicate: + runs-on: ubuntu-latest + steps: + # https://docs.github.com/cn/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issues + - uses: 94dreamer/create-report@main + with: + wxhook: ${{ secrets.WX_HOOK_URL }} + token: ${{ secrets.GITHUB_TOKEN }} + type: 'issue' \ No newline at end of file diff --git a/.github/workflows/pr-spelling.template.yml b/.github/workflows/pr-spelling.template.yml new file mode 100644 index 0000000..93e138e --- /dev/null +++ b/.github/workflows/pr-spelling.template.yml @@ -0,0 +1,12 @@ +# force copy from tencent/tdesign +name: pr-spell-check +on: [pull_request] + +jobs: + run: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check spelling + uses: crate-ci/typos@master diff --git a/.github/workflows/preview-publish.yml b/.github/workflows/preview-publish.yml new file mode 100644 index 0000000..364f99c --- /dev/null +++ b/.github/workflows/preview-publish.yml @@ -0,0 +1,15 @@ +# 文件名建议统一为 preview-publish +# 应用 preview.yml 的 demo +name: PREVIEW_PUBLISH + +on: + workflow_run: + workflows: ["MAIN_PULL_REQUEST"] + types: + - completed + +jobs: + call-preview: + uses: Tencent/tdesign/.github/workflows/preview.yml@main + secrets: + TDESIGN_SURGE_TOKEN: ${{ secrets.TDESIGN_SURGE_TOKEN }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..280a82f --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,14 @@ +# 文件名建议统一为 pull-request.yml +# 应用 test-build.yml 的 demo + +name: MAIN_PULL_REQUEST + +on: + pull_request: + branches: [develop, main, site] + types: [opened, synchronize, reopened] + +jobs: + call-test-build: + uses: Tencent/tdesign/.github/workflows/test-build.yml@main +# install lint diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..35bcab0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +node_modules +.DS_Store + +# build files +es/ +lib/ +dist/ +typings/ + +_site +package +tmp* +temp* +coverage +test-report.html +.idea/ +yarn-error.log +*.zip +.history +.stylelintcache + +.env.local +.env.*.local + +# lock文件 请根据自身项目或团队需求选择具体的包管理工具 并移除具体的ignore的lock文件 +yarn.lock +package-lock.json +pnpm-lock.yaml \ No newline at end of file diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000..b02e0a7 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,8 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +if [[ "$OS" == "Windows_NT" ]]; then + npx.cmd --no-install commitlint -e $GIT_PARAMS +else + npx --no-install commitlint -e $GIT_PARAMS +fi diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..11709a7 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,8 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +if [[ "$OS" == "Windows_NT" ]]; then + npx.cmd lint-staged +else + npx lint-staged +fi diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg new file mode 100644 index 0000000..ab3a6e8 --- /dev/null +++ b/.husky/prepare-commit-msg @@ -0,0 +1,10 @@ +#!/bin/sh +[[ "$(uname -a)" = *"MINGW64"* ]] && exit 0 +[ -n "$CI" ] && exit 0 +. "$(dirname "$0")/_/husky.sh" + +if [[ "$OS" == "Windows_NT" ]]; then + exec < /dev/tty && npx.cmd git-cz --hook || true +else + exec < /dev/tty && npx git-cz --hook || true +fi diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..d43847c --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +shamefully-hoist = true +hoist = true +engine-strict =true diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..3c58064 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,39 @@ +module.exports = { + // 一行最多 120 字符.. + printWidth: 120, + // 使用 2 个空格缩进 + tabWidth: 2, + // 不使用缩进符,而使用空格 + useTabs: false, + // 行尾需要有分号 + semi: true, + // 使用单引号 + singleQuote: true, + // 对象的 key 仅在必要时用引号 + quoteProps: 'as-needed', + // jsx 不使用单引号,而使用双引号 + jsxSingleQuote: false, + // 末尾需要有逗号 + trailingComma: 'all', + // 大括号内的首尾需要空格 + bracketSpacing: true, + // jsx 标签的反尖括号需要换行 + jsxBracketSameLine: false, + // 箭头函数,只有一个参数的时候,也需要括号 + arrowParens: 'always', + // 每个文件格式化的范围是文件的全部内容 + rangeStart: 0, + rangeEnd: Infinity, + // 不需要写文件开头的 @prettier + requirePragma: false, + // 不需要自动在文件开头插入 @prettier + insertPragma: false, + // 使用默认的折行标准 + proseWrap: 'preserve', + // 根据显示样式决定 html 要不要折行 + htmlWhitespaceSensitivity: 'css', + // vue 文件中的 script 和 style 内不用缩进 + vueIndentScriptAndStyle: false, + // 换行符使用 lf + endOfLine: 'lf', +}; diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 0000000..1b7da3c --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,8 @@ +# .stylelintignore +# 旧的不需打包的样式库 +*.min.css + +# 其他类型文件 +*.js +*.jpg +*.woff diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..940260d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["dbaeumer.vscode-eslint"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..02a0913 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,36 @@ +{ + "files.eol":"\n", + "editor.tabSize": 2, + "eslint.format.enable": true, + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"], + "[vue]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescriptreact]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[javascriptreact]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescript]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[javascript]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "cSpell.words": [ + "tdesign", + "tvision", + "echarts", + "nprogress", + "commitlint", + "stylelint", + "pinia", + "qrcode" + ], +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..81af071 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 TDesign + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README-zh_CN.md b/README-zh_CN.md new file mode 100644 index 0000000..63b71ae --- /dev/null +++ b/README-zh_CN.md @@ -0,0 +1,117 @@ + +
+ +
++ + + +
+ ++ + + + +
+ +简体中文 | [English](./README.md) + +### 项目简介 + +TDesign Vue Next Starter 是一个基于 TDesign,使用 `Vue3`、`Vite`、`Pinia`、`TypeScript` 开发,可进行个性化主题配置,旨在提供项目开箱即用的、配置式的中后台项目。 + + + + + +### 特性 + +- 内置多种常用的中后台页面 +- 完善的目录结构 +- 完善的代码规范配置 +- 支持暗黑模式 +- 自定义主题颜色 +- 多种空间布局 +- 内置 Mock 数据方案 + +### 使用 + +> 通过 `tdesign-starter-cli` 初始化项目仓库 + +```bash +## 1、安装 tdesign-starter-cli +npm i tdesign-starter-cli@latest -g + +## 2、创建项目 +td-starter init +``` + +### 开发 + +``` bash +## 安装依赖 +npm install + +## 启动项目 +npm run dev +``` + +### 构建 + +```bash +## 构建正式环境 +npm run build + +## 构建测试环境 +npm run build:test +``` + +### 其他 + +```bash +## 预览构建产物 +npm run preview + +## 代码格式检查 +npm run lint + +## 代码格式检查与自动修复 +npm run lint:fix + +## style格式检查 +npm run stylelint + +## style格式检查与自动修复 +npm run stylelint:fix +``` + +### 如何贡献 + +非常欢迎您的贡献!提交您的 [Issue](https://github.com/tencent/tdesign-vue-next-starter/issues/new/choose) 或者提交 [Pull Request](https://github.com/Tencent/tdesign-vue-next-starter/pulls)。 + +#### 贡献提交规范 + +- [Angular Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) +- [Vue Style Guide](https://v3.vuejs.org/style-guide/#rule-categories) + +### 兼容性 + +| [](http://godban.github.io/browsers-support-badges/) IE / Edge | [](http://godban.github.io/browsers-support-badges/)Firefox | [](http://godban.github.io/browsers-support-badges/)Chrome | [](http://godban.github.io/browsers-support-badges/)Safari | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 | + +### 社区版本 + +基于 TDesign Vue Next 的 starter-kit 有多种社区版本,访问 [社区链接](https://tdesign.tencent.com/starter/docs/vue-next/community-link) 可以访问更多版本。 +如果您也开发了 TDesign Starter 的社区版本,可以提交 Issue 或者直接给我们提Pull Request 😊。 + +### 开源协议 + +TDesign 遵循 [MIT 协议](https://github.com/Tencent/tdesign-vue-next-starter/LICENSE)。 + diff --git a/README.md b/README.md new file mode 100644 index 0000000..823d502 --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ ++ +
++ + + +
+ ++ + + + +
+ +English | [简体中文](./README-zh_CN.md) +### Introduction + +TDesign Vue Next Starter is a TDesign-based developed with `Vue 3`, `Vite`, `Pinia`, `TypeScript`. It can be customized theme configuration, and aims to provide project out-of-the-box, configuration-style middle and background projects. + ++ Live Preview + · + Documentation +
+ + + +### Features + +- Various provided pages for develop +- Complete directory structure for develop +- Code specification configuration +- Support dark mode +- Custom theme colors +- Various space layouts +- Mock data scheme + +### Usage + +> Initialize project with our CLI tool `tdesign-starter-cli` + +```bash +## install tdesign-starter-cli +npm i tdesign-starter-cli@latest -g + +## create project +td-starter init +``` + +### Develop + +```bash +## install dependencies +npm install + +## set up +npm run dev +``` + +### Build + +```bash +## build +npm run build + +## build for test +npm run build:test +``` + + +### Contributing Guide + +We welcome contributions to our project. Create your [Issue](https://github.com/tencent/tdesign-vue-next-starter/issues/new/choose) or Submit your [Pull Request](https://github.com/Tencent/tdesign-vue-next-starter/pulls). + +#### Commit Specification + +- [Angular Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) +- [Vue Style Guide](https://v3.vuejs.org/style-guide/#rule-categories) + +### Browser Support + +| [](http://godban.github.io/browsers-support-badges/) IE / Edge | [](http://godban.github.io/browsers-support-badges/)Firefox | [](http://godban.github.io/browsers-support-badges/)Chrome | [](http://godban.github.io/browsers-support-badges/)Safari | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 | + +### Community Versions + +There are kinds of community versions of starter-kit based on TDesign Vue Next, visit [community-link](https://tdesign.tencent.com/starter/docs/vue-next/community-link) for more detail. If you developed a community versions of tdesign starter, please create a issue or submit a pull request to let us know 😊. + +### License + +The MIT License. Please see [the license file](LICENSE) for more information. diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..20116c9 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,11 @@ +// commit-lint config +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + 2, + 'always', + ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'types'], + ], + }, +}; diff --git a/docs/starter.png b/docs/starter.png new file mode 100644 index 0000000000000000000000000000000000000000..6c8d7e73eb62a1bcb2164d1b1106c053897ee6c5 GIT binary patch literal 86639 zcma&NWmsIzwk^E6ad-C+JV+q8d+-Ez8h3YZ9D)XdI|K-U0D<7vcpx|gm&V-*E;sw^ z{hqtO@7MiTt7`NdHD*<>XUz3f#k^CM$3iDZ2LJ#|;jN510H8nt067B{;cw6Tgx3uK z0DgR@tSS5a{7m_R?fCc@P@msAzHjRt-`GAlJO6WVaPW#xc6)pK@#*RC{Ap)rhn$>z zWo7mJ{Cs0$gP))O{^7B|zkgw2AucXXLqnsyyxhgbWoB_>cy{mR=C-u7w6?Z(ety2~ zU}<<{Wb^25adGkF^!)Dbj+vP`D=VwBvvYO-9u9{$H8pP@-A+$W2L%Pm%F4ob|J=^b z;}|VU1a7P!+(65Z*7mRW_Kyw@PibvdPX0Wt>|EsM=L?F9ME>rW&zUaH&+iJx1Bu(>=l#J?#O
zsfRi%bPO1`<~yZ}fXAd^lN$A@Ol}l7Z^OShC=zF&Syd8R4w>4pVtgy)d8nqi-$G5c^