From b322bceefc846928af78f5ca27f04b37a8212cad Mon Sep 17 00:00:00 2001 From: pengYYYYY Date: Thu, 2 Sep 2021 10:36:32 +0800 Subject: [PATCH] fix: const naming (merge request !8) Squash merge branch 'fix/eslint/constnaming' into 'develop' fix: const naming --- globals.d.ts | 4 ++-- src/config/global.ts | 12 ++++++------ src/pages/dashboard/base/index.ts | 10 +++++----- src/pages/detail/advanced/index.vue | 13 ++++++------- src/pages/detail/base/index.vue | 2 +- src/pages/detail/secondary/index.vue | 2 +- src/pages/form/step/index.vue | 2 +- 7 files changed, 22 insertions(+), 23 deletions(-) diff --git a/globals.d.ts b/globals.d.ts index 7e31034..e27917c 100644 --- a/globals.d.ts +++ b/globals.d.ts @@ -10,8 +10,8 @@ declare interface ImportMeta { } declare module '*.svg' { - const content: string; - export default content; + const CONTENT: string; + export default CONTENT; } diff --git a/src/config/global.ts b/src/config/global.ts index e99d082..bd163ff 100644 --- a/src/config/global.ts +++ b/src/config/global.ts @@ -1,11 +1,11 @@ -export const Prefix = 'tdesign-pro'; -export const Theme = 'light'; +export const PREFIX = 'tdesign-pro'; +export const THEME = 'light'; // 登录方式设定,authenticationMethod取值有:smartProxy(走智能网关内网登录,要求.oa.co../.woa.co.. 等域名,且要求域名申请接入智能网关) // customize(自定义登录,外网域名,统一重定向到登录页面) // export const authenticationMethod = 'smartProxy'; -export const AuthenticationMethod = 'customize'; +export const AUTHENTICATION_METHOD = 'customize'; export default { - Prefix, - Theme, - AuthenticationMethod, + PREFIX, + THEME, + AUTHENTICATION_METHOD, }; diff --git a/src/pages/dashboard/base/index.ts b/src/pages/dashboard/base/index.ts index 940305f..d18c2b0 100644 --- a/src/pages/dashboard/base/index.ts +++ b/src/pages/dashboard/base/index.ts @@ -97,7 +97,7 @@ export function getLineChartDataSet(dateTime: Array = []): any { ]; } /** 图表颜色 */ -export const chartListColor: Array = ['#0052D9', '#00A870', '#7D46BD', '#0594FA', '#ED7B2F']; +export const CHART_LIST_COLOR: Array = ['#0052D9', '#00A870', '#7D46BD', '#0594FA', '#ED7B2F']; /** * 获取表头数据 @@ -190,7 +190,7 @@ export function getAreaChartDataSet(text = ''): any { area: { smooth: true, }, - injectOption: option => ({ ...option, color: chartListColor }), + injectOption: option => ({ ...option, color: CHART_LIST_COLOR }), }; } @@ -220,7 +220,7 @@ export function getColumnChartDataSet(isMonth = false): any { getRandomNum(Math.random() * 100), ], ], - injectOption: option => ({ ...option, color: chartListColor }), + injectOption: option => ({ ...option, color: CHART_LIST_COLOR }), }; } return { @@ -240,7 +240,7 @@ export function getColumnChartDataSet(isMonth = false): any { getRandomNum(Math.random() * 100), ], ], - injectOption: option => ({ ...option, color: chartListColor }), + injectOption: option => ({ ...option, color: CHART_LIST_COLOR }), }; } @@ -260,7 +260,7 @@ export function getPieChartDataSet(radius = 42): any { ['状态', '审核中', '待履行', '履行中', '已完成'], ['数量', 67, 45, radius, 36], ], - injectOption: option => ({ ...option, color: chartListColor }), + injectOption: option => ({ ...option, color: CHART_LIST_COLOR }), pie: { radius: ['45%', '60%'], // 设置内圆和外圆半径 }, diff --git a/src/pages/detail/advanced/index.vue b/src/pages/detail/advanced/index.vue index dd8541c..b8ecf37 100644 --- a/src/pages/detail/advanced/index.vue +++ b/src/pages/detail/advanced/index.vue @@ -173,10 +173,9 @@ @click="deleteClickOp(slotProps)" >删除 - + -
+