fix:修复elementSet插件切换语言显示bug

This commit is contained in:
wangwenrui
2020-01-16 15:48:49 +08:00
parent e8bdc59b74
commit 405c9ab66b
8 changed files with 50 additions and 21 deletions

View File

@@ -45,17 +45,32 @@
<script>
export default {
props: ["dropCol"],
props: ["dropCol","tableTitle"],
data() {
return {
other: this.$t("overall.other"),
event_positiony: 0,
event_positionx: 0,
eventfixedVal: {},
dropColRes: JSON.parse(JSON.stringify(this.dropCol))
dropColRes: JSON.parse(JSON.stringify(this.dropCol)),
titles: JSON.parse(JSON.stringify(this.tableTitle))
};
},
mounted() {},
created() {
let localStorageTitle=JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path));
if(localStorageTitle){
for(let title of this.titles){
for(let lsTitle of localStorageTitle){
if(lsTitle.prop === title.prop){
lsTitle.label=title.label;
}
}
}
localStorage.setItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path,JSON.stringify(localStorageTitle))
}
},
watch: {
dropCol: {
immediate: true,