diff --git a/.eslintrc b/.eslintrc index 5697453..0ebc597 100644 --- a/.eslintrc +++ b/.eslintrc @@ -47,6 +47,7 @@ "@typescript-eslint/explicit-module-boundary-types": "off", "vue/first-attribute-linebreak": 0, + "@typescript-eslint/no-unused-vars": [ "error", { diff --git a/package.json b/package.json index 76d2895..15d4e79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tencent/tdesign-vue-next-starter", - "version": "0.8.0", + "version": "0.9.0", "scripts": { "dev:mock": "vite --open --mode mock", "dev": "vite --open --mode development", @@ -24,38 +24,39 @@ "echarts": "5.1.2", "lodash": "^4.17.21", "nprogress": "^0.2.0", - "pinia": "^2.1.4", - "pinia-plugin-persistedstate": "^3.1.0", + "pinia": "^2.1.6", + "pinia-plugin-persistedstate": "^3.2.0", "qrcode.vue": "^3.4.0", "qs": "^6.11.2", - "tdesign-icons-vue-next": "^0.1.11", + "tdesign-icons-vue-next": "^0.2.0", + "tdesign-vue-next": "^1.4.1", "tdesign-site-components": "^0.12.9", "tdesign-theme-generator": "^1.0.5", - "tdesign-vue-next": "^1.3.10", "tvision-color": "^1.6.0", "vue": "^3.3.4", "vue-clipboard3": "^2.0.0", - "vue-router": "~4.2.3" + "vue-i18n": "^9.4.1", + "vue-router": "~4.2.4" }, "devDependencies": { - "@commitlint/cli": "^17.6.6", - "@commitlint/config-conventional": "^17.6.6", + "@commitlint/cli": "^17.6.7", + "@commitlint/config-conventional": "^17.6.7", "@types/echarts": "^4.9.18", - "@types/lodash": "^4.14.195", + "@types/lodash": "^4.14.196", "@types/nprogress": "^0.2.0", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.61.0", - "@typescript-eslint/parser": "^5.61.0", + "@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", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", - "eslint": "^8.44.0", + "eslint": "^8.45.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-import": "^2.27.5", + "eslint-config-prettier": "^8.9.0", + "eslint-plugin-import": "^2.28.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-vue": "^9.15.1", @@ -67,14 +68,14 @@ "postcss-html": "^1.5.0", "postcss-less": "^6.0.0", "prettier": "^2.8.8", - "stylelint": "~15.10.0", + "stylelint": "~15.10.2", "stylelint-config-standard": "^34.0.0", "stylelint-order": "~6.0.3", "typescript": "~5.1.6", - "vite": "^4.3.9", + "vite": "^4.4.7", "vite-plugin-mock": "^3.0.0", "vite-svg-loader": "^4.0.0", - "vue-tsc": "^1.8.4" + "vue-tsc": "^1.8.8" }, "config": { "commitizen": { @@ -89,5 +90,8 @@ "*.{html,vue,css,sass,less}": [ "npm run stylelint:fix" ] + }, + "engines": { + "node": ">=16.0.0" } } diff --git a/src/App.vue b/src/App.vue index 913dee0..1d81fd5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,11 +1,14 @@ diff --git a/src/pages/detail/deploy/constants.ts b/src/pages/detail/deploy/constants.ts index 18ea0c5..0c6c9a3 100644 --- a/src/pages/detail/deploy/constants.ts +++ b/src/pages/detail/deploy/constants.ts @@ -80,36 +80,3 @@ export const BASE_INFO_DATA = [ type: null, }, ]; - -export const TABLE_COLUMNS = [ - { - width: '280', - ellipsis: true, - colKey: 'name', - title: '项目名称', - sorter: (a: any, b: any) => a.name.substr(10) - b.name.substr(10), - }, - { - width: '280', - ellipsis: true, - colKey: 'adminName', - title: '管理员', - }, - { - width: '280', - className: 'test', - ellipsis: true, - colKey: 'updateTime', - title: '创建时间', - sorter: (a: any, b: any) => Date.parse(a.updateTime) - Date.parse(b.updateTime), - }, - { - align: 'left' as const, - width: '200', - className: 'test2', - ellipsis: true, - colKey: 'op', - fixed: 'right' as const, - title: '操作', - }, -]; diff --git a/src/pages/detail/deploy/index.ts b/src/pages/detail/deploy/index.ts index 81570da..57aa074 100644 --- a/src/pages/detail/deploy/index.ts +++ b/src/pages/detail/deploy/index.ts @@ -1,4 +1,5 @@ import { TChartColor } from '@/config/color'; +import { t } from '@/locales/index'; import { getDateArray, getRandomArray } from '@/utils/charts'; import { getChartListColor } from '@/utils/color'; @@ -52,7 +53,7 @@ export function getSmoothLineDataSet({ }, }, legend: { - data: ['本月', '上月'], + data: [t('pages.detailDeploy.deployTrend.thisMonth'), t('pages.detailDeploy.deployTrend.lastMonth')], icon: 'circle', bottom: '0', itemGap: 48, @@ -65,7 +66,7 @@ export function getSmoothLineDataSet({ }, series: [ { - name: '上月', + name: t('pages.detailDeploy.deployTrend.lastMonth'), data: [ getRandomArray(), getRandomArray(), @@ -86,7 +87,7 @@ export function getSmoothLineDataSet({ }, }, { - name: '本月', + name: t('pages.detailDeploy.deployTrend.thisMonth'), data: [ getRandomArray(), getRandomArray(), @@ -129,6 +130,11 @@ export function get2ColBarChartDataSet({ thisYearListCopy = thisYearListCopy.reverse(); } + const data = []; + for (let i = 1; i < 7; i++) { + data.push(t(`pages.detailDeploy.deployTrend.week${i}`)); + } + return { color: getChartListColor(), tooltip: { @@ -144,7 +150,7 @@ export function get2ColBarChartDataSet({ xAxis: [ { type: 'category', - data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], + data, axisTick: { alignWithLabel: true, }, @@ -173,7 +179,7 @@ export function get2ColBarChartDataSet({ }, ], legend: { - data: ['去年', '今年'], + data: [t('pages.detailDeploy.deployTrend.lastYear'), t('pages.detailDeploy.deployTrend.thisYear')], bottom: '0', icon: 'rect', itemGap: 48, @@ -186,7 +192,7 @@ export function get2ColBarChartDataSet({ }, series: [ { - name: '去年', + name: t('pages.detailDeploy.deployTrend.lastYear'), type: 'bar', barWidth: '30%', data: lastYearListCopy, @@ -195,7 +201,7 @@ export function get2ColBarChartDataSet({ }, }, { - name: '今年', + name: t('pages.detailDeploy.deployTrend.thisYear'), type: 'bar', barWidth: '30%', data: thisYearListCopy, diff --git a/src/pages/detail/deploy/index.vue b/src/pages/detail/deploy/index.vue index 9109585..5131c6b 100644 --- a/src/pages/detail/deploy/index.vue +++ b/src/pages/detail/deploy/index.vue @@ -2,18 +2,18 @@
- +
- -