@form-create/element-ui 3.2.8 → 3.2.9

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/element-ui v3.2.8
2
+ * @form-create/element-ui v3.2.9
3
3
  * (c) 2018-2024 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -1290,7 +1290,7 @@
1290
1290
  return vue.createVNode(vue.resolveComponent("ElTree"), vue.mergeProps(this.$attrs, {
1291
1291
  "ref": "tree",
1292
1292
  "onCheck": this.updateValue,
1293
- "onNode-click": this.updateValue
1293
+ "onNodeClick": this.updateValue
1294
1294
  }), this.$slots);
1295
1295
  },
1296
1296
  mounted: function mounted() {
@@ -1418,7 +1418,7 @@
1418
1418
  }, [vue.createVNode(vue.resolveComponent("ElUpload"), vue.mergeProps({
1419
1419
  "key": len
1420
1420
  }, this.$attrs, {
1421
- "list-type": this.listType || 'picture-card',
1421
+ "listType": this.listType || 'picture-card',
1422
1422
  "class": {
1423
1423
  '_fc-exceed': this.$attrs.limit ? this.$attrs.limit <= len : false
1424
1424
  },
@@ -2153,6 +2153,15 @@
2153
2153
  var vm = vue.getCurrentInstance();
2154
2154
  vue.provide('parentFC', vm);
2155
2155
  var parent = vue.inject('parentFC', null);
2156
+ var top = parent;
2157
+
2158
+ if (parent) {
2159
+ while (top.setupState.parent) {
2160
+ top = top.setupState.parent;
2161
+ }
2162
+ } else {
2163
+ top = vm;
2164
+ }
2156
2165
 
2157
2166
  var _toRefs = vue.toRefs(props),
2158
2167
  rule = _toRefs.rule,
@@ -2285,6 +2294,7 @@
2285
2294
  if (fc.$handle.isBreakWatch() || n.length === data.renderRule.length && n.every(function (v) {
2286
2295
  return data.renderRule.indexOf(v) > -1;
2287
2296
  })) return;
2297
+ fc.$handle.updateAppendData();
2288
2298
  fc.$handle.reloadRule(rule.value);
2289
2299
  vm.setupState.renderRule();
2290
2300
  });
@@ -2310,12 +2320,14 @@
2310
2320
  fapi.setValue(n || {});
2311
2321
  }
2312
2322
  }, {
2313
- deep: true
2323
+ deep: true,
2324
+ flush: 'post'
2314
2325
  });
