Skip to content

Commit 36c10d5

Browse files
committed
build(lib): build lib
1 parent 50348c2 commit 36c10d5

17 files changed

+178
-50
lines changed

packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.js

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8613,6 +8613,7 @@ function getWidgetConfig(_ref6) {
86138613
widgetAttrs = uiOptions.attrs,
86148614
widgetClass = uiOptions.class,
86158615
widgetStyle = uiOptions.style,
8616+
widgetListeners = uiOptions.widgetListeners,
86168617
fieldAttrs = uiOptions.fieldAttrs,
86178618
fieldStyle = uiOptions.fieldStyle,
86188619
fieldClass = uiOptions.fieldClass,
@@ -8622,7 +8623,7 @@ function getWidgetConfig(_ref6) {
86228623
renderScopedSlots = uiOptions.renderScopedSlots,
86238624
renderChildren = uiOptions.renderChildren,
86248625
onChange = uiOptions.onChange,
8625-
uiProps = _objectWithoutProperties(uiOptions, ["widget", "title", "labelWidth", "description", "attrs", "class", "style", "fieldAttrs", "fieldStyle", "fieldClass", "emptyValue", "width", "getWidget", "renderScopedSlots", "renderChildren", "onChange"]);
8626+
uiProps = _objectWithoutProperties(uiOptions, ["widget", "title", "labelWidth", "description", "attrs", "class", "style", "widgetListeners", "fieldAttrs", "fieldStyle", "fieldClass", "emptyValue", "width", "getWidget", "renderScopedSlots", "renderChildren", "onChange"]);
86268627

86278628
return {
86288629
widget: widget,
@@ -8641,6 +8642,7 @@ function getWidgetConfig(_ref6) {
86418642
renderScopedSlots: renderScopedSlots,
86428643
renderChildren: renderChildren,
86438644
onChange: onChange,
8645+
widgetListeners: widgetListeners,
86448646
uiProps: uiProps
86458647
};
86468648
} // 解析用户配置的 errorSchema options
@@ -9448,6 +9450,12 @@ var FormFooter = {
94489450
type: String,
94499451
default: '保存'
94509452
},
9453+
okBtnProps: {
9454+
type: Object,
9455+
default: function _default() {
9456+
return {};
9457+
}
9458+
},
94519459
cancelBtn: {
94529460
type: String,
94539461
default: '取消'
@@ -9464,6 +9472,7 @@ var FormFooter = {
94649472
var self = this;
94659473
var _this$$props = this.$props,
94669474
okBtn = _this$$props.okBtn,
9475+
okBtnProps = _this$$props.okBtnProps,
94679476
cancelBtn = _this$$props.cancelBtn,
94689477
COMPONENT_MAP = _this$$props.globalOptions.COMPONENT_MAP;
94699478
return h(COMPONENT_MAP.formItem, _objectSpread2({
@@ -9480,9 +9489,9 @@ var FormFooter = {
94809489
style: {
94819490
marginLeft: '10px'
94829491
},
9483-
props: {
9492+
props: _objectSpread2({
94849493
type: 'primary'
9485-
},
9494+
}, okBtnProps),
94869495
on: {
94879496
click: function click() {
94889497
self.$emit('onSubmit');
@@ -10159,6 +10168,8 @@ var Widget = {
1015910168
return {};
1016010169
}
1016110170
},
10171+
widgetListeners: null,
10172+
// widget组件 emits
1016210173
formProps: null,
1016310174
getWidget: null,
1016410175
renderScopedSlots: null,
@@ -10313,9 +10324,14 @@ var Widget = {
1031310324
}, self.renderScopedSlots ? {
1031410325
scopedSlots: self.renderScopedSlots(h) || {}
1031510326
} : {}), {}, {
10316-
on: {
10327+
on: _objectSpread2(_objectSpread2({}, self.widgetListeners ? self.widgetListeners : {}), {}, {
1031710328
'hook:mounted': function widgetMounted() {
10318-
// 提供一种特殊的配置 允许直接访问到 widget vm
10329+
if (self.widgetListeners && self.widgetListeners['hook:mounted']) {
10330+
// eslint-disable-next-line prefer-rest-params
10331+
self.widgetListeners['hook:mounted'].apply(this, Array.prototype.slice.call(arguments));
10332+
} // 提供一种特殊的配置 允许直接访问到 widget vm
10333+
10334+
1031910335
if (self.getWidget && typeof self.getWidget === 'function') {
1032010336
self.getWidget.call(null, self.$refs.widgetRef);
1032110337
}
@@ -10340,8 +10356,13 @@ var Widget = {
1034010356
});
1034110357
}
1034210358
}
10359+
10360+
if (self.widgetListeners && self.widgetListeners.input) {
10361+
// eslint-disable-next-line prefer-rest-params
10362+
self.widgetListeners.input.apply(this, Array.prototype.slice.call(arguments));
10363+
}
1034310364
}
10344-
}
10365+
})
1034510366
}), self.renderChildren ? self.renderChildren(h) : null)]);
1034610367
}
1034710368
};
@@ -11707,6 +11728,7 @@ function createForm() {
1170711728
props: {
1170811729
globalOptions: globalOptions,
1170911730
okBtn: self.footerParams.okBtn,
11731+
okBtnProps: self.footerParams.okBtnProps,
1171011732
cancelBtn: self.footerParams.cancelBtn,
1171111733
formItemAttrs: self.footerParams.formItemAttrs
1171211734
},

packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.js

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8621,6 +8621,7 @@
86218621
widgetAttrs = uiOptions.attrs,
86228622
widgetClass = uiOptions.class,
86238623
widgetStyle = uiOptions.style,
8624+
widgetListeners = uiOptions.widgetListeners,
86248625
fieldAttrs = uiOptions.fieldAttrs,
86258626
fieldStyle = uiOptions.fieldStyle,
86268627
fieldClass = uiOptions.fieldClass,
@@ -8630,7 +8631,7 @@
86308631
renderScopedSlots = uiOptions.renderScopedSlots,
86318632
renderChildren = uiOptions.renderChildren,
86328633
onChange = uiOptions.onChange,
8633-
uiProps = _objectWithoutProperties(uiOptions, ["widget", "title", "labelWidth", "description", "attrs", "class", "style", "fieldAttrs", "fieldStyle", "fieldClass", "emptyValue", "width", "getWidget", "renderScopedSlots", "renderChildren", "onChange"]);
8634+
uiProps = _objectWithoutProperties(uiOptions, ["widget", "title", "labelWidth", "description", "attrs", "class", "style", "widgetListeners", "fieldAttrs", "fieldStyle", "fieldClass", "emptyValue", "width", "getWidget", "renderScopedSlots", "renderChildren", "onChange"]);
86348635

86358636
return {
86368637
widget: widget,
@@ -8649,6 +8650,7 @@
86498650
renderScopedSlots: renderScopedSlots,
86508651
renderChildren: renderChildren,
86518652
onChange: onChange,
8653+
widgetListeners: widgetListeners,
86528654
uiProps: uiProps
86538655
};
86548656
} // 解析用户配置的 errorSchema options
@@ -9456,6 +9458,12 @@
94569458
type: String,
94579459
default: '保存'
94589460
},
9461+
okBtnProps: {
9462+
type: Object,
9463+
default: function _default() {
9464+
return {};
9465+
}
9466+
},
94599467
cancelBtn: {
94609468
type: String,
94619469
default: '取消'
@@ -9472,6 +9480,7 @@
94729480
var self = this;
94739481
var _this$$props = this.$props,
94749482
okBtn = _this$$props.okBtn,
9483+
okBtnProps = _this$$props.okBtnProps,
94759484
cancelBtn = _this$$props.cancelBtn,
94769485
COMPONENT_MAP = _this$$props.globalOptions.COMPONENT_MAP;
94779486
return h(COMPONENT_MAP.formItem, _objectSpread2({
@@ -9488,9 +9497,9 @@
94889497
style: {
94899498
marginLeft: '10px'
94909499
},
9491-
props: {
9500+
props: _objectSpread2({
94929501
type: 'primary'
9493-
},
9502+
}, okBtnProps),
94949503
on: {
94959504
click: function click() {
94969505
self.$emit('onSubmit');
@@ -10167,6 +10176,8 @@
1016710176
return {};
1016810177
}
1016910178
},
10179+
widgetListeners: null,
10180+
// widget组件 emits
1017010181
formProps: null,
1017110182
getWidget: null,
1017210183
renderScopedSlots: null,
@@ -10321,9 +10332,14 @@
1032110332
}, self.renderScopedSlots ? {
1032210333
scopedSlots: self.renderScopedSlots(h) || {}
1032310334
} : {}), {}, {
10324-
on: {
10335+
on: _objectSpread2(_objectSpread2({}, self.widgetListeners ? self.widgetListeners : {}), {}, {
1032510336
'hook:mounted': function widgetMounted() {
10326-
// 提供一种特殊的配置 允许直接访问到 widget vm
10337+
if (self.widgetListeners && self.widgetListeners['hook:mounted']) {
10338+
// eslint-disable-next-line prefer-rest-params
10339+
self.widgetListeners['hook:mounted'].apply(this, Array.prototype.slice.call(arguments));
10340+
} // 提供一种特殊的配置 允许直接访问到 widget vm
10341+
10342+
1032710343
if (self.getWidget && typeof self.getWidget === 'function') {
1032810344
self.getWidget.call(null, self.$refs.widgetRef);
1032910345
}
@@ -10348,8 +10364,13 @@
1034810364
});
1034910365
}
1035010366
}
10367+
10368+
if (self.widgetListeners && self.widgetListeners.input) {
10369+
// eslint-disable-next-line prefer-rest-params
10370+
self.widgetListeners.input.apply(this, Array.prototype.slice.call(arguments));
10371+
}
1035110372
}
10352-
}
10373+
})
1035310374
}), self.renderChildren ? self.renderChildren(h) : null)]);
1035410375
}
1035510376
};
@@ -11715,6 +11736,7 @@
1171511736
props: {
1171611737
globalOptions: globalOptions,
1171711738
okBtn: self.footerParams.okBtn,
11739+
okBtnProps: self.footerParams.okBtnProps,
1171811740
cancelBtn: self.footerParams.cancelBtn,
1171911741
formItemAttrs: self.footerParams.formItemAttrs
1172011742
},

packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.js

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8613,6 +8613,7 @@ function getWidgetConfig(_ref6) {
86138613
widgetAttrs = uiOptions.attrs,
86148614
widgetClass = uiOptions.class,
86158615
widgetStyle = uiOptions.style,
8616+
widgetListeners = uiOptions.widgetListeners,
86168617
fieldAttrs = uiOptions.fieldAttrs,
86178618
fieldStyle = uiOptions.fieldStyle,
86188619
fieldClass = uiOptions.fieldClass,
@@ -8622,7 +8623,7 @@ function getWidgetConfig(_ref6) {
86228623
renderScopedSlots = uiOptions.renderScopedSlots,
86238624
renderChildren = uiOptions.renderChildren,
86248625
onChange = uiOptions.onChange,
8625-
uiProps = _objectWithoutProperties(uiOptions, ["widget", "title", "labelWidth", "description", "attrs", "class", "style", "fieldAttrs", "fieldStyle", "fieldClass", "emptyValue", "width", "getWidget", "renderScopedSlots", "renderChildren", "onChange"]);
8626+
uiProps = _objectWithoutProperties(uiOptions, ["widget", "title", "labelWidth", "description", "attrs", "class", "style", "widgetListeners", "fieldAttrs", "fieldStyle", "fieldClass", "emptyValue", "width", "getWidget", "renderScopedSlots", "renderChildren", "onChange"]);
86268627

86278628
return {
86288629
widget: widget,
@@ -8641,6 +8642,7 @@ function getWidgetConfig(_ref6) {
86418642
renderScopedSlots: renderScopedSlots,
86428643
renderChildren: renderChildren,
86438644
onChange: onChange,
8645+
widgetListeners: widgetListeners,
86448646
uiProps: uiProps
86458647
};
86468648
} // 解析用户配置的 errorSchema options
@@ -9448,6 +9450,12 @@ var FormFooter = {
94489450
type: String,
94499451
default: '保存'
94509452
},
9453+
okBtnProps: {
9454+
type: Object,
9455+
default: function _default() {
9456+
return {};
9457+
}
9458+
},
94519459
cancelBtn: {
94529460
type: String,
94539461
default: '取消'
@@ -9464,6 +9472,7 @@ var FormFooter = {
94649472
var self = this;
94659473
var _this$$props = this.$props,
94669474
okBtn = _this$$props.okBtn,
9475+
okBtnProps = _this$$props.okBtnProps,
94679476
cancelBtn = _this$$props.cancelBtn,
94689477
COMPONENT_MAP = _this$$props.globalOptions.COMPONENT_MAP;
94699478
return h(COMPONENT_MAP.formItem, _objectSpread2({
@@ -9480,9 +9489,9 @@ var FormFooter = {
94809489
style: {
94819490
marginLeft: '10px'
94829491
},
9483-
props: {
9492+
props: _objectSpread2({
94849493
type: 'primary'
9485-
},
9494+
}, okBtnProps),
94869495
on: {
94879496
click: function click() {
94889497
self.$emit('onSubmit');
@@ -10159,6 +10168,8 @@ var Widget = {
1015910168
return {};
1016010169
}
1016110170
},
10171+
widgetListeners: null,
10172+
// widget组件 emits
1016210173
formProps: null,
1016310174
getWidget: null,
1016410175
renderScopedSlots: null,
@@ -10313,9 +10324,14 @@ var Widget = {
1031310324
}, self.renderScopedSlots ? {
1031410325
scopedSlots: self.renderScopedSlots(h) || {}
1031510326
} : {}), {}, {
10316-
on: {
10327+
on: _objectSpread2(_objectSpread2({}, self.widgetListeners ? self.widgetListeners : {}), {}, {
1031710328
'hook:mounted': function widgetMounted() {
10318-
// 提供一种特殊的配置 允许直接访问到 widget vm
10329+
if (self.widgetListeners && self.widgetListeners['hook:mounted']) {
10330+
// eslint-disable-next-line prefer-rest-params
10331+
self.widgetListeners['hook:mounted'].apply(this, Array.prototype.slice.call(arguments));
10332+
} // 提供一种特殊的配置 允许直接访问到 widget vm
10333+
10334+
1031910335
if (self.getWidget && typeof self.getWidget === 'function') {
1032010336
self.getWidget.call(null, self.$refs.widgetRef);
1032110337
}
@@ -10340,8 +10356,13 @@ var Widget = {
1034010356
});
1034110357
}
1034210358
}
10359+
10360+
if (self.widgetListeners && self.widgetListeners.input) {
10361+
// eslint-disable-next-line prefer-rest-params
10362+
self.widgetListeners.input.apply(this, Array.prototype.slice.call(arguments));
10363+
}
1034310364
}
10344-
}
10365+
})
1034510366
}), self.renderChildren ? self.renderChildren(h) : null)]);
1034610367
}
1034710368
};
@@ -11707,6 +11728,7 @@ function createForm() {
1170711728
props: {
1170811729
globalOptions: globalOptions,
1170911730
okBtn: self.footerParams.okBtn,
11731+
okBtnProps: self.footerParams.okBtnProps,
1171011732
cancelBtn: self.footerParams.cancelBtn,
1171111733
formItemAttrs: self.footerParams.formItemAttrs
1171211734
},

packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)