diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 60bdf9b0..8e4297ca 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -104,6 +104,8 @@ const msg = { import: "Import Dashboard Templates", yes: "Yes", no: "No", + tableHeaderCol1: "Name of the first column of the table", + tableHeaderCol2: "Name of the second column of the table", hourTip: "Select Hour", minuteTip: "Select Minute", secondTip: "Select Second", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 779eed57..778f846b 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -104,6 +104,8 @@ const msg = { import: "导入仪表板模板", yes: "是", no: "否", + tableHeaderCol1: "表格的第一列的名称", + tableHeaderCol2: "表格的第二列的名称", hourTip: "选择小时", minuteTip: "选择分钟", secondTip: "选择秒数", diff --git a/src/views/dashboard/configuration/widget/graph-styles/Table.vue b/src/views/dashboard/configuration/widget/graph-styles/Table.vue index d4135876..37468f22 100644 --- a/src/views/dashboard/configuration/widget/graph-styles/Table.vue +++ b/src/views/dashboard/configuration/widget/graph-styles/Table.vue @@ -75,4 +75,8 @@ function updateConfig(param: { [key: string]: unknown }) { display: block; margin-bottom: 5px; } + +.item { + margin-top: 10px; +} diff --git a/src/views/dashboard/graphs/Table.vue b/src/views/dashboard/graphs/Table.vue index a84576f9..530eb0a9 100644 --- a/src/views/dashboard/graphs/Table.vue +++ b/src/views/dashboard/graphs/Table.vue @@ -21,13 +21,13 @@ limitations under the License. --> :style="`width: ${nameWidth + initWidth}px`" >
- {{ config.tableHeaderCol1 || $t("name") }} + {{ config.tableHeaderCol1 || t("name") }}
-
- {{ config.tableHeaderCol2 || $t("value") }} +
+ {{ config.tableHeaderCol2 || t("value") }}
:style="`width: ${nameWidth + initWidth}px`" >
{{ key }}
-
+
{{ data[key][data[key].length - 1 || 0] }}
@@ -47,6 +47,7 @@ limitations under the License. -->