2315
2326
  vue.watch(function () {
2316
2327
  return props.index;
2317
2328
  }, function () {
2318
2329
  fapi.coverValue({});
2330
+ fc.$handle.updateAppendData();
2319
2331
  vue.nextTick(function () {
2320
2332
  vue.nextTick(function () {
2321
2333
  fapi.clearValidateState();
@@ -2327,6 +2339,7 @@
2327
2339
  return _objectSpread2(_objectSpread2({
2328
2340
  fc: vue.markRaw(fc),
2329
2341
  parent: parent ? vue.markRaw(parent) : parent,
2342
+ top: vue.markRaw(top),
2330
2343
  fapi: vue.markRaw(fapi)
2331
2344
  }, vue.toRefs(data)), {}, {
2332
2345
  getGroupInject: function getGroupInject() {
@@ -2453,6 +2466,16 @@
2453
2466
  console.error(e);
2454
2467
  }
2455
2468
 
2469
+ function toCase(str) {
2470
+ var to = str.replace(/(-[a-z])/g, function (v) {
2471
+ return v.replace('-', '').toLocaleUpperCase();
2472
+ });
2473
+ return lower(to);
2474
+ }
2475
+ function lower(str) {
2476
+ return str.replace(str[0], str[0].toLowerCase());
2477
+ }
2478
+
2456
2479
  var PREFIX = '[[FORM-CREATE-PREFIX-';
2457
2480
  var SUFFIX = '-FORM-CREATE-SUFFIX]]';
2458
2481
  var $T = '$FN:';
@@ -2680,6 +2703,10 @@
2680
2703
  var prop = _objectSpread2({}, rule.props || {});
2681
2704
 
2682
2705
  Object.keys(rule.on || {}).forEach(function (k) {
2706
+ if (k.indexOf('-') > 0) {
2707
+ k = toCase(k);
2708
+ }
2709
+
2683
2710
  var name = "on".concat(upper(k));
2684
2711
 
2685
2712
  if (Array.isArray(prop[name])) {
@@ -3369,7 +3396,7 @@
3369
3396
  },
3370
3397
  method: function method(id, name) {
3371
3398
  var el = api.el(id);
3372
- if (!el || !el[name]) throw new Error(format('err', "".concat(name, "\u65B9\u6CD5\u4E0D\u5B58\u5728")));
3399
+ if (!el || !el[name]) throw new Error(format('err', "".concat(name, " \u65B9\u6CD5\u4E0D\u5B58\u5728")));
3373
3400
  return function () {
3374
3401
  return el[name].apply(el, arguments);
3375
3402
  };
@@ -3434,6 +3461,11 @@
3434
3461
  findRules(ctx ? ctx.loadChildrenPending() : rule.children);
3435
3462
  return rules;
3436
3463
  },
3464
+ getParentRule: function getParentRule(id) {
3465
+ var flag = _typeof(id) === 'object';
3466
+ var ctx = flag ? byCtx(id) : h.getCtx(id);
3467
+ return ctx.parent.rule;
3468
+ },
3437
3469
  getParentSubRule: function getParentSubRule(id) {
3438
3470
  var flag = _typeof(id) === 'object';
3439
3471
  var ctx = flag ? byCtx(id) : h.getCtx(id);
@@ -3542,8 +3574,8 @@
3542
3574
  getData: function getData(id, def) {
3543
3575
  return h.fc.getLoadData(id, def);
3544
3576
  },
3545
- setData: function setData(id, data) {
3546
- return h.fc.setData(id, data);
3577
+ setData: function setData(id, data, isGlobal) {
3578
+ return h.fc.setData(id, data, isGlobal);
3547
3579
  },
3548
3580
  refreshData: function refreshData(id) {
3549
3581
  return h.fc.refreshData(id);
@@ -3616,16 +3648,6 @@
3616
3648
  });
3617
3649
  }
3618
3650
 
3619
- function toCase(str) {
3620
- var to = str.replace(/(-[a-z])/g, function (v) {
3621
- return v.replace('-', '').toLocaleUpperCase();
3622
- });
3623
- return lower(to);
3624
- }
3625
- function lower(str) {
3626
- return str.replace(str[0], str[0].toLowerCase());
3627
- }
3628
-
3629
3651
  function toString(val) {
3630
3652
  return val == null ? '' : _typeof(val) === 'object' ? JSON.stringify(val, null, 2) : String(val);
3631
3653
  }
@@ -3784,7 +3806,7 @@
3784
3806
  this.setOptions(ctx);
3785
3807
  this.ctxProp(ctx);
3786
3808
  var prop = ctx.prop;
3787
- prop.preview = !!(prop.preview != null ? prop.preview : this.vm.props.preview !== undefined ? this.vm.props.preview : this.options.preview || false);
3809
+ prop.preview = !!(prop.preview != null ? prop.preview : this.$handle.preview);
3788
3810
  prop.props.formCreateInject = this.injectProp(ctx);
3789
3811
  var cacheFlag = prop.cache !== false;
3790
3812
  var preview = prop.preview;
@@ -3937,7 +3959,10 @@
3937
3959
  id: ctx.id,
3938
3960
  field: ctx.field,
3939
3961
  rule: ctx.rule,
3940
- input: ctx.input
3962
+ input: ctx.input,
3963
+ updateValue: function updateValue(data) {
3964
+ _this6.$handle.onUpdateValue(ctx, data);
3965
+ }
3941
3966
  };
3942
3967
  }
3943
3968
 
@@ -5070,11 +5095,23 @@
5070
5095
  }
5071
5096
  });
5072
5097
  });
5073
- hideLst.length && vue.nextTick(function () {
5074
- hideLst.forEach(function (v) {
5075
- return v();
5076
- });
5077
- });
5098
+
5099
+ if (hideLst.length) {
5100
+ if (this.loading) {
5101
+ hideLst.length && this.bus.$once('load-end', function () {
5102
+ hideLst.forEach(function (v) {
5103
+ return v();
5104
+ });
5105
+ });
5106
+ } else {
5107
+ hideLst.length && vue.nextTick(function () {
5108
+ hideLst.forEach(function (v) {
5109
+ return v();
5110
+ });
5111
+ });
5112
+ }
5113
+ }
5114
+
5078
5115
  this.vm.emit('control', ctx.origin, this.api);
5079
5116
  this.effect(ctx, 'control');
5080
5117
  return flag;
@@ -5253,7 +5290,10 @@
5253
5290
  this.syncValue();
5254
5291
  },
5255
5292
  appendValue: function appendValue(rule) {
5256
- if (!rule.field || !hasProperty(this.appendData, rule.field)) return;
5293
+ if ((!rule.field || !hasProperty(this.appendData, rule.field)) && !this.options.forceCoverValue) {
5294
+ return;
5295
+ }
5296
+
5257
5297
  rule.value = this.appendData[rule.field];
5258
5298
  delete this.appendData[rule.field];
5259
5299
  },
@@ -5540,123 +5580,135 @@
5540
5580
  }
5541
5581
 
5542
5582
  this.bus.$once('load-end', function () {
5543
- var computed = ctx.rule.computed;
5583
+ var computedRule = ctx.rule.computed;
5544
5584
 
5545
- if (!computed) {
5585
+ if (!computedRule) {
5546
5586
  return;
5547
5587
  }
5548
5588
 
5549
- if (_typeof(computed) !== 'object') {
5550
- computed = {
5551
- value: computed
5589
+ if (_typeof(computedRule) !== 'object') {
5590
+ computedRule = {
5591
+ value: computedRule
5552
5592
  };
5553
5593
  }
5554
5594
 
5555
- Object.keys(computed).forEach(function (k) {
5556
- ctx.watch.push(vue.watch(function () {
5557
- var item = computed[k];
5595
+ Object.keys(computedRule).forEach(function (k) {
5596
+ var computedValue = vue.computed(function () {
5597
+ var item = computedRule[k];
5558
5598
  if (!item) return undefined;
5559
- var fn;
5560
-
5561
- if (_typeof(item) === 'object') {
5562
- var group = ctx.getParentGroup();
5599
+ return _this.compute(ctx, item);
5600
+ });
5563
5601
 
5564
- var checkCondition = function checkCondition(item) {
5565
- item = Array.isArray(item) ? {
5566
- mode: 'AND',
5567
- group: item
5568
- } : item;
5602
+ var callback = function callback(n) {
5603
+ if (k === 'value') {
5604
+ _this.onInput(ctx, n);
5605
+ } else if (k[0] === '$') {
5606
+ _this.api.setEffect(ctx.id, k, n);
5607
+ } else {
5608
+ deepSet(ctx.rule, k, n);
5609
+ }
5610
+ };
5569
5611
 
5570
- if (!is.trueArray(item.group)) {
5571
- return true;
5572
- }
5612
+ if (k === 'value' ? [undefined, null, ''].indexOf(ctx.rule.value) > -1 : computedValue.value !== deepGet(ctx.rule, k)) {
5613
+ callback(computedValue.value);
5614
+ }
5573
5615
 
5574
- var or = item.mode === 'OR';
5575
- var valid = true;
5616
+ ctx.watch.push(vue.watch(computedValue, function (n) {
5617
+ setTimeout(function () {
5618
+ callback(n);
5619
+ });
5620
+ }));
5621
+ });
5622
+ });
5623
+ this.watchEffect(ctx);
5624
+ },
5625
+ compute: function compute(ctx, item) {
5626
+ var _this2 = this;
5576
5627
 
5577
- for (var i = 0; i < item.group.length; i++) {
5578
- var one = item.group[i];
5579
- var flag = void 0;
5628
+ var fn;
5580
5629
 
5581
- if (one.mode) {
5582
- flag = checkCondition(one);
5583
- } else if (!condition[one.condition]) {
5584
- flag = false;
5585
- } else {
5586
- flag = new Function('_$', '_$val', '$form', '_group', "with($form){with(this){with(_group){ return _$['".concat(one.condition, "'](").concat(one.field, ", ").concat(one.compare ? one.compare : '_$val', "); }}}")).call(_this.api.form, condition, one.value, _this.api.top.form, group ? _this.subRuleData[group.id] || {} : {});
5587
- }
5630
+ if (_typeof(item) === 'object') {
5631
+ var group = ctx.getParentGroup();
5588
5632
 
5589
- if (or && flag) {
5590
- return true;
5591
- }
5633
+ var checkCondition = function checkCondition(item) {
5634
+ item = Array.isArray(item) ? {
5635
+ mode: 'AND',
5636
+ group: item
5637
+ } : item;
5592
5638
 
5593
- if (!or) {
5594
- valid = valid && flag;
5595
- }
5596
- }
5639
+ if (!is.trueArray(item.group)) {
5640
+ return true;
5641
+ }
5597
5642
 
5598
- return or ? false : valid;
5599
- };
5643
+ var or = item.mode === 'OR';
5644
+ var valid = true;
5600
5645
 
5601
- var _val = checkCondition(item);
5646
+ for (var i = 0; i < item.group.length; i++) {
5647
+ var one = item.group[i];
5648
+ var flag = void 0;
5602
5649
 
5603
- return item.invert === true ? !_val : _val;
5604
- } else if (is.Function(item)) {
5605
- fn = function fn() {
5606
- return item(_this.api.form, _this.api);
5607
- };
5650
+ if (one.mode) {
5651
+ flag = checkCondition(one);
5652
+ } else if (!condition[one.condition]) {
5653
+ flag = false;
5608
5654
  } else {
5609
- var _group = ctx.getParentGroup();
5655
+ flag = new Function('$condition', '$val', '$form', '$group', "with($form){with(this){with($group){ return $condition['".concat(one.condition, "'](").concat(one.field, ", ").concat(one.compare ? one.compare : '$val', "); }}}")).call(_this2.api.form, condition, one.value, _this2.api.top.form, group ? _this2.subRuleData[group.id] || {} : {});
5656
+ }
5610
5657
 
5611
- fn = function fn() {
5612
- return new Function('_formulas', '$form', '_group', '$rule', '$api', "with($form){with(this){with(_group){with(_formulas){ return ".concat(item, " }}}}")).call(_this.api.form, _this.fc.formulas, _this.api.top.form, _group ? _this.subRuleData[_group.id] || {} : {}, ctx.rule, _this.api);
5613
- };
5658
+ if (or && flag) {
5659
+ return true;
5614
5660
  }
5615
5661
 
5616
- return invoke(fn, undefined);
5617
- }, function (n) {
5618
- setTimeout(function () {
5619
- if (k === 'value') {
5620
- _this.onInput(ctx, n);
5621
- } else if (k[0] === '$') {
5622
- _this.api.setEffect(ctx.id, k, n);
5623
- } else {
5624
- deepSet(ctx.rule, k, n);
5625
- }
5626
- });
5627
- }, {
5628
- immediate: k === 'value' ? [undefined, null, ''].indexOf(ctx.rule.value) > -1 : true
5629
- }));
5630
- });
5631
- });
5632
- this.watchEffect(ctx);
5662
+ if (!or) {
5663
+ valid = valid && flag;
5664
+ }
5665
+ }
5666
+
5667
+ return or ? false : valid;
5668
+ };
5669
+
5670
+ var val = checkCondition(item);
5671
+ return item.invert === true ? !val : val;
5672
+ } else if (is.Function(item)) {
5673
+ fn = function fn() {
5674
+ return item(_this2.api.form, _this2.api);
5675
+ };
5676
+ } else {
5677
+ var _group = ctx.getParentGroup();
5678
+
5679
+ fn = function fn() {
5680
+ return new Function('$formulas', '$form', '$group', '$rule', '$api', "with($form){with(this){with($group){with($formulas){ return ".concat(item, " }}}}")).call(_this2.api.form, _this2.fc.formulas, _this2.api.top.form, _group ? _this2.subRuleData[_group.id] || {} : {}, ctx.rule, _this2.api);
5681
+ };
5682
+ }
5683
+
5684
+ return invoke(fn, undefined);
5633
5685
  },
5634
5686
  updateChildren: function updateChildren(ctx, n, o) {
5635
- var _this2 = this;
5687
+ var _this3 = this;
5636
5688
 
5637
5689
  this.deferSyncValue(function () {
5638
5690
  o && o.forEach(function (child) {
5639
5691
  if ((n || []).indexOf(child) === -1 && child && !is.String(child) && child.__fc__ && child.__fc__.parent === ctx) {
5640
- _this2.rmCtx(child.__fc__);
5692
+ _this3.rmCtx(child.__fc__);
5641
5693
  }
5642
5694
  });
5643
5695
 
5644
5696
  if (is.trueArray(n)) {
5645
- _this2.loadChildren(n, ctx);
5697
+ _this3.loadChildren(n, ctx);
5646
5698
 
5647
- _this2.bus.$emit('update', _this2.api);
5699
+ _this3.bus.$emit('update', _this3.api);
5648
5700
  }
5649
5701
  });
5650
5702
  },
5651
5703
  rmSub: function rmSub(sub) {
5652
- var _this3 = this;
5704
+ var _this4 = this;
5653
5705
 
5654
5706
  is.trueArray(sub) && sub.forEach(function (r) {
5655
- r && r.__fc__ && _this3.rmCtx(r.__fc__);
5707
+ r && r.__fc__ && _this4.rmCtx(r.__fc__);
5656
5708
  });
5657
5709
  },
5658
5710
  rmCtx: function rmCtx(ctx) {
5659
- var _this4 = this;
5711
+ var _this5 = this;
5660
5712
 
5661
5713
  if (ctx.deleted) return;
5662
5714
  var id = ctx.id,
@@ -5685,19 +5737,19 @@
5685
5737
  }
5686
5738
 
5687
5739
  this.deferSyncValue(function () {
5688
- if (!_this4.reloading) {
5740
+ if (!_this5.reloading) {
5689
5741
  if (ctx.parser.loadChildren !== false) {
5690
5742
  var children = ctx.getPending('children', ctx.rule.children);
5691
5743
 
5692
5744
  if (is.trueArray(children)) {
5693
5745
  children.forEach(function (h) {
5694
- return h.__fc__ && _this4.rmCtx(h.__fc__);
5746
+ return h.__fc__ && _this5.rmCtx(h.__fc__);
5695
5747
  });
5696
5748
  }
5697
5749
  }
5698
5750
 
5699
- if (ctx.root === _this4.rules) {
5700
- _this4.vm.setupState.renderRule();
5751
+ if (ctx.root === _this5.rules) {
5752
+ _this5.vm.setupState.renderRule();
5701
5753
  }
5702
5754
  }
5703
5755
  }, input);
@@ -5934,6 +5986,9 @@
5934
5986
  },
5935
5987
  bus: function bus() {
5936
5988
  return fc.bus;
5989
+ },
5990
+ preview: function preview() {
5991
+ return fc.vm.props.preview != null ? fc.vm.props.preview : this.options.preview || false;
5937
5992
  }
5938
5993
  });
5939
5994
  extend(this, {
@@ -5981,7 +6036,7 @@
5981
6036
  });
5982
6037
  },
