tianheng-ui 0.0.88 → 0.0.90
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
@@ -8,8 +8,12 @@
|
|
8
8
|
</el-radio-group>
|
9
9
|
</el-form-item>
|
10
10
|
|
11
|
-
<el-form-item label="表单标题">
|
12
|
-
<el-input
|
11
|
+
<el-form-item label="表单标题" required>
|
12
|
+
<el-input
|
13
|
+
v-model="data.title"
|
14
|
+
placeholder="请输入"
|
15
|
+
clearable
|
16
|
+
></el-input>
|
13
17
|
</el-form-item>
|
14
18
|
|
15
19
|
<el-form-item label="表单宽度">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="fm-container">
|
3
|
-
<el-container class="container-box">
|
3
|
+
<el-container v-if="widgetFormData.config" class="container-box">
|
4
4
|
<el-main>
|
5
5
|
<el-container>
|
6
6
|
<!-- 左侧字段区 -->
|
@@ -458,33 +458,9 @@ export default {
|
|
458
458
|
this.basicComponents = basicComponents;
|
459
459
|
this.layoutComponents = layoutComponents;
|
460
460
|
this.advanceComponents = advanceComponents;
|
461
|
+
this.baseConfig = JSON.parse(JSON.stringify(baseConfig));
|
461
462
|
return {
|
462
|
-
widgetFormData:
|
463
|
-
list: [],
|
464
|
-
config: {
|
465
|
-
ui: "element",
|
466
|
-
title: "",
|
467
|
-
width: "",
|
468
|
-
labelWidth: 100,
|
469
|
-
labelPosition: "right",
|
470
|
-
labelSuffix: ":",
|
471
|
-
size: "small",
|
472
|
-
disabled: false,
|
473
|
-
hideLabel: false,
|
474
|
-
eventScript: [
|
475
|
-
{
|
476
|
-
key: "mounted",
|
477
|
-
name: "mounted",
|
478
|
-
func: ""
|
479
|
-
},
|
480
|
-
{
|
481
|
-
key: "refresh",
|
482
|
-
name: "refresh",
|
483
|
-
func: ""
|
484
|
-
}
|
485
|
-
]
|
486
|
-
}
|
487
|
-
},
|
463
|
+
widgetFormData: this.data,
|
488
464
|
widgetFormSelect: {},
|
489
465
|
widgetValue: {},
|
490
466
|
configTab: "widget",
|
@@ -553,23 +529,28 @@ export default {
|
|
553
529
|
},
|
554
530
|
data(val) {
|
555
531
|
if (val && val.config) {
|
556
|
-
val.config = Object.assign(this.
|
532
|
+
val.config = Object.assign(this.baseConfig, val.config);
|
557
533
|
}
|
558
534
|
this.setJSON(val);
|
559
535
|
}
|
560
536
|
},
|
561
|
-
|
562
|
-
|
563
|
-
this.
|
564
|
-
this.
|
565
|
-
|
566
|
-
if (this.
|
567
|
-
this.
|
568
|
-
this.widgetFormData.config,
|
569
|
-
this.data.config
|
570
|
-
);
|
537
|
+
created() {
|
538
|
+
this.widgetFormData.config = Object.assign(
|
539
|
+
this.baseConfig,
|
540
|
+
this.widgetFormData.config
|
541
|
+
);
|
542
|
+
if (this.widgetFormData && this.widgetFormData.list.length) {
|
543
|
+
this.widgetFormSelect = this.widgetFormData.list[0];
|
571
544
|
}
|
572
545
|
},
|
546
|
+
mounted() {
|
547
|
+
// if (this.data && this.data.config) {
|
548
|
+
// this.widgetFormData.config = Object.assign(
|
549
|
+
// this.widgetFormData.config,
|
550
|
+
// this.data.config
|
551
|
+
// );
|
552
|
+
// }
|
553
|
+
},
|
573
554
|
methods: {
|
574
555
|
// 读取excel file
|
575
556
|
readExcelFile(file) {
|
@@ -612,29 +593,7 @@ export default {
|
|
612
593
|
|
613
594
|
let config = {
|
614
595
|
list: [],
|
615
|
-
config:
|
616
|
-
ui: "element",
|
617
|
-
title: "",
|
618
|
-
width: "",
|
619
|
-
labelWidth: 100,
|
620
|
-
labelPosition: "right",
|
621
|
-
labelSuffix: ":",
|
622
|
-
size: "small",
|
623
|
-
disabled: false,
|
624
|
-
hideLabel: false,
|
625
|
-
eventScript: [
|
626
|
-
{
|
627
|
-
key: "mounted",
|
628
|
-
name: "mounted",
|
629
|
-
func: ""
|
630
|
-
},
|
631
|
-
{
|
632
|
-
key: "refresh",
|
633
|
-
name: "refresh",
|
634
|
-
func: ""
|
635
|
-
}
|
636
|
-
]
|
637
|
-
}
|
596
|
+
config: this.baseConfig
|
638
597
|
};
|
639
598
|
|
640
599
|
for (const row of rowsDom) {
|
@@ -790,29 +749,7 @@ export default {
|
|
790
749
|
handleClear() {
|
791
750
|
this.widgetFormData = {
|
792
751
|
list: [],
|
793
|
-
config:
|
794
|
-
ui: "element",
|
795
|
-
title: "",
|
796
|
-
width: "",
|
797
|
-
labelWidth: 100,
|
798
|
-
labelPosition: "right",
|
799
|
-
labelSuffix: ":",
|
800
|
-
size: "small",
|
801
|
-
disabled: false,
|
802
|
-
hideLabel: false,
|
803
|
-
eventScript: [
|
804
|
-
{
|
805
|
-
key: "mounted",
|
806
|
-
name: "mounted",
|
807
|
-
func: ""
|
808
|
-
},
|
809
|
-
{
|
810
|
-
key: "refresh",
|
811
|
-
name: "refresh",
|
812
|
-
func: ""
|
813
|
-
}
|
814
|
-
]
|
815
|
-
}
|
752
|
+
config: this.baseConfig
|
816
753
|
};
|
817
754
|
|
818
755
|
this.widgetFormSelect = {};
|