tianheng-ui 0.0.87 → 0.0.89
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 +2 -2
- package/package.json +1 -1
- package/packages/FormMaking/index.vue +21 -40
package/package.json
CHANGED
@@ -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,11 +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: JSON.parse(JSON.stringify(baseConfig))
|
465
|
-
},
|
463
|
+
widgetFormData: this.data,
|
466
464
|
widgetFormSelect: {},
|
467
465
|
widgetValue: {},
|
468
466
|
configTab: "widget",
|
@@ -531,23 +529,28 @@ export default {
|
|
531
529
|
},
|
532
530
|
data(val) {
|
533
531
|
if (val && val.config) {
|
534
|
-
val.config = Object.assign(this.
|
532
|
+
val.config = Object.assign(this.baseConfig, val.config);
|
535
533
|
}
|
536
534
|
this.setJSON(val);
|
537
535
|
}
|
538
536
|
},
|
539
|
-
|
540
|
-
|
541
|
-
this.
|
542
|
-
this.
|
543
|
-
|
544
|
-
if (this.
|
545
|
-
this.
|
546
|
-
this.widgetFormData.config,
|
547
|
-
this.data.config
|
548
|
-
);
|
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];
|
549
544
|
}
|
550
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
|
+
},
|
551
554
|
methods: {
|
552
555
|
// 读取excel file
|
553
556
|
readExcelFile(file) {
|
@@ -590,29 +593,7 @@ export default {
|
|
590
593
|
|
591
594
|
let config = {
|
592
595
|
list: [],
|
593
|
-
config:
|
594
|
-
ui: "element",
|
595
|
-
title: "",
|
596
|
-
width: "",
|
597
|
-
labelWidth: 100,
|
598
|
-
labelPosition: "right",
|
599
|
-
labelSuffix: ":",
|
600
|
-
size: "small",
|
601
|
-
disabled: false,
|
602
|
-
hideLabel: false,
|
603
|
-
eventScript: [
|
604
|
-
{
|
605
|
-
key: "mounted",
|
606
|
-
name: "mounted",
|
607
|
-
func: ""
|
608
|
-
},
|
609
|
-
{
|
610
|
-
key: "refresh",
|
611
|
-
name: "refresh",
|
612
|
-
func: ""
|
613
|
-
}
|
614
|
-
]
|
615
|
-
}
|
596
|
+
config: this.baseConfig
|
616
597
|
};
|
617
598
|
|
618
599
|
for (const row of rowsDom) {
|
@@ -768,7 +749,7 @@ export default {
|
|
768
749
|
handleClear() {
|
769
750
|
this.widgetFormData = {
|
770
751
|
list: [],
|
771
|
-
config: baseConfig
|
752
|
+
config: this.baseConfig
|
772
753
|
};
|
773
754
|
|
774
755
|
this.widgetFormSelect = {};
|