@form-create/element-ui 3.2.35 → 3.2.37
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.esm.js +77 -71
- package/dist/form-create.esm.min.js +3 -3
- package/dist/form-create.js +76 -70
- package/dist/form-create.min.js +3 -3
- package/package.json +4 -4
package/dist/form-create.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @form-create/element-ui v3.2.
|
|
3
|
-
* (c) 2018-
|
|
2
|
+
* @form-create/element-ui v3.2.37
|
|
3
|
+
* (c) 2018-2026 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
7
|
-
import { defineComponent, toRef, ref, watch, computed, createVNode, resolveComponent, mergeProps as mergeProps$1, openBlock, createElementBlock, createElementVNode, nextTick, markRaw, reactive, isVNode, getCurrentInstance, provide, inject, toRefs, onBeforeMount, watchEffect, onMounted, onBeforeUnmount, onUpdated, withDirectives, resolveDirective, createApp, h } from 'vue';
|
|
7
|
+
import { defineComponent, toRef, ref, watch, computed, createVNode, resolveComponent, mergeProps as mergeProps$1, openBlock, createElementBlock, createElementVNode, nextTick, createBlock, withCtx, Fragment, renderList, renderSlot, markRaw, reactive, isVNode, getCurrentInstance, provide, inject, toRefs, onBeforeMount, watchEffect, onMounted, onBeforeUnmount, onUpdated, withDirectives, resolveDirective, createApp, h } from 'vue';
|
|
8
8
|
|
|
9
9
|
function ownKeys(object, enumerableOnly) {
|
|
10
10
|
var keys = Object.keys(object);
|
|
@@ -475,7 +475,7 @@ function styleInject(css, ref) {
|
|
|
475
475
|
var css_248z$3 = "._fc-frame ._fc-files img{display:inline-block;height:100%;vertical-align:top;width:100%}._fc-frame ._fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame._fc-disabled ._fc-upload-btn,._fc-frame._fc-disabled .el-button{color:#999;cursor:not-allowed!important}._fc-frame ._fc-upload-cover{background:rgba(0,0,0,.6);bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame ._fc-upload-cover i{color:#fff;cursor:pointer;font-size:20px;margin:0 2px}._fc-frame ._fc-files:hover ._fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame ._fc-upload-icon{cursor:pointer}._fc-files,._fc-frame ._fc-upload-btn{background:#fff;border:1px solid #c0ccda;border-radius:4px;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px rgba(0,0,0,.1);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;height:58px;line-height:58px;margin-right:4px;overflow:hidden;position:relative;text-align:center;width:58px}";
|
|
476
476
|
styleInject(css_248z$3);
|
|
477
477
|
|
|
478
|
-
var script$
|
|
478
|
+
var script$7 = {
|
|
479
479
|
name: 'IconCircleClose'
|
|
480
480
|
};
|
|
481
481
|
|
|
@@ -496,13 +496,13 @@ var _hoisted_3$6 = /*#__PURE__*/createElementVNode("path", {
|
|
|
496
496
|
}, null, -1);
|
|
497
497
|
|
|
498
498
|
var _hoisted_4 = [_hoisted_2$6, _hoisted_3$6];
|
|
499
|
-
function render$
|
|
499
|
+
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
500
500
|
return openBlock(), createElementBlock("svg", _hoisted_1$6, _hoisted_4);
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
-
script$
|
|
503
|
+
script$7.render = render$7;
|
|
504
504
|
|
|
505
|
-
var script$
|
|
505
|
+
var script$6 = {
|
|
506
506
|
name: 'IconDocument'
|
|
507
507
|
};
|
|
508
508
|
|
|
@@ -518,13 +518,13 @@ var _hoisted_2$5 = /*#__PURE__*/createElementVNode("path", {
|
|
|
518
518
|
}, null, -1);
|
|
519
519
|
|
|
520
520
|
var _hoisted_3$5 = [_hoisted_2$5];
|
|
521
|
-
function render$
|
|
521
|
+
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
522
522
|
return openBlock(), createElementBlock("svg", _hoisted_1$5, _hoisted_3$5);
|
|
523
523
|
}
|
|
524
524
|
|
|
525
|
-
script$
|
|
525
|
+
script$6.render = render$6;
|
|
526
526
|
|
|
527
|
-
var script$
|
|
527
|
+
var script$5 = {
|
|
528
528
|
name: 'IconDelete'
|
|
529
529
|
};
|
|
530
530
|
|
|
@@ -540,13 +540,13 @@ var _hoisted_2$4 = /*#__PURE__*/createElementVNode("path", {
|
|
|
540
540
|
}, null, -1);
|
|
541
541
|
|
|
542
542
|
var _hoisted_3$4 = [_hoisted_2$4];
|
|
543
|
-
function render$
|
|
543
|
+
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
544
544
|
return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_3$4);
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
-
script$
|
|
547
|
+
script$5.render = render$5;
|
|
548
548
|
|
|
549
|
-
var script$
|
|
549
|
+
var script$4 = {
|
|
550
550
|
name: 'IconView'
|
|
551
551
|
};
|
|
552
552
|
|
|
@@ -562,13 +562,13 @@ var _hoisted_2$3 = /*#__PURE__*/createElementVNode("path", {
|
|
|
562
562
|
}, null, -1);
|
|
563
563
|
|
|
564
564
|
var _hoisted_3$3 = [_hoisted_2$3];
|
|
565
|
-
function render$
|
|
565
|
+
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
566
566
|
return openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$3);
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
script$
|
|
569
|
+
script$4.render = render$4;
|
|
570
570
|
|
|
571
|
-
var script$
|
|
571
|
+
var script$3 = {
|
|
572
572
|
name: 'IconFolderOpened'
|
|
573
573
|
};
|
|
574
574
|
|
|
@@ -584,11 +584,11 @@ var _hoisted_2$2 = /*#__PURE__*/createElementVNode("path", {
|
|
|
584
584
|
}, null, -1);
|
|
585
585
|
|
|
586
586
|
var _hoisted_3$2 = [_hoisted_2$2];
|
|
587
|
-
function render$
|
|
587
|
+
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
588
588
|
return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
-
script$
|
|
591
|
+
script$3.render = render$3;
|
|
592
592
|
|
|
593
593
|
var NAME$7 = 'fcFrame';
|
|
594
594
|
var Frame = defineComponent({
|
|
@@ -699,8 +699,8 @@ var Frame = defineComponent({
|
|
|
699
699
|
},
|
|
700
700
|
emits: ['update:modelValue', 'change'],
|
|
701
701
|
components: {
|
|
702
|
-
IconFolderOpened: script$
|
|
703
|
-
IconView: script$
|
|
702
|
+
IconFolderOpened: script$3,
|
|
703
|
+
IconView: script$4
|
|
704
704
|
},
|
|
705
705
|
data: function data() {
|
|
706
706
|
return {
|
|
@@ -776,7 +776,7 @@ var Frame = defineComponent({
|
|
|
776
776
|
}
|
|
777
777
|
}, {
|
|
778
778
|
"default": function _default() {
|
|
779
|
-
return [createVNode(script$
|
|
779
|
+
return [createVNode(script$7, null, null)];
|
|
780
780
|
}
|
|
781
781
|
}) : null;
|
|
782
782
|
}
|
|
@@ -847,7 +847,7 @@ var Frame = defineComponent({
|
|
|
847
847
|
"key": '6' + index
|
|
848
848
|
}, {
|
|
849
849
|
"default": function _default() {
|
|
850
|
-
return [createVNode(script$
|
|
850
|
+
return [createVNode(script$5, null, null)];
|
|
851
851
|
}
|
|
852
852
|
});
|
|
853
853
|
},
|
|
@@ -861,7 +861,7 @@ var Frame = defineComponent({
|
|
|
861
861
|
}
|
|
862
862
|
}, {
|
|
863
863
|
"default": function _default() {
|
|
864
|
-
return [createVNode(script$
|
|
864
|
+
return [createVNode(script$6, null, null)];
|
|
865
865
|
}
|
|
866
866
|
}), _this4.makeIcons(src, index)]);
|
|
867
867
|
}));
|
|
@@ -1252,7 +1252,7 @@ function hasProperty(rule, k) {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
1254
|
var NAME$5 = 'fcSelect';
|
|
1255
|
-
var
|
|
1255
|
+
var script$2 = defineComponent({
|
|
1256
1256
|
name: NAME$5,
|
|
1257
1257
|
inheritAttrs: false,
|
|
1258
1258
|
props: {
|
|
@@ -1264,63 +1264,69 @@ var Select = defineComponent({
|
|
|
1264
1264
|
type: String
|
|
1265
1265
|
},
|
|
1266
1266
|
emits: ['update:modelValue', 'fc.el'],
|
|
1267
|
-
setup: function setup(props) {
|
|
1267
|
+
setup: function setup(props, _ref) {
|
|
1268
|
+
var emit = _ref.emit;
|
|
1268
1269
|
var options = toRef(props.formCreateInject, 'options', []);
|
|
1269
1270
|
var value = toRef(props, 'modelValue');
|
|
1270
1271
|
|
|
1271
|
-
var _options = function
|
|
1272
|
+
var _options = computed(function () {
|
|
1272
1273
|
return Array.isArray(options.value) ? options.value : [];
|
|
1274
|
+
});
|
|
1275
|
+
|
|
1276
|
+
var handleUpdate = function handleUpdate(v) {
|
|
1277
|
+
emit('update:modelValue', v);
|
|
1273
1278
|
};
|
|
1274
1279
|
|
|
1275
1280
|
return {
|
|
1276
1281
|
options: _options,
|
|
1277
|
-
value: value
|
|
1282
|
+
value: value,
|
|
1283
|
+
handleUpdate: handleUpdate,
|
|
1284
|
+
hasProperty: hasProperty,
|
|
1285
|
+
is: is
|
|
1278
1286
|
};
|
|
1279
1287
|
},
|
|
1280
|
-
render: function render() {
|
|
1281
|
-
var _this = this,
|
|
1282
|
-
_this$$slots$default,
|
|
1283
|
-
_this$$slots;
|
|
1284
|
-
|
|
1285
|
-
var makeOption = function makeOption(props, index) {
|
|
1286
|
-
return createVNode(resolveComponent("ElOption"), mergeProps$1(props, {
|
|
1287
|
-
"key": '' + index + '-' + props.value
|
|
1288
|
-
}), null);
|
|
1289
|
-
};
|
|
1290
|
-
|
|
1291
|
-
var makeOptionGroup = function makeOptionGroup(props, index) {
|
|
1292
|
-
return createVNode(resolveComponent("ElOptionGroup"), {
|
|
1293
|
-
"label": props.label,
|
|
1294
|
-
"key": '' + index + '-' + props.label
|
|
1295
|
-
}, {
|
|
1296
|
-
"default": function _default() {
|
|
1297
|
-
return [is.trueArray(props.options) && props.options.map(function (v, index) {
|
|
1298
|
-
return makeOption(v, index);
|
|
1299
|
-
})];
|
|
1300
|
-
}
|
|
1301
|
-
});
|
|
1302
|
-
};
|
|
1303
|
-
|
|
1304
|
-
var options = this.options();
|
|
1305
|
-
return createVNode(resolveComponent("ElSelect"), mergeProps$1(this.$attrs, {
|
|
1306
|
-
"modelValue": this.value,
|
|
1307
|
-
"onUpdate:modelValue": function onUpdateModelValue(v) {
|
|
1308
|
-
return _this.$emit('update:modelValue', v);
|
|
1309
|
-
},
|
|
1310
|
-
"ref": "el"
|
|
1311
|
-
}), _objectSpread2({
|
|
1312
|
-
"default": function _default() {
|
|
1313
|
-
return [options.map(function (props, index) {
|
|
1314
|
-
return hasProperty(props || '', 'options') ? makeOptionGroup(props, index) : makeOption(props, index);
|
|
1315
|
-
}), (_this$$slots$default = (_this$$slots = _this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)];
|
|
1316
|
-
}
|
|
1317
|
-
}, getSlot(this.$slots, ['default'])));
|
|
1318
|
-
},
|
|
1319
1288
|
mounted: function mounted() {
|
|
1320
1289
|
this.$emit('fc.el', this.$refs.el);
|
|
1321
1290
|
}
|
|
1322
1291
|
});
|
|
1323
1292
|
|
|
1293
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1294
|
+
var _component_el_option = resolveComponent("el-option");
|
|
1295
|
+
|
|
1296
|
+
var _component_el_option_group = resolveComponent("el-option-group");
|
|
1297
|
+
|
|
1298
|
+
var _component_el_select = resolveComponent("el-select");
|
|
1299
|
+
|
|
1300
|
+
return openBlock(), createBlock(_component_el_select, mergeProps$1(_ctx.$attrs, {
|
|
1301
|
+
"model-value": _ctx.value,
|
|
1302
|
+
"onUpdate:modelValue": _ctx.handleUpdate,
|
|
1303
|
+
ref: "el"
|
|
1304
|
+
}), {
|
|
1305
|
+
"default": withCtx(function () {
|
|
1306
|
+
return [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, function (props, index) {
|
|
1307
|
+
return openBlock(), createElementBlock(Fragment, null, [_ctx.hasProperty(props, 'options') ? (openBlock(), createBlock(_component_el_option_group, {
|
|
1308
|
+
label: props.label,
|
|
1309
|
+
key: "".concat(index, "-").concat(props.label)
|
|
1310
|
+
}, {
|
|
1311
|
+
"default": withCtx(function () {
|
|
1312
|
+
return [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.is.trueArray(props.options) ? props.options : [], function (option, optIndex) {
|
|
1313
|
+
return openBlock(), createBlock(_component_el_option, mergeProps$1({
|
|
1314
|
+
key: "".concat(optIndex, "-").concat(option.value)
|
|
1315
|
+
}, option), null, 16);
|
|
1316
|
+
}), 128))];
|
|
1317
|
+
}),
|
|
1318
|
+
_: 2
|
|
1319
|
+
}, 1032, ["label"])) : (openBlock(), createBlock(_component_el_option, mergeProps$1(_defineProperty({
|
|
1320
|
+
key: 1
|
|
1321
|
+
}, "key", "".concat(index, "-").concat(props.value)), props), null, 16))], 64);
|
|
1322
|
+
}), 256)), renderSlot(_ctx.$slots, "default")];
|
|
1323
|
+
}),
|
|
1324
|
+
_: 3
|
|
1325
|
+
}, 16, ["model-value", "onUpdate:modelValue"]);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
script$2.render = render$2;
|
|
1329
|
+
|
|
1324
1330
|
var NAME$4 = 'fcTree';
|
|
1325
1331
|
var Tree = defineComponent({
|
|
1326
1332
|
name: NAME$4,
|
|
@@ -2434,7 +2440,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2434
2440
|
|
|
2435
2441
|
script.render = render;
|
|
2436
2442
|
|
|
2437
|
-
var components = [Checkbox, Frame, Radio,
|
|
2443
|
+
var components = [Checkbox, Frame, Radio, script$2, Tree, Upload, Group, Sub, script];
|
|
2438
2444
|
|
|
2439
2445
|
var normalMerge = ['props'];
|
|
2440
2446
|
var toArrayMerge = ['class', 'style', 'directives'];
|
|
@@ -4273,7 +4279,7 @@ function useRender$1(Render) {
|
|
|
4273
4279
|
}
|
|
4274
4280
|
},
|
|
4275
4281
|
deepSet: function deepSet$1(ctx) {
|
|
4276
|
-
var deep = ctx.
|
|
4282
|
+
var deep = ctx.prop.deep;
|
|
4277
4283
|
deep && Object.keys(deep).sort(function (a, b) {
|
|
4278
4284
|
return a.length < b.length ? -1 : 1;
|
|
4279
4285
|
}).forEach(function (str) {
|
|
@@ -6126,7 +6132,7 @@ function useContext(Handler) {
|
|
|
6126
6132
|
this.setFormData(ctx, ctx.parser.toFormValue(rule.value, ctx));
|
|
6127
6133
|
|
|
6128
6134
|
if (this.isMounted && !this.reloading) {
|
|
6129
|
-
this.vm.emit('change', ctx.field, rule.value, ctx.origin, this.api);
|
|
6135
|
+
this.vm.emit('change', ctx.field, rule.value, ctx.origin, this.api, false, true);
|
|
6130
6136
|
}
|
|
6131
6137
|
},
|
|
6132
6138
|
getParser: function getParser(ctx) {
|
|
@@ -7231,7 +7237,7 @@ extend(Handler.prototype, {
|
|
|
7231
7237
|
this.lifecycle('created');
|
|
7232
7238
|
},
|
|
7233
7239
|
updateAppendData: function updateAppendData() {
|
|
7234
|
-
this.appendData = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options.formData || {}), this.fc.vm.props.modelValue || {}), this.appendData);
|
|
7240
|
+
this.appendData = _objectSpread2(_objectSpread2(_objectSpread2({}, deepCopy(this.options.formData || {})), this.fc.vm.props.modelValue || {}), this.appendData);
|
|
7235
7241
|
},
|
|
7236
7242
|
isBreakWatch: function isBreakWatch() {
|
|
7237
7243
|
return this.loading || this.noWatchFn || this.reloading;
|
|
@@ -9887,7 +9893,7 @@ function install(FormCreate) {
|
|
|
9887
9893
|
function elmFormCreate() {
|
|
9888
9894
|
return FormCreateFactory({
|
|
9889
9895
|
ui: 'element-ui',
|
|
9890
|
-
version: '3.2.
|
|
9896
|
+
version: '3.2.37',
|
|
9891
9897
|
manager: manager,
|
|
9892
9898
|
extendApi: extendApi,
|
|
9893
9899
|
install: install,
|