@form-create/view-design 2.5.24 → 2.5.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-create.js +76 -62
- package/dist/form-create.min.js +2 -2
- package/dist/form-create.min.js.map +1 -1
- package/package.json +4 -5
- package/types/config.d.ts +9 -13
package/dist/form-create.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @form-create/view-design v2.5.
|
|
2
|
+
* @form-create/view-design v2.5.25
|
|
3
3
|
* (c) 2018-2022 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -305,20 +305,22 @@
|
|
|
305
305
|
},
|
|
306
306
|
render: function render() {
|
|
307
307
|
var h = arguments[0];
|
|
308
|
-
return h("CheckboxGroup", helper([{}, this.formCreateInject.prop, {
|
|
309
|
-
"
|
|
310
|
-
|
|
311
|
-
}
|
|
308
|
+
return h("CheckboxGroup", helper([{}, this.formCreateInject.prop, {}, {
|
|
309
|
+
"props": {
|
|
310
|
+
value: this.trueValue
|
|
311
|
+
}
|
|
312
|
+
}, {
|
|
312
313
|
"on": {
|
|
313
314
|
"input": this.onInput
|
|
314
315
|
}
|
|
315
316
|
}]), [this.options().map(function (opt, index) {
|
|
316
317
|
var props = _objectSpread2({}, opt);
|
|
317
318
|
delete props.value;
|
|
318
|
-
return h("Checkbox", {
|
|
319
|
-
"props":
|
|
319
|
+
return h("Checkbox", helper([{}, {
|
|
320
|
+
"props": props
|
|
321
|
+
}, {
|
|
320
322
|
"key": '' + index + '-' + opt.value
|
|
321
|
-
});
|
|
323
|
+
}]));
|
|
322
324
|
}), getSlot(this.$slots)]);
|
|
323
325
|
}
|
|
324
326
|
};
|
|
@@ -738,28 +740,30 @@
|
|
|
738
740
|
});
|
|
739
741
|
return h("div", {
|
|
740
742
|
"class": "_fc-frame"
|
|
741
|
-
}, [node, h("Modal", {
|
|
742
|
-
"
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
}
|
|
743
|
+
}, [node, h("Modal", helper([{}, {
|
|
744
|
+
"props": {
|
|
745
|
+
mask: this.previewMask,
|
|
746
|
+
title: modalTitle,
|
|
747
|
+
footerHide: true
|
|
748
|
+
}
|
|
749
|
+
}, {
|
|
747
750
|
"model": {
|
|
748
751
|
value: _this9.previewVisible,
|
|
749
752
|
callback: function callback($$v) {
|
|
750
753
|
_this9.previewVisible = $$v;
|
|
751
754
|
}
|
|
752
755
|
}
|
|
753
|
-
}, [h("img", {
|
|
756
|
+
}]), [h("img", {
|
|
754
757
|
"style": "width: 100%",
|
|
755
758
|
"attrs": {
|
|
756
759
|
"src": this.previewImage
|
|
757
760
|
}
|
|
758
|
-
})]), h("Modal", {
|
|
759
|
-
"props": _objectSpread2({
|
|
761
|
+
})]), h("Modal", helper([{}, {
|
|
762
|
+
"props": _objectSpread2({
|
|
760
763
|
width: width,
|
|
761
764
|
title: title
|
|
762
|
-
}, this.modal)
|
|
765
|
+
}, this.modal)
|
|
766
|
+
}, {
|
|
763
767
|
"on": {
|
|
764
768
|
"on-cancel": function onCancel() {
|
|
765
769
|
return _this9.closeModel(true);
|
|
@@ -771,7 +775,7 @@
|
|
|
771
775
|
_this9.frameVisible = $$v;
|
|
772
776
|
}
|
|
773
777
|
}
|
|
774
|
-
}, [this.frameVisible || !this.reload ? h("iframe", {
|
|
778
|
+
}]), [this.frameVisible || !this.reload ? h("iframe", {
|
|
775
779
|
"ref": "frame",
|
|
776
780
|
"attrs": {
|
|
777
781
|
"src": src,
|
|
@@ -853,20 +857,22 @@
|
|
|
853
857
|
},
|
|
854
858
|
render: function render() {
|
|
855
859
|
var h = arguments[0];
|
|
856
|
-
return h("RadioGroup", helper([{}, this.formCreateInject.prop, {
|
|
857
|
-
"
|
|
858
|
-
|
|
859
|
-
}
|
|
860
|
+
return h("RadioGroup", helper([{}, this.formCreateInject.prop, {}, {
|
|
861
|
+
"props": {
|
|
862
|
+
value: this.trueValue
|
|
863
|
+
}
|
|
864
|
+
}, {
|
|
860
865
|
"on": {
|
|
861
866
|
"input": this.onInput
|
|
862
867
|
}
|
|
863
868
|
}]), [this.options().map(function (opt, index) {
|
|
864
869
|
var props = _objectSpread2({}, opt);
|
|
865
870
|
delete props.value;
|
|
866
|
-
return h("Radio", {
|
|
867
|
-
"props":
|
|
871
|
+
return h("Radio", helper([{}, {
|
|
872
|
+
"props": props
|
|
873
|
+
}, {
|
|
868
874
|
"key": '' + index + '-' + opt.value
|
|
869
|
-
});
|
|
875
|
+
}]));
|
|
870
876
|
}), getSlot(this.$slots)]);
|
|
871
877
|
}
|
|
872
878
|
};
|
|
@@ -925,10 +931,11 @@
|
|
|
925
931
|
var options = ctx.props.formCreateInject.options;
|
|
926
932
|
return h("Select", helper([{}, ctx.data]), [(Array.isArray(options) ? options : []).map(function (props, index) {
|
|
927
933
|
var slot = props.slot;
|
|
928
|
-
return h("Option", {
|
|
929
|
-
"props":
|
|
934
|
+
return h("Option", helper([{}, {
|
|
935
|
+
"props": props
|
|
936
|
+
}, {
|
|
930
937
|
"key": '' + index + '-' + props.value
|
|
931
|
-
}, [slot ? h("template", {
|
|
938
|
+
}]), [slot ? h("template", {
|
|
932
939
|
"slot": props.slotName || 'default'
|
|
933
940
|
}, [is.Function(slot) ? props.slot(h) : slot]) : null]);
|
|
934
941
|
}), ctx.children]);
|
|
@@ -1218,18 +1225,19 @@
|
|
|
1218
1225
|
}
|
|
1219
1226
|
return h("div", {
|
|
1220
1227
|
"class": "_fc-upload"
|
|
1221
|
-
}, [[this.formCreateInject.prop.props.showUploadList ? [] : this.makeFiles(), this.makeUpload()], h("Modal", {
|
|
1222
|
-
"
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}
|
|
1228
|
+
}, [[this.formCreateInject.prop.props.showUploadList ? [] : this.makeFiles(), this.makeUpload()], h("Modal", helper([{}, {
|
|
1229
|
+
"props": {
|
|
1230
|
+
title: this.modalTitle,
|
|
1231
|
+
footerHide: true
|
|
1232
|
+
}
|
|
1233
|
+
}, {
|
|
1226
1234
|
"model": {
|
|
1227
1235
|
value: _this4.previewVisible,
|
|
1228
1236
|
callback: function callback($$v) {
|
|
1229
1237
|
_this4.previewVisible = $$v;
|
|
1230
1238
|
}
|
|
1231
1239
|
}
|
|
1232
|
-
}, [h("img", {
|
|
1240
|
+
}]), [h("img", {
|
|
1233
1241
|
"attrs": {
|
|
1234
1242
|
"alt": "example",
|
|
1235
1243
|
"src": this.previewImage
|
|
@@ -1666,10 +1674,7 @@
|
|
|
1666
1674
|
"span": button ? 20 : 24
|
|
1667
1675
|
}
|
|
1668
1676
|
}, [h("FormItem", [h(Type, helper([{
|
|
1669
|
-
"key": key
|
|
1670
|
-
"attrs": {
|
|
1671
|
-
"inFor": true
|
|
1672
|
-
}
|
|
1677
|
+
"key": key
|
|
1673
1678
|
}, {
|
|
1674
1679
|
"on": {
|
|
1675
1680
|
'update:value': function updateValue(formData) {
|
|
@@ -1685,20 +1690,21 @@
|
|
|
1685
1690
|
return _this9.add$f(index, key, $f);
|
|
1686
1691
|
}
|
|
1687
1692
|
}
|
|
1688
|
-
}, {
|
|
1689
|
-
"
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1693
|
+
}, {}, {
|
|
1694
|
+
"props": {
|
|
1695
|
+
value: _this9.field ? _defineProperty({}, _this9.field, _this9._value(_this9.value[index])) : _this9.value[index],
|
|
1696
|
+
rule: rule,
|
|
1697
|
+
option: options,
|
|
1698
|
+
extendOption: true,
|
|
1699
|
+
inFor: true
|
|
1694
1700
|
}
|
|
1695
|
-
}]))])]), button ? h("Col", {
|
|
1696
|
-
"
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1701
|
+
}]))])]), button ? h("Col", helper([{}, {
|
|
1702
|
+
"props": {
|
|
1703
|
+
span: 2,
|
|
1704
|
+
pull: 1,
|
|
1705
|
+
push: 1
|
|
1700
1706
|
}
|
|
1701
|
-
}, [_this9.makeIcon(keys.length, index, key)]) : null]);
|
|
1707
|
+
}]), [_this9.makeIcon(keys.length, index, key)]) : null]);
|
|
1702
1708
|
})]);
|
|
1703
1709
|
}
|
|
1704
1710
|
};
|
|
@@ -1809,11 +1815,11 @@
|
|
|
1809
1815
|
'emit-event': this.emitEvent,
|
|
1810
1816
|
input: this.add$f
|
|
1811
1817
|
}
|
|
1812
|
-
}, {
|
|
1813
|
-
"
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1818
|
+
}, {}, {
|
|
1819
|
+
"props": {
|
|
1820
|
+
rule: rule,
|
|
1821
|
+
option: options,
|
|
1822
|
+
extendOption: true
|
|
1817
1823
|
}
|
|
1818
1824
|
}]));
|
|
1819
1825
|
}
|
|
@@ -2669,8 +2675,11 @@
|
|
|
2669
2675
|
},
|
|
2670
2676
|
getCache: function getCache(ctx) {
|
|
2671
2677
|
var cache = this.cache[ctx.id];
|
|
2672
|
-
cache
|
|
2673
|
-
|
|
2678
|
+
if (cache) {
|
|
2679
|
+
cache.use = true;
|
|
2680
|
+
return cache.vnode;
|
|
2681
|
+
}
|
|
2682
|
+
return undefined;
|
|
2674
2683
|
}
|
|
2675
2684
|
});
|
|
2676
2685
|
}
|
|
@@ -4604,7 +4613,8 @@
|
|
|
4604
4613
|
}
|
|
4605
4614
|
}, val);
|
|
4606
4615
|
if (!validate.message) {
|
|
4607
|
-
|
|
4616
|
+
var title = rule.title || '';
|
|
4617
|
+
validate.message = ((_typeof(title) === 'object' ? title.title : title) || '') + '不能为空';
|
|
4608
4618
|
}
|
|
4609
4619
|
inject.getProp().validate = [validate];
|
|
4610
4620
|
}
|
|
@@ -4674,9 +4684,13 @@
|
|
|
4674
4684
|
return fetch(_objectSpread2(_objectSpread2({}, option), {}, {
|
|
4675
4685
|
onSuccess: function onSuccess(body) {
|
|
4676
4686
|
if (check()) return;
|
|
4677
|
-
|
|
4687
|
+
var fn = function fn(v) {
|
|
4678
4688
|
return v.data;
|
|
4679
|
-
}
|
|
4689
|
+
};
|
|
4690
|
+
if (is.Function(option.parse)) {
|
|
4691
|
+
fn = option.parse;
|
|
4692
|
+
}
|
|
4693
|
+
set(fn(body, rule, api));
|
|
4680
4694
|
api.sync(rule);
|
|
4681
4695
|
},
|
|
4682
4696
|
onError: function onError(e) {
|
|
@@ -5839,7 +5853,7 @@
|
|
|
5839
5853
|
function ivuFormCreate() {
|
|
5840
5854
|
return FormCreateFactory({
|
|
5841
5855
|
ui: "".concat("view-design"),
|
|
5842
|
-
version: "".concat("2.5.
|
|
5856
|
+
version: "".concat("2.5.25"),
|
|
5843
5857
|
manager: manager,
|
|
5844
5858
|
install: install,
|
|
5845
5859
|
extendApi: extendApi,
|