tianheng-ui 0.1.16 → 0.1.18
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/lib/tianheng-ui.js +5 -5
- package/package.json +1 -1
- package/packages/FormMaking/GenerateForm.vue +3 -3
- package/packages/FormMaking/custom/configs/image.vue +1 -3
- package/packages/FormMaking/index.vue +3 -3
- package/packages/TableMaking/index.vue +8 -5
- package/packages/TableMaking/widgetConfig.vue +11 -2
package/package.json
CHANGED
@@ -73,7 +73,7 @@ export default {
|
|
73
73
|
return {};
|
74
74
|
}
|
75
75
|
},
|
76
|
-
|
76
|
+
config: {
|
77
77
|
type: Object,
|
78
78
|
default: () => {
|
79
79
|
return {};
|
@@ -101,7 +101,7 @@ export default {
|
|
101
101
|
},
|
102
102
|
data() {
|
103
103
|
return {
|
104
|
-
formJson: this.
|
104
|
+
formJson: this.config,
|
105
105
|
models: {},
|
106
106
|
componentsData: [],
|
107
107
|
axios: null
|
@@ -116,7 +116,7 @@ export default {
|
|
116
116
|
}
|
117
117
|
},
|
118
118
|
watch: {
|
119
|
-
|
119
|
+
config(val) {
|
120
120
|
this.setJSON(val);
|
121
121
|
},
|
122
122
|
formJson: {
|
@@ -194,7 +194,7 @@ export default {
|
|
194
194
|
GenerateForm
|
195
195
|
},
|
196
196
|
props: {
|
197
|
-
|
197
|
+
config: {
|
198
198
|
type: Object,
|
199
199
|
default: () => {
|
200
200
|
return { config: {}, list: [] };
|
@@ -261,7 +261,7 @@ export default {
|
|
261
261
|
this.layoutComponents = layoutComponents;
|
262
262
|
this.baseConfig = deepClone(baseConfig);
|
263
263
|
return {
|
264
|
-
widgetFormData: this.
|
264
|
+
widgetFormData: this.config,
|
265
265
|
widgetFormSelect: {},
|
266
266
|
widgetValue: {},
|
267
267
|
configTab: "widget",
|
@@ -296,7 +296,7 @@ export default {
|
|
296
296
|
this.$emit("on-change", val);
|
297
297
|
}
|
298
298
|
},
|
299
|
-
|
299
|
+
config(val) {
|
300
300
|
if (val && val.config) {
|
301
301
|
val.config = Object.assign(this.baseConfig, val.config);
|
302
302
|
}
|
@@ -36,7 +36,7 @@ export default {
|
|
36
36
|
name: "ThTableMaking",
|
37
37
|
components: { WidgetTools, WidgetTable, WidgetConfig },
|
38
38
|
props: {
|
39
|
-
|
39
|
+
config: {
|
40
40
|
type: Object,
|
41
41
|
default: () => {
|
42
42
|
return deepClone(tableConfig);
|
@@ -139,13 +139,16 @@ export default {
|
|
139
139
|
}
|
140
140
|
})
|
141
141
|
.catch(err => {
|
142
|
+
if (!this.config.table.title) {
|
143
|
+
this.$message.warning("请选择列表名称");
|
144
|
+
return reject();
|
145
|
+
}
|
142
146
|
if (!this.config.table.mounted.api) {
|
143
147
|
this.$message.warning("请选择列表接口");
|
144
|
-
reject();
|
145
|
-
} else {
|
146
|
-
const data = deepClone(this.config);
|
147
|
-
resolve(data);
|
148
|
+
return reject();
|
148
149
|
}
|
150
|
+
const data = deepClone(this.config);
|
151
|
+
resolve(data);
|
149
152
|
})
|
150
153
|
);
|
151
154
|
}
|
@@ -54,6 +54,12 @@
|
|
54
54
|
>
|
55
55
|
<el-collapse v-model="tableCollapse">
|
56
56
|
<el-collapse-item title="表格配置" name="group-table">
|
57
|
+
<el-form-item label="列表名称" required prop="table.title">
|
58
|
+
<el-input
|
59
|
+
v-model="config.table.title"
|
60
|
+
placeholder="请输入"
|
61
|
+
></el-input>
|
62
|
+
</el-form-item>
|
57
63
|
<el-form-item label="列表接口" required prop="table.mounted.api">
|
58
64
|
<el-select
|
59
65
|
v-model="config.table.mounted.api"
|
@@ -427,7 +433,7 @@ export default {
|
|
427
433
|
{ title: "列表字段", value: 1 },
|
428
434
|
{ title: "列表属性", value: 2 }
|
429
435
|
],
|
430
|
-
activeTab: { title: "
|
436
|
+
activeTab: { title: "列表属性", value: 2 },
|
431
437
|
searchField: {
|
432
438
|
isCheckAll: false,
|
433
439
|
isIndeterminate: false
|
@@ -448,9 +454,12 @@ export default {
|
|
448
454
|
"group-button"
|
449
455
|
],
|
450
456
|
formRules: {
|
457
|
+
"table.title": [
|
458
|
+
{ required: true, message: "请选择列表名称", trigger: "change" }
|
459
|
+
],
|
451
460
|
"table.mounted.api": [
|
452
461
|
{ required: true, message: "请选择列表接口", trigger: "change" }
|
453
|
-
]
|
462
|
+
],
|
454
463
|
},
|
455
464
|
dialog: { show: false, data: null }
|
456
465
|
};
|