diff --git a/src/.prettierrc.js b/src/.prettierrc.js index 5d274cad..6fd3c6c3 100644 --- a/src/.prettierrc.js +++ b/src/.prettierrc.js @@ -4,5 +4,5 @@ module.exports = { singleQuote: true, printWidth: 80, tabWidth: 2, - endOfLine: 'auto', + endOfLine: 'auto' } diff --git a/src/commitlint.config.js b/src/commitlint.config.js index 30b791a4..af2f4dcd 100644 --- a/src/commitlint.config.js +++ b/src/commitlint.config.js @@ -24,7 +24,7 @@ const scopes = [ 'dev', 'build', 'deploy', - 'other', + 'other' ] module.exports = { @@ -42,7 +42,7 @@ module.exports = { 'type-enum': [ 2, 'always', - ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'improvement'], - ], - }, + ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'improvement'] + ] + } } diff --git a/src/components/charts/panel.scss b/src/components/charts/panel.scss index 94a31ee0..974f9a0e 100644 --- a/src/components/charts/panel.scss +++ b/src/components/charts/panel.scss @@ -1,6 +1,6 @@ .cn-panel { display: grid; - grid-template-columns: repeat(30, 1fr); + grid-template-columns: repeat(30, 2.90%); grid-auto-flow: row; grid-auto-rows: var(--chart-height-unit); grid-gap: 10px; @@ -57,6 +57,7 @@ display: flex; justify-content: center; align-items: center; + grid-template-columns:(5,200px); .single-value-icon__box{ height: 70px; @@ -96,19 +97,13 @@ font-weight: bold; } .content__title { + width: 206px; + overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - overflow: hidden; - word-break: break-all; - width: 80px; font-size: 16px; color: #666666; } - .content__title:hover{ - overflow: visible; - white-space: inherit; - min-width:100%; - } } } &>.cn-chart__single-value.cn-chart__single-value--icon-right { diff --git a/src/i18n/index.js b/src/i18n/index.js index 6c390bc0..e939c782 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -6,11 +6,11 @@ import cn from './cn' import en from './en' const i18n = createI18n({ - locale: localStorage.getItem(storageKey.language) || 'en', - /*messages: { + locale: localStorage.getItem(storageKey.language) || 'en' + /* messages: { cn: cn, en: en - }*/ + } */ }) export async function loadI18n () { if (!store.state.i18n) { diff --git a/src/jest.config.js b/src/jest.config.js index eac923d3..1bd19ef3 100644 --- a/src/jest.config.js +++ b/src/jest.config.js @@ -3,9 +3,9 @@ module.exports = { // work around: https://github.com/kulshekhar/ts-jest/issues/748#issuecomment-423528659 'ts-jest': { diagnostics: { - ignoreCodes: [151001], - }, - }, + ignoreCodes: [151001] + } + } }, testEnvironment: 'jsdom', transform: { @@ -17,21 +17,21 @@ module.exports = { '@babel/preset-env', { targets: { - node: true, - }, - }, + node: true + } + } ], - '@babel/preset-typescript', + '@babel/preset-typescript' ], plugins: [ '@vue/babel-plugin-jsx', - '@babel/plugin-proposal-class-properties', - ], - }, - ], + '@babel/plugin-proposal-class-properties' + ] + } + ] }, moduleFileExtensions: ['ts', 'tsx', 'js', 'json'], // u can change this option to a more specific folder for test single component or util when dev // for example, ['/packages/input'] - roots: [''], + roots: [''] } diff --git a/src/utils/date-util.js b/src/utils/date-util.js index 023d3783..e6966ce8 100644 --- a/src/utils/date-util.js +++ b/src/utils/date-util.js @@ -134,7 +134,7 @@ export function debounce (fn, delay) { } } export function getNowTime (interval) { - const endTime = window.$dayJs.tz().valueOf(); + const endTime = window.$dayJs.tz().valueOf() const startTime = endTime - interval * 60 * 1000 return { startTime, diff --git a/src/views/charts/Chart.vue b/src/views/charts/Chart.vue index 68a517c6..35fe29da 100644 --- a/src/views/charts/Chart.vue +++ b/src/views/charts/Chart.vue @@ -9,6 +9,7 @@ v-else-if="isTabs" class="cn-chart cn-chart__tabs" :tabs="chartInfo" + style="grid-area: 1 / 1 / 2 / 7;" > - +