update content

This commit is contained in:
Qiuxia Fan 2022-03-18 15:51:46 +08:00
parent 442a24eedc
commit f0c5c181c2
5 changed files with 7 additions and 3 deletions

View File

@ -108,6 +108,7 @@ const msg = {
tableHeaderCol2: "Name of the second column of the table",
showXAxis: "Show X Axis",
showYAxis: "Show Y Axis",
nameError: "The dashboard name cannot be duplicate",
hourTip: "Select Hour",
minuteTip: "Select Minute",
secondTip: "Select Second",

View File

@ -108,6 +108,7 @@ const msg = {
tableHeaderCol2: "表格的第二列的名称",
showXAxis: "显示X轴",
showYAxis: "显示Y轴",
nameError: "仪表板名称不能重复",
hourTip: "选择小时",
minuteTip: "选择分钟",
secondTip: "选择秒数",

View File

@ -26,6 +26,7 @@ import { NewControl } from "../data";
import { Duration } from "@/types/app";
import { AxiosResponse } from "axios";
import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n";
interface DashboardState {
showConfig: boolean;
layout: LayoutConfig[];
@ -368,7 +369,8 @@ export const dashboardStore = defineStore({
d.layer === this.currentDashboard.layerId
);
if (index > -1) {
ElMessage.error("The dashboard name cannot be duplicate.");
const { t } = useI18n();
ElMessage.error(t("nameError"));
return;
}
res = await graphql

View File

@ -158,7 +158,7 @@ async function importTemplates(event: any) {
d.name === name && d.entity === entity && d.layer === layer && !item.id
);
if (index > -1) {
return ElMessage.error("The dashboard name cannot be duplicate.");
return ElMessage.error(t("nameError"));
}
}
loading.value = true;

View File

@ -82,7 +82,7 @@ const onCreate = () => {
states.selectedLayer === d.layer
);
if (index > -1) {
ElMessage.error("The dashboard name cannot be duplicate.");
ElMessage.error(t("nameError"));
return;
}
dashboardStore.setCurrentDashboard({