tianheng-ui 0.1.23 → 0.1.24
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 +13 -13
- package/package.json +1 -1
- package/packages/FormMaking/FormConfig.vue +43 -6
- package/packages/FormMaking/WidgetConfig.vue +146 -33
- package/packages/FormMaking/WidgetTools.vue +1 -1
- package/packages/FormMaking/custom/config.js +10 -7
- package/packages/FormMaking/custom/configs/blank.vue +2 -6
- package/packages/FormMaking/custom/configs/button.vue +4 -46
- package/packages/FormMaking/custom/configs/cascader.vue +4 -45
- package/packages/FormMaking/custom/configs/cell.vue +2 -6
- package/packages/FormMaking/custom/configs/checkbox.vue +15 -62
- package/packages/FormMaking/custom/configs/color.vue +2 -43
- package/packages/FormMaking/custom/configs/date.vue +2 -42
- package/packages/FormMaking/custom/configs/divider.vue +2 -6
- package/packages/FormMaking/custom/configs/editor.vue +2 -6
- package/packages/FormMaking/custom/configs/filler.vue +2 -6
- package/packages/FormMaking/custom/configs/grid.vue +2 -6
- package/packages/FormMaking/custom/configs/image.vue +2 -6
- package/packages/FormMaking/custom/configs/input.vue +2 -42
- package/packages/FormMaking/custom/configs/number.vue +3 -47
- package/packages/FormMaking/custom/configs/radio.vue +13 -60
- package/packages/FormMaking/custom/configs/rate.vue +2 -44
- package/packages/FormMaking/custom/configs/select.vue +12 -58
- package/packages/FormMaking/custom/configs/slider.vue +2 -43
- package/packages/FormMaking/custom/configs/switch.vue +2 -43
- package/packages/FormMaking/custom/configs/table.vue +2 -6
- package/packages/FormMaking/custom/configs/tableH5.vue +2 -6
- package/packages/FormMaking/custom/configs/tabs.vue +14 -23
- package/packages/FormMaking/custom/configs/text.vue +6 -7
- package/packages/FormMaking/custom/configs/textarea.vue +4 -45
- package/packages/FormMaking/custom/configs/time.vue +2 -43
- package/packages/FormMaking/custom/configs/upload.vue +6 -11
- package/packages/FormMaking/index.vue +12 -37
- package/packages/TableMaking/index.vue +25 -2
- package/packages/TableMaking/widgetConfig.vue +38 -12
@@ -52,8 +52,26 @@
|
|
52
52
|
:rules="formRules"
|
53
53
|
ref="formRef"
|
54
54
|
>
|
55
|
-
<el-collapse v-model="
|
56
|
-
<el-collapse-item title="
|
55
|
+
<el-collapse v-model="collapseValue">
|
56
|
+
<el-collapse-item title="列表配置" name="group-table">
|
57
|
+
<el-form-item label="字段表" required prop="table.fieldsTable">
|
58
|
+
<el-select
|
59
|
+
v-model="config.table.fieldsTable"
|
60
|
+
style="width:100%"
|
61
|
+
clearable
|
62
|
+
placeholder="请选择"
|
63
|
+
no-data-text="暂无接口,请前往【数据源模块】创建"
|
64
|
+
@change="handleFieldsTableChange"
|
65
|
+
>
|
66
|
+
<el-option
|
67
|
+
v-for="item in fieldsOptions"
|
68
|
+
:key="item.id"
|
69
|
+
:label="item.label"
|
70
|
+
:value="item.id"
|
71
|
+
>
|
72
|
+
</el-option>
|
73
|
+
</el-select>
|
74
|
+
</el-form-item>
|
57
75
|
<el-form-item label="列表名称" required prop="table.title">
|
58
76
|
<el-input
|
59
77
|
v-model="config.table.title"
|
@@ -64,7 +82,6 @@
|
|
64
82
|
<el-select
|
65
83
|
v-model="config.table.mounted.api"
|
66
84
|
style="width:100%"
|
67
|
-
value-key="id"
|
68
85
|
clearable
|
69
86
|
placeholder="请选择"
|
70
87
|
no-data-text="暂无接口,请前往【接口模块】创建"
|
@@ -417,12 +434,7 @@ export default {
|
|
417
434
|
return {};
|
418
435
|
}
|
419
436
|
},
|
420
|
-
|
421
|
-
type: Array,
|
422
|
-
default: () => {
|
423
|
-
return [];
|
424
|
-
}
|
425
|
-
},
|
437
|
+
fieldsOptions: Array,
|
426
438
|
formOptions: Array,
|
427
439
|
apiOptions: Array
|
428
440
|
},
|
@@ -434,6 +446,7 @@ export default {
|
|
434
446
|
{ title: "列表属性", value: 2 }
|
435
447
|
],
|
436
448
|
activeTab: { title: "列表属性", value: 2 },
|
449
|
+
fields: [],
|
437
450
|
searchField: {
|
438
451
|
isCheckAll: false,
|
439
452
|
isIndeterminate: false
|
@@ -442,7 +455,7 @@ export default {
|
|
442
455
|
isCheckAll: false,
|
443
456
|
isIndeterminate: false
|
444
457
|
},
|
445
|
-
|
458
|
+
collapseValue: [
|
446
459
|
"group-table",
|
447
460
|
"group-pageInfo",
|
448
461
|
"group-sort",
|
@@ -454,12 +467,15 @@ export default {
|
|
454
467
|
"group-button"
|
455
468
|
],
|
456
469
|
formRules: {
|
470
|
+
"table.fieldsTable": [
|
471
|
+
{ required: true, message: "请选择字段表", trigger: "change" }
|
472
|
+
],
|
457
473
|
"table.title": [
|
458
474
|
{ required: true, message: "请选择列表名称", trigger: "change" }
|
459
475
|
],
|
460
476
|
"table.mounted.api": [
|
461
477
|
{ required: true, message: "请选择列表接口", trigger: "change" }
|
462
|
-
]
|
478
|
+
]
|
463
479
|
},
|
464
480
|
dialog: { show: false, data: null }
|
465
481
|
};
|
@@ -568,6 +584,13 @@ export default {
|
|
568
584
|
handleActionConfig(data) {
|
569
585
|
this.dialog = { show: true, data };
|
570
586
|
},
|
587
|
+
handleFieldsTableChange(val) {
|
588
|
+
const data = this.fieldsOptions.filter(item => {
|
589
|
+
return item.id === val;
|
590
|
+
});
|
591
|
+
if (data.length) this.fields = data[0].children;
|
592
|
+
else this.fields = [];
|
593
|
+
},
|
571
594
|
handleFormValidate() {
|
572
595
|
return new Promise((resolve, reject) => {
|
573
596
|
if (this.$refs.formRef) {
|
@@ -585,14 +608,17 @@ export default {
|
|
585
608
|
|
586
609
|
<style lang="scss" scoped>
|
587
610
|
.widgetConfig {
|
588
|
-
height: 100%;
|
589
611
|
background-color: white;
|
590
612
|
.tabs {
|
613
|
+
position: sticky;
|
614
|
+
top: 0;
|
591
615
|
display: flex;
|
592
616
|
align-items: center;
|
593
617
|
height: 45px;
|
618
|
+
background-color: white;
|
594
619
|
border-bottom: 1px solid #dcdfe6;
|
595
620
|
box-sizing: border-box;
|
621
|
+
z-index: 100;
|
596
622
|
|
597
623
|
.tabs-item {
|
598
624
|
flex: 1;
|