@panpanzhao/component-ui 0.0.47 → 1.0.0

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.
@@ -3073,9 +3073,13 @@ form_query_src_form.install = function (Vue) {
3073
3073
  }
3074
3074
  },
3075
3075
  created: function created() {
3076
- if (this.prop && this._formGroup) {
3077
- this._formGroup.formModel[this.prop] = this.formModel;
3076
+ if (this._formGroup) {
3077
+ var defaultVal = this.prop ? this._formGroup.formModel[this.prop] : this._formGroup.formModel;
3078
+ this.formModel = defaultVal || {};
3078
3079
  }
3080
+ // if (this.prop && this._formGroup) {
3081
+ // this._formGroup.formModel[this.prop] = this.formModel;
3082
+ // }
3079
3083
  },
3080
3084
  mounted: function mounted() {
3081
3085
  if (this.prop && this._formGroup && this.$refs.form) {
@@ -3155,6 +3159,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
3155
3159
  return [];
3156
3160
  }
3157
3161
  },
3162
+ defaultExpandVal: {
3163
+ type: Array | String
3164
+ },
3158
3165
  items: {
3159
3166
  type: Array,
3160
3167
  default: function _default() {
@@ -3324,9 +3331,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
3324
3331
  return item.render(h, _this5.formModel, item);
3325
3332
  }
3326
3333
  return h("el-collapse-item", {
3327
- "key": item.prop,
3334
+ "key": item.prop || item.label,
3328
3335
  "attrs": {
3329
- "name": item.prop,
3336
+ "name": item.prop || item.label,
3330
3337
  "title": item.label
3331
3338
  }
3332
3339
  }, [h("template", {
@@ -3362,7 +3369,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
3362
3369
  if (!filterItems.length > 0) {
3363
3370
  return null;
3364
3371
  }
3365
- this.openedCode = filterItems[0] && filterItems[0].prop;
3372
+ this.openedCode = this.defaultExpandVal || filterItems[0] && filterItems[0].prop;
3366
3373
  return h("div", {
3367
3374
  "class": ["form-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
3368
3375
  }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);
@@ -817,9 +817,13 @@ var components_form = __webpack_require__(4);
817
817
  }
818
818
  },
819
819
  created: function created() {
820
- if (this.prop && this._formGroup) {
821
- this._formGroup.formModel[this.prop] = this.formModel;
820
+ if (this._formGroup) {
821
+ var defaultVal = this.prop ? this._formGroup.formModel[this.prop] : this._formGroup.formModel;
822
+ this.formModel = defaultVal || {};
822
823
  }
824
+ // if (this.prop && this._formGroup) {
825
+ // this._formGroup.formModel[this.prop] = this.formModel;
826
+ // }
823
827
  },
824
828
  mounted: function mounted() {
825
829
  if (this.prop && this._formGroup && this.$refs.form) {
@@ -899,6 +903,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
899
903
  return [];
900
904
  }
901
905
  },
906
+ defaultExpandVal: {
907
+ type: Array | String
908
+ },
902
909
  items: {
903
910
  type: Array,
904
911
  default: function _default() {
@@ -1068,9 +1075,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
1068
1075
  return item.render(h, _this5.formModel, item);
1069
1076
  }
1070
1077
  return h("el-collapse-item", {
1071
- "key": item.prop,
1078
+ "key": item.prop || item.label,
1072
1079
  "attrs": {
1073
- "name": item.prop,
1080
+ "name": item.prop || item.label,
1074
1081
  "title": item.label
1075
1082
  }
1076
1083
  }, [h("template", {
@@ -1106,7 +1113,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
1106
1113
  if (!filterItems.length > 0) {
1107
1114
  return null;
1108
1115
  }
1109
- this.openedCode = filterItems[0] && filterItems[0].prop;
1116
+ this.openedCode = this.defaultExpandVal || filterItems[0] && filterItems[0].prop;
1110
1117
  return h("div", {
1111
1118
  "class": ["form-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
1112
1119
  }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);
@@ -648,9 +648,13 @@ var components_form = __webpack_require__(4);
648
648
  }
649
649
  },
650
650
  created: function created() {
651
- if (this.prop && this._formGroup) {
652
- this._formGroup.formModel[this.prop] = this.formModel;
651
+ if (this._formGroup) {
652
+ var defaultVal = this.prop ? this._formGroup.formModel[this.prop] : this._formGroup.formModel;
653
+ this.formModel = defaultVal || {};
653
654
  }
655
+ // if (this.prop && this._formGroup) {
656
+ // this._formGroup.formModel[this.prop] = this.formModel;
657
+ // }
654
658
  },
655
659
  mounted: function mounted() {
656
660
  if (this.prop && this._formGroup && this.$refs.form) {
@@ -730,6 +734,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
730
734
  return [];
731
735
  }
732
736
  },
737
+ defaultExpandVal: {
738
+ type: Array | String
739
+ },
733
740
  items: {
734
741
  type: Array,
735
742
  default: function _default() {
@@ -899,9 +906,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
899
906
  return item.render(h, _this5.formModel, item);
900
907
  }
901
908
  return h("el-collapse-item", {
902
- "key": item.prop,
909
+ "key": item.prop || item.label,
903
910
  "attrs": {
904
- "name": item.prop,
911
+ "name": item.prop || item.label,
905
912
  "title": item.label
906
913
  }
907
914
  }, [h("template", {
@@ -937,7 +944,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
937
944
  if (!filterItems.length > 0) {
938
945
  return null;
939
946
  }
940
- this.openedCode = filterItems[0] && filterItems[0].prop;
947
+ this.openedCode = this.defaultExpandVal || filterItems[0] && filterItems[0].prop;
941
948
  return h("div", {
942
949
  "class": ["form-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
943
950
  }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);
@@ -284,9 +284,13 @@ var components_form = __webpack_require__(4);
284
284
  }
285
285
  },
286
286
  created: function created() {
287
- if (this.prop && this._formGroup) {
288
- this._formGroup.formModel[this.prop] = this.formModel;
287
+ if (this._formGroup) {
288
+ var defaultVal = this.prop ? this._formGroup.formModel[this.prop] : this._formGroup.formModel;
289
+ this.formModel = defaultVal || {};
289
290
  }
291
+ // if (this.prop && this._formGroup) {
292
+ // this._formGroup.formModel[this.prop] = this.formModel;
293
+ // }
290
294
  },
291
295
  mounted: function mounted() {
292
296
  if (this.prop && this._formGroup && this.$refs.form) {
@@ -366,6 +370,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
366
370
  return [];
367
371
  }
368
372
  },
373
+ defaultExpandVal: {
374
+ type: Array | String
375
+ },
369
376
  items: {
370
377
  type: Array,
371
378
  default: function _default() {
@@ -535,9 +542,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
535
542
  return item.render(h, _this5.formModel, item);
536
543
  }
537
544
  return h("el-collapse-item", {
538
- "key": item.prop,
545
+ "key": item.prop || item.label,
539
546
  "attrs": {
540
- "name": item.prop,
547
+ "name": item.prop || item.label,
541
548
  "title": item.label
542
549
  }
543
550
  }, [h("template", {
@@ -573,7 +580,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
573
580
  if (!filterItems.length > 0) {
574
581
  return null;
575
582
  }
576
- this.openedCode = filterItems[0] && filterItems[0].prop;
583
+ this.openedCode = this.defaultExpandVal || filterItems[0] && filterItems[0].prop;
577
584
  return h("div", {
578
585
  "class": ["form-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
579
586
  }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);
@@ -638,9 +638,13 @@ var components_form = __webpack_require__(4);
638
638
  }
639
639
  },
640
640
  created: function created() {
641
- if (this.prop && this._formGroup) {
642
- this._formGroup.formModel[this.prop] = this.formModel;
641
+ if (this._formGroup) {
642
+ var defaultVal = this.prop ? this._formGroup.formModel[this.prop] : this._formGroup.formModel;
643
+ this.formModel = defaultVal || {};
643
644
  }
645
+ // if (this.prop && this._formGroup) {
646
+ // this._formGroup.formModel[this.prop] = this.formModel;
647
+ // }
644
648
  },
645
649
  mounted: function mounted() {
646
650
  if (this.prop && this._formGroup && this.$refs.form) {
@@ -720,6 +724,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
720
724
  return [];
721
725
  }
722
726
  },
727
+ defaultExpandVal: {
728
+ type: Array | String
729
+ },
723
730
  items: {
724
731
  type: Array,
725
732
  default: function _default() {
@@ -889,9 +896,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
889
896
  return item.render(h, _this5.formModel, item);
890
897
  }
891
898
  return h("el-collapse-item", {
892
- "key": item.prop,
899
+ "key": item.prop || item.label,
893
900
  "attrs": {
894
- "name": item.prop,
901
+ "name": item.prop || item.label,
895
902
  "title": item.label
896
903
  }
897
904
  }, [h("template", {
@@ -927,7 +934,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
927
934
  if (!filterItems.length > 0) {
928
935
  return null;
929
936
  }
930
- this.openedCode = filterItems[0] && filterItems[0].prop;
937
+ this.openedCode = this.defaultExpandVal || filterItems[0] && filterItems[0].prop;
931
938
  return h("div", {
932
939
  "class": ["form-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
933
940
  }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);
@@ -817,9 +817,13 @@ var components_form = __webpack_require__(4);
817
817
  }
818
818
  },
819
819
  created: function created() {
820
- if (this.prop && this._formGroup) {
821
- this._formGroup.formModel[this.prop] = this.formModel;
820
+ if (this._formGroup) {
821
+ var defaultVal = this.prop ? this._formGroup.formModel[this.prop] : this._formGroup.formModel;
822
+ this.formModel = defaultVal || {};
822
823
  }
824
+ // if (this.prop && this._formGroup) {
825
+ // this._formGroup.formModel[this.prop] = this.formModel;
826
+ // }
823
827
  },
824
828
  mounted: function mounted() {
825
829
  if (this.prop && this._formGroup && this.$refs.form) {
@@ -899,6 +903,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
899
903
  return [];
900
904
  }
901
905
  },
906
+ defaultExpandVal: {
907
+ type: Array | String
908
+ },
902
909
  items: {
903
910
  type: Array,
904
911
  default: function _default() {
@@ -1068,9 +1075,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
1068
1075
  return item.render(h, _this5.formModel, item);
1069
1076
  }
1070
1077
  return h("el-collapse-item", {
1071
- "key": item.prop,
1078
+ "key": item.prop || item.label,
1072
1079
  "attrs": {
1073
- "name": item.prop,
1080
+ "name": item.prop || item.label,
1074
1081
  "title": item.label
1075
1082
  }
1076
1083
  }, [h("template", {
@@ -1106,7 +1113,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
1106
1113
  if (!filterItems.length > 0) {
1107
1114
  return null;
1108
1115
  }
1109
- this.openedCode = filterItems[0] && filterItems[0].prop;
1116
+ this.openedCode = this.defaultExpandVal || filterItems[0] && filterItems[0].prop;
1110
1117
  return h("div", {
1111
1118
  "class": ["form-group", "is-" + (this.control === "Tab" ? "tab" : "collapse")]
1112
1119
  }, [this.control === "Tab" ? this.renderTab(h, filterItems) : this.renderCollapse(h, filterItems)]);