@panpanzhao/component-ui 0.0.46 → 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)]);
@@ -7132,8 +7139,8 @@ table_operate_src.install = function (Vue) {
7132
7139
  Vue.component(table_operate_src.name, table_operate_src);
7133
7140
  };
7134
7141
  /* harmony default export */ var table_operate = (table_operate_src);
7135
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=8ec3f608&
7136
- var srcvue_type_template_id_8ec3f608_render = function render() {
7142
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=09a7f1dc&
7143
+ var srcvue_type_template_id_09a7f1dc_render = function render() {
7137
7144
  var _vm = this,
7138
7145
  _c = _vm._self._c
7139
7146
  return _c("div", { staticClass: "crud" }, [
@@ -7200,11 +7207,11 @@ var srcvue_type_template_id_8ec3f608_render = function render() {
7200
7207
  ),
7201
7208
  ])
7202
7209
  }
7203
- var srcvue_type_template_id_8ec3f608_staticRenderFns = []
7204
- srcvue_type_template_id_8ec3f608_render._withStripped = true
7210
+ var srcvue_type_template_id_09a7f1dc_staticRenderFns = []
7211
+ srcvue_type_template_id_09a7f1dc_render._withStripped = true
7205
7212
 
7206
7213
 
7207
- // CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=8ec3f608&
7214
+ // CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=09a7f1dc&
7208
7215
 
7209
7216
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=script&lang=js&
7210
7217
 
@@ -7236,7 +7243,8 @@ srcvue_type_template_id_8ec3f608_render._withStripped = true
7236
7243
  message: {
7237
7244
  success: {
7238
7245
  message: '添加成功',
7239
- type: 'success'
7246
+ type: 'success',
7247
+ showClose: true
7240
7248
  }
7241
7249
  }
7242
7250
  }, this.create);
@@ -7251,7 +7259,8 @@ srcvue_type_template_id_8ec3f608_render._withStripped = true
7251
7259
  message: {
7252
7260
  success: {
7253
7261
  message: '修改成功',
7254
- type: 'success'
7262
+ type: 'success',
7263
+ showClose: true
7255
7264
  }
7256
7265
  }
7257
7266
  }, this.update);
@@ -7574,8 +7583,8 @@ srcvue_type_template_id_8ec3f608_render._withStripped = true
7574
7583
 
7575
7584
  var crud_src_component = normalizeComponent(
7576
7585
  components_crud_srcvue_type_script_lang_js_,
7577
- srcvue_type_template_id_8ec3f608_render,
7578
- srcvue_type_template_id_8ec3f608_staticRenderFns,
7586
+ srcvue_type_template_id_09a7f1dc_render,
7587
+ srcvue_type_template_id_09a7f1dc_staticRenderFns,
7579
7588
  false,
7580
7589
  null,
7581
7590
  null,
@@ -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)]);
@@ -2106,7 +2113,7 @@ module.exports = require("element-ui/lib/message-box");
2106
2113
  // ESM COMPAT FLAG
2107
2114
  __webpack_require__.r(__webpack_exports__);
2108
2115
 
2109
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=8ec3f608&
2116
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=09a7f1dc&
2110
2117
  var render = function render() {
2111
2118
  var _vm = this,
2112
2119
  _c = _vm._self._c
@@ -2178,7 +2185,7 @@ var staticRenderFns = []
2178
2185
  render._withStripped = true
2179
2186
 
2180
2187
 
2181
- // CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=8ec3f608&
2188
+ // CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=09a7f1dc&
2182
2189
 
2183
2190
  // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
2184
2191
  var table_search_ = __webpack_require__(29);
@@ -2234,7 +2241,8 @@ var external_lodash_ = __webpack_require__(2);
2234
2241
  message: {
2235
2242
  success: {
2236
2243
  message: '添加成功',
2237
- type: 'success'
2244
+ type: 'success',
2245
+ showClose: true
2238
2246
  }
2239
2247
  }
2240
2248
  }, this.create);
@@ -2249,7 +2257,8 @@ var external_lodash_ = __webpack_require__(2);
2249
2257
  message: {
2250
2258
  success: {
2251
2259
  message: '修改成功',
2252
- type: 'success'
2260
+ type: 'success',
2261
+ showClose: true
2253
2262
  }
2254
2263
  }
2255
2264
  }, this.update);
@@ -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)]);