From 437818abce4c9e9e1ac0c938e15ee2bda8aba454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Fri, 17 Jun 2022 14:13:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=8E=92=E5=90=8D?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tables/Tables/TableList/config.ts | 6 +++++ .../Tables/Tables/TableList/config.vue | 25 +++++++++++++++++++ .../Tables/Tables/TableList/index.vue | 19 ++++++++------ 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/packages/components/Tables/Tables/TableList/config.ts b/src/packages/components/Tables/Tables/TableList/config.ts index 920685e9..d3f60d4d 100644 --- a/src/packages/components/Tables/Tables/TableList/config.ts +++ b/src/packages/components/Tables/Tables/TableList/config.ts @@ -19,6 +19,12 @@ export const option = { textColor: '#CDD2F8FF', borderColor: '#1370fb80', carousel: 'single', + //序号字体大小 + indexFontSize: 12, + //左侧数据字体大小 + leftFontSize: 12, + //右侧数据字体大小 + rightFontSize: 12, // 格式化 valueFormatter(item: { value: any}) { return item.value} } diff --git a/src/packages/components/Tables/Tables/TableList/config.vue b/src/packages/components/Tables/Tables/TableList/config.vue index bd7c34c5..fb76b46e 100644 --- a/src/packages/components/Tables/Tables/TableList/config.vue +++ b/src/packages/components/Tables/Tables/TableList/config.vue @@ -49,6 +49,31 @@ > + + + + + + + + + + + + + diff --git a/src/packages/components/Tables/Tables/TableList/index.vue b/src/packages/components/Tables/Tables/TableList/index.vue index f5e95e07..f8ff364a 100644 --- a/src/packages/components/Tables/Tables/TableList/index.vue +++ b/src/packages/components/Tables/Tables/TableList/index.vue @@ -7,9 +7,9 @@ :style="`height: ${status.heights[i]}px;`" >
-
No.{{ item.ranking }}
-
-
+
No.{{ item.ranking }}
+
+
{{ status.mergedConfig.valueFormatter ? status.mergedConfig.valueFormatter(item) @@ -43,7 +43,7 @@ const props = defineProps({ }, }) const { w, h } = toRefs(props.chartConfig.attr) -const { rowNum, unit, color, textColor, borderColor } = toRefs( +const { rowNum, unit, color, textColor, borderColor, indexFontSize, leftFontSize, rightFontSize } = toRefs( props.chartConfig.option ) @@ -164,7 +164,7 @@ watch( } ) -// 数据更新 +// 数据更新(配置时触发) watch( () => props.chartConfig.option.dataset, () => { @@ -172,7 +172,11 @@ watch( } ) -useChartDataFetch(props.chartConfig, useChartEditStore) +// 数据callback处理(预览时触发) +useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => { + props.chartConfig.option.dataset = resData + onRestart() +}) onUnmounted(() => { stopAnimation() @@ -197,9 +201,10 @@ onUnmounted(() => { display: flex; width: 100%; font-size: 13px; + align-items: center; .rank { - width: 40px; + margin-right: 5px; } .info-name {