Merge branch 'develop' of github.com:Tencent/tdesign-vue-next-starter

This commit is contained in:
Uyarn 2024-01-02 11:49:36 +08:00
commit 8d8d1267af
35 changed files with 201 additions and 137 deletions

7
.gitignore vendored
View File

@ -18,8 +18,11 @@ yarn-error.log
*.zip *.zip
.history .history
.stylelintcache .stylelintcache
.env.local
.env.*.local
# lock文件 请根据自身项目或团队需求选择具体的包管理工具 并移除具体的ignore的lock文件
yarn.lock yarn.lock
package-lock.json package-lock.json
pnpm-lock.yaml pnpm-lock.yaml
.env.local
.env.*.local

View File

@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.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 npx --no-install commitlint -e $GIT_PARAMS
fi

View File

@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
if [[ "$OS" == "Windows_NT" ]]; then
npx.cmd lint-staged
else
npx lint-staged npx lint-staged
fi

View File

@ -3,4 +3,8 @@
[ -n "$CI" ] && exit 0 [ -n "$CI" ] && exit 0
. "$(dirname "$0")/_/husky.sh" . "$(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 exec < /dev/tty && npx git-cz --hook || true
fi

View File

@ -145,7 +145,7 @@ export default [
}, },
}, },
{ {
url: '/api/get-menu-list', url: '/api/get-menu-list-i18n',
method: 'get', method: 'get',
timeout: 2000, timeout: 2000,
response: { response: {
@ -159,7 +159,10 @@ export default [
component: 'LAYOUT', component: 'LAYOUT',
redirect: '/list/base', redirect: '/list/base',
meta: { meta: {
title: '列表页', title: {
zh_CN: '列表页',
en_US: 'List',
},
icon: 'view-list', icon: 'view-list',
}, },
children: [ children: [
@ -168,7 +171,10 @@ export default [
name: 'ListBase', name: 'ListBase',
component: '/list/base/index', component: '/list/base/index',
meta: { meta: {
title: '基础列表页', title: {
zh_CN: '基础列表页',
en_US: 'Base List',
},
}, },
}, },
{ {
@ -176,7 +182,10 @@ export default [
name: 'ListCard', name: 'ListCard',
component: '/list/card/index', component: '/list/card/index',
meta: { meta: {
title: '卡片列表页', title: {
zh_CN: '卡片列表页',
en_US: 'Card List',
},
}, },
}, },
{ {
@ -184,7 +193,10 @@ export default [
name: 'ListFilter', name: 'ListFilter',
component: '/list/filter/index', component: '/list/filter/index',
meta: { meta: {
title: '筛选列表页', title: {
zh_CN: '筛选列表页',
en_US: 'Filter List',
},
}, },
}, },
{ {
@ -192,7 +204,10 @@ export default [
name: 'ListTree', name: 'ListTree',
component: '/list/tree/index', component: '/list/tree/index',
meta: { meta: {
title: '树状筛选列表页', title: {
zh_CN: '树状筛选列表页',
en_US: 'Tree List',
},
}, },
}, },
], ],
@ -203,7 +218,10 @@ export default [
component: 'LAYOUT', component: 'LAYOUT',
redirect: '/form/base', redirect: '/form/base',
meta: { meta: {
title: '表单页', title: {
zh_CN: '表单页',
en_US: 'Form',
},
icon: 'edit-1', icon: 'edit-1',
}, },
children: [ children: [
@ -212,7 +230,10 @@ export default [
name: 'FormBase', name: 'FormBase',
component: '/form/base/index', component: '/form/base/index',
meta: { meta: {
title: '基础表单页', title: {
zh_CN: '基础表单页',
en_US: 'Base Form',
},
}, },
}, },
{ {
@ -220,8 +241,10 @@ export default [
name: 'FormStep', name: 'FormStep',
component: '/form/step/index', component: '/form/step/index',
meta: { meta: {
title: '分步表单页', title: {
keepAlive: false, zh_CN: '分步表单页',
en_US: 'Step Form',
},
}, },
}, },
], ],
@ -232,7 +255,10 @@ export default [
component: 'LAYOUT', component: 'LAYOUT',
redirect: '/detail/base', redirect: '/detail/base',
meta: { meta: {
title: '详情页', title: {
zh_CN: '详情页',
en_US: 'Detail',
},
icon: 'layers', icon: 'layers',
}, },
children: [ children: [
@ -241,7 +267,10 @@ export default [
name: 'DetailBase', name: 'DetailBase',
component: '/detail/base/index', component: '/detail/base/index',
meta: { meta: {
title: '基础详情页', title: {
zh_CN: '基础详情页',
en_US: 'Base Detail',
},
}, },
}, },
{ {
@ -249,7 +278,10 @@ export default [
name: 'DetailAdvanced', name: 'DetailAdvanced',
component: '/detail/advanced/index', component: '/detail/advanced/index',
meta: { meta: {
title: '多卡片详情页', title: {
zh_CN: '多卡片详情页',
en_US: 'Card Detail',
},
}, },
}, },
{ {
@ -257,7 +289,10 @@ export default [
name: 'DetailDeploy', name: 'DetailDeploy',
component: '/detail/deploy/index', component: '/detail/deploy/index',
meta: { meta: {
title: '数据详情页', title: {
zh_CN: '数据详情页',
en_US: 'Data Detail',
},
}, },
}, },
{ {
@ -265,7 +300,10 @@ export default [
name: 'DetailSecondary', name: 'DetailSecondary',
component: '/detail/secondary/index', component: '/detail/secondary/index',
meta: { meta: {
title: '二级详情页', title: {
zh_CN: '二级详情页',
en_US: 'Secondary Detail',
},
}, },
}, },
], ],
@ -277,7 +315,10 @@ export default [
redirect: '/frame/doc', redirect: '/frame/doc',
meta: { meta: {
icon: 'internet', icon: 'internet',
title: '外部页面', title: {
zh_CN: '外部页面',
en_US: 'External',
},
}, },
children: [ children: [
{ {
@ -286,7 +327,10 @@ export default [
component: 'IFrame', component: 'IFrame',
meta: { meta: {
frameSrc: 'https://tdesign.tencent.com/starter/docs/vue-next/get-started', 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', component: 'IFrame',
meta: { meta: {
frameSrc: 'https://tdesign.tencent.com/vue-next/getting-started', 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: { meta: {
frameSrc: 'https://tdesign.tencent.com/vue-next/getting-started', frameSrc: 'https://tdesign.tencent.com/vue-next/getting-started',
frameBlank: true, frameBlank: true,
title: 'TDesign 文档(外链)', title: {
zh_CN: 'TDesign 文档(外链',
en_US: 'TDesign Doc(Link)',
},
}, },
}, },
], ],

View File

@ -19,61 +19,61 @@
"test:coverage": "echo \"no test:coverage specified,work in process\"" "test:coverage": "echo \"no test:coverage specified,work in process\""
}, },
"dependencies": { "dependencies": {
"axios": "^1.4.0", "@vueuse/core": "^10.6.1",
"dayjs": "^1.11.9", "axios": "^1.6.2",
"dayjs": "^1.11.10",
"echarts": "5.1.2", "echarts": "5.1.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "^2.1.6", "pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.0", "pinia-plugin-persistedstate": "^3.2.0",
"qrcode.vue": "^3.4.0", "qrcode.vue": "^3.4.1",
"qs": "^6.11.2", "qs": "^6.11.2",
"tdesign-icons-vue-next": "^0.2.0", "tdesign-icons-vue-next": "^0.2.2",
"tdesign-vue-next": "^1.4.1", "tdesign-vue-next": "^1.6.8",
"tvision-color": "^1.6.0", "tvision-color": "^1.6.0",
"vue": "^3.3.4", "vue": "~3.3.8",
"vue-clipboard3": "^2.0.0", "vue-i18n": "^9.6.5",
"vue-i18n": "^9.4.1",
"vue-router": "~4.2.4" "vue-router": "~4.2.4"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^17.6.7", "@commitlint/cli": "^18.4.1",
"@commitlint/config-conventional": "^17.6.7", "@commitlint/config-conventional": "^18.4.0",
"@types/echarts": "^4.9.18", "@types/echarts": "^4.9.21",
"@types/lodash": "^4.14.196", "@types/lodash": "^4.14.201",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.3",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.10",
"@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^5.62.0", "@typescript-eslint/parser": "^6.11.0",
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.4.1",
"@vitejs/plugin-vue-jsx": "^3.0.1", "@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/compiler-sfc": "^3.3.4", "@vue/compiler-sfc": "^3.3.8",
"@vue/eslint-config-typescript": "^11.0.3", "@vue/eslint-config-typescript": "^12.0.0",
"commitizen": "^4.3.0", "commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.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-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.9.0", "eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.0", "eslint-plugin-import": "^2.29.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vue": "^9.15.1", "eslint-plugin-vue": "^9.18.1",
"eslint-plugin-vue-scoped-css": "^2.5.0", "eslint-plugin-vue-scoped-css": "^2.5.1",
"husky": "^8.0.3", "husky": "^8.0.3",
"less": "^4.1.3", "less": "^4.2.0",
"lint-staged": "^13.2.3", "lint-staged": "^15.1.0",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.8.8", "prettier": "^3.1.0",
"stylelint": "~15.10.2", "stylelint": "~15.11.0",
"stylelint-config-standard": "^34.0.0", "stylelint-config-standard": "^34.0.0",
"stylelint-order": "~6.0.3", "stylelint-order": "~6.0.3",
"typescript": "~5.1.6", "typescript": "~5.3.2",
"vite": "^4.4.7", "vite": "^4.5.0",
"vite-plugin-mock": "^3.0.0", "vite-plugin-mock": "^3.0.0",
"vite-svg-loader": "^4.0.0", "vite-svg-loader": "^4.0.0",
"vue-tsc": "^1.8.8" "vue-tsc": "^1.8.22"
}, },
"config": { "config": {
"commitizen": { "commitizen": {

View File

@ -294,7 +294,7 @@ const headerAffixedTop = computed(
({ ({
offsetTop: store.isUseTabsRouter ? 48 : 0, offsetTop: store.isUseTabsRouter ? 48 : 0,
container: `.${prefix}-layout`, container: `.${prefix}-layout`,
} as any), // TO BE FIXED }) as any, // TO BE FIXED
); );
</script> </script>

View File

@ -83,10 +83,10 @@ const dynamicComponent = computed(() => {
} }
&-title { &-title {
font: var(--td-font-title-large);
font-style: normal; font-style: normal;
margin-top: var(--td-comp-margin-l); margin-top: var(--td-comp-margin-l);
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
font: var(--td-font-title-large);
} }
&-tip { &-tip {

View File

@ -24,7 +24,7 @@ const className = computed(() => {
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url('@/style/index.less'); @import '@/style/index.less';
.thumbnail { .thumbnail {
&-container { &-container {

View File

@ -75,7 +75,7 @@ const iconCls = computed(() => ['trend-icon-container']);
} }
&__reverse { &__reverse {
color: #ffffff; color: #fff;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View File

@ -1,16 +1,14 @@
import * as echarts from 'echarts/core'; import * as echarts from 'echarts/core';
import { onMounted, onUnmounted, Ref, ref } from 'vue'; import { onMounted, onUnmounted, Ref, ref, ShallowRef, shallowRef } from 'vue';
/** /**
* eChart hook * eChart hook
* @param domId * @param domId
* @param chart
*/ */
export const useChart = (domId: string): Ref<echarts.ECharts> => { export const useChart = (domId: string): ShallowRef<echarts.ECharts> => {
let chartContainer: HTMLCanvasElement; let chartContainer: HTMLCanvasElement;
const selfChart = ref<echarts.ECharts | any>(); const selfChart = shallowRef<echarts.ECharts | any>();
const updateContainer = () => { const updateContainer = () => {
// TODO resize 报错,响应式的问题,待处理
selfChart.value.resize({ selfChart.value.resize({
width: chartContainer.clientWidth, width: chartContainer.clientWidth,
height: chartContainer.clientHeight, height: chartContainer.clientHeight,

View File

@ -24,7 +24,8 @@
:min-column-width="128" :min-column-width="128"
:popup-props="{ :popup-props="{
overlayClassName: 'route-tabs-dropdown', overlayClassName: 'route-tabs-dropdown',
onVisibleChange: (visible: boolean, ctx: PopupVisibleChangeContext) => handleTabMenuClick(visible, ctx, routeItem.path), onVisibleChange: (visible: boolean, ctx: PopupVisibleChangeContext) =>
handleTabMenuClick(visible, ctx, routeItem.path),
visible: activeTabPath === routeItem.path, visible: activeTabPath === routeItem.path,
}" }"
> >

View File

@ -98,10 +98,10 @@
</t-drawer> </t-drawer>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useClipboard } from '@vueuse/core';
import type { PopupVisibleChangeContext } from 'tdesign-vue-next'; import type { PopupVisibleChangeContext } from 'tdesign-vue-next';
import { MessagePlugin } from 'tdesign-vue-next'; import { MessagePlugin } from 'tdesign-vue-next';
import { computed, onMounted, ref, watchEffect } from 'vue'; import { computed, onMounted, ref, watchEffect } from 'vue';
import useClipboard from 'vue-clipboard3';
import SettingAutoIcon from '@/assets/assets-setting-auto.svg'; import SettingAutoIcon from '@/assets/assets-setting-auto.svg';
import SettingDarkIcon from '@/assets/assets-setting-dark.svg'; import SettingDarkIcon from '@/assets/assets-setting-dark.svg';
@ -169,9 +169,9 @@ const onPopupVisibleChange = (visible: boolean, context: PopupVisibleChangeConte
}; };
const handleCopy = () => { const handleCopy = () => {
const text = JSON.stringify(formData.value, null, 4); const sourceText = JSON.stringify(formData.value, null, 4);
const { toClipboard } = useClipboard(); const { copy } = useClipboard({ source: sourceText });
toClipboard(text) copy()
.then(() => { .then(() => {
MessagePlugin.closeAll(); MessagePlugin.closeAll();
MessagePlugin.success('复制成功'); MessagePlugin.success('复制成功');

View File

@ -1,3 +1,4 @@
import { useLocalStorage, usePreferredLanguages } from '@vueuse/core';
import { DropdownOption } from 'tdesign-vue-next'; import { DropdownOption } from 'tdesign-vue-next';
import { computed } from 'vue'; import { computed } from 'vue';
import { createI18n } from 'vue-i18n'; import { createI18n } from 'vue-i18n';
@ -12,19 +13,17 @@ export const langCode: Array<string> = [];
export const localeConfigKey = 'tdesign-starter-locale'; export const localeConfigKey = 'tdesign-starter-locale';
// 获取浏览器默认语言环境 // 获取浏览器默认语言环境
const browserLanguage = navigator.language.replace('-', '_'); const languages = usePreferredLanguages();
// 生成语言模块列表 // 生成语言模块列表
const generateLangModuleMap = () => { const generateLangModuleMap = () => {
const fullPaths = Object.keys(langModules); const fullPaths = Object.keys(langModules);
console.log(langModules, 'langModules');
fullPaths.forEach((fullPath) => { fullPaths.forEach((fullPath) => {
const k = fullPath.replace('./lang', ''); const k = fullPath.replace('./lang', '');
const startIndex = 1; const startIndex = 1;
const lastIndex = k.lastIndexOf('/'); const lastIndex = k.lastIndexOf('/');
const code = k.substring(startIndex, lastIndex); const code = k.substring(startIndex, lastIndex);
langCode.push(code); langCode.push(code);
console.log(langCode, 'langCode');
langModuleMap.set(code, langModules[fullPath]); langModuleMap.set(code, langModules[fullPath]);
}); });
}; };
@ -42,7 +41,7 @@ const importMessages = computed(() => {
export const i18n = createI18n({ export const i18n = createI18n({
legacy: false, legacy: false,
locale: localStorage.getItem(localeConfigKey) || browserLanguage || 'zh_CN', locale: useLocalStorage(localeConfigKey, 'zh_CN').value || languages.value[0] || 'zh_CN',
fallbackLocale: 'zh_CN', fallbackLocale: 'zh_CN',
messages: importMessages.value, messages: importMessages.value,
globalInjection: true, globalInjection: true,

View File

@ -15,7 +15,7 @@ export default {
title: '创建失败', title: '创建失败',
subtitle: '抱歉,您的项目创建失败,企业微信联系检查创建者权限,或返回修改。', subtitle: '抱歉,您的项目创建失败,企业微信联系检查创建者权限,或返回修改。',
back: '回到首页', back: '回到首页',
progress: '返回修改', modify: '返回修改',
}, },
success: { success: {
title: '项目已创建成功', title: '项目已创建成功',

View File

@ -1,3 +1,4 @@
import { useLocalStorage } from '@vueuse/core';
import { computed } from 'vue'; import { computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
@ -12,7 +13,7 @@ export function useLocale() {
} }
locale.value = lang; locale.value = lang;
localStorage.setItem(localeConfigKey, lang); useLocalStorage(localeConfigKey, 'zh_CN').value = lang;
} }
const getComponentsLocale = computed(() => { const getComponentsLocale = computed(() => {

View File

@ -43,11 +43,12 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useWindowSize } from '@vueuse/core';
import { LineChart, PieChart } from 'echarts/charts'; import { LineChart, PieChart } from 'echarts/charts';
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'; import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components';
import * as echarts from 'echarts/core'; import * as echarts from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
import { computed, nextTick, onDeactivated, onMounted, onUnmounted, ref, watch } from 'vue'; import { computed, nextTick, onDeactivated, onMounted, ref, watch } from 'vue';
import { useSettingStore } from '@/store'; import { useSettingStore } from '@/store';
import { changeChartsTheme } from '@/utils/color'; import { changeChartsTheme } from '@/utils/color';
@ -128,11 +129,11 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
updateContainer(); updateContainer();
}); });
window.addEventListener('resize', updateContainer, false);
}); });
onUnmounted(() => { const { width, height } = useWindowSize();
window.removeEventListener('resize', updateContainer); watch([width, height], () => {
updateContainer();
}); });
onDeactivated(() => { onDeactivated(() => {

View File

@ -70,11 +70,12 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { useWindowSize } from '@vueuse/core';
import { LineChart } from 'echarts/charts'; import { LineChart } from 'echarts/charts';
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'; import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components';
import * as echarts from 'echarts/core'; import * as echarts from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'; import { computed, nextTick, onMounted, ref, watch } from 'vue';
// //
import Trend from '@/components/trend/index.vue'; import Trend from '@/components/trend/index.vue';
@ -127,11 +128,11 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
updateContainer(); updateContainer();
}); });
window.addEventListener('resize', updateContainer, false);
}); });
onUnmounted(() => { const { width, height } = useWindowSize();
window.removeEventListener('resize', updateContainer); watch([width, height], () => {
updateContainer();
}); });
watch( watch(

View File

@ -2,7 +2,7 @@
<t-row :gutter="[16, 16]"> <t-row :gutter="[16, 16]">
<t-col v-for="(item, index) in PANE_LIST" :key="item.title" :xs="6" :xl="3"> <t-col v-for="(item, index) in PANE_LIST" :key="item.title" :xs="6" :xl="3">
<t-card <t-card
:title="item.title" :title="t(item.title)"
:bordered="false" :bordered="false"
:class="{ 'dashboard-item': true, 'dashboard-item--main-color': index == 0 }" :class="{ 'dashboard-item': true, 'dashboard-item--main-color': index == 0 }"
> >
@ -55,11 +55,12 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { useWindowSize } from '@vueuse/core';
import { BarChart, LineChart } from 'echarts/charts'; import { BarChart, LineChart } from 'echarts/charts';
import * as echarts from 'echarts/core'; import * as echarts from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
import { FileIcon, UsergroupIcon } from 'tdesign-icons-vue-next'; import { FileIcon, UsergroupIcon } from 'tdesign-icons-vue-next';
import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'; import { nextTick, onMounted, ref, watch } from 'vue';
// //
import Trend from '@/components/trend/index.vue'; import Trend from '@/components/trend/index.vue';
@ -76,25 +77,25 @@ const resizeTime = ref(1);
const PANE_LIST = [ const PANE_LIST = [
{ {
title: t('pages.dashboardBase.topPanel.card1'), title: 'pages.dashboardBase.topPanel.card1',
number: '¥ 28,425.00', number: '¥ 28,425.00',
upTrend: '20.5%', upTrend: '20.5%',
leftType: 'echarts-line', leftType: 'echarts-line',
}, },
{ {
title: t('pages.dashboardBase.topPanel.card2'), title: 'pages.dashboardBase.topPanel.card2',
number: '¥ 768.00', number: '¥ 768.00',
downTrend: '20.5%', downTrend: '20.5%',
leftType: 'echarts-bar', leftType: 'echarts-bar',
}, },
{ {
title: t('pages.dashboardBase.topPanel.card3'), title: 'pages.dashboardBase.topPanel.card3',
number: '1126', number: '1126',
upTrend: '20.5%', upTrend: '20.5%',
leftType: 'icon-usergroup', leftType: 'icon-usergroup',
}, },
{ {
title: t('pages.dashboardBase.topPanel.card4'), title: 'pages.dashboardBase.topPanel.card4',
number: 527, number: 527,
downTrend: '20.5%', downTrend: '20.5%',
leftType: 'icon-file-paste', leftType: 'icon-file-paste',
@ -152,11 +153,11 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
updateContainer(); updateContainer();
}); });
window.addEventListener('resize', updateContainer, false);
}); });
onUnmounted(() => { const { width, height } = useWindowSize();
window.removeEventListener('resize', updateContainer); watch([width, height], () => {
updateContainer();
}); });
watch( watch(

View File

@ -69,11 +69,12 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { useWindowSize } from '@vueuse/core';
import { LineChart, ScatterChart } from 'echarts/charts'; import { LineChart, ScatterChart } from 'echarts/charts';
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'; import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components';
import * as echarts from 'echarts/core'; import * as echarts from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
import { computed, nextTick, onDeactivated, onMounted, onUnmounted, watch } from 'vue'; import { computed, nextTick, onDeactivated, onMounted, watch } from 'vue';
import ProductCard from '@/components/product-card/index.vue'; import ProductCard from '@/components/product-card/index.vue';
import Trend from '@/components/trend/index.vue'; import Trend from '@/components/trend/index.vue';
@ -126,14 +127,14 @@ const renderCharts = () => {
onMounted(() => { onMounted(() => {
renderCharts(); renderCharts();
window.addEventListener('resize', updateContainer, false);
nextTick(() => { nextTick(() => {
updateContainer(); updateContainer();
}); });
}); });
onUnmounted(() => { const { width, height } = useWindowSize();
window.removeEventListener('resize', updateContainer); watch([width, height], () => {
updateContainer();
}); });
onDeactivated(() => { onDeactivated(() => {

View File

@ -21,7 +21,7 @@
</div> </div>
<div class="operator-item"> <div class="operator-item">
<span class="operator-item-info">{{ data.info }}</span> <span class="operator-item-info">{{ data.info }}</span>
<t-icon class="operator-item-icon" name="chevron-right" size="small" style="color: rgba(0, 0, 0, 0.26)" /> <t-icon class="operator-item-icon" name="chevron-right" size="small" style="color: rgb(0 0 0 / 26%)" />
</div> </div>
</div> </div>
<div class="operator-footer"> <div class="operator-footer">
@ -70,6 +70,9 @@ export default defineComponent({
font-size: var(--td-comp-size-xxxl); font-size: var(--td-comp-size-xxxl);
padding: calc(var(--td-comp-size-xxxl) - var(--td-comp-size-xl)); padding: calc(var(--td-comp-size-xxxl) - var(--td-comp-size-xl));
border-radius: 100%; border-radius: 100%;
position: absolute;
top: 0;
right: 0;
} }
.operator-title { .operator-title {
@ -95,12 +98,6 @@ export default defineComponent({
border: unset; border: unset;
} }
&-icon {
position: absolute;
top: 0px;
right: 0px;
}
svg { svg {
circle { circle {
fill: var(--td-brand-color-focus); fill: var(--td-brand-color-focus);
@ -136,7 +133,7 @@ export default defineComponent({
.operator-footer { .operator-footer {
position: absolute; position: absolute;
width: 100%; width: 100%;
bottom: 0px; bottom: 0;
left: 0; left: 0;
.t-progress--thin { .t-progress--thin {
@ -158,11 +155,11 @@ export default defineComponent({
display: unset; display: unset;
:deep(.t-progress__bar) { :deep(.t-progress__bar) {
border-radius: 0px 0px var(--td-radius-medium) var(--td-radius-medium); border-radius: 0 0 var(--td-radius-medium) var(--td-radius-medium);
} }
:deep(.t-progress__inner) { :deep(.t-progress__inner) {
border-radius: 0px 0px 0px var(--td-radius-medium); border-radius: 0 0 0 var(--td-radius-medium);
} }
:deep(.t-progress__info) { :deep(.t-progress__info) {

View File

@ -9,6 +9,7 @@
padding: 0; padding: 0;
margin-bottom: var(--td-comp-margin-m); margin-bottom: var(--td-comp-margin-m);
} }
:deep(.t-card__body) { :deep(.t-card__body) {
padding: 0; padding: 0;
} }
@ -50,8 +51,7 @@
width: 100%; width: 100%;
height: 240px; height: 240px;
display: flex; display: flex;
align-items: center; place-items: center center;
justify-items: center;
border: dashed 1px var(--td-component-border); border: dashed 1px var(--td-component-border);
border-radius: var(--td-radius-medium); border-radius: var(--td-radius-medium);

View File

@ -14,7 +14,7 @@
.t-list-item { .t-list-item {
cursor: pointer; cursor: pointer;
padding: var(--td-comp-paddingTB-l) 0; padding: var(--td-comp-paddingTB-l) 0;
transition: .2s linear; transition: 0.2s linear;
&:hover { &:hover {
background-color: var(--td-bg-color-container-hover); background-color: var(--td-bg-color-container-hover);
@ -60,7 +60,7 @@
.msg-action { .msg-action {
display: none; display: none;
margin-right: var(--td-comp-margin-xxl); margin-right: var(--td-comp-margin-xxl);
transition: .2s linear; transition: 0.2s linear;
.set-read-icon { .set-read-icon {
margin-right: var(--td-comp-margin-l); margin-right: var(--td-comp-margin-l);

View File

@ -14,8 +14,6 @@
margin-top: var(--td-comp-margin-xxxl); margin-top: var(--td-comp-margin-xxxl);
} }
.step-form { .step-form {
margin-top: var(--td-comp-margin-xxxl); margin-top: var(--td-comp-margin-xxxl);
} }

View File

@ -242,7 +242,7 @@ const headerAffixedTop = computed(
({ ({
offsetTop: store.isUseTabsRouter ? 48 : 0, offsetTop: store.isUseTabsRouter ? 48 : 0,
container: `.${prefix}-layout`, container: `.${prefix}-layout`,
} as any), }) as any,
); );
</script> </script>

View File

@ -53,6 +53,7 @@ const navToHelper = () => {
.operations-container { .operations-container {
display: flex; display: flex;
align-items: center; align-items: center;
.t-button { .t-button {
margin-left: var(--td-comp-margin-l); margin-left: var(--td-comp-margin-l);
} }

View File

@ -124,5 +124,5 @@ const switchType = (val: string) => {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url('../index.less'); @import '../index.less';
</style> </style>

View File

@ -187,7 +187,7 @@
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
} }
@media screen and (max-height: 700px) { @media screen and (height <= 700px) {
.copyright { .copyright {
display: none; display: none;
} }

View File

@ -1,5 +1,3 @@
import { t } from '@/locales';
export interface UserInfoListType { export interface UserInfoListType {
title: string; title: string;
content: string; content: string;
@ -8,39 +6,39 @@ export interface UserInfoListType {
export const USER_INFO_LIST: Array<UserInfoListType> = [ export const USER_INFO_LIST: Array<UserInfoListType> = [
{ {
title: t('pages.user.personalInfo.desc.mobile'), title: 'pages.user.personalInfo.desc.mobile',
content: '+86 13923734567', content: '+86 13923734567',
}, },
{ {
title: t('pages.user.personalInfo.desc.phone'), title: 'pages.user.personalInfo.desc.phone',
content: '734567', content: '734567',
}, },
{ {
title: t('pages.user.personalInfo.desc.email'), title: 'pages.user.personalInfo.desc.email',
content: 'Account@qq.com', content: 'Account@qq.com',
}, },
{ {
title: t('pages.user.personalInfo.desc.seat'), title: 'pages.user.personalInfo.desc.seat',
content: 'T32F 012', content: 'T32F 012',
}, },
{ {
title: t('pages.user.personalInfo.desc.entity'), title: 'pages.user.personalInfo.desc.entity',
content: '腾讯集团', content: '腾讯集团',
}, },
{ {
title: t('pages.user.personalInfo.desc.leader'), title: 'pages.user.personalInfo.desc.leader',
content: 'Michael Wang', content: 'Michael Wang',
}, },
{ {
title: t('pages.user.personalInfo.desc.position'), title: 'pages.user.personalInfo.desc.position',
content: '高级 UI 设计师', content: '高级 UI 设计师',
}, },
{ {
title: t('pages.user.personalInfo.desc.joinDay'), title: 'pages.user.personalInfo.desc.joinDay',
content: '2021-07-01', content: '2021-07-01',
}, },
{ {
title: t('pages.user.personalInfo.desc.group'), title: 'pages.user.personalInfo.desc.group',
content: '腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组', content: '腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组',
span: 6, span: 6,
}, },

View File

@ -41,7 +41,6 @@
} }
.contract { .contract {
&-title { &-title {
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -149,6 +148,7 @@
.card-padding-no { .card-padding-no {
margin-top: var(--td-comp-margin-xxxl); margin-top: var(--td-comp-margin-xxxl);
:deep(.t-card__body) { :deep(.t-card__body) {
margin-top: var(--td-comp-margin-xxl); margin-top: var(--td-comp-margin-xxl);
} }

View File

@ -18,7 +18,7 @@
<t-row class="content" justify="space-between"> <t-row class="content" justify="space-between">
<t-col v-for="(item, index) in USER_INFO_LIST" :key="index" class="contract" :span="item.span ?? 3"> <t-col v-for="(item, index) in USER_INFO_LIST" :key="index" class="contract" :span="item.span ?? 3">
<div class="contract-title"> <div class="contract-title">
{{ item.title }} {{ $t(item.title) }}
</div> </div>
<div class="contract-detail"> <div class="contract-detail">
{{ item.content }} {{ item.content }}

View File

@ -1,6 +1,7 @@
@font-face { @font-face {
font-family: 'TencentSansW7'; font-family: 'TencentSansW7';
src: url('data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAusAA4AAAAAEJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAALkAAAABwAAAAchqPqzUdERUYAAAtwAAAAHgAAAB4AKQAbT1MvMgAAAbgAAABZAAAAYGmceoNjbWFwAAACYAAAAJcAAAHsPmfPZmdhc3AAAAtkAAAADAAAAAwACAAbZ2x5ZgAAAywAAAW8AAAG/Ivn/ztoZWFkAAABRAAAADYAAAA2E+AL5GhoZWEAAAF8AAAAIAAAACQIawJ9aG10eAAAAhQAAABMAAAATCG/Auxsb2NhAAADAAAAACwAAAAsDjIQIm1heHAAAAGcAAAAGgAAACAAfgBDbmFtZQAACOgAAAIUAAAEm0zGvtJwb3N0AAAK/AAAAGYAAAB/4wuGdnByZXAAAAL4AAAACAAAAAhwAgESAAEAAAABBR/xlpGAXw889QALA+gAAAAA2Ac3gwAAAADY+IxB//L/HAPPAwAAAAAIAAIAAAAAAAB42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ATJnl93jaY2BiAIP/zQxGDNiAKBAzMjAxMjG4MLgyuDN4MHgy+DD4MwQwhDGEM0QwxDAyM7IwsjKyMbKzl+ZlGhgYGHIlFhXllxdlpmeUgISM3AwcQbSJq6sziDY1cjQA0WZGhoYAgBwU3AAAAAEAAgAIAAr//wAPAAEAAAAMAAAAFgAAAAIAAQADABQAAQAEAAAAAgAAAAAAAAABAAAAANWkJwgAAAAA2Ac3gwAAAADY+IxB') format('woff'); 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/yAC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Xik6PrnhhYfKAxM/hyb0Oanycm3+86bHMPC6JyZfB8YJnN8sngi4xqqdq3nN0//vzOTNXq5YsR+g8984WfeNq1Us1qFEEQ/npnk0X8IQGJIjnUSRLYLLt7MMlFCHvNKRvMuTPTmZ1kdib0zAY3ePMFfAAvigi5+Ry+gA8iiOLFr3tbTFZWcnGgu76qrvqqpqoAPMQ3KMy+A3wMWOGBehRwAy31LOAIayoPuEmfdwEv4Z76HPAy7quvAbfwqvEz4BXcjd4EvIpG9J5sqnmH2gfP7LDCOn4E3CD/04AjtNXzgJtYV68DXsJj9SngZTxRXwJu4XtDBbyCtehlwKtoRm8xQIlzTGGRIcUINQRXPH100cMOtgLape0QBgVif9dBjxlTkCPnSckj2MCQNudzGeQmrS5PB22ifcYmxII9RuWUf3JXXjOUhvKCt/PEoDyf2iwd1XIl/W5vZ4vXrhyaIjZFTRmPijIv06lsDEemuOTZlEHZact+nXRkL8/FR1diTWXshUnIefNnhtCULv0Rtvk4ox7qopKjbbcNhhVOWK1mXTgw6STX9t8kMh91k1RuRfJXJS98Zyp2rKSbcDIdzqfPB2OrrCyk1+n2F3HOMzrC+aFmPrcOg0i9XvukbhhCbPmaUBv73zqjrcTJf1gPV7PL6PK4yGN6L6oq882IvaWm/0w/ZfOt9014x3yZta1yS/V7fbJKNBcjzaraWJNIbXVixtqeSXly6x3TRSJjPZVjc50qKyQ2ttaUpxObVUkW15xRtXD9rg8Hs3FxRr8ATJnl93jaY2BiAIP/zQxGDNiAKBAzMjAxMjG4MLgyuDN4MHgy+DD4MwQwhDGEM0QwxDAyM7IwsjKyMbKzl+ZlGhgYGHIlFhXllxdlpmeUgISM3AwcQbSJq6sziDY1cjQA0WZGhoYAgBwU3AAAAAEAAgAIAAr//wAPAAEAAAAMAAAAFgAAAAIAAQADABQAAQAEAAAAAgAAAAAAAAABAAAAANWkJwgAAAAA2Ac3gwAAAADY+IxB')
format('woff');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }

View File

@ -36,4 +36,3 @@ p {
* { * {
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -24,7 +24,7 @@ LayoutMap.set('IFRAME', IFRAME);
let dynamicViewsModules: Record<string, () => Promise<Recordable>>; let dynamicViewsModules: Record<string, () => Promise<Recordable>>;
// 动态从包内引入单个Icon // 动态从包内引入单个Icon
async function getMenuIcon(iconName: string) { async function getMenuIcon(iconName: string): Promise<string> {
const RenderIcon = iconsPath[`../../../node_modules/tdesign-icons-vue-next/esm/components/${iconName}.js`]; const RenderIcon = iconsPath[`../../../node_modules/tdesign-icons-vue-next/esm/components/${iconName}.js`];
const Icon = await RenderIcon(); const Icon = await RenderIcon();
@ -51,6 +51,7 @@ function asyncImportRoute(routes: RouteItem[] | undefined) {
} else if (name) { } else if (name) {
item.component = PARENT_LAYOUT(); 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);
// eslint-disable-next-line no-unused-expressions // eslint-disable-next-line no-unused-expressions

View File

@ -13,6 +13,7 @@ module.exports = {
ignorePseudoClasses: ['deep'], ignorePseudoClasses: ['deep'],
}, },
], ],
'media-query-no-invalid': null, // 官方表示此规则应当仅对于原生CSS启用对于预处理器Less不应启用
}, },
overrides: [ overrides: [
{ {