tianheng-ui 0.0.81 → 0.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -396,6 +396,7 @@ export default {
|
|
396
396
|
GenerateForm
|
397
397
|
},
|
398
398
|
props: {
|
399
|
+
formName: String,
|
399
400
|
data: {
|
400
401
|
type: Object,
|
401
402
|
default: () => {
|
@@ -539,7 +540,10 @@ export default {
|
|
539
540
|
this.widgetFormSelect = this.data.list[0];
|
540
541
|
}
|
541
542
|
if (this.data && this.data.config) {
|
542
|
-
this.widgetFormData.config =
|
543
|
+
this.widgetFormData.config = Object.assign(
|
544
|
+
this.widgetFormData.config,
|
545
|
+
this.data.config
|
546
|
+
);
|
543
547
|
}
|
544
548
|
},
|
545
549
|
methods: {
|
@@ -56,6 +56,12 @@ export default {
|
|
56
56
|
default: () => {
|
57
57
|
return [];
|
58
58
|
}
|
59
|
+
},
|
60
|
+
config: {
|
61
|
+
type: Object,
|
62
|
+
default: () => {
|
63
|
+
return {};
|
64
|
+
}
|
59
65
|
}
|
60
66
|
},
|
61
67
|
data() {
|
@@ -65,8 +71,36 @@ export default {
|
|
65
71
|
client: "monitor"
|
66
72
|
};
|
67
73
|
},
|
68
|
-
|
74
|
+
watch: {
|
75
|
+
fields(val) {
|
76
|
+
this.initConfig();
|
77
|
+
},
|
78
|
+
config(val) {
|
79
|
+
this.initConfig();
|
80
|
+
}
|
81
|
+
},
|
82
|
+
mounted() {
|
83
|
+
this.initConfig();
|
84
|
+
},
|
69
85
|
methods: {
|
86
|
+
initConfig() {
|
87
|
+
this.searchFields = [];
|
88
|
+
const searchFieldsIndexs = [];
|
89
|
+
if (this.config.search) {
|
90
|
+
const search = this.config.search.options;
|
91
|
+
for (const item of search) {
|
92
|
+
for (let i = 0; i < this.fields.length; i++) {
|
93
|
+
const element = this.fields[i];
|
94
|
+
if (element.prop === item.prop) {
|
95
|
+
this.searchFields.push(item);
|
96
|
+
searchFieldsIndexs.push(i);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
this.$refs.configRef.search.fields = searchFieldsIndexs;
|
103
|
+
},
|
70
104
|
handleFieldsChange(val) {
|
71
105
|
const type = val.type;
|
72
106
|
const data = val.data;
|
@@ -113,7 +147,7 @@ export default {
|
|
113
147
|
const tableConfig = this.$refs.configRef.getJson();
|
114
148
|
tableConfig.search.options = this.searchFields;
|
115
149
|
tableConfig.table.options = this.tableFields;
|
116
|
-
return tableConfig
|
150
|
+
return tableConfig;
|
117
151
|
}
|
118
152
|
}
|
119
153
|
};
|
@@ -317,7 +317,8 @@ const tableConfig = {
|
|
317
317
|
delete: { show: true, name: "删除", position: 2 },
|
318
318
|
batchDelete: { show: true, name: "批量删除", position: 1 },
|
319
319
|
export: { show: true, name: "导出", position: 1 },
|
320
|
-
import: { show: true, name: "导入", position: 1 }
|
320
|
+
import: { show: true, name: "导入", position: 1 },
|
321
|
+
key_123456:{}
|
321
322
|
},
|
322
323
|
network: {
|
323
324
|
mounted: {
|