5983
6038
  init: function init() {
5984
- this.appendData = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options.formData || {}), this.fc.vm.props.modelValue || {}), this.appendData);
6039
+ this.updateAppendData();
5985
6040
  this.useProvider();
5986
6041
  this.usePage();
5987
6042
  this.loadRule();
@@ -5990,6 +6045,9 @@
5990
6045
 
5991
6046
  this.lifecycle('created');
5992
6047
  },
6048
+ updateAppendData: function updateAppendData() {
6049
+ this.appendData = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options.formData || {}), this.fc.vm.props.modelValue || {}), this.appendData);
6050
+ },
5993
6051
  isBreakWatch: function isBreakWatch() {
5994
6052
  return this.loading || this.noWatchFn || this.reloading;
5995
6053
  },
@@ -6270,13 +6328,21 @@
6270
6328
  var componentValidate = {
6271
6329
  name: 'componentValidate',
6272
6330
  load: function load(attr, rule, api) {
6273
- var method = attr.getValue();
6331
+ var options = attr.getValue();
6274
6332
 
6275
- if (!method) {
6333
+ if (!options || options.method === false) {
6276
6334
  attr.clearProp();
6277
6335
  api.clearValidateState([rule.field]);
6278
6336
  } else {
6279
- attr.getProp().validate = [{
6337
+ if (!is.Object(options)) {
6338
+ options = {
6339
+ method: options
6340
+ };
6341
+ }
6342
+
6343
+ var method = options.method;
6344
+ delete options.method;
6345
+ attr.getProp().validate = [_objectSpread2(_objectSpread2({}, options), {}, {
6280
6346
  validator: function validator() {
6281
6347
  var ctx = byCtx(rule);
6282
6348
 
@@ -6285,14 +6351,14 @@
6285
6351
  args[_key] = arguments[_key];
6286
6352
  }
6287
6353
 
6288
- return api.exec.apply(api, [ctx.id, method === true ? 'formCreateValidate' : method].concat(args, [{
6354
+ return api.exec.apply(api, [ctx.id, is.String(method) ? method : 'formCreateValidate'].concat(args, [{
6289
6355
  attr: attr,
6290
6356
  rule: rule,
6291
6357
  api: api
6292
6358
  }]));
6293
6359
  }
6294
6360
  }
6295
- }];
6361
+ })];
6296
6362
  }
6297
6363
  },
6298
6364
  watch: function watch() {
@@ -6623,7 +6689,7 @@
6623
6689
 
6624
6690
  function register() {
6625
6691
  var data = nameProp.apply(void 0, arguments);
6626
- if (data.id && data.prop) providers[data.id] = _objectSpread2(_objectSpread2({}, data.prop), {}, {
6692
+ if (data.id && data.prop) providers[data.id] = is.Function(data.prop) ? data.prop : _objectSpread2(_objectSpread2({}, data.prop), {}, {
6627
6693
  name: data.id
6628
6694
  });
6629
6695
  }
@@ -6769,8 +6835,8 @@
6769
6835
  }
6770
6836
  }
6771
6837
 
6772
- function setData(id, data) {
6773
- loadData[id] = data;
6838
+ function _setData(id, data) {
6839
+ deepSet(loadData, id, data);
6774
6840
  refreshData(id);
6775
6841
  }
6776
6842
 
@@ -6786,7 +6852,8 @@
6786
6852
  };
6787
6853
 
6788
6854
  callback._driver = true;
6789
- setData(id, callback);
6855
+
6856
+ _setData(id, callback);
6790
6857
  }
6791
6858
 
6792
6859
  function getData(id, def) {
@@ -6847,8 +6914,6 @@
6847
6914
  },
6848
6915
  drivers: drivers,
6849
6916
  renderDriver: null,
6850
- setData: setData,
6851
- getData: getData,
6852
6917
  refreshData: refreshData,
6853
6918
  loadData: loadData,
6854
6919
  CreateNode: CreateNode,
@@ -6856,7 +6921,8 @@
6856
6921
  unwatch: [],
6857
6922
  options: vue.ref({}),
6858
6923
  extendApiFn: extendApiFn,
6859
- fetchCache: new WeakMap()
6924
+ fetchCache: new WeakMap(),
6925
+ tmpData: {}
6860
6926
  });
6861
6927
  listener.forEach(function (item) {
6862
6928
  _this.bus.$on(item.name, item.callback);
@@ -7044,6 +7110,14 @@
7044
7110
  }
7045
7111
  }
7046
7112
  },
7113
+ setData: function setData(id, data, isGlobal) {
7114
+ if (!isGlobal) {
7115
+ deepSet(this.vm.setupState.top.setupState.fc.tmpData, id, data);
7116
+ this.bus.$emit('$loadData.' + id);
7117
+ } else {
7118
+ _setData(id, data);
7119
+ }
7120
+ },
7047
7121
  getLoadData: function getLoadData(id, def) {
7048
7122
  var val = null;
7049
7123
 
@@ -7064,11 +7138,12 @@
7064
7138
  val = this.globalVarDriver(split.join('.'));
7065
7139
  split = [];
7066
7140
  } else {
7067
- val = getData(id, def);
7141
+ var tmpData = this.vm.setupState.top.setupState.fc.tmpData;
7142
+ val = hasProperty(tmpData, key) ? deepGet(tmpData, id) : getData(key);
7068
7143
  split = [];
7069
7144
  }
7070
7145
 
7071
- if (split.length) {
7146
+ if (val && split.length) {
7072
7147
  val = deepGet(val, split);
7073
7148
  }
7074
7149
  }
@@ -7204,6 +7279,7 @@
7204
7279
  listener.forEach(function (item) {
7205
7280
  _this7.bus.$off(item.name, item.callback);
7206
7281
  });
7282
+ this.tmpData = {};
7207
7283
  this.unwatch.forEach(function (fn) {
7208
7284
  return fn();
7209
7285
  });
@@ -7226,7 +7302,7 @@
7226
7302
  extendApi: extendApi,
7227
7303
  getData: getData,
7228
7304
  setDataDriver: setDataDriver,
7229
- setData: setData,
7305
+ setData: _setData,
7230
7306
  removeData: removeData,
7231
7307
  refreshData: refreshData,
7232
7308
  maker: maker,
@@ -7644,7 +7720,7 @@
7644
7720
  e.preventDefault();
7645
7721
  }
7646
7722
  },
7647
- "class": [form.className, form["class"], 'form-create', this.options.preview ? 'is-preview' : ''],
7723
+ "class": [form.className, form["class"], 'form-create', this.$handle.preview ? 'is-preview' : ''],
7648
7724
  style: form.style,
7649
7725
  type: 'form'
7650
7726
  };
@@ -7664,7 +7740,7 @@
7664
7740
  render: function render(children) {
7665
7741
  var _this2 = this;
7666
7742
 
7667
- if (children.slotLen() && !this.options.preview) {
7743
+ if (children.slotLen() && !this.$handle.preview) {
7668
7744
  children.setSlot(undefined, function () {
7669
7745
  return _this2.makeFormBtn();
7670
7746
  });
@@ -8207,7 +8283,7 @@
8207
8283
  function elmFormCreate() {
8208
8284
  return FormCreateFactory({
8209
8285
  ui: 'element-ui',
8210
- version: '3.2.8',
8286
+ version: '3.2.9',
8211
8287
  manager: manager,
8212
8288
  extendApi: extendApi,
8213
8289
  install: install,