@form-create/view-design 2.5.7 → 2.5.11

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @form-create/view-design v2.5.7
2
+ * @form-create/view-design v2.5.11
3
3
  * (c) 2018-2021 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -255,17 +255,9 @@
255
255
  var Checkbox = {
256
256
  name: NAME,
257
257
  props: {
258
- formCreateRule: {
258
+ formCreateInject: {
259
259
  type: Object,
260
- "default": function _default() {
261
- return {};
262
- }
263
- },
264
- formCreateOptions: {
265
- type: Array,
266
- "default": function _default() {
267
- return [];
268
- }
260
+ required: true
269
261
  },
270
262
  value: {
271
263
  type: Array,
@@ -286,7 +278,7 @@
286
278
  },
287
279
  methods: {
288
280
  onInput: function onInput(n) {
289
- this.$emit('input', this.formCreateOptions.filter(function (opt) {
281
+ this.$emit('input', this.formCreateInject.options.filter(function (opt) {
290
282
  return n.indexOf(opt.label) !== -1;
291
283
  }).map(function (opt) {
292
284
  return opt.value;
@@ -297,7 +289,7 @@
297
289
  update: function update() {
298
290
  var _this = this;
299
291
 
300
- this.trueValue = this.value ? this.formCreateOptions.filter(function (opt) {
292
+ this.trueValue = this.value ? this.formCreateInject.options.filter(function (opt) {
301
293
  return _this.value.indexOf(opt.value) !== -1;
302
294
  }).map(function (option) {
303
295
  return option.label;
@@ -309,14 +301,14 @@
309
301
  },
310
302
  render: function render() {
311
303
  var h = arguments[0];
312
- return h("CheckboxGroup", helper([{}, this.formCreateRule, {
304
+ return h("CheckboxGroup", helper([{}, this.formCreateInject.prop, {
313
305
  "attrs": {
314
306
  "value": this.trueValue
315
307
  },
316
308
  "on": {
317
309
  "input": this.onInput
318
310
  }
319
- }]), [this.formCreateOptions.map(function (opt, index) {
311
+ }]), [this.formCreateInject.options.map(function (opt, index) {
320
312
  var props = _objectSpread2({}, opt);
321
313
 
322
314
  delete props.value;
@@ -369,7 +361,10 @@
369
361
  return {
370
362
  name: NAME$1,
371
363
  props: {
372
- formCreateField: String,
364
+ formCreateInject: {
365
+ type: Object,
366
+ required: true
367
+ },
373
368
  type: {
374
369
  type: String,
375
370
  "default": 'input'
@@ -559,7 +554,7 @@
559
554
  }, _toConsumableArray(children));
560
555
  },
561
556
  valid: function valid(f) {
562
- var field = this.formCreateField || this.field;
557
+ var field = this.formCreateInject.field || this.field;
563
558
  if (field && f !== field) throw new Error('[frame]无效的字段值');
564
559
  },
565
560
  makeIcons: function makeIcons(val, index) {
@@ -660,7 +655,6 @@
660
655
  }]))]);
661
656
  },
662
657
  handleClick: function handleClick(src) {
663
- if (this.disabled) return;
664
658
  return this.onHandle(src);
665
659
  },
666
660
  handleRemove: function handleRemove(src) {
@@ -830,17 +824,9 @@
830
824
  var Radio = {
831
825
  name: NAME$2,
832
826
  props: {
833
- formCreateRule: {
827
+ formCreateInject: {
834
828
  type: Object,
835
- "default": function _default() {
836
- return {};
837
- }
838
- },
839
- formCreateOptions: {
840
- type: Array,
841
- "default": function _default() {
842
- return [];
843
- }
829
+ required: true
844
830
  },
845
831
  value: {}
846
832
  },
@@ -856,7 +842,7 @@
856
842
  },
857
843
  methods: {
858
844
  onInput: function onInput(n) {
859
- this.$emit('input', this.formCreateOptions.filter(function (opt) {
845
+ this.$emit('input', this.formCreateInject.options.filter(function (opt) {
860
846
  return opt.label === n;
861
847
  }).reduce(function (initial, opt) {
862
848
  return opt.value;
@@ -865,7 +851,7 @@
865
851
  update: function update() {
866
852
  var _this = this;
867
853
 
868
- this.trueValue = this.formCreateOptions.filter(function (opt) {
854
+ this.trueValue = this.formCreateInject.options.filter(function (opt) {
869
855
  return opt.value === _this.value;
870
856
  }).reduce(function (initial, opt) {
871
857
  return opt.label;
@@ -877,14 +863,14 @@
877
863
  },
878
864
  render: function render() {
879
865
  var h = arguments[0];
880
- return h("RadioGroup", helper([{}, this.formCreateRule, {
866
+ return h("RadioGroup", helper([{}, this.formCreateInject.prop, {
881
867
  "attrs": {
882
868
  "value": this.trueValue
883
869
  },
884
870
  "on": {
885
871
  "input": this.onInput
886
872
  }
887
- }]), [this.formCreateOptions.map(function (opt, index) {
873
+ }]), [this.formCreateInject.options.map(function (opt, index) {
888
874
  var props = _objectSpread2({}, opt);
889
875
 
890
876
  delete props.value;
@@ -924,15 +910,13 @@
924
910
  name: NAME$3,
925
911
  functional: true,
926
912
  props: {
927
- formCreateOptions: {
928
- type: Array,
929
- "default": function _default() {
930
- return [];
931
- }
913
+ formCreateInject: {
914
+ type: Object,
915
+ required: true
932
916
  }
933
917
  },
934
918
  render: function render(h, ctx) {
935
- return h("Select", helper([{}, ctx.data]), [ctx.props.formCreateOptions.map(function (props, index) {
919
+ return h("Select", helper([{}, ctx.data]), [ctx.props.formCreateInject.options.map(function (props, index) {
936
920
  var slot = props.slot;
937
921
  return h("Option", {
938
922
  "props": _objectSpread2({}, props),
@@ -948,13 +932,9 @@
948
932
  var Tree = {
949
933
  name: NAME$4,
950
934
  props: {
951
- formCreateRule: {
935
+ formCreateInject: {
952
936
  type: Object,
953
- "default": function _default() {
954
- return {
955
- props: {}
956
- };
957
- }
937
+ required: true
958
938
  },
959
939
  type: {
960
940
  type: String,
@@ -983,7 +963,7 @@
983
963
  methods: {
984
964
  setStatus: function setStatus(value) {
985
965
  var n = toArray(value);
986
- var data = this.formCreateRule.props.data;
966
+ var data = this.formCreateInject.prop.props.data;
987
967
  this.type === 'selected' ? this.checked(data, n, 'selected') : this.checked(data, n, 'checked');
988
968
  this.$forceUpdate();
989
969
  },
@@ -1012,14 +992,11 @@
1012
992
  on['on-check-change'] = this.onInput;
1013
993
  }
1014
994
 
1015
- return h("Tree", helper([{}, this.formCreateRule, {
995
+ return h("Tree", helper([{}, this.formCreateInject.prop, {
1016
996
  "ref": "tree"
1017
997
  }, {
1018
998
  "on": on
1019
999
  }]), [getSlot(this.$slots)]);
1020
- },
1021
- mounted: function mounted() {
1022
- this.onInput(this.type === 'selected' ? this.$refs.tree.getSelectedNodes() : this.$refs.tree.getCheckedNodes());
1023
1000
  }
1024
1001
  };
1025
1002
 
@@ -1042,13 +1019,9 @@
1042
1019
  return {
1043
1020
  name: NAME$5,
1044
1021
  props: {
1045
- formCreateRule: {
1022
+ formCreateInject: {
1046
1023
  type: Object,
1047
- "default": function _default() {
1048
- return {
1049
- props: {}
1050
- };
1051
- }
1024
+ required: true
1052
1025
  },
1053
1026
  onHandle: {
1054
1027
  type: Function,
@@ -1086,8 +1059,8 @@
1086
1059
  };
1087
1060
  },
1088
1061
  created: function created() {
1089
- if (this.formCreateRule.props.showUploadList === undefined) this.formCreateRule.props.showUploadList = false;
1090
- this.formCreateRule.props.defaultFileList = toArray(this.value).map(parseFile);
1062
+ if (this.formCreateInject.prop.props.showUploadList === undefined) this.formCreateInject.prop.props.showUploadList = false;
1063
+ this.formCreateInject.prop.props.defaultFileList = toArray(this.value).map(parseFile);
1091
1064
  },
1092
1065
  watch: {
1093
1066
  value: function value(n) {
@@ -1107,14 +1080,13 @@
1107
1080
  return unique;
1108
1081
  },
1109
1082
  isDisabled: function isDisabled() {
1110
- return this.formCreateRule.props.disabled === true;
1083
+ return this.formCreateInject.prop.props.disabled === true;
1111
1084
  },
1112
1085
  onRemove: function onRemove(file) {
1113
1086
  if (this.isDisabled()) return;
1114
1087
  this.$refs.upload.handleRemove(file);
1115
1088
  },
1116
1089
  handleClick: function handleClick(file) {
1117
- if (this.isDisabled()) return;
1118
1090
  this.onHandle(file);
1119
1091
  },
1120
1092
  makeItem: function makeItem(file, index) {
@@ -1207,7 +1179,7 @@
1207
1179
  makeUpload: function makeUpload() {
1208
1180
  var h = this.$createElement;
1209
1181
  var isShow = !this.maxLength || this.maxLength > this.uploadList.length;
1210
- return h("Upload", helper([{}, this.formCreateRule, {
1182
+ return h("Upload", helper([{}, this.formCreateInject.prop, {
1211
1183
  "ref": "upload",
1212
1184
  "style": {
1213
1185
  display: 'inline-block'
@@ -1242,13 +1214,13 @@
1242
1214
  var h = arguments[0];
1243
1215
 
1244
1216
  if (this.$refs.upload) {
1245
- if (this.formCreateRule.props.showUploadList === undefined) this.formCreateRule.props.showUploadList = this.$refs.upload.showUploadList;
1246
- this.formCreateRule.props.defaultFileList = this.$refs.upload.defaultFileList;
1217
+ if (this.formCreateInject.prop.props.showUploadList === undefined) this.formCreateInject.prop.props.showUploadList = this.$refs.upload.showUploadList;
1218
+ this.formCreateInject.prop.props.defaultFileList = this.$refs.upload.defaultFileList;
1247
1219
  }
1248
1220
 
1249
1221
  return h("div", {
1250
1222
  "class": "_fc-upload"
1251
- }, [[this.formCreateRule.props.showUploadList ? [] : this.makeFiles(), this.makeUpload()], h("Modal", {
1223
+ }, [[this.formCreateInject.prop.props.showUploadList ? [] : this.makeFiles(), this.makeUpload()], h("Modal", {
1252
1224
  "attrs": {
1253
1225
  "title": this.modalTitle,
1254
1226
  "footerHide": true
@@ -1301,7 +1273,10 @@
1301
1273
  rules: Array,
1302
1274
  expand: Number,
1303
1275
  options: Object,
1304
- formCreate: Object,
1276
+ formCreateInject: {
1277
+ type: Object,
1278
+ required: true
1279
+ },
1305
1280
  button: {
1306
1281
  type: Boolean,
1307
1282
  "default": true
@@ -1324,6 +1299,10 @@
1324
1299
  type: Boolean,
1325
1300
  "default": false
1326
1301
  },
1302
+ syncDisabled: {
1303
+ type: Boolean,
1304
+ "default": true
1305
+ },
1327
1306
  fontSize: {
1328
1307
  type: Number,
1329
1308
  "default": 28
@@ -1359,10 +1338,12 @@
1359
1338
  },
1360
1339
  watch: {
1361
1340
  disabled: function disabled(n) {
1362
- var lst = this.cacheRule;
1363
- Object.keys(lst).forEach(function (k) {
1364
- lst[k].$f.disabled(n);
1365
- });
1341
+ if (this.syncDisabled) {
1342
+ var lst = this.cacheRule;
1343
+ Object.keys(lst).forEach(function (k) {
1344
+ lst[k].$f.disabled(n);
1345
+ });
1346
+ }
1366
1347
  },
1367
1348
  expand: function expand(n) {
1368
1349
  var d = n - this.value.length;
@@ -1453,7 +1434,7 @@
1453
1434
  addRule: function addRule(i, emit) {
1454
1435
  var _this3 = this;
1455
1436
 
1456
- var rule = this.$formCreate.copyRules(this.formRule);
1437
+ var rule = this.formCreateInject.form.copyRules(this.formRule);
1457
1438
  var options = this.options ? _objectSpread2({}, this.options) : {
1458
1439
  submitBtn: false,
1459
1440
  resetBtn: false
@@ -1476,7 +1457,9 @@
1476
1457
  this.cacheRule[key].$f = $f;
1477
1458
  this.subForm();
1478
1459
  this.$nextTick(function () {
1479
- $f.disabled(_this4.disabled);
1460
+ if (_this4.syncDisabled) {
1461
+ $f.disabled(_this4.disabled);
1462
+ }
1480
1463
 
1481
1464
  _this4.$emit('itemMounted', $f, Object.keys(_this4.cacheRule).indexOf(key));
1482
1465
  });
@@ -1484,7 +1467,7 @@
1484
1467
  subForm: function subForm() {
1485
1468
  var _this5 = this;
1486
1469
 
1487
- this.$emit('fc.sub-form', Object.keys(this.cacheRule).map(function (k) {
1470
+ this.formCreateInject.subForm(Object.keys(this.cacheRule).map(function (k) {
1488
1471
  return _this5.cacheRule[k].$f;
1489
1472
  }));
1490
1473
  },
@@ -1659,6 +1642,9 @@
1659
1642
  }
1660
1643
  }, [_this9.makeIcon(keys.length, index, key)]) : null]);
1661
1644
  })]);
1645
+ },
1646
+ beforeMount: function beforeMount() {
1647
+ this.$options.components.FormCreate = this.formCreateInject.form.$form();
1662
1648
  }
1663
1649
  };
1664
1650
  }
@@ -1678,7 +1664,10 @@
1678
1664
  props: {
1679
1665
  rule: Array,
1680
1666
  options: Object,
1681
- formCreate: Object,
1667
+ formCreateInject: {
1668
+ type: Object,
1669
+ required: true
1670
+ },
1682
1671
  value: {
1683
1672
  type: Object,
1684
1673
  "default": function _default() {
@@ -1688,6 +1677,10 @@
1688
1677
  disabled: {
1689
1678
  type: Boolean,
1690
1679
  "default": false
1680
+ },
1681
+ syncDisabled: {
1682
+ type: Boolean,
1683
+ "default": true
1691
1684
  }
1692
1685
  },
1693
1686
  data: function data() {
@@ -1698,7 +1691,7 @@
1698
1691
  },
1699
1692
  watch: {
1700
1693
  disabled: function disabled(n) {
1701
- this.cacheRule.$f.disabled(n);
1694
+ this.syncDisabled && this.cacheRule.$f.disabled(n);
1702
1695
  },
1703
1696
  value: function value(n) {
1704
1697
  this.setValue(n);
@@ -1737,13 +1730,13 @@
1737
1730
  this.cacheRule.$f = $f;
1738
1731
  this.subForm();
1739
1732
  this.$nextTick(function () {
1740
- $f.disabled(_this.disabled);
1733
+ _this.syncDisabled && $f.disabled(_this.disabled);
1741
1734
 
1742
1735
  _this.$emit('itemMounted', $f);
1743
1736
  });
1744
1737
  },
1745
1738
  subForm: function subForm() {
1746
- this.$emit('fc.sub-form', this.cacheRule.$f);
1739
+ this.formCreateInject.subForm(this.cacheRule.$f);
1747
1740
  },
1748
1741
  emitEvent: function emitEvent(name) {
1749
1742
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -1774,6 +1767,9 @@
1774
1767
  "extendOption": true
1775
1768
  }
1776
1769
  }]));
1770
+ },
1771
+ beforeMount: function beforeMount() {
1772
+ this.$options.components.FormCreate = this.formCreateInject.form.$form();
1777
1773
  }
1778
1774
  };
1779
1775
 
@@ -1842,6 +1838,7 @@
1842
1838
  isShow: true,
1843
1839
  unique: 1,
1844
1840
  renderRule: _toConsumableArray(this.rule || []),
1841
+ ctxInject: {},
1845
1842
  updateValue: ''
1846
1843
  };
1847
1844
  },
@@ -1892,10 +1889,8 @@
1892
1889
 
1893
1890
  var _this$$options$propsD = this.$options.propsData,
1894
1891
  rule = _this$$options$propsD.rule,
1895
- option = _this$$options$propsD.option,
1896
- value = _this$$options$propsD.value;
1892
+ option = _this$$options$propsD.option;
1897
1893
  this.formCreate = new FormCreate(this, rule, option);
1898
- extend(this.formCreate.options.formData, value || {});
1899
1894
  Object.keys(this.formCreate.prop).forEach(function (k) {
1900
1895
  extend(_this2.$options[k], _this2.formCreate.prop[k]);
1901
1896
  });
@@ -1972,9 +1967,9 @@
1972
1967
  };
1973
1968
  };
1974
1969
 
1975
- var keyAttrs = ['type', 'slot', 'emitPrefix', 'value', 'name', 'native', 'hidden', 'display', 'inject', 'options', 'emit', 'nativeEmit', 'link', 'prefix', 'suffix', 'update', 'sync', 'optionsTo'];
1970
+ var keyAttrs = ['type', 'slot', 'emitPrefix', 'value', 'name', 'native', 'hidden', 'display', 'inject', 'options', 'emit', 'nativeEmit', 'link', 'prefix', 'suffix', 'update', 'sync', 'optionsTo', 'key'];
1976
1971
  var arrayAttrs = ['validate', 'children', 'control'];
1977
- var normalAttrs = ['effect'];
1972
+ var normalAttrs = ['effect', 'deep'];
1978
1973
  function attrs() {
1979
1974
  return [].concat(keyAttrs, _toConsumableArray(normalMerge$1), _toConsumableArray(toArrayMerge$1), _toConsumableArray(functionalMerge$1), arrayAttrs, normalAttrs);
1980
1975
  }
@@ -2007,6 +2002,12 @@
2007
2002
  }
2008
2003
 
2009
2004
  origin[key] = deepExtend(origin[key], clone, mode);
2005
+ } else if (is.Undef(clone)) {
2006
+ $set(origin, key, clone);
2007
+ } else if (clone.__json !== undefined) {
2008
+ $set(origin, key, clone.__json);
2009
+ } else if (clone.__origin !== undefined) {
2010
+ $set(origin, key, clone.__origin);
2010
2011
  } else {
2011
2012
  $set(origin, key, clone);
2012
2013
  }
@@ -2040,6 +2041,7 @@
2040
2041
  var PREFIX = '[[FORM-CREATE-PREFIX-';
2041
2042
  var SUFFIX = '-FORM-CREATE-SUFFIX]]';
2042
2043
  var $T = '$FN:';
2044
+ var $TX = '$FNX:';
2043
2045
  var FUNCTION = 'function';
2044
2046
  function toJson(obj, space) {
2045
2047
  return JSON.stringify(deepExtend([], obj, true), function (key, val) {
@@ -2049,7 +2051,11 @@
2049
2051
  return val;
2050
2052
  }
2051
2053
 
2052
- if (val.__inject) val = val.__origin;
2054
+ if (hasProperty(val, '__json')) {
2055
+ return val.__json;
2056
+ }
2057
+
2058
+ if (val.__origin) val = val.__origin;
2053
2059
  if (val.__emit) return undefined;
2054
2060
  return PREFIX + val + SUFFIX;
2055
2061
  }, space);
@@ -2060,26 +2066,32 @@
2060
2066
  }
2061
2067
 
2062
2068
  function parseFn(fn, mode) {
2063
- if (fn && is.String(fn)) {
2069
+ if (fn && is.String(fn) && fn.length > 4) {
2064
2070
  var v = fn.trim();
2065
2071
  var flag = false;
2066
2072
 
2067
- if (v.indexOf(SUFFIX) > 0 && v.indexOf(PREFIX) === 0) {
2068
- v = v.replace(SUFFIX, '').replace(PREFIX, '');
2069
- flag = true;
2070
- } else if (v.indexOf($T) === 0) {
2071
- v = v.replace($T, '');
2072
- flag = true;
2073
- } else if (!mode && v.indexOf(FUNCTION) === 0 && v !== FUNCTION) {
2074
- flag = true;
2075
- }
2076
-
2077
- if (!flag) return fn;
2078
-
2079
2073
  try {
2080
- return makeFn(v.indexOf(FUNCTION) === -1 && v.indexOf('(') !== 0 ? FUNCTION + ' ' + v : v);
2074
+ if (v.indexOf(SUFFIX) > 0 && v.indexOf(PREFIX) === 0) {
2075
+ v = v.replace(SUFFIX, '').replace(PREFIX, '');
2076
+ flag = true;
2077
+ } else if (v.indexOf($T) === 0) {
2078
+ v = v.replace($T, '');
2079
+ flag = true;
2080
+ } else if (v.indexOf($TX) === 0) {
2081
+ v = makeFn('function($inject){' + v.replace($TX, '') + '}');
2082
+ v.__json = fn;
2083
+ v.__inject = true;
2084
+ return v;
2085
+ } else if (!mode && v.indexOf(FUNCTION) === 0 && v !== FUNCTION) {
2086
+ flag = true;
2087
+ }
2088
+
2089
+ if (!flag) return fn;
2090
+ var val = makeFn(v.indexOf(FUNCTION) === -1 && v.indexOf('(') !== 0 ? FUNCTION + ' ' + v : v);
2091
+ val.__json = fn;
2092
+ return val;
2081
2093
  } catch (e) {
2082
- err("\u89E3\u6790\u5931\u8D25:".concat(v));
2094
+ err("\u89E3\u6790\u5931\u8D25:".concat(v, "\n\nerr: ").concat(e));
2083
2095
  return undefined;
2084
2096
  }
2085
2097
  }
@@ -2092,6 +2104,7 @@
2092
2104
  return parseFn(v, mode);
2093
2105
  });
2094
2106
  }
2107
+
2095
2108
  function enumerable(value, writable) {
2096
2109
  return {
2097
2110
  value: value,
@@ -2169,7 +2182,7 @@
2169
2182
  to;
2170
2183
  (idx || '').split('.').forEach(function (v) {
2171
2184
  if (to) {
2172
- if (!_data[to]) {
2185
+ if (!_data[to] || _typeof(_data[to]) != 'object') {
2173
2186
  _data[to] = {};
2174
2187
  }
2175
2188
 
@@ -2267,13 +2280,6 @@
2267
2280
  return deepCopy(value);
2268
2281
  }
2269
2282
 
2270
- function byRules(ctxs, origin) {
2271
- return Object.keys(ctxs).reduce(function (initial, key) {
2272
- initial[key] = origin ? ctxs[key].origin : ctxs[key].rule;
2273
- return initial;
2274
- }, {});
2275
- }
2276
-
2277
2283
  function Api(h) {
2278
2284
  function tidyFields(fields) {
2279
2285
  if (is.Undef(fields)) fields = h.fields();else if (!Array.isArray(fields)) fields = [fields];
@@ -2282,10 +2288,10 @@
2282
2288
 
2283
2289
  function props(fields, key, val) {
2284
2290
  tidyFields(fields).forEach(function (field) {
2285
- var ctx = h.getCtx(field);
2286
- if (!ctx) return;
2287
- $set(ctx.rule, key, val);
2288
- h.$render.clearCache(ctx);
2291
+ h.getCtxs(field).forEach(function (ctx) {
2292
+ $set(ctx.rule, key, val);
2293
+ h.$render.clearCache(ctx);
2294
+ });
2289
2295
  });
2290
2296
  }
2291
2297
 
@@ -2331,23 +2337,26 @@
2331
2337
 
2332
2338
  formData: function formData(fields) {
2333
2339
  return tidyFields(fields).reduce(function (initial, id) {
2334
- var ctx = h.fieldCtx[id];
2340
+ var ctx = h.getFieldCtx(id);
2335
2341
  if (!ctx) return initial;
2336
2342
  initial[ctx.field] = copy(ctx.rule.value);
2337
2343
  return initial;
2338
- }, {});
2344
+ }, copy(h.appendData));
2339
2345
  },
2340
2346
  getValue: function getValue(field) {
2341
- var ctx = h.fieldCtx[field];
2347
+ var ctx = h.getFieldCtx(field);
2342
2348
  if (!ctx) return;
2343
2349
  return copy(ctx.rule.value);
2344
2350
  },
2345
2351
  coverValue: function coverValue(formData) {
2346
2352
  h.deferSyncValue(function () {
2347
- Object.keys(h.fieldCtx).forEach(function (key) {
2348
- var ctx = h.fieldCtx[key];
2349
- if (!ctx) return h.appendData[key] = formData[key];
2350
- ctx.rule.value = hasProperty(formData, key) ? formData[key] : undefined;
2353
+ api.fields().forEach(function (key) {
2354
+ var ctxs = h.fieldCtx[key];
2355
+ if (!ctxs) return h.appendData[key] = formData[key];
2356
+ var flag = hasProperty(formData, key);
2357
+ ctxs.forEach(function (ctx) {
2358
+ ctx.rule.value = flag ? formData[key] : undefined;
2359
+ });
2351
2360
  });
2352
2361
  });
2353
2362
  },
@@ -2356,17 +2365,22 @@
2356
2365
  if (arguments.length >= 2) formData = _defineProperty({}, field, arguments[1]);
2357
2366
  h.deferSyncValue(function () {
2358
2367
  Object.keys(formData).forEach(function (key) {
2359
- var ctx = h.fieldCtx[key];
2360
- if (!ctx) return h.appendData[key] = formData[key];
2361
- ctx.rule.value = formData[key];
2368
+ var ctxs = h.fieldCtx[key];
2369
+ if (!ctxs) return h.appendData[key] = formData[key];
2370
+ ctxs.forEach(function (ctx) {
2371
+ ctx.rule.value = formData[key];
2372
+ });
2362
2373
  });
2363
2374
  });
2364
2375
  },
2365
2376
  removeField: function removeField(field) {
2366
2377
  var ctx = h.getCtx(field);
2367
- if (!ctx) return;
2368
- ctx.rm();
2369
- return ctx.origin;
2378
+ h.deferSyncValue(function () {
2379
+ h.getCtxs(field).forEach(function (ctx) {
2380
+ ctx.rm();
2381
+ });
2382
+ }, true);
2383
+ return ctx ? ctx.origin : undefined;
2370
2384
  },
2371
2385
  removeRule: function removeRule(rule) {
2372
2386
  var ctx = rule && byCtx(rule);
@@ -2382,10 +2396,8 @@
2382
2396
  return h.fields();
2383
2397
  },
2384
2398
  append: function append(rule, after, child) {
2385
- var fields = Object.keys(h.fieldCtx),
2386
- index = h.sort.length - 1,
2399
+ var index = h.sort.length - 1,
2387
2400
  rules;
2388
- if (rule.field && fields.indexOf(rule.field) > -1) return err("".concat(rule.field, " \u5B57\u6BB5\u5DF2\u5B58\u5728"), rule);
2389
2401
  var ctx = h.getCtx(after);
2390
2402
 
2391
2403
  if (ctx) {
@@ -2401,10 +2413,8 @@
2401
2413
  rules.splice(index + 1, 0, rule);
2402
2414
  },
2403
2415
  prepend: function prepend(rule, after, child) {
2404
- var fields = Object.keys(h.fieldCtx),
2405
- index = 0,
2416
+ var index = 0,
2406
2417
  rules;
2407
- if (rule.field && fields.indexOf(rule.field) > -1) return err("".concat(rule.field, " \u5B57\u6BB5\u5DF2\u5B58\u5728"), rule);
2408
2418
  var ctx = h.getCtx(after);
2409
2419
 
2410
2420
  if (ctx) {
@@ -2438,17 +2448,27 @@
2438
2448
  },
2439
2449
  disabled: function disabled(_disabled, fields) {
2440
2450
  tidyFields(fields).forEach(function (field) {
2441
- var ctx = h.fieldCtx[field];
2442
- if (!ctx) return;
2443
- $set(ctx.rule.props, 'disabled', !!_disabled);
2451
+ h.getCtxs(field).forEach(function (ctx) {
2452
+ $set(ctx.rule.props, 'disabled', !!_disabled);
2453
+ });
2444
2454
  });
2445
2455
  h.refresh();
2446
2456
  },
2447
2457
  model: function model(origin) {
2448
- return byRules(h.fieldCtx, origin);
2458
+ return h.fields().reduce(function (initial, key) {
2459
+ var ctx = h.fieldCtx[key][0];
2460
+ initial[key] = origin ? ctx.origin : ctx.rule;
2461
+ return initial;
2462
+ }, {});
2449
2463
  },
2450
2464
  component: function component(origin) {
2451
- return byRules(h.nameCtx, origin);
2465
+ return Object.keys(h.nameCtx).reduce(function (initial, key) {
2466
+ var ctx = h.nameCtx[key].map(function (ctx) {
2467
+ return origin ? ctx.origin : ctx.rule;
2468
+ });
2469
+ initial[key] = ctx.length === 1 ? ctx[0] : ctx;
2470
+ return initial;
2471
+ }, {});
2452
2472
  },
2453
2473
  bind: function bind() {
2454
2474
  return api.form;
@@ -2466,25 +2486,39 @@
2466
2486
  });
2467
2487
  },
2468
2488
  sync: function sync(field) {
2469
- var ctx = is.Object(field) ? byCtx(field) : h.getCtx(field);
2489
+ if (Array.isArray(field)) {
2490
+ field.forEach(function (v) {
2491
+ return api.sync(v);
2492
+ });
2493
+ return;
2494
+ }
2470
2495
 
2471
- if (ctx && !ctx.deleted) {
2472
- var subForm = h.subForm[field];
2496
+ var ctxs = is.Object(field) ? byCtx(field) : h.getCtxs(field);
2473
2497
 
2474
- if (subForm) {
2475
- if (Array.isArray(subForm)) {
2476
- subForm.forEach(function (form) {
2477
- form.refresh();
2478
- });
2479
- } else if (subForm) {
2480
- subForm.refresh();
2481
- }
2482
- } //ctx.updateKey(true);
2498
+ if (!ctxs) {
2499
+ return;
2500
+ }
2483
2501
 
2502
+ ctxs = Array.isArray(ctxs) ? ctxs : [ctxs];
2503
+ ctxs.forEach(function (ctx) {
2504
+ if (!ctx.deleted) {
2505
+ var subForm = h.subForm[ctx.id];
2506
+
2507
+ if (subForm) {
2508
+ if (Array.isArray(subForm)) {
2509
+ subForm.forEach(function (form) {
2510
+ form.refresh();
2511
+ });
2512
+ } else if (subForm) {
2513
+ subForm.refresh();
2514
+ }
2515
+ } //ctx.updateKey(true);
2484
2516
 
2485
- h.$render.clearCache(ctx);
2486
- h.refresh();
2487
- }
2517
+
2518
+ h.$render.clearCache(ctx);
2519
+ }
2520
+ });
2521
+ h.refresh();
2488
2522
  },
2489
2523
  refresh: function refresh() {
2490
2524
  allSubForm().forEach(function (sub) {
@@ -2507,8 +2541,9 @@
2507
2541
  h.changeStatus = false;
2508
2542
  },
2509
2543
  updateRule: function updateRule(id, rule) {
2510
- var r = api.getRule(id);
2511
- r && extend(r, rule);
2544
+ h.getCtxs(id).forEach(function (ctx) {
2545
+ extend(ctx.rule, rule);
2546
+ });
2512
2547
  },
2513
2548
  updateRules: function updateRules(rules) {
2514
2549
  Object.keys(rules).forEach(function (id) {
@@ -2516,8 +2551,9 @@
2516
2551
  });
2517
2552
  },
2518
2553
  mergeRule: function mergeRule$1(id, rule) {
2519
- var ctx = h.getCtx(id);
2520
- ctx && mergeRule(ctx.rule, rule);
2554
+ h.getCtxs(id).forEach(function (ctx) {
2555
+ mergeRule(ctx.rule, rule);
2556
+ });
2521
2557
  },
2522
2558
  mergeRules: function mergeRules(rules) {
2523
2559
  Object.keys(rules).forEach(function (id) {
@@ -2550,13 +2586,12 @@
2550
2586
  api.refresh();
2551
2587
  },
2552
2588
  resetFields: function resetFields(fields) {
2553
- var ctxs = h.fieldCtx;
2554
2589
  tidyFields(fields).forEach(function (field) {
2555
- var ctx = ctxs[field];
2556
- if (!ctx) return;
2557
- h.$render.clearCache(ctx);
2558
- ctx.rule.value = copy(ctx.defaultValue);
2559
- h.refreshControl(ctx);
2590
+ h.getCtxs(field).forEach(function (ctx) {
2591
+ h.$render.clearCache(ctx);
2592
+ ctx.rule.value = copy(ctx.defaultValue);
2593
+ h.refreshControl(ctx);
2594
+ });
2560
2595
  });
2561
2596
  },
2562
2597
  method: function method(id, name) {
@@ -2596,7 +2631,8 @@
2596
2631
  el && el.$emit && el.$emit('close-modal');
2597
2632
  },
2598
2633
  getSubForm: function getSubForm(field) {
2599
- return h.subForm[field];
2634
+ var ctx = h.getCtx(field);
2635
+ return ctx ? h.subForm[ctx.id] : undefined;
2600
2636
  },
2601
2637
  nextTick: function nextTick(fn) {
2602
2638
  h.bus.$once('next-tick', fn);
@@ -2644,7 +2680,8 @@
2644
2680
  this.cache[ctx.id] = {
2645
2681
  vnode: vnode,
2646
2682
  use: false,
2647
- parent: parent
2683
+ parent: parent,
2684
+ slot: ctx.rule.slot
2648
2685
  };
2649
2686
  },
2650
2687
  getCache: function getCache(ctx) {
@@ -2665,46 +2702,20 @@
2665
2702
  return str.replace(str[0], str[0].toLowerCase());
2666
2703
  }
2667
2704
 
2668
- function setTempProps(vm, ctx, api) {
2669
- if (!vm.$props) return;
2670
- var prop = ctx.prop;
2671
- var keys = Object.keys(vm.$props);
2672
- var inject = injectProp(ctx, api);
2673
- var injectKeys = Object.keys(inject);
2674
- keys.forEach(function (key) {
2675
- if (hasProperty(prop.props, key)) vm.$props[key] = prop.props[key];else if (injectKeys.indexOf(key) > -1) vm.$props[key] = inject[key];
2676
- });
2677
- var key = vm.$options.model && vm.$options.model.prop || 'value';
2678
-
2679
- if (keys.indexOf(key) > -1) {
2680
- vm.$props[key] = prop.value;
2681
- }
2682
- }
2683
-
2684
- function injectProp(ctx, api) {
2685
- return {
2686
- formCreate: api,
2687
- formCreateField: ctx.field,
2688
- formCreateOptions: ctx.prop.options,
2689
- formCreateRule: function () {
2690
- var temp = _objectSpread2({}, ctx.prop);
2691
-
2692
- return temp.on = temp.on ? _objectSpread2({}, temp.on) : {}, temp;
2693
- }()
2694
- };
2695
- }
2696
-
2697
2705
  function useRender(Render) {
2698
2706
  extend(Render.prototype, {
2699
2707
  initRender: function initRender() {
2700
- this.renderList = {};
2708
+ this.tempList = {};
2701
2709
  this.clearOrgChildren();
2702
2710
  },
2703
2711
  initOrgChildren: function initOrgChildren() {
2704
2712
  var ctxs = this.$handle.ctxs;
2705
2713
  this.orgChildren = Object.keys(ctxs).reduce(function (initial, id) {
2706
- var children = ctxs[id].rule.children;
2707
- initial[id] = is.trueArray(children) ? _toConsumableArray(children) : [];
2714
+ if (ctxs[id].parser.loadChildren !== false) {
2715
+ var children = ctxs[id].rule.children;
2716
+ initial[id] = is.trueArray(children) ? _toConsumableArray(children) : [];
2717
+ }
2718
+
2708
2719
  return initial;
2709
2720
  }, {});
2710
2721
  },
@@ -2720,19 +2731,47 @@
2720
2731
 
2721
2732
  this.$h = this.vm.$createElement;
2722
2733
  this.$manager.beforeRender();
2723
- var vn = this.sort.map(function (id) {
2724
- return _this.renderCtx(_this.$handle.ctxs[id]);
2734
+ var vn;
2735
+
2736
+ var make = function make() {
2737
+ return _this.renderList();
2738
+ };
2739
+
2740
+ make.renderSlot = function (slot) {
2741
+ return _this.renderList(slot);
2742
+ };
2743
+
2744
+ make.renderName = function (name) {
2745
+ return _this.renderId(name);
2746
+ };
2747
+
2748
+ make.renderField = function (field) {
2749
+ return _this.renderId(field, 'field');
2750
+ };
2751
+
2752
+ if (this.vm.$scopedSlots.container) {
2753
+ vn = [this.vm.$scopedSlots.container(make)];
2754
+ } else {
2755
+ vn = make();
2756
+ }
2757
+
2758
+ return this.$manager.render(vn);
2759
+ },
2760
+ renderList: function renderList(slot) {
2761
+ var _this2 = this;
2762
+
2763
+ return this.sort.map(function (id) {
2764
+ return slot ? _this2.renderSlot(_this2.$handle.ctxs[id], slot) : _this2.renderCtx(_this2.$handle.ctxs[id]);
2725
2765
  }).filter(function (val) {
2726
2766
  return val !== undefined;
2727
2767
  });
2728
- return this.$manager.render(vn);
2729
2768
  },
2730
2769
  makeVm: function makeVm(rule) {
2731
- var _this2 = this;
2770
+ var _this3 = this;
2732
2771
 
2733
2772
  var vm = rule.vm;
2734
2773
  if (!vm) return new _vue();else if (is.Function(vm)) return invoke(function () {
2735
- return vm(_this2.$handle.getInjectData(rule));
2774
+ return rule.vm(_this3.$handle.getInjectData(rule));
2736
2775
  });else if (!vm._isVue) return new _vue(vm);
2737
2776
  return vm;
2738
2777
  },
@@ -2748,8 +2787,31 @@
2748
2787
  deepSet(ctx.prop, ctx.prop.optionsTo, ctx.prop.options);
2749
2788
  }
2750
2789
  },
2790
+ deepSet: function deepSet$1(ctx) {
2791
+ var deep = ctx.rule.deep;
2792
+ deep && Object.keys(deep).sort(function (a, b) {
2793
+ return a.length < b.length ? -1 : 1;
2794
+ }).forEach(function (str) {
2795
+ deepSet(ctx.prop, str, deep[str]);
2796
+ });
2797
+ },
2798
+ setTempProps: function setTempProps(vm, ctx) {
2799
+ if (!vm.$props) return;
2800
+ var prop = ctx.prop;
2801
+ var keys = Object.keys(vm.$props);
2802
+ var inject = this.injectProp(ctx);
2803
+ var injectKeys = Object.keys(inject);
2804
+ keys.forEach(function (key) {
2805
+ if (hasProperty(prop.props, key)) vm.$props[key] = prop.props[key];else if (injectKeys.indexOf(key) > -1) vm.$props[key] = inject[key];
2806
+ });
2807
+ var key = vm.$options.model && vm.$options.model.prop || 'value';
2808
+
2809
+ if (keys.indexOf(key) > -1) {
2810
+ vm.$props[key] = prop.value;
2811
+ }
2812
+ },
2751
2813
  renderTemp: function renderTemp(ctx) {
2752
- var _this3 = this;
2814
+ var _this4 = this;
2753
2815
 
2754
2816
  if (!_vue.compile) {
2755
2817
  tip('当前使用的Vue构建版本不支持compile,无法使用template功能');
@@ -2760,7 +2822,7 @@
2760
2822
  var id = ctx.id,
2761
2823
  key = ctx.key;
2762
2824
 
2763
- if (!this.renderList[id]) {
2825
+ if (!this.tempList[id]) {
2764
2826
  if (!ctx.el) {
2765
2827
  ctx.el = this.makeVm(rule);
2766
2828
  this.vm.$nextTick(function () {
@@ -2770,18 +2832,18 @@
2770
2832
 
2771
2833
  var _vm = ctx.el;
2772
2834
  if (ctx.input) _vm.$on(_vm.$options.model && _vm.$options.model.event || 'input', function (value) {
2773
- _this3.onInput(ctx, value);
2835
+ _this4.onInput(ctx, value);
2774
2836
  });
2775
- this.renderList[id] = {
2837
+ this.tempList[id] = {
2776
2838
  vm: _vm,
2777
2839
  template: _vue.compile(rule.template)
2778
2840
  };
2779
2841
  }
2780
2842
 
2781
- var _this$renderList$id = this.renderList[id],
2782
- vm = _this$renderList$id.vm,
2783
- template = _this$renderList$id.template;
2784
- setTempProps(vm, ctx, this.$handle.api);
2843
+ var _this$tempList$id = this.tempList[id],
2844
+ vm = _this$tempList$id.vm,
2845
+ template = _this$tempList$id.template;
2846
+ this.setTempProps(vm, ctx);
2785
2847
  var vn = template.render.call(vm);
2786
2848
  if (is.Undef(vn.data)) vn.data = {};
2787
2849
  vn.key = key;
@@ -2789,20 +2851,35 @@
2789
2851
  vn.data.key = key;
2790
2852
  return vn;
2791
2853
  },
2854
+ parseSide: function parseSide(side) {
2855
+ return is.Object(side) ? mergeRule({}, side) : side;
2856
+ },
2792
2857
  renderSides: function renderSides(vn, ctx, temp) {
2793
2858
  var prop = ctx[temp ? 'rule' : 'prop'];
2794
- return [this.renderRule(prop.prefix), vn, this.renderRule(prop.suffix)];
2859
+ return [this.renderRule(this.parseSide(prop.prefix)), vn, this.renderRule(this.parseSide(prop.suffix))];
2860
+ },
2861
+ renderSlot: function renderSlot(ctx, slot) {
2862
+ return ctx.rule.slot === slot ? this.renderCtx(ctx) : undefined;
2863
+ },
2864
+ renderId: function renderId(name, type) {
2865
+ var _this5 = this;
2866
+
2867
+ var ctxs = this.$handle[type === 'field' ? 'fieldCtx' : 'nameCtx'][name];
2868
+ return ctxs ? ctxs.map(function (ctx) {
2869
+ return _this5.renderCtx(ctx, ctx.parent);
2870
+ }) : undefined;
2795
2871
  },
2796
2872
  renderCtx: function renderCtx(ctx, parent) {
2797
2873
  if (ctx.type === 'hidden') return;
2874
+ var rule = ctx.rule;
2798
2875
 
2799
- if (!this.cache[ctx.id]) {
2876
+ if (!this.cache[ctx.id] || this.cache[ctx.id].slot !== rule.slot) {
2800
2877
  var vn;
2801
2878
  var cacheFlag = true;
2802
2879
  var _type = ctx.trueType;
2803
- var none = !(is.Undef(ctx.rule.display) || !!ctx.rule.display);
2880
+ var none = !(is.Undef(rule.display) || !!rule.display);
2804
2881
 
2805
- if (_type === 'template' && !ctx.rule.template) {
2882
+ if (_type === 'template' && !rule.template) {
2806
2883
  vn = this.renderSides(this.renderChildren(ctx), ctx, true);
2807
2884
 
2808
2885
  if (none) {
@@ -2816,9 +2893,11 @@
2816
2893
  ctx.initProp();
2817
2894
  this.mergeGlobal(ctx);
2818
2895
  this.$manager.tidyRule(ctx);
2896
+ this.deepSet(ctx);
2819
2897
  this.setOptions(ctx);
2820
2898
  this.ctxProp(ctx);
2821
2899
  var prop = ctx.prop;
2900
+ prop.props.formCreateInject = this.injectProp(ctx);
2822
2901
 
2823
2902
  if (prop.hidden) {
2824
2903
  this.setCache(ctx, undefined, parent);
@@ -2829,7 +2908,27 @@
2829
2908
  vn = this.renderTemp(ctx);
2830
2909
  cacheFlag = false;
2831
2910
  } else {
2832
- vn = ctx.parser.render(this.renderChildren(ctx), ctx);
2911
+ var children = [];
2912
+
2913
+ if (ctx.parser.renderChildren) {
2914
+ children = ctx.parser.renderChildren(ctx);
2915
+ } else if (ctx.parser.loadChildren !== false) {
2916
+ children = this.renderChildren(ctx);
2917
+ }
2918
+
2919
+ var slot = 'type-' + toLine(ctx.type);
2920
+
2921
+ if (this.vm.$scopedSlots[slot]) {
2922
+ vn = this.vm.$scopedSlots[slot]({
2923
+ rule: rule,
2924
+ prop: prop,
2925
+ children: children,
2926
+ api: this.$handle.api,
2927
+ model: prop.model || {}
2928
+ });
2929
+ } else {
2930
+ vn = ctx.parser.render(children, ctx);
2931
+ }
2833
2932
  }
2834
2933
 
2835
2934
  vn = this.renderSides(vn, ctx);
@@ -2855,13 +2954,13 @@
2855
2954
  return this.getCache(ctx);
2856
2955
  },
2857
2956
  display: function display(vn) {
2858
- var _this4 = this;
2957
+ var _this6 = this;
2859
2958
 
2860
2959
  if (Array.isArray(vn)) {
2861
2960
  var data = [];
2862
2961
  vn.forEach(function (v) {
2863
- if (Array.isArray(v)) return _this4.display(v);
2864
- if (_this4.none(v)) data.push(v);
2962
+ if (Array.isArray(v)) return _this6.display(v);
2963
+ if (_this6.none(v)) data.push(v);
2865
2964
  });
2866
2965
  return data;
2867
2966
  } else {
@@ -2889,37 +2988,62 @@
2889
2988
  key: ctx.key
2890
2989
  }, [vn]);
2891
2990
  },
2991
+ injectProp: function injectProp(ctx) {
2992
+ var _this7 = this;
2993
+
2994
+ if (!this.vm.ctxInject[ctx.id]) {
2995
+ $set(this.vm.ctxInject, ctx.id, {});
2996
+ }
2997
+
2998
+ var inject = this.vm.ctxInject[ctx.id];
2999
+ extend(inject, {
3000
+ api: this.$handle.api,
3001
+ form: this.fc.create,
3002
+ subForm: function subForm(_subForm) {
3003
+ _this7.$handle.addSubForm(ctx, _subForm);
3004
+ },
3005
+ field: ctx.field,
3006
+ options: ctx.prop.options,
3007
+ children: ctx.rule.children,
3008
+ rule: ctx.rule,
3009
+ prop: function () {
3010
+ var temp = _objectSpread2({}, ctx.prop);
3011
+
3012
+ temp.on = temp.on ? _objectSpread2({}, temp.on) : {};
3013
+ delete temp.model;
3014
+ return temp;
3015
+ }()
3016
+ });
3017
+ return inject;
3018
+ },
2892
3019
  ctxProp: function ctxProp(ctx, custom) {
2893
- var _this5 = this;
3020
+ var _this8 = this;
2894
3021
 
2895
3022
  var ref = ctx.ref,
2896
- key = ctx.key;
3023
+ key = ctx.key,
3024
+ rule = ctx.rule;
2897
3025
  this.$manager.mergeProp(ctx, custom);
2898
3026
  ctx.parser.mergeProp(ctx, custom);
2899
3027
  var props = [{
2900
- props: injectProp(ctx, this.$handle.api),
2901
3028
  ref: ref,
2902
- key: "".concat(key, "fc"),
2903
- slot: undefined
3029
+ key: rule.key || "".concat(key, "fc"),
3030
+ slot: undefined,
3031
+ on: {
3032
+ 'hook:mounted': function hookMounted() {
3033
+ _this8.onMounted(ctx);
3034
+ }
3035
+ }
2904
3036
  }];
2905
3037
 
2906
- if (!custom) {
3038
+ if (!custom && ctx.input) {
2907
3039
  props.push({
2908
- on: {
2909
- 'hook:mounted': function hookMounted() {
2910
- _this5.onMounted(ctx);
2911
- },
2912
- 'fc.sub-form': function fcSubForm(subForm) {
2913
- _this5.$handle.addSubForm(ctx, subForm);
2914
- }
2915
- },
2916
- model: ctx.input ? {
3040
+ model: {
2917
3041
  value: this.$handle.getFormData(ctx),
2918
3042
  callback: function callback(value) {
2919
- _this5.onInput(ctx, value);
3043
+ _this8.onInput(ctx, value);
2920
3044
  },
2921
- expression: "formData.".concat(ctx.field)
2922
- } : undefined
3045
+ expression: "formData.".concat(ctx.id)
3046
+ }
2923
3047
  });
2924
3048
  }
2925
3049
 
@@ -2928,6 +3052,11 @@
2928
3052
  },
2929
3053
  onMounted: function onMounted(ctx) {
2930
3054
  ctx.el = this.vm.$refs[ctx.ref];
3055
+
3056
+ if (ctx.el) {
3057
+ (ctx.el.$el || ctx.el).__rule__ = ctx.rule;
3058
+ }
3059
+
2931
3060
  ctx.parser.mounted(ctx);
2932
3061
  this.$handle.effect(ctx, 'mounted');
2933
3062
  },
@@ -2935,13 +3064,13 @@
2935
3064
  this.$handle.onInput(ctx, value);
2936
3065
  },
2937
3066
  renderChildren: function renderChildren(ctx) {
2938
- var _this6 = this;
3067
+ var _this9 = this;
2939
3068
 
2940
3069
  var children = ctx.rule.children,
2941
3070
  orgChildren = this.orgChildren[ctx.id];
2942
3071
 
2943
3072
  var isRm = function isRm(child) {
2944
- return !is.String(child) && child.__fc__ && !_this6.$handle.ctxs[child.__fc__.id];
3073
+ return !is.String(child) && child.__fc__ && !_this9.$handle.ctxs[child.__fc__.id];
2945
3074
  };
2946
3075
 
2947
3076
  if (!is.trueArray(children) && orgChildren) {
@@ -2950,7 +3079,7 @@
2950
3079
  if (!child) return;
2951
3080
 
2952
3081
  if (isRm(child)) {
2953
- _this6.$handle.rmCtx(child.__fc__);
3082
+ _this9.$handle.rmCtx(child.__fc__);
2954
3083
  }
2955
3084
  });
2956
3085
  });
@@ -2963,7 +3092,7 @@
2963
3092
  if (!child) return;
2964
3093
 
2965
3094
  if (children.indexOf(child) === -1 && isRm(child)) {
2966
- _this6.$handle.rmCtx(child.__fc__);
3095
+ _this9.$handle.rmCtx(child.__fc__);
2967
3096
  }
2968
3097
  });
2969
3098
  });
@@ -2972,14 +3101,14 @@
2972
3101
  if (is.String(child)) return child;
2973
3102
 
2974
3103
  if (child.__fc__) {
2975
- return _this6.renderCtx(child.__fc__, ctx);
3104
+ return _this9.renderCtx(child.__fc__, ctx);
2976
3105
  }
2977
3106
 
2978
- if (!_this6.$handle.isRepeatRule(child.__origin__ || child) && child.type) {
2979
- _this6.vm.$nextTick(function () {
2980
- _this6.$handle.loadChildren(children, ctx);
3107
+ if (child.type) {
3108
+ _this9.vm.$nextTick(function () {
3109
+ _this9.$handle.loadChildren(children, ctx);
2981
3110
 
2982
- _this6.$handle.refresh();
3111
+ _this9.$handle.refresh();
2983
3112
  });
2984
3113
  }
2985
3114
  });
@@ -2991,7 +3120,7 @@
2991
3120
  return this.vNode.make(lower(ctx.originType), prop, children);
2992
3121
  },
2993
3122
  renderRule: function renderRule(rule, children, origin) {
2994
- var _this7 = this;
3123
+ var _this10 = this;
2995
3124
 
2996
3125
  if (!rule) return undefined;
2997
3126
  if (is.String(rule)) return rule;
@@ -3014,7 +3143,7 @@
3014
3143
 
3015
3144
  if (is.trueArray(rule.children)) {
3016
3145
  data.push(rule.children.map(function (v) {
3017
- return _this7.renderRule(v);
3146
+ return _this10.renderRule(v);
3018
3147
  }));
3019
3148
  }
3020
3149
 
@@ -3048,15 +3177,33 @@
3048
3177
  function useInject(Handler) {
3049
3178
  extend(Handler.prototype, {
3050
3179
  parseInjectEvent: function parseInjectEvent(rule, on) {
3180
+ var inject = rule.inject || this.options.injectEvent;
3181
+ return this.parseEventLst(rule, on, inject);
3182
+ },
3183
+ parseEventLst: function parseEventLst(rule, data, inject, deep) {
3051
3184
  var _this = this;
3052
3185
 
3053
- if (rule.inject === false) return;
3054
- var inject = rule.inject || this.options.injectEvent;
3055
- if (is.Undef(inject)) return;
3056
- Object.keys(on).forEach(function (k) {
3057
- if (is.Function(on[k])) on[k] = _this.inject(rule, on[k], inject);
3186
+ Object.keys(data).forEach(function (k) {
3187
+ var fn = _this.parseEvent(rule, data[k], inject, deep);
3188
+
3189
+ if (fn) {
3190
+ data[k] = fn;
3191
+ }
3058
3192
  });
3059
- return on;
3193
+ return data;
3194
+ },
3195
+ parseEvent: function parseEvent(rule, fn, inject, deep) {
3196
+ if (is.Function(fn) && (inject !== false && !is.Undef(inject) || fn.__inject)) {
3197
+ return this.inject(rule, fn, inject);
3198
+ } else if (!deep && Array.isArray(fn) && fn[0] && (is.String(fn[0]) || is.Function(fn[0]))) {
3199
+ return this.parseEventLst(rule, fn, inject, true);
3200
+ } else if (is.String(fn)) {
3201
+ var val = parseFn(fn);
3202
+
3203
+ if (val && fn !== val) {
3204
+ return val.__inject ? this.parseEvent(rule, val, inject, true) : val;
3205
+ }
3206
+ }
3060
3207
  },
3061
3208
  parseEmit: function parseEmit(ctx, on) {
3062
3209
  var _this2 = this;
@@ -3118,6 +3265,7 @@
3118
3265
  option = _this$vm$$options$pro.option,
3119
3266
  rule = _this$vm$$options$pro.rule;
3120
3267
  return {
3268
+ api: this.api,
3121
3269
  $f: this.api,
3122
3270
  rule: rule,
3123
3271
  self: self.__origin__,
@@ -3126,7 +3274,7 @@
3126
3274
  };
3127
3275
  },
3128
3276
  inject: function inject(self, _fn, _inject2) {
3129
- if (_fn.__inject) {
3277
+ if (_fn.__origin) {
3130
3278
  if (this.watching && !this.loading) return _fn;
3131
3279
  _fn = _fn.__origin;
3132
3280
  }
@@ -3134,16 +3282,19 @@
3134
3282
  var h = this;
3135
3283
 
3136
3284
  var fn = function fn() {
3285
+ var data = h.getInjectData(self, _inject2);
3286
+
3137
3287
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
3138
3288
  args[_key2] = arguments[_key2];
3139
3289
  }
3140
3290
 
3141
- args.unshift(h.getInjectData(self, _inject2));
3291
+ data.args = [].concat(args);
3292
+ args.unshift(data);
3142
3293
  return _fn.apply(this, args);
3143
3294
  };
3144
3295
 
3145
- fn.__inject = true;
3146
3296
  fn.__origin = _fn;
3297
+ fn.__json = _fn.__json;
3147
3298
  return fn;
3148
3299
  }
3149
3300
  });
@@ -3288,7 +3439,10 @@
3288
3439
  initProp: function initProp() {
3289
3440
  var _this = this;
3290
3441
 
3291
- this.prop = mergeProps([this.rule].concat(_toConsumableArray(Object.keys(this.payload).map(function (k) {
3442
+ var rule = _objectSpread2({}, this.rule);
3443
+
3444
+ delete rule.children;
3445
+ this.prop = mergeProps([rule].concat(_toConsumableArray(Object.keys(this.payload).map(function (k) {
3292
3446
  return _this.payload[k];
3293
3447
  })), [this.computed]));
3294
3448
  },
@@ -3335,7 +3489,7 @@
3335
3489
  },
3336
3490
  rmCtrl: function rmCtrl() {
3337
3491
  this.ctrlRule.forEach(function (ctrl) {
3338
- return ctrl.__fc__.rm();
3492
+ return ctrl.__fc__ && ctrl.__fc__.rm();
3339
3493
  });
3340
3494
  this.ctrlRule = [];
3341
3495
  },
@@ -3348,7 +3502,7 @@
3348
3502
  if (index > -1) {
3349
3503
  _this2.root.splice(index, 1);
3350
3504
 
3351
- _this2.$handle.refresh();
3505
+ _this2.$handle && _this2.$handle.refresh();
3352
3506
  }
3353
3507
  };
3354
3508
 
@@ -3369,7 +3523,7 @@
3369
3523
  extend(_this2, {
3370
3524
  root: []
3371
3525
  });
3372
- });
3526
+ }, _this2.input);
3373
3527
  });
3374
3528
  },
3375
3529
  update: function update(handle, init) {
@@ -3407,23 +3561,39 @@
3407
3561
  __origin__: enumerable(_rule, true)
3408
3562
  });
3409
3563
  fullRule(rule);
3410
- if (rule.field && hasProperty(this.options.formData || {}, rule.field)) rule.value = this.options.formData[rule.field];
3564
+ this.appendValue(rule);
3411
3565
  rule.options = Array.isArray(rule.options) ? rule.options : [];
3412
- ['on', 'props', 'nativeOn'].forEach(function (k) {
3413
- var v = rule[k];
3566
+ [rule, rule['prefix'], rule['suffix']].forEach(function (item) {
3567
+ if (!item) {
3568
+ return;
3569
+ }
3414
3570
 
3415
- if (v) {
3416
- Object.keys(v).forEach(function (n) {
3417
- v[n] = parseFn(v[n]);
3418
- });
3571
+ _this2.loadFn(item, rule);
3572
+ });
3573
+ this.loadCtrl(rule);
3419
3574
 
3420
- _this2.parseInjectEvent(rule, v);
3575
+ if (rule.update) {
3576
+ rule.update = parseFn(rule.update);
3577
+ }
3578
+
3579
+ return rule;
3580
+ },
3581
+ loadFn: function loadFn(item, rule) {
3582
+ var _this3 = this;
3583
+
3584
+ ['on', 'props', 'nativeOn', 'deep'].forEach(function (k) {
3585
+ item[k] && _this3.parseInjectEvent(rule, item[k]);
3586
+ });
3587
+ },
3588
+ loadCtrl: function loadCtrl(rule) {
3589
+ rule.control && rule.control.forEach(function (ctrl) {
3590
+ if (ctrl.handle) {
3591
+ ctrl.handle = parseFn(ctrl.handle);
3421
3592
  }
3422
3593
  });
3423
- return rule;
3424
3594
  },
3425
3595
  syncProp: function syncProp(ctx) {
3426
- var _this3 = this;
3596
+ var _this4 = this;
3427
3597
 
3428
3598
  var rule = ctx.rule;
3429
3599
  is.trueArray(rule.sync) && mergeProps([{
@@ -3431,18 +3601,15 @@
3431
3601
  pre["update:".concat(prop)] = function (val) {
3432
3602
  rule.props[prop] = val;
3433
3603
 
3434
- _this3.vm.$emit('sync', prop, val, rule, _this3.fapi);
3604
+ _this4.vm.$emit('sync', prop, val, rule, _this4.fapi);
3435
3605
  };
3436
3606
 
3437
3607
  return pre;
3438
3608
  }, {})
3439
3609
  }], ctx.computed);
3440
3610
  },
3441
- isRepeatRule: function isRepeatRule(rule) {
3442
- return this.repeatRule.indexOf(rule) > -1;
3443
- },
3444
3611
  loadRule: function loadRule() {
3445
- var _this4 = this;
3612
+ var _this5 = this;
3446
3613
 
3447
3614
  // console.warn('%c load', 'color:blue');
3448
3615
  this.cycleLoad = false;
@@ -3453,23 +3620,23 @@
3453
3620
  }
3454
3621
 
3455
3622
  this.deferSyncValue(function () {
3456
- _this4._loadRule(_this4.rules);
3623
+ _this5._loadRule(_this5.rules);
3457
3624
 
3458
- _this4.loading = false;
3625
+ _this5.loading = false;
3459
3626
 
3460
- if (_this4.cycleLoad && _this4.pageEnd) {
3461
- return _this4.loadRule();
3627
+ if (_this5.cycleLoad && _this5.pageEnd) {
3628
+ return _this5.loadRule();
3462
3629
  }
3463
3630
 
3464
- if (_this4.pageEnd) {
3465
- _this4.bus.$emit('load-end');
3631
+ if (_this5.pageEnd) {
3632
+ _this5.bus.$emit('load-end');
3466
3633
  }
3467
3634
 
3468
- _this4.vm._renderRule();
3635
+ _this5.vm._renderRule();
3469
3636
 
3470
- _this4.$render.initOrgChildren();
3637
+ _this5.$render.initOrgChildren();
3471
3638
 
3472
- _this4.syncForm();
3639
+ _this5.syncForm();
3473
3640
  });
3474
3641
  },
3475
3642
  loadChildren: function loadChildren(children, parent) {
@@ -3491,7 +3658,7 @@
3491
3658
  this.$render.clearCache(parent);
3492
3659
  },
3493
3660
  _loadRule: function _loadRule(rules, parent) {
3494
- var _this5 = this;
3661
+ var _this6 = this;
3495
3662
 
3496
3663
  var preIndex = function preIndex(i) {
3497
3664
  var pre = rules[i - 1];
@@ -3500,45 +3667,48 @@
3500
3667
  return i > 0 ? preIndex(i - 1) : -1;
3501
3668
  }
3502
3669
 
3503
- var index = _this5.sort.indexOf(pre.__fc__.id);
3670
+ var index = _this6.sort.indexOf(pre.__fc__.id);
3504
3671
 
3505
3672
  return index > -1 ? index : preIndex(i - 1);
3506
3673
  };
3507
3674
 
3508
3675
  var loadChildren = function loadChildren(children, parent) {
3509
3676
  if (is.trueArray(children)) {
3510
- _this5._loadRule(children, parent);
3677
+ _this6._loadRule(children, parent);
3511
3678
  }
3512
3679
  };
3513
3680
 
3514
- var initEvent = function initEvent(rule) {
3515
- return _this5.ruleEffect(rule, 'init');
3516
- };
3517
-
3518
3681
  rules.map(function (_rule, index) {
3519
3682
  if (parent && (is.String(_rule) || is.Undef(_rule))) return;
3520
- if (!_this5.pageEnd && !parent && index >= _this5.first) return;
3683
+ if (!_this6.pageEnd && !parent && index >= _this6.first) return;
3521
3684
  if (!is.Object(_rule) || !getRule(_rule).type) return err('未定义生成规则的 type 字段', _rule);
3522
3685
 
3523
- if (_rule.__fc__ && _rule.__fc__.root === rules && _this5.ctxs[_rule.__fc__.id]) {
3686
+ if (_rule.__fc__ && _rule.__fc__.root === rules && _this6.ctxs[_rule.__fc__.id]) {
3524
3687
  loadChildren(_rule.__fc__.rule.children, _rule.__fc__);
3525
3688
  return _rule.__fc__;
3526
3689
  }
3527
3690
 
3528
3691
  var rule = getRule(_rule);
3529
- if (!_rule.__fc__) initEvent(rule);
3530
3692
 
3531
- if (rule.field && _this5.fieldCtx[rule.field] && _this5.fieldCtx[rule.field] !== _rule.__fc__) {
3532
- _this5.repeatRule.push(_rule);
3693
+ var isRepeat = function isRepeat() {
3694
+ return !!(rule.field && _this6.fieldCtx[rule.field] && _this6.fieldCtx[rule.field][0] !== _rule.__fc__);
3695
+ };
3533
3696
 
3534
- return err("".concat(rule.field, " \u5B57\u6BB5\u5DF2\u5B58\u5728"), _rule);
3697
+ _this6.ruleEffect(rule, 'init', {
3698
+ repeat: isRepeat()
3699
+ });
3700
+
3701
+ if (isRepeat()) {
3702
+ _this6.vm.$emit('repeat-field', _rule, _this6.api);
3535
3703
  }
3536
3704
 
3537
3705
  var ctx;
3706
+ var isCopy = false;
3707
+ var isInit = !!_rule.__fc__;
3538
3708
 
3539
- if (_rule.__fc__) {
3709
+ if (isInit) {
3540
3710
  ctx = _rule.__fc__;
3541
- var check = !ctx.check(_this5);
3711
+ var check = !ctx.check(_this6);
3542
3712
 
3543
3713
  if (ctx.deleted) {
3544
3714
  if (check) {
@@ -3546,7 +3716,7 @@
3546
3716
  return;
3547
3717
  }
3548
3718
 
3549
- ctx.update(_this5);
3719
+ ctx.update(_this6);
3550
3720
  }
3551
3721
  } else {
3552
3722
  if (check) {
@@ -3555,44 +3725,47 @@
3555
3725
  }
3556
3726
 
3557
3727
  rules[index] = _rule = _rule._clone ? _rule._clone() : copyRule(_rule);
3558
- initEvent(getRule(_rule));
3559
3728
  ctx = null;
3729
+ isCopy = true;
3560
3730
  }
3561
3731
  }
3562
3732
  }
3563
3733
 
3564
3734
  if (!ctx) {
3565
- ctx = new RuleContext(_this5, _this5.parseRule(_rule));
3735
+ ctx = new RuleContext(_this6, _this6.parseRule(_rule));
3566
3736
 
3567
- _this5.bindParser(ctx);
3568
- } else if (ctx.originType !== ctx.rule.type) {
3569
- ctx.updateType();
3737
+ _this6.bindParser(ctx);
3738
+ } else {
3739
+ if (ctx.originType !== ctx.rule.type) {
3740
+ ctx.updateType();
3570
3741
 
3571
- _this5.bindParser(ctx);
3572
- }
3742
+ _this6.bindParser(ctx);
3743
+ }
3573
3744
 
3574
- _this5.appendValue(ctx.rule);
3745
+ _this6.appendValue(ctx.rule);
3746
+ }
3575
3747
 
3576
3748
  [false, true].forEach(function (b) {
3577
- return _this5.parseEmit(ctx, b);
3749
+ return _this6.parseEmit(ctx, b);
3578
3750
  });
3579
3751
 
3580
- _this5.syncProp(ctx);
3752
+ _this6.syncProp(ctx);
3581
3753
 
3582
3754
  ctx.parent = parent || null;
3583
3755
  ctx.root = rules;
3584
3756
 
3585
- _this5.setCtx(ctx);
3757
+ _this6.setCtx(ctx);
3586
3758
 
3587
- loadChildren(ctx.rule.children, ctx);
3759
+ !isCopy && !isInit && _this6.effect(ctx, 'load');
3760
+ ctx.parser.loadChildren === false || loadChildren(ctx.rule.children, ctx);
3588
3761
 
3589
3762
  if (!parent) {
3590
3763
  var _preIndex = preIndex(index);
3591
3764
 
3592
- if (_preIndex > -1) {
3593
- _this5.sort.splice(_preIndex + 1, 0, ctx.id);
3765
+ if (_preIndex > -1 || !index) {
3766
+ _this6.sort.splice(_preIndex + 1, 0, ctx.id);
3594
3767
  } else {
3595
- _this5.sort.push(ctx.id);
3768
+ _this6.sort.push(ctx.id);
3596
3769
  }
3597
3770
  }
3598
3771
 
@@ -3602,16 +3775,16 @@
3602
3775
  ctx.updated = true;
3603
3776
 
3604
3777
  if (is.Function(r.update)) {
3605
- _this5.bus.$once('load-end', function () {
3606
- _this5.refreshUpdate(ctx, r.value);
3778
+ _this6.bus.$once('load-end', function () {
3779
+ _this6.refreshUpdate(ctx, r.value);
3607
3780
  });
3608
3781
  }
3609
3782
 
3610
- _this5.effect(ctx, 'loaded');
3783
+ _this6.effect(ctx, 'loaded');
3611
3784
  }
3612
3785
 
3613
- if (ctx.input) Object.defineProperty(r, 'value', _this5.valueHandle(ctx));
3614
- if (_this5.refreshControl(ctx)) _this5.cycleLoad = true;
3786
+ if (ctx.input) Object.defineProperty(r, 'value', _this6.valueHandle(ctx));
3787
+ if (_this6.refreshControl(ctx)) _this6.cycleLoad = true;
3615
3788
  return ctx;
3616
3789
  });
3617
3790
  },
@@ -3619,7 +3792,7 @@
3619
3792
  return ctx.input && ctx.rule.control && this.useCtrl(ctx);
3620
3793
  },
3621
3794
  useCtrl: function useCtrl(ctx) {
3622
- var _this6 = this;
3795
+ var _this7 = this;
3623
3796
 
3624
3797
  var controls = getCtrl(ctx),
3625
3798
  validate = [],
@@ -3632,14 +3805,17 @@
3632
3805
  return val === control.value;
3633
3806
  };
3634
3807
 
3808
+ if (!is.trueArray(control.rule)) return "continue";
3809
+
3635
3810
  var data = _objectSpread2(_objectSpread2({}, control), {}, {
3636
3811
  valid: invoke(function () {
3637
3812
  return handleFn(ctx.rule.value, api);
3638
3813
  }),
3639
- ctrl: findCtrl(ctx, control.rule)
3814
+ ctrl: findCtrl(ctx, control.rule),
3815
+ isHidden: is.String(control.rule[0])
3640
3816
  });
3641
3817
 
3642
- if (data.valid && data.ctrl || !data.valid && !data.ctrl) return "continue";
3818
+ if (data.valid && data.ctrl || !data.valid && !data.ctrl && !data.isHidden) return "continue";
3643
3819
  validate.push(data);
3644
3820
  };
3645
3821
 
@@ -3651,39 +3827,56 @@
3651
3827
 
3652
3828
  if (!validate.length) return false;
3653
3829
  var flag = false;
3654
- validate.reverse().forEach(function (_ref) {
3655
- var valid = _ref.valid,
3656
- rule = _ref.rule,
3657
- prepend = _ref.prepend,
3658
- append = _ref.append,
3659
- child = _ref.child,
3660
- ctrl = _ref.ctrl;
3830
+ this.deferSyncValue(function () {
3831
+ validate.reverse().forEach(function (_ref) {
3832
+ var isHidden = _ref.isHidden,
3833
+ valid = _ref.valid,
3834
+ rule = _ref.rule,
3835
+ prepend = _ref.prepend,
3836
+ append = _ref.append,
3837
+ child = _ref.child,
3838
+ ctrl = _ref.ctrl;
3839
+
3840
+ if (isHidden) {
3841
+ valid ? ctx.ctrlRule.push({
3842
+ __ctrl: true,
3843
+ children: rule,
3844
+ valid: valid
3845
+ }) : ctx.ctrlRule.splice(ctx.ctrlRule.indexOf(ctrl), 1);
3846
+
3847
+ _this7.vm.$nextTick(function () {
3848
+ _this7.api.hidden(!valid, rule);
3849
+ });
3661
3850
 
3662
- if (valid) {
3663
- flag = true;
3664
- var ruleCon = {
3665
- type: 'fcFragment',
3666
- "native": true,
3667
- __ctrl: true,
3668
- children: rule
3669
- };
3670
- ctx.ctrlRule.push(ruleCon);
3671
-
3672
- _this6.bus.$once('load-start', function () {
3673
- // this.cycleLoad = true;
3674
- if (prepend) {
3675
- api.prepend(ruleCon, prepend, child);
3676
- } else if (append || child) {
3677
- api.append(ruleCon, append || ctx.id, child);
3678
- } else {
3679
- ctx.root.splice(ctx.root.indexOf(ctx.origin) + 1, 0, ruleCon);
3680
- }
3681
- });
3682
- } else {
3683
- ctx.ctrlRule.splice(ctx.ctrlRule.indexOf(ctrl), 1);
3684
- var ctrlCtx = byCtx(ctrl);
3685
- ctrlCtx && ctrlCtx.rm();
3686
- }
3851
+ return;
3852
+ }
3853
+
3854
+ if (valid) {
3855
+ flag = true;
3856
+ var ruleCon = {
3857
+ type: 'fcFragment',
3858
+ "native": true,
3859
+ __ctrl: true,
3860
+ children: rule
3861
+ };
3862
+ ctx.ctrlRule.push(ruleCon);
3863
+
3864
+ _this7.bus.$once('load-start', function () {
3865
+ // this.cycleLoad = true;
3866
+ if (prepend) {
3867
+ api.prepend(ruleCon, prepend, child);
3868
+ } else if (append || child) {
3869
+ api.append(ruleCon, append || ctx.id, child);
3870
+ } else {
3871
+ ctx.root.splice(ctx.root.indexOf(ctx.origin) + 1, 0, ruleCon);
3872
+ }
3873
+ });
3874
+ } else {
3875
+ ctx.ctrlRule.splice(ctx.ctrlRule.indexOf(ctrl), 1);
3876
+ var ctrlCtx = byCtx(ctrl);
3877
+ ctrlCtx && ctrlCtx.rm();
3878
+ }
3879
+ });
3687
3880
  });
3688
3881
  this.vm.$emit('control', ctx.origin, this.api);
3689
3882
  this.effect(ctx, 'control');
@@ -3693,7 +3886,7 @@
3693
3886
  return this._reloadRule(rules);
3694
3887
  },
3695
3888
  _reloadRule: function _reloadRule(rules) {
3696
- var _this7 = this;
3889
+ var _this8 = this;
3697
3890
 
3698
3891
  // console.warn('%c reload', 'color:red');
3699
3892
  if (!rules) rules = this.rules;
@@ -3706,12 +3899,12 @@
3706
3899
  this.fc.rules = rules;
3707
3900
  this.bus.$once('load-end', function () {
3708
3901
  Object.keys(ctxs).filter(function (id) {
3709
- return _this7.ctxs[id] === undefined;
3902
+ return _this8.ctxs[id] === undefined;
3710
3903
  }).forEach(function (id) {
3711
- return _this7.rmCtx(ctxs[id]);
3904
+ return _this8.rmCtx(ctxs[id]);
3712
3905
  });
3713
3906
 
3714
- _this7.$render.clearCacheAll();
3907
+ _this8.$render.clearCacheAll();
3715
3908
  });
3716
3909
  this.reloading = true;
3717
3910
  this.loadRule();
@@ -3780,18 +3973,19 @@
3780
3973
  }
3781
3974
  },
3782
3975
  setFormData: function setFormData(ctx, value) {
3783
- $set(this.formData, ctx.field, value);
3976
+ $set(this.formData, ctx.id, value);
3784
3977
  },
3785
3978
  getFormData: function getFormData(ctx) {
3786
- return this.formData[ctx.field];
3979
+ return this.formData[ctx.id];
3787
3980
  },
3788
3981
  validate: function validate() {
3789
3982
  var _this = this;
3790
3983
 
3791
3984
  toEmpty(this.vm.validate);
3792
- Object.keys(this.fieldCtx).forEach(function (id) {
3793
- var ctx = _this.fieldCtx[id];
3794
- _this.vm.validate[ctx.field] = toArray(ctx.rule.validate);
3985
+ this.fields().forEach(function (id) {
3986
+ _this.fieldCtx[id].forEach(function (ctx) {
3987
+ _this.vm.validate[ctx.id] = toArray(ctx.rule.validate);
3988
+ });
3795
3989
  });
3796
3990
  return this.vm.validate;
3797
3991
  },
@@ -3799,15 +3993,27 @@
3799
3993
  var _this2 = this;
3800
3994
 
3801
3995
  toEmpty(this.form);
3802
- Object.defineProperties(this.form, Object.keys(this.formData).reduce(function (initial, field) {
3803
- var ctx = _this2.getCtx(field);
3996
+ Object.defineProperties(this.form, this.fields().reduce(function (initial, field) {
3997
+ var ctx = _this2.getFieldCtx(field);
3804
3998
 
3805
3999
  var handle = _this2.valueHandle(ctx);
3806
4000
 
3807
4001
  handle.configurable = true;
3808
4002
  initial[field] = handle;
3809
4003
  return initial;
3810
- }, {}));
4004
+ }, Object.keys(this.appendData).reduce(function (initial, field) {
4005
+ initial[field] = {
4006
+ enumerable: true,
4007
+ configurable: true,
4008
+ get: function get() {
4009
+ return _this2.appendData[field];
4010
+ },
4011
+ set: function set(val) {
4012
+ _this2.appendData[field] = val;
4013
+ }
4014
+ };
4015
+ return initial;
4016
+ }, {})));
3811
4017
  this.syncValue();
3812
4018
  },
3813
4019
  valueHandle: function valueHandle(ctx) {
@@ -3831,13 +4037,19 @@
3831
4037
  delete this.appendData[rule.field];
3832
4038
  },
3833
4039
  addSubForm: function addSubForm(ctx, subForm) {
3834
- this.subForm[ctx.field] = subForm;
4040
+ if (ctx.input) {
4041
+ this.subForm[ctx.id] = subForm;
4042
+ }
3835
4043
  },
3836
- deferSyncValue: function deferSyncValue(fn) {
4044
+ deferSyncValue: function deferSyncValue(fn, sync) {
3837
4045
  if (!this.deferSyncFn) {
3838
4046
  this.deferSyncFn = fn;
3839
4047
  }
3840
4048
 
4049
+ if (!this.deferSyncFn.sync) {
4050
+ this.deferSyncFn.sync = sync;
4051
+ }
4052
+
3841
4053
  invoke(fn);
3842
4054
 
3843
4055
  if (this.deferSyncFn === fn) {
@@ -3864,11 +4076,9 @@
3864
4076
  refreshUpdate: function refreshUpdate(ctx, val) {
3865
4077
  var _this4 = this;
3866
4078
 
3867
- var fn = ctx.rule.update;
3868
-
3869
- if (is.Function(fn)) {
4079
+ if (is.Function(ctx.rule.update)) {
3870
4080
  var state = invoke(function () {
3871
- return fn(val, ctx.origin, _this4.api);
4081
+ return ctx.rule.update(val, ctx.origin, _this4.api);
3872
4082
  });
3873
4083
  if (state === undefined) return;
3874
4084
  ctx.rule.hidden = state === true;
@@ -3904,7 +4114,7 @@
3904
4114
  });
3905
4115
  },
3906
4116
  fields: function fields() {
3907
- return Object.keys(this.formData);
4117
+ return Object.keys(this.fieldCtx);
3908
4118
  }
3909
4119
  });
3910
4120
  }
@@ -3915,49 +4125,6 @@
3915
4125
  });
3916
4126
  }
3917
4127
 
3918
- function useHelper(rules) {
3919
- if (!Array.isArray(rules) || rules.findField) return;
3920
- Object.defineProperties(rules, {
3921
- findField: enumerable(findField),
3922
- findName: enumerable(findName),
3923
- setValue: enumerable(setValue)
3924
- });
3925
- }
3926
-
3927
- function find(field, name, origin) {
3928
- if (!this.length) return;
3929
- var children = [];
3930
-
3931
- for (var i = 0; i < this.length; i++) {
3932
- if (!is.Object(this[i])) continue;
3933
- var rule = getRule(this[i]);
3934
- if (rule[name] === field) return origin ? rule : this[i];
3935
- if (is.trueArray(rule.children)) children = children.concat(rule.children);
3936
- is.trueArray(rule.control) && rule.control.forEach(function (r) {
3937
- children = children.concat(r.rule);
3938
- });
3939
- }
3940
-
3941
- return find.call(children, field, name, origin);
3942
- }
3943
-
3944
- function findField(field) {
3945
- return find.call(this, field, 'field');
3946
- }
3947
-
3948
- function findName(field) {
3949
- return find.call(this, field, 'name');
3950
- }
3951
-
3952
- function setValue(formData) {
3953
- var _this = this;
3954
-
3955
- Object.keys(formData).forEach(function (field) {
3956
- var rule = find.call(_this, field, 'field', true);
3957
- if (rule) rule.value = formData[field];
3958
- });
3959
- }
3960
-
3961
4128
  var BaseParser = {
3962
4129
  init: function init(ctx) {},
3963
4130
  toFormValue: function toFormValue(value, ctx) {
@@ -3976,7 +4143,37 @@
3976
4143
  function useContext(Handler) {
3977
4144
  extend(Handler.prototype, {
3978
4145
  getCtx: function getCtx(id) {
3979
- return this.fieldCtx[id] || this.nameCtx[id] || this.ctxs[id];
4146
+ return this.getFieldCtx(id) || this.getNameCtx(id)[0] || this.ctxs[id];
4147
+ },
4148
+ getCtxs: function getCtxs(id) {
4149
+ return this.fieldCtx[id] || this.nameCtx[id] || (this.ctxs[id] ? [this.ctxs[id]] : []);
4150
+ },
4151
+ setIdCtx: function setIdCtx(ctx, key, type) {
4152
+ var field = "".concat(type, "Ctx");
4153
+
4154
+ if (!this[field][key]) {
4155
+ this[field][key] = [ctx];
4156
+ } else {
4157
+ this[field][key].push(ctx);
4158
+ }
4159
+ },
4160
+ rmIdCtx: function rmIdCtx(ctx, key, type) {
4161
+ var field = "".concat(type, "Ctx");
4162
+ var lst = this[field][key];
4163
+ if (!lst) return false;
4164
+ var flag = lst.splice(lst.indexOf(ctx) >>> 0, 1).length > 0;
4165
+
4166
+ if (!lst.length) {
4167
+ delete this[field][key];
4168
+ }
4169
+
4170
+ return flag;
4171
+ },
4172
+ getFieldCtx: function getFieldCtx(field) {
4173
+ return (this.fieldCtx[field] || [])[0];
4174
+ },
4175
+ getNameCtx: function getNameCtx(name) {
4176
+ return this.nameCtx[name] || [];
3980
4177
  },
3981
4178
  setCtx: function setCtx(ctx) {
3982
4179
  var id = ctx.id,
@@ -3984,9 +4181,9 @@
3984
4181
  name = ctx.name,
3985
4182
  rule = ctx.rule;
3986
4183
  this.ctxs[id] = ctx;
3987
- if (name) $set(this.nameCtx, name, ctx);
4184
+ name && this.setIdCtx(ctx, name, 'name');
3988
4185
  if (!ctx.input) return;
3989
- this.fieldCtx[field] = ctx;
4186
+ this.setIdCtx(ctx, field, 'field');
3990
4187
  this.setFormData(ctx, ctx.parser.toFormValue(rule.value, ctx));
3991
4188
 
3992
4189
  if (this.isMounted && !this.reloading) {
@@ -4020,7 +4217,7 @@
4020
4217
  var _this = this;
4021
4218
 
4022
4219
  var vm = this.vm;
4023
- var none = ['field', 'value', 'vm', 'template', 'name', 'config', 'control', 'inject', 'sync', 'payload', 'optionsTo'];
4220
+ var none = ['field', 'value', 'vm', 'template', 'name', 'config', 'control', 'inject', 'sync', 'payload', 'optionsTo', 'update'];
4024
4221
  Object.keys(ctx.rule).filter(function (k) {
4025
4222
  return none.indexOf(k) === -1;
4026
4223
  }).forEach(function (key) {
@@ -4029,6 +4226,15 @@
4029
4226
  return ctx.rule[key];
4030
4227
  }, function (n, o) {
4031
4228
  if (_this.loading || _this.noWatchFn || _this.reloading) return;
4229
+
4230
+ if (flag && ctx.parser.loadChildren === false) {
4231
+ _this.$render.clearCache(ctx);
4232
+
4233
+ _this.nextRefresh();
4234
+
4235
+ return;
4236
+ }
4237
+
4032
4238
  _this.watching = true; // if (key === 'hidden')
4033
4239
  // ctx.updateKey(true);
4034
4240
  // else
@@ -4036,13 +4242,13 @@
4036
4242
  if (key === 'link') {
4037
4243
  ctx.link();
4038
4244
  return;
4039
- } else if (['props', 'on', 'nativeOn'].indexOf(key) > -1) {
4245
+ } else if (['props', 'on', 'nativeOn', 'deep'].indexOf(key) > -1) {
4040
4246
  _this.parseInjectEvent(ctx.rule, n || {});
4041
4247
 
4042
4248
  if (key === 'props' && ctx.input) {
4043
4249
  _this.setFormData(ctx, ctx.parser.toFormValue(ctx.rule.value, ctx));
4044
4250
  }
4045
- } else if (['emit', 'nativeEmit'].indexOf(key) > -1) _this.parseEmit(ctx, key === 'emit');else if (key === 'type') {
4251
+ } else if (['emit', 'nativeEmit'].indexOf(key) > -1) _this.parseEmit(ctx, key === 'emit');else if (['prefix', 'suffix'].indexOf(key) > -1) n && _this.loadFn(n, ctx.rule);else if (key === 'type') {
4046
4252
  ctx.updateType();
4047
4253
 
4048
4254
  _this.bindParser(ctx);
@@ -4083,6 +4289,7 @@
4083
4289
  if (ctx.deleted) return;
4084
4290
  var id = ctx.id,
4085
4291
  field = ctx.field,
4292
+ input = ctx.input,
4086
4293
  name = ctx.name;
4087
4294
 
4088
4295
  if (ctx.input) {
@@ -4093,41 +4300,29 @@
4093
4300
  }
4094
4301
 
4095
4302
  $del(this.ctxs, id);
4096
- $del(this.$render.renderList, id);
4303
+ $del(this.$render.tempList, id);
4097
4304
  $del(this.$render.orgChildren, id);
4305
+ $del(this.vm.ctxInject, id);
4306
+ $del(this.formData, id);
4307
+ $del(this.subForm, id);
4098
4308
  $del(ctx, 'cacheValue');
4099
- var f = this.fieldCtx[field];
4100
-
4101
- if (field && (!f || f === ctx)) {
4102
- $del(this.formData, field);
4103
- $del(this.form, field);
4104
- $del(this.fieldCtx, field);
4105
- $del(this.subForm, field);
4106
- this.vm.$nextTick(function () {
4107
- return _this3.vm.$emit('removeField', field, ctx.rule, _this3.api);
4108
- });
4109
- }
4110
-
4111
- if (name && this.nameCtx[name] === ctx) {
4112
- $del(this.nameCtx, name);
4113
- }
4114
-
4115
- if (!this.reloading) {
4116
- this.deferSyncValue(function () {
4117
- if (is.trueArray(ctx.rule.children)) {
4118
- ctx.rule.children.forEach(function (h) {
4119
- return h.__fc__ && _this3.rmCtx(h.__fc__);
4120
- });
4309
+ input && this.rmIdCtx(ctx, field, 'field');
4310
+ name && this.rmIdCtx(ctx, name, 'name');
4311
+ this.deferSyncValue(function () {
4312
+ if (!_this3.reloading) {
4313
+ if (ctx.parser.loadChildren !== false) {
4314
+ if (is.trueArray(ctx.rule.children)) {
4315
+ ctx.rule.children.forEach(function (h) {
4316
+ return h.__fc__ && _this3.rmCtx(h.__fc__);
4317
+ });
4318
+ }
4121
4319
  }
4122
4320
 
4123
- _this3.syncValue();
4124
- });
4125
-
4126
- if (ctx.root === this.rules) {
4127
- this.vm._renderRule();
4321
+ if (ctx.root === _this3.rules) {
4322
+ _this3.vm._renderRule();
4323
+ }
4128
4324
  }
4129
- }
4130
-
4325
+ }, input);
4131
4326
  var index = this.sort.indexOf(id);
4132
4327
 
4133
4328
  if (index > -1) {
@@ -4137,9 +4332,8 @@
4137
4332
  this.$render.clearCache(ctx);
4138
4333
  ctx["delete"]();
4139
4334
  this.effect(ctx, 'deleted');
4140
- this.vm.$nextTick(function () {
4141
- return _this3.vm.$emit('removeRule', ctx.rule, _this3.api);
4142
- });
4335
+ input && !this.fieldCtx[field] && this.vm.$emit('removeField', field, ctx.rule, this.api);
4336
+ ctx.rule.__ctrl || this.vm.$emit('removeRule', ctx.rule, this.api);
4143
4337
  return ctx;
4144
4338
  }
4145
4339
  });
@@ -4218,6 +4412,13 @@
4218
4412
  }));
4219
4413
  });
4220
4414
  },
4415
+ ruleEffect: function ruleEffect(rule, event, append) {
4416
+ this.emitEffect({
4417
+ rule: rule,
4418
+ input: !!rule.field,
4419
+ type: this.getType(rule.type)
4420
+ }, event, append);
4421
+ },
4221
4422
  effect: function effect(ctx, event, custom) {
4222
4423
  this.emitEffect({
4223
4424
  rule: ctx.rule,
@@ -4227,17 +4428,10 @@
4227
4428
  custom: custom
4228
4429
  }, event);
4229
4430
  },
4230
- ruleEffect: function ruleEffect(rule, event) {
4231
- this.emitEffect({
4232
- rule: rule,
4233
- input: !!rule.field,
4234
- type: this.getType(rule.type)
4235
- }, event);
4236
- },
4237
4431
  getEffect: function getEffect(rule, name) {
4238
4432
  if (hasProperty(rule, 'effect') && hasProperty(rule.effect, name)) return rule.effect[name];else return undefined;
4239
4433
  },
4240
- emitEffect: function emitEffect(_ref, event) {
4434
+ emitEffect: function emitEffect(_ref, event, append) {
4241
4435
  var _this4 = this;
4242
4436
 
4243
4437
  var ctx = _ref.ctx,
@@ -4261,12 +4455,12 @@
4261
4455
  return;
4262
4456
  }
4263
4457
 
4264
- var data = {
4458
+ var data = _objectSpread2({
4265
4459
  value: effect[attr],
4266
4460
  getValue: function getValue() {
4267
4461
  return _this4.getEffect(rule, attr);
4268
4462
  }
4269
- };
4463
+ }, append || {});
4270
4464
 
4271
4465
  if (ctx) {
4272
4466
  data.getProp = function () {
@@ -4343,16 +4537,15 @@
4343
4537
  extend(Handler.prototype, {
4344
4538
  initData: function initData(rules) {
4345
4539
  extend(this, {
4346
- fieldCtx: {},
4347
4540
  ctxs: {},
4541
+ fieldCtx: {},
4348
4542
  nameCtx: {},
4349
4543
  sort: [],
4350
- rules: rules,
4351
- repeatRule: []
4544
+ rules: rules
4352
4545
  });
4353
- useHelper(rules);
4354
4546
  },
4355
4547
  init: function init() {
4548
+ this.appendData = _objectSpread2(_objectSpread2(_objectSpread2({}, this.fc.options.formData || {}), this.vm.value || {}), this.appendData);
4356
4549
  this.useProvider();
4357
4550
  this.usePage();
4358
4551
  this.loadRule();
@@ -4446,8 +4639,9 @@
4446
4639
  var fragment = {
4447
4640
  name: NAME$9,
4448
4641
  functional: true,
4642
+ props: ['vnode'],
4449
4643
  render: function render(h, ctx) {
4450
- return ctx.children;
4644
+ return ctx.props.vnode ? ctx.props.vnode : ctx.children;
4451
4645
  }
4452
4646
  };
4453
4647
 
@@ -4639,7 +4833,7 @@
4639
4833
  if (check()) return;
4640
4834
  set((option.parse || function (v) {
4641
4835
  return v.data;
4642
- })(body));
4836
+ })(body, rule, api));
4643
4837
  api.sync(rule);
4644
4838
  },
4645
4839
  onError: function onError(e) {
@@ -4714,7 +4908,9 @@
4714
4908
 
4715
4909
 
4716
4910
  function FormCreateFactory(config) {
4717
- var components = _defineProperty({}, fragment.name, fragment);
4911
+ var _fragment = _vue.extend(fragment);
4912
+
4913
+ var components = _defineProperty({}, fragment.name, _fragment);
4718
4914
 
4719
4915
  var parsers = {};
4720
4916
  var directives = {};
@@ -4797,9 +4993,14 @@
4797
4993
  return _this.api();
4798
4994
  }
4799
4995
 
4996
+ function factory() {
4997
+ return FormCreateFactory(config);
4998
+ }
4999
+
4800
5000
  function FormCreate(vm, rules, options) {
4801
5001
  extend(this, {
4802
5002
  vm: vm,
5003
+ create: create,
4803
5004
  manager: createManager(config.manager),
4804
5005
  parsers: parsers,
4805
5006
  providers: providers,
@@ -4916,8 +5117,10 @@
4916
5117
  component: component,
4917
5118
  directive: directive,
4918
5119
  register: register,
5120
+ fragment: _fragment,
4919
5121
  parser: parser,
4920
5122
  use: use,
5123
+ factory: factory,
4921
5124
  componentAlias: componentAlias,
4922
5125
  copyRule: copyRule,
4923
5126
  copyRules: copyRules,
@@ -4968,6 +5171,7 @@
4968
5171
  useAttr($formCreate);
4969
5172
  Vue.prototype.$formCreate = $formCreate;
4970
5173
  Vue.component('FormCreate', $form());
5174
+ Vue.component('FcFragment', _fragment);
4971
5175
  }
4972
5176
  });
4973
5177
  }
@@ -5338,10 +5542,9 @@
5338
5542
  _col = _this$rule$props.col;
5339
5543
  var item = isFalse(rule.wrap.show) ? children : this.$r(mergeProps([rule.wrap, {
5340
5544
  props: _objectSpread2(_objectSpread2({
5341
- label: rule.title.title,
5342
5545
  labelWidth: labelWidth
5343
5546
  }, rule.wrap || {}), {}, {
5344
- prop: ctx.field,
5547
+ prop: ctx.id,
5345
5548
  rules: rule.validate
5346
5549
  }),
5347
5550
  "class": rule.className,
@@ -5352,6 +5555,7 @@
5352
5555
  return inline === true || isFalse(_col) || isFalse(col.show) ? item : this.makeCol(rule, uni, [item]);
5353
5556
  },
5354
5557
  isTitle: function isTitle(rule) {
5558
+ if (this.options.form.title === false) return false;
5355
5559
  var title = rule.title;
5356
5560
  return !(!title.title && !title["native"] || isFalse(title.show));
5357
5561
  },
@@ -5589,7 +5793,7 @@
5589
5793
  useFrame(maker);
5590
5794
  useTimePicker(maker);
5591
5795
 
5592
- var css_248z$2 = ".form-create .form-create .ivu-form-item {\n margin-bottom: 24px;\n}\n\n.form-create .form-create .ivu-form-item .ivu-form-item {\n margin-bottom: 0px;\n}\n";
5796
+ var css_248z$2 = ".form-create .form-create .ivu-form-item {\n margin-bottom: 24px;\n}\n\n.form-create .form-create .ivu-form-item .ivu-form-item {\n margin-bottom: 0px;\n}\n\n.form-create{\n transform: rotateZ(0);\n}\n";
5593
5797
  styleInject(css_248z$2);
5594
5798
 
5595
5799
  function tidyBtnProp(btn, def) {
@@ -5618,7 +5822,7 @@
5618
5822
  flag = args;
5619
5823
  }
5620
5824
 
5621
- callback.apply(void 0, _toConsumableArray(flag));
5825
+ callback && callback.apply(void 0, _toConsumableArray(flag));
5622
5826
  });
5623
5827
  };
5624
5828
 
@@ -5651,13 +5855,14 @@
5651
5855
  }
5652
5856
  },
5653
5857
  validateField: function validateField(field, callback) {
5654
- if (!h.fieldCtx[field]) return;
5655
- var sub = h.subForm[field];
5858
+ var ctx = h.getFieldCtx(field);
5859
+ if (!ctx) return;
5860
+ var sub = h.subForm[ctx.id];
5656
5861
  var len = 0;
5657
5862
  var flag;
5658
5863
 
5659
5864
  var validate = function validate() {
5660
- h.$manager.validateField(field, function () {
5865
+ h.$manager.validateField(ctx.id, function () {
5661
5866
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
5662
5867
  args[_key3] = arguments[_key3];
5663
5868
  }
@@ -5665,10 +5870,10 @@
5665
5870
  if (args[0]) {
5666
5871
  flag = args;
5667
5872
  } else if (flag) {
5668
- return callback('子表单验证未通过');
5873
+ return callback && callback('子表单验证未通过');
5669
5874
  }
5670
5875
 
5671
- callback.apply(void 0, _toConsumableArray(flag || args));
5876
+ callback && callback.apply(void 0, _toConsumableArray(flag || args));
5672
5877
  });
5673
5878
  };
5674
5879
 
@@ -5707,23 +5912,25 @@
5707
5912
  var clearSub = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
5708
5913
  api.helper.tidyFields(fields).forEach(function (field) {
5709
5914
  if (clearSub) _this.clearSubValidateState(field);
5710
- var ctx = h.fieldCtx[field];
5711
- if (!ctx) return;
5712
- h.$manager.clearValidateState(ctx);
5915
+ h.getCtxs(field).forEach(function (ctx) {
5916
+ h.$manager.clearValidateState(ctx);
5917
+ });
5713
5918
  });
5714
5919
  },
5715
5920
  clearSubValidateState: function clearSubValidateState(fields) {
5716
5921
  api.helper.tidyFields(fields).forEach(function (field) {
5717
- var subForm = h.subForm[field];
5718
- if (!subForm) return;
5922
+ h.getCtxs(field).forEach(function (ctx) {
5923
+ var subForm = h.subForm[ctx.id];
5924
+ if (!subForm) return;
5719
5925
 
5720
- if (Array.isArray(subForm)) {
5721
- subForm.forEach(function (form) {
5722
- form.clearValidateState();
5723
- });
5724
- } else if (subForm) {
5725
- subForm.clearValidateState();
5726
- }
5926
+ if (Array.isArray(subForm)) {
5927
+ subForm.forEach(function (form) {
5928
+ form.clearValidateState();
5929
+ });
5930
+ } else if (subForm) {
5931
+ subForm.clearValidateState();
5932
+ }
5933
+ });
5727
5934
  });
5728
5935
  },
5729
5936
  btn: {
@@ -5826,7 +6033,7 @@
5826
6033
  function ivuFormCreate() {
5827
6034
  return FormCreateFactory({
5828
6035
  ui: "".concat("view-design"),
5829
- version: "".concat("2.5.7"),
6036
+ version: "".concat("2.5.11"),
5830
6037
  manager: manager,
5831
6038
  install: install,
5832
6039
  extendApi: extendApi,