diff --git a/.gitignore b/.gitignore index bb6ed77..35bcab0 100755 --- a/.gitignore +++ b/.gitignore @@ -18,8 +18,11 @@ yarn-error.log *.zip .history .stylelintcache -yarn.lock -package-lock.json -pnpm-lock.yaml + .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 index ccfec39..b02e0a7 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,8 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx --no-install commitlint -e $GIT_PARAMS \ No newline at end of file +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 index c37466e..11709a7 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,8 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx lint-staged \ No newline at end of file +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 index 6720567..ab3a6e8 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -3,4 +3,8 @@ [ -n "$CI" ] && exit 0 . "$(dirname "$0")/_/husky.sh" -exec < /dev/tty && npx git-cz --hook || true \ No newline at end of file +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/mock/index.ts b/mock/index.ts index 171c80d..d898fcc 100644 --- a/mock/index.ts +++ b/mock/index.ts @@ -145,7 +145,7 @@ export default [ }, }, { - url: '/api/get-menu-list', + url: '/api/get-menu-list-i18n', method: 'get', timeout: 2000, response: { @@ -159,7 +159,10 @@ export default [ component: 'LAYOUT', redirect: '/list/base', meta: { - title: '列表页', + title: { + zh_CN: '列表页', + en_US: 'List', + }, icon: 'view-list', }, children: [ @@ -168,7 +171,10 @@ export default [ name: 'ListBase', component: '/list/base/index', meta: { - title: '基础列表页', + title: { + zh_CN: '基础列表页', + en_US: 'Base List', + }, }, }, { @@ -176,7 +182,10 @@ export default [ name: 'ListCard', component: '/list/card/index', meta: { - title: '卡片列表页', + title: { + zh_CN: '卡片列表页', + en_US: 'Card List', + }, }, }, { @@ -184,7 +193,10 @@ export default [ name: 'ListFilter', component: '/list/filter/index', meta: { - title: '筛选列表页', + title: { + zh_CN: '筛选列表页', + en_US: 'Filter List', + }, }, }, { @@ -192,7 +204,10 @@ export default [ name: 'ListTree', component: '/list/tree/index', meta: { - title: '树状筛选列表页', + title: { + zh_CN: '树状筛选列表页', + en_US: 'Tree List', + }, }, }, ], @@ -203,7 +218,10 @@ export default [ component: 'LAYOUT', redirect: '/form/base', meta: { - title: '表单页', + title: { + zh_CN: '表单页', + en_US: 'Form', + }, icon: 'edit-1', }, children: [ @@ -212,7 +230,10 @@ export default [ name: 'FormBase', component: '/form/base/index', meta: { - title: '基础表单页', + title: { + zh_CN: '基础表单页', + en_US: 'Base Form', + }, }, }, { @@ -220,8 +241,10 @@ export default [ name: 'FormStep', component: '/form/step/index', meta: { - title: '分步表单页', - keepAlive: false, + title: { + zh_CN: '分步表单页', + en_US: 'Step Form', + }, }, }, ], @@ -232,7 +255,10 @@ export default [ component: 'LAYOUT', redirect: '/detail/base', meta: { - title: '详情页', + title: { + zh_CN: '详情页', + en_US: 'Detail', + }, icon: 'layers', }, children: [ @@ -241,7 +267,10 @@ export default [ name: 'DetailBase', component: '/detail/base/index', meta: { - title: '基础详情页', + title: { + zh_CN: '基础详情页', + en_US: 'Base Detail', + }, }, }, { @@ -249,7 +278,10 @@ export default [ name: 'DetailAdvanced', component: '/detail/advanced/index', meta: { - title: '多卡片详情页', + title: { + zh_CN: '多卡片详情页', + en_US: 'Card Detail', + }, }, }, { @@ -257,7 +289,10 @@ export default [ name: 'DetailDeploy', component: '/detail/deploy/index', meta: { - title: '数据详情页', + title: { + zh_CN: '数据详情页', + en_US: 'Data Detail', + }, }, }, { @@ -265,7 +300,10 @@ export default [ name: 'DetailSecondary', component: '/detail/secondary/index', meta: { - title: '二级详情页', + title: { + zh_CN: '二级详情页', + en_US: 'Secondary Detail', + }, }, }, ], @@ -277,7 +315,10 @@ export default [ redirect: '/frame/doc', meta: { icon: 'internet', - title: '外部页面', + title: { + zh_CN: '外部页面', + en_US: 'External', + }, }, children: [ { @@ -286,7 +327,10 @@ export default [ component: 'IFrame', meta: { frameSrc: 'https://tdesign.tencent.com/starter/docs/vue-next/get-started', - title: '使用文档(内嵌)', + title: { + zh_CN: '使用文档(内嵌)', + en_US: 'Documentation(IFrame)', + }, }, }, { @@ -295,7 +339,10 @@ export default [ component: 'IFrame', meta: { frameSrc: 'https://tdesign.tencent.com/vue-next/getting-started', - title: 'TDesign 文档(内嵌)', + title: { + zh_CN: 'TDesign 文档(内嵌)', + en_US: 'TDesign (IFrame)', + }, }, }, { @@ -305,7 +352,10 @@ export default [ meta: { frameSrc: 'https://tdesign.tencent.com/vue-next/getting-started', frameBlank: true, - title: 'TDesign 文档(外链)', + title: { + zh_CN: 'TDesign 文档(外链', + en_US: 'TDesign Doc(Link)', + }, }, }, ], diff --git a/package.json b/package.json index 15d4e79..b1af3be 100644 --- a/package.json +++ b/package.json @@ -19,63 +19,63 @@ "test:coverage": "echo \"no test:coverage specified,work in process\"" }, "dependencies": { - "axios": "^1.4.0", - "dayjs": "^1.11.9", + "@vueuse/core": "^10.6.1", + "axios": "^1.6.2", + "dayjs": "^1.11.10", "echarts": "5.1.2", "lodash": "^4.17.21", "nprogress": "^0.2.0", - "pinia": "^2.1.6", + "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.0", - "qrcode.vue": "^3.4.0", + "qrcode.vue": "^3.4.1", "qs": "^6.11.2", - "tdesign-icons-vue-next": "^0.2.0", - "tdesign-vue-next": "^1.4.1", + "tdesign-icons-vue-next": "^0.2.2", + "tdesign-vue-next": "^1.6.8", "tdesign-site-components": "^0.12.9", "tdesign-theme-generator": "^1.0.5", "tvision-color": "^1.6.0", - "vue": "^3.3.4", - "vue-clipboard3": "^2.0.0", - "vue-i18n": "^9.4.1", + "vue": "^3.3.8", + "vue-i18n": "^9.6.5", "vue-router": "~4.2.4" }, "devDependencies": { - "@commitlint/cli": "^17.6.7", - "@commitlint/config-conventional": "^17.6.7", - "@types/echarts": "^4.9.18", - "@types/lodash": "^4.14.196", - "@types/nprogress": "^0.2.0", - "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", - "@vitejs/plugin-vue": "^4.2.3", - "@vitejs/plugin-vue-jsx": "^3.0.1", - "@vue/compiler-sfc": "^3.3.4", - "@vue/eslint-config-typescript": "^11.0.3", + "@commitlint/cli": "^18.4.1", + "@commitlint/config-conventional": "^18.4.0", + "@types/echarts": "^4.9.21", + "@types/lodash": "^4.14.201", + "@types/nprogress": "^0.2.3", + "@types/qs": "^6.9.10", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "@vitejs/plugin-vue": "^4.4.1", + "@vitejs/plugin-vue-jsx": "^3.0.2", + "@vue/compiler-sfc": "^3.3.8", + "@vue/eslint-config-typescript": "^12.0.0", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", - "eslint": "^8.45.0", + "eslint": "^8.53.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-prettier": "^8.9.0", - "eslint-plugin-import": "^2.28.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-vue": "^9.15.1", - "eslint-plugin-vue-scoped-css": "^2.5.0", + "eslint-plugin-vue": "^9.18.1", + "eslint-plugin-vue-scoped-css": "^2.5.1", "husky": "^8.0.3", - "less": "^4.1.3", - "lint-staged": "^13.2.3", + "less": "^4.2.0", + "lint-staged": "^15.1.0", "mockjs": "^1.1.0", "postcss-html": "^1.5.0", "postcss-less": "^6.0.0", - "prettier": "^2.8.8", - "stylelint": "~15.10.2", + "prettier": "^3.1.0", + "stylelint": "~15.11.0", "stylelint-config-standard": "^34.0.0", "stylelint-order": "~6.0.3", - "typescript": "~5.1.6", - "vite": "^4.4.7", + "typescript": "~5.3.2", + "vite": "^4.5.0", "vite-plugin-mock": "^3.0.0", "vite-svg-loader": "^4.0.0", - "vue-tsc": "^1.8.8" + "vue-tsc": "^1.8.22" }, "config": { "commitizen": { @@ -94,4 +94,4 @@ "engines": { "node": ">=16.0.0" } -} +} \ No newline at end of file diff --git a/src/components/common-table/index.vue b/src/components/common-table/index.vue index 0236628..05cd4a8 100644 --- a/src/components/common-table/index.vue +++ b/src/components/common-table/index.vue @@ -294,7 +294,7 @@ const headerAffixedTop = computed( ({ offsetTop: store.isUseTabsRouter ? 48 : 0, container: `.${prefix}-layout`, - } as any), // TO BE FIXED + }) as any, // TO BE FIXED ); diff --git a/src/components/result/index.vue b/src/components/result/index.vue index 53c42fa..74045b8 100644 --- a/src/components/result/index.vue +++ b/src/components/result/index.vue @@ -83,10 +83,10 @@ const dynamicComponent = computed(() => { } &-title { + font: var(--td-font-title-large); font-style: normal; margin-top: var(--td-comp-margin-l); color: var(--td-text-color-primary); - font: var(--td-font-title-large); } &-tip { diff --git a/src/components/thumbnail/index.vue b/src/components/thumbnail/index.vue index 4f902e6..370774d 100644 --- a/src/components/thumbnail/index.vue +++ b/src/components/thumbnail/index.vue @@ -24,7 +24,7 @@ const className = computed(() => { }); diff --git a/src/pages/login/index.less b/src/pages/login/index.less index 6e92a19..b978dd5 100644 --- a/src/pages/login/index.less +++ b/src/pages/login/index.less @@ -187,7 +187,7 @@ color: var(--td-text-color-secondary); } -@media screen and (max-height: 700px) { +@media screen and (height <= 700px) { .copyright { display: none; } diff --git a/src/pages/user/constants.ts b/src/pages/user/constants.ts index 38dab68..74f03ad 100644 --- a/src/pages/user/constants.ts +++ b/src/pages/user/constants.ts @@ -1,5 +1,3 @@ -import { t } from '@/locales'; - export interface UserInfoListType { title: string; content: string; @@ -8,39 +6,39 @@ export interface UserInfoListType { export const USER_INFO_LIST: Array = [ { - title: t('pages.user.personalInfo.desc.mobile'), + title: 'pages.user.personalInfo.desc.mobile', content: '+86 13923734567', }, { - title: t('pages.user.personalInfo.desc.phone'), + title: 'pages.user.personalInfo.desc.phone', content: '734567', }, { - title: t('pages.user.personalInfo.desc.email'), + title: 'pages.user.personalInfo.desc.email', content: 'Account@qq.com', }, { - title: t('pages.user.personalInfo.desc.seat'), + title: 'pages.user.personalInfo.desc.seat', content: 'T32F 012', }, { - title: t('pages.user.personalInfo.desc.entity'), + title: 'pages.user.personalInfo.desc.entity', content: '腾讯集团', }, { - title: t('pages.user.personalInfo.desc.leader'), + title: 'pages.user.personalInfo.desc.leader', content: 'Michael Wang', }, { - title: t('pages.user.personalInfo.desc.position'), + title: 'pages.user.personalInfo.desc.position', content: '高级 UI 设计师', }, { - title: t('pages.user.personalInfo.desc.joinDay'), + title: 'pages.user.personalInfo.desc.joinDay', content: '2021-07-01', }, { - title: t('pages.user.personalInfo.desc.group'), + title: 'pages.user.personalInfo.desc.group', content: '腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组', span: 6, }, diff --git a/src/pages/user/index.less b/src/pages/user/index.less index dc7d558..33bf30e 100644 --- a/src/pages/user/index.less +++ b/src/pages/user/index.less @@ -41,7 +41,6 @@ } .contract { - &-title { white-space: nowrap; text-overflow: ellipsis; @@ -142,13 +141,14 @@ :deep(.t-card__header) { padding: 0; } - + :deep(.t-card__body) { padding: 0; } .card-padding-no { margin-top: var(--td-comp-margin-xxxl); + :deep(.t-card__body) { margin-top: var(--td-comp-margin-xxl); } diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue index 048ccef..5ceecb4 100644 --- a/src/pages/user/index.vue +++ b/src/pages/user/index.vue @@ -18,7 +18,7 @@
- {{ item.title }} + {{ $t(item.title) }}
{{ item.content }} diff --git a/src/style/font-family.less b/src/style/font-family.less index c639e25..67a31b4 100644 --- a/src/style/font-family.less +++ b/src/style/font-family.less @@ -1,6 +1,7 @@ @font-face { font-family: 'TencentSansW7'; - src: url('data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAusAA4AAAAAEJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAALkAAAABwAAAAchqPqzUdERUYAAAtwAAAAHgAAAB4AKQAbT1MvMgAAAbgAAABZAAAAYGmceoNjbWFwAAACYAAAAJcAAAHsPmfPZmdhc3AAAAtkAAAADAAAAAwACAAbZ2x5ZgAAAywAAAW8AAAG/Ivn/ztoZWFkAAABRAAAADYAAAA2E+AL5GhoZWEAAAF8AAAAIAAAACQIawJ9aG10eAAAAhQAAABMAAAATCG/Auxsb2NhAAADAAAAACwAAAAsDjIQIm1heHAAAAGcAAAAGgAAACAAfgBDbmFtZQAACOgAAAIUAAAEm0zGvtJwb3N0AAAK/AAAAGYAAAB/4wuGdnByZXAAAAL4AAAACAAAAAhwAgESAAEAAAABBR/xlpGAXw889QALA+gAAAAA2Ac3gwAAAADY+IxB//L/HAPPAwAAAAAIAAIAAAAAAAB42mNgZGBgWf7vFAMD84v/n/7vZD7PABRBAYIAwxQH7XjaY2BkYGAQZXBiYGEAAUYGGEiBUAAMEQDCAAB42mNgYepm2sPAysDA1MUUwcDA4A2hGeMYjBjNgKI8HMxMTCz8TCwLGJj2CzCAgRiI8PX382d0YGBMEmQ2+u/FcIJlOVA9CwMjSI6JlekwkFJgYAQAR1kL+QAAAAJYAHYAAAAAAU0AAAEEAAACUAAhAlYAFQJUACACKgAdAZUANgEUABUBYAAkA5wAFQINABsBqAA0AnAAKgJYACoD6ACF//YANP/yACN42mNgYGBmgGAZBkYGEHgG5DGC+SwMp4C0HIMA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wKtoRm8xQIlzTGGRIcUINQRXPH100cMOtgLape0QBgVif9dBjxlTkCPnSckj2MCQNudzGeQmrS5PB22ifcYmxII9RuWUf3JXXjOUhvKCt/PEoDyf2iwd1XIl/W5vZ4vXrhyaIjZFTRmPijIv06lsDEemuOTZlEHZact+nXRkL8/FR1diTWXshUnIefNnhtCULv0Rtvk4ox7qopKjbbcNhhVOWK1mXTgw6STX9t8kMh91k1RuRfJXJS98Zyp2rKSbcDIdzqfPB2OrrCyk1+n2F3HOMzrC+aFmPrcOg0i9XvukbhhCbPmaUBv73zqjrcTJf1gPV7PL6PK4yGN6L6oq882IvaWm/0w/ZfOt9014x3yZta1yS/V7fbJKNBcjzaraWJNIbXVixtqeSXly6x3TRSJjPZVjc50qKyQ2ttaUpxObVUkW15xRtXD9rg8Hs3FxRr8ATJnl93jaY2BiAIP/zQxGDNiAKBAzMjAxMjG4MLgyuDN4MHgy+DD4MwQwhDGEM0QwxDAyM7IwsjKyMbKzl+ZlGhgYGHIlFhXllxdlpmeUgISM3AwcQbSJq6sziDY1cjQA0WZGhoYAgBwU3AAAAAEAAgAIAAr//wAPAAEAAAAMAAAAFgAAAAIAAQADABQAAQAEAAAAAgAAAAAAAAABAAAAANWkJwgAAAAA2Ac3gwAAAADY+IxB') + format('woff'); font-weight: normal; font-style: normal; } diff --git a/src/style/reset.less b/src/style/reset.less index cff1e8b..96cb11f 100644 --- a/src/style/reset.less +++ b/src/style/reset.less @@ -36,4 +36,3 @@ p { * { box-sizing: border-box; } - diff --git a/src/utils/route/index.ts b/src/utils/route/index.ts index 693c662..aba0279 100644 --- a/src/utils/route/index.ts +++ b/src/utils/route/index.ts @@ -51,7 +51,7 @@ function asyncImportRoute(routes: RouteItem[] | undefined) { } else if (name) { item.component = PARENT_LAYOUT(); } - if (item.meta.icon) item.meta.icon = await getMenuIcon(item.meta.icon); + if (item.meta.icon) item.meta.icon = (await getMenuIcon(item.meta.icon)).value; // eslint-disable-next-line no-unused-expressions children && asyncImportRoute(children); @@ -102,7 +102,7 @@ export function transformObjectToRoute(routeList: RouteItem[]): T } // eslint-disable-next-line no-unused-expressions route.children && asyncImportRoute(route.children); - if (route.meta.icon) route.meta.icon = await getMenuIcon(route.meta.icon); + if (route.meta.icon) route.meta.icon = (await getMenuIcon(route.meta.icon)).value; }); return [PAGE_NOT_FOUND_ROUTE, ...routeList] as unknown as T[]; diff --git a/stylelint.config.js b/stylelint.config.js index 1e9edb5..8bfdbdb 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -13,6 +13,7 @@ module.exports = { ignorePseudoClasses: ['deep'], }, ], + 'media-query-no-invalid': null, // 官方表示此规则应当仅对于原生CSS启用,对于预处理器(Less)不应启用 }, overrides: [ {