tianheng-ui 0.1.18 → 0.1.19
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
@@ -292,8 +292,8 @@ export default {
|
|
292
292
|
widgetFormData: {
|
293
293
|
deep: true,
|
294
294
|
handler: function(val) {
|
295
|
-
this.$emit("update:
|
296
|
-
this.$emit("on-change", val);
|
295
|
+
this.$emit("update:config", val);
|
296
|
+
// this.$emit("on-change", val);
|
297
297
|
}
|
298
298
|
},
|
299
299
|
config(val) {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="th-table-making th-flex_box">
|
3
3
|
<div class="th-fiex_content">
|
4
4
|
<widget-tools
|
5
|
-
:config="
|
5
|
+
:config="tableConfig"
|
6
6
|
:client="client"
|
7
7
|
:permissions="permissions"
|
8
8
|
@click="handleToolsClick"
|
@@ -11,12 +11,12 @@
|
|
11
11
|
</widget-tools>
|
12
12
|
<widget-table
|
13
13
|
style="height:calc(100% - 45px)"
|
14
|
-
:config="
|
14
|
+
:config="tableConfig"
|
15
15
|
></widget-table>
|
16
16
|
</div>
|
17
17
|
<div class="th-flex_aside th-is_border_left" style="width:300px">
|
18
18
|
<widget-config
|
19
|
-
:config="
|
19
|
+
:config="tableConfig"
|
20
20
|
:fields.sync="fields"
|
21
21
|
:formOptions="formOptions"
|
22
22
|
:apiOptions="apiOptions"
|
@@ -88,19 +88,19 @@ export default {
|
|
88
88
|
},
|
89
89
|
data() {
|
90
90
|
return {
|
91
|
-
|
91
|
+
tableConfig: this.data,
|
92
92
|
client: "monitor"
|
93
93
|
};
|
94
94
|
},
|
95
95
|
watch: {
|
96
|
-
|
96
|
+
tableConfig: {
|
97
97
|
deep: true,
|
98
98
|
handler: function(val) {
|
99
|
-
this.$emit("update:
|
99
|
+
this.$emit("update:config", val);
|
100
100
|
}
|
101
101
|
},
|
102
|
-
|
103
|
-
this.
|
102
|
+
config(val) {
|
103
|
+
this.tableConfig = val;
|
104
104
|
this.handleNetwork();
|
105
105
|
},
|
106
106
|
apiOptions(val) {
|
@@ -114,12 +114,12 @@ export default {
|
|
114
114
|
this.apiOptions.map(item => {
|
115
115
|
network[item.id] = item;
|
116
116
|
});
|
117
|
-
this.
|
117
|
+
this.tableConfig.network = network;
|
118
118
|
},
|
119
119
|
handleToolsClick(action, data) {
|
120
120
|
switch (action) {
|
121
121
|
case "import-json":
|
122
|
-
this.
|
122
|
+
this.tableConfig = data;
|
123
123
|
break;
|
124
124
|
|
125
125
|
default:
|
@@ -132,22 +132,22 @@ export default {
|
|
132
132
|
.handleFormValidate()
|
133
133
|
.then(res => {
|
134
134
|
if (res) {
|
135
|
-
const data = deepClone(this.
|
135
|
+
const data = deepClone(this.tableConfig);
|
136
136
|
resolve(data);
|
137
137
|
} else {
|
138
138
|
reject();
|
139
139
|
}
|
140
140
|
})
|
141
141
|
.catch(err => {
|
142
|
-
if (!this.
|
142
|
+
if (!this.tableConfig.table.title) {
|
143
143
|
this.$message.warning("请选择列表名称");
|
144
144
|
return reject();
|
145
145
|
}
|
146
|
-
if (!this.
|
146
|
+
if (!this.tableConfig.table.mounted.api) {
|
147
147
|
this.$message.warning("请选择列表接口");
|
148
148
|
return reject();
|
149
149
|
}
|
150
|
-
const data = deepClone(this.
|
150
|
+
const data = deepClone(this.tableConfig);
|
151
151
|
resolve(data);
|
152
152
|
})
|
153
153
|
);
|