@vxe-ui/plugin-render-element 4.0.11 → 4.0.12
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/README.md +26 -0
- package/dist/all.common.js +116 -58
- package/dist/form/index.js +13 -12
- package/dist/form-design/checkbox-widget.js +4 -3
- package/dist/form-design/date-picker-widget.js +3 -2
- package/dist/form-design/input-widget.js +3 -2
- package/dist/form-design/number-input-widget.js +3 -2
- package/dist/form-design/radio-widget.js +4 -3
- package/dist/form-design/select-widget.js +4 -3
- package/dist/form-design/switch-widget.js +3 -2
- package/dist/form-design/textarea-widget.js +3 -2
- package/dist/index.common.js +31 -4
- package/dist/index.js +31 -4
- package/dist/index.umd.js +127 -48
- package/dist/index.umd.min.js +1 -1
- package/dist/store/index.js +8 -0
- package/dist/table/index.js +13 -12
- package/dist/util/comp.js +11 -0
- package/package.json +3 -3
- package/src/form/index.ts +14 -13
- package/src/form-design/checkbox-widget.ts +5 -4
- package/src/form-design/date-picker-widget.ts +4 -3
- package/src/form-design/input-widget.ts +4 -3
- package/src/form-design/number-input-widget.ts +5 -3
- package/src/form-design/radio-widget.ts +5 -4
- package/src/form-design/select-widget.ts +5 -4
- package/src/form-design/switch-widget.ts +4 -3
- package/src/form-design/textarea-widget.ts +4 -3
- package/src/index.ts +32 -6
- package/src/store/index.ts +5 -0
- package/src/table/index.ts +14 -13
- package/src/util/comp.ts +6 -0
- package/types/index.d.ts +6 -3
package/dist/form/index.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defineFormRender = defineFormRender;
|
|
7
7
|
var _vue = require("vue");
|
|
8
|
+
var _comp = require("../util/comp");
|
|
8
9
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -102,7 +103,7 @@ function defineFormRender(VxeUI) {
|
|
|
102
103
|
var labelProp = optionProps.label || 'label';
|
|
103
104
|
var valueProp = optionProps.value || 'value';
|
|
104
105
|
return _xeUtils["default"].map(options, function (item, oIndex) {
|
|
105
|
-
return (0, _vue.h)((0,
|
|
106
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-option'), {
|
|
106
107
|
key: oIndex,
|
|
107
108
|
value: item[valueProp],
|
|
108
109
|
label: item[labelProp],
|
|
@@ -120,13 +121,13 @@ function defineFormRender(VxeUI) {
|
|
|
120
121
|
var name = renderOpts.name;
|
|
121
122
|
var attrs = renderOpts.attrs;
|
|
122
123
|
var itemValue = _xeUtils["default"].get(data, field);
|
|
123
|
-
return [(0, _vue.h)((0,
|
|
124
|
+
return [(0, _vue.h)((0, _comp.getCurrComponent)(name), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue, defaultProps)), getItemOns(renderOpts, params)))];
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
127
|
function defaultButtonItemRender(renderOpts, params) {
|
|
127
128
|
var attrs = renderOpts.attrs;
|
|
128
129
|
var props = getItemProps(renderOpts, params, null);
|
|
129
|
-
return [(0, _vue.h)((0,
|
|
130
|
+
return [(0, _vue.h)((0, _comp.getCurrComponent)('el-button'), _objectSpread(_objectSpread(_objectSpread({}, attrs), props), getOns(renderOpts, params)), {
|
|
130
131
|
"default": function _default() {
|
|
131
132
|
return cellText(renderOpts.content || props.content);
|
|
132
133
|
}
|
|
@@ -158,10 +159,10 @@ function defineFormRender(VxeUI) {
|
|
|
158
159
|
var labelProp = optionProps.label || 'label';
|
|
159
160
|
var valueProp = optionProps.value || 'value';
|
|
160
161
|
var itemValue = _xeUtils["default"].get(data, field);
|
|
161
|
-
return [(0, _vue.h)((0,
|
|
162
|
+
return [(0, _vue.h)((0, _comp.getCurrComponent)("".concat(name, "Group")), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
|
|
162
163
|
"default": function _default() {
|
|
163
164
|
return options.map(function (option, oIndex) {
|
|
164
|
-
return (0, _vue.h)((0,
|
|
165
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)(name), {
|
|
165
166
|
key: oIndex,
|
|
166
167
|
label: option[valueProp],
|
|
167
168
|
disabled: option.disabled
|
|
@@ -203,10 +204,10 @@ function defineFormRender(VxeUI) {
|
|
|
203
204
|
if (optionGroups) {
|
|
204
205
|
var groupOptions = optionGroupProps.options || 'options';
|
|
205
206
|
var groupLabel = optionGroupProps.label || 'label';
|
|
206
|
-
return [(0, _vue.h)((0,
|
|
207
|
+
return [(0, _vue.h)((0, _comp.getCurrComponent)('el-select'), _objectSpread(_objectSpread(_objectSpread({}, attrs), props), ons), {
|
|
207
208
|
"default": function _default() {
|
|
208
209
|
return _xeUtils["default"].map(optionGroups, function (group, gIndex) {
|
|
209
|
-
return (0, _vue.h)((0,
|
|
210
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-option-group'), {
|
|
210
211
|
label: group[groupLabel],
|
|
211
212
|
key: gIndex
|
|
212
213
|
}, {
|
|
@@ -218,7 +219,7 @@ function defineFormRender(VxeUI) {
|
|
|
218
219
|
}
|
|
219
220
|
})];
|
|
220
221
|
}
|
|
221
|
-
return [(0, _vue.h)((0,
|
|
222
|
+
return [(0, _vue.h)((0, _comp.getCurrComponent)('el-select'), _objectSpread(_objectSpread(_objectSpread({}, attrs), props), ons), {
|
|
222
223
|
"default": function _default() {
|
|
223
224
|
return renderOptions(options, optionProps);
|
|
224
225
|
}
|
|
@@ -258,10 +259,10 @@ function defineFormRender(VxeUI) {
|
|
|
258
259
|
var labelProp = optionProps.label || 'label';
|
|
259
260
|
var valueProp = optionProps.value || 'value';
|
|
260
261
|
var itemValue = _xeUtils["default"].get(data, field);
|
|
261
|
-
return [(0, _vue.h)((0,
|
|
262
|
+
return [(0, _vue.h)((0, _comp.getCurrComponent)('el-radio-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
|
|
262
263
|
"default": function _default() {
|
|
263
264
|
return options.map(function (option, oIndex) {
|
|
264
|
-
return (0, _vue.h)((0,
|
|
265
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-radio'), {
|
|
265
266
|
key: oIndex,
|
|
266
267
|
value: option[valueProp],
|
|
267
268
|
disabled: option.disabled
|
|
@@ -287,10 +288,10 @@ function defineFormRender(VxeUI) {
|
|
|
287
288
|
var labelProp = optionProps.label || 'label';
|
|
288
289
|
var valueProp = optionProps.value || 'value';
|
|
289
290
|
var itemValue = _xeUtils["default"].get(data, field);
|
|
290
|
-
return [(0, _vue.h)((0,
|
|
291
|
+
return [(0, _vue.h)((0, _comp.getCurrComponent)('el-checkbox-group'), _objectSpread(_objectSpread(_objectSpread({}, attrs), getItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
|
|
291
292
|
"default": function _default() {
|
|
292
293
|
return options.map(function (option, oIndex) {
|
|
293
|
-
return (0, _vue.h)((0,
|
|
294
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-checkbox'), {
|
|
294
295
|
key: oIndex,
|
|
295
296
|
value: option[valueProp],
|
|
296
297
|
label: option[labelProp],
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createWidgetElCheckbox = createWidgetElCheckbox;
|
|
7
7
|
var _vue = require("vue");
|
|
8
8
|
var _use = require("./use");
|
|
9
|
+
var _comp = require("../util/comp");
|
|
9
10
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
12
|
function createWidgetElCheckbox(VxeUI) {
|
|
@@ -60,7 +61,7 @@ function createWidgetElCheckbox(VxeUI) {
|
|
|
60
61
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
61
62
|
}, {
|
|
62
63
|
"default": function _default() {
|
|
63
|
-
return (0, _vue.h)((0,
|
|
64
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
64
65
|
modelValue: widget.title,
|
|
65
66
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
66
67
|
widget.title = val;
|
|
@@ -128,7 +129,7 @@ function createWidgetElCheckbox(VxeUI) {
|
|
|
128
129
|
title: widget.title
|
|
129
130
|
}, {
|
|
130
131
|
"default": function _default() {
|
|
131
|
-
return (0, _vue.h)((0,
|
|
132
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-checkbox-group'), {
|
|
132
133
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
133
134
|
onChange: changeEvent,
|
|
134
135
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
@@ -139,7 +140,7 @@ function createWidgetElCheckbox(VxeUI) {
|
|
|
139
140
|
}, {
|
|
140
141
|
"default": function _default() {
|
|
141
142
|
return options.options ? options.options.map(function (item, index) {
|
|
142
|
-
return (0, _vue.h)((0,
|
|
143
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-checkbox'), {
|
|
143
144
|
key: index,
|
|
144
145
|
value: item.value
|
|
145
146
|
}, {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createWidgetElDatePicker = createWidgetElDatePicker;
|
|
7
7
|
var _vue = require("vue");
|
|
8
|
+
var _comp = require("../util/comp");
|
|
8
9
|
function createWidgetElDatePicker(VxeUI) {
|
|
9
10
|
var getWidgetElDatePickerConfig = function getWidgetElDatePickerConfig(params) {
|
|
10
11
|
return {
|
|
@@ -51,7 +52,7 @@ function createWidgetElDatePicker(VxeUI) {
|
|
|
51
52
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
52
53
|
}, {
|
|
53
54
|
"default": function _default() {
|
|
54
|
-
return (0, _vue.h)((0,
|
|
55
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
55
56
|
modelValue: widget.title,
|
|
56
57
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
57
58
|
widget.title = val;
|
|
@@ -119,7 +120,7 @@ function createWidgetElDatePicker(VxeUI) {
|
|
|
119
120
|
title: widget.title
|
|
120
121
|
}, {
|
|
121
122
|
"default": function _default() {
|
|
122
|
-
return (0, _vue.h)((0,
|
|
123
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-date-picker'), {
|
|
123
124
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
124
125
|
placeholder: options.placeholder,
|
|
125
126
|
onChange: changeEvent,
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createWidgetElInput = createWidgetElInput;
|
|
7
7
|
var _vue = require("vue");
|
|
8
|
+
var _comp = require("../util/comp");
|
|
8
9
|
function createWidgetElInput(VxeUI) {
|
|
9
10
|
var getWidgetElInputConfig = function getWidgetElInputConfig(params) {
|
|
10
11
|
return {
|
|
@@ -52,7 +53,7 @@ function createWidgetElInput(VxeUI) {
|
|
|
52
53
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
53
54
|
}, {
|
|
54
55
|
"default": function _default() {
|
|
55
|
-
return (0, _vue.h)((0,
|
|
56
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
56
57
|
modelValue: widget.title,
|
|
57
58
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
58
59
|
widget.title = val;
|
|
@@ -120,7 +121,7 @@ function createWidgetElInput(VxeUI) {
|
|
|
120
121
|
title: widget.title
|
|
121
122
|
}, {
|
|
122
123
|
"default": function _default() {
|
|
123
|
-
return (0, _vue.h)((0,
|
|
124
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
124
125
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
125
126
|
placeholder: options.placeholder,
|
|
126
127
|
onChange: changeEvent,
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createWidgetElInputNumber = createWidgetElInputNumber;
|
|
7
7
|
var _vue = require("vue");
|
|
8
|
+
var _comp = require("../util/comp");
|
|
8
9
|
function createWidgetElInputNumber(VxeUI) {
|
|
9
10
|
var getWidgetElInputNumberConfig = function getWidgetElInputNumberConfig(params) {
|
|
10
11
|
return {
|
|
@@ -51,7 +52,7 @@ function createWidgetElInputNumber(VxeUI) {
|
|
|
51
52
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
52
53
|
}, {
|
|
53
54
|
"default": function _default() {
|
|
54
|
-
return (0, _vue.h)((0,
|
|
55
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
55
56
|
modelValue: widget.title,
|
|
56
57
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
57
58
|
widget.title = val;
|
|
@@ -119,7 +120,7 @@ function createWidgetElInputNumber(VxeUI) {
|
|
|
119
120
|
title: widget.title
|
|
120
121
|
}, {
|
|
121
122
|
"default": function _default() {
|
|
122
|
-
return (0, _vue.h)((0,
|
|
123
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input-number'), {
|
|
123
124
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
124
125
|
placeholder: options.placeholder,
|
|
125
126
|
onChange: changeEvent,
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createWidgetElRadio = createWidgetElRadio;
|
|
7
7
|
var _vue = require("vue");
|
|
8
8
|
var _use = require("./use");
|
|
9
|
+
var _comp = require("../util/comp");
|
|
9
10
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
12
|
function createWidgetElRadio(VxeUI) {
|
|
@@ -60,7 +61,7 @@ function createWidgetElRadio(VxeUI) {
|
|
|
60
61
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
61
62
|
}, {
|
|
62
63
|
"default": function _default() {
|
|
63
|
-
return (0, _vue.h)((0,
|
|
64
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
64
65
|
modelValue: widget.title,
|
|
65
66
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
66
67
|
widget.title = val;
|
|
@@ -128,7 +129,7 @@ function createWidgetElRadio(VxeUI) {
|
|
|
128
129
|
title: widget.title
|
|
129
130
|
}, {
|
|
130
131
|
"default": function _default() {
|
|
131
|
-
return (0, _vue.h)((0,
|
|
132
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-radio-group'), {
|
|
132
133
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
133
134
|
onChange: changeEvent,
|
|
134
135
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
@@ -139,7 +140,7 @@ function createWidgetElRadio(VxeUI) {
|
|
|
139
140
|
}, {
|
|
140
141
|
"default": function _default() {
|
|
141
142
|
return options.options ? options.options.map(function (item, index) {
|
|
142
|
-
return (0, _vue.h)((0,
|
|
143
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-radio'), {
|
|
143
144
|
key: index,
|
|
144
145
|
value: item.value
|
|
145
146
|
}, {
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createWidgetElSelect = createWidgetElSelect;
|
|
7
7
|
var _vue = require("vue");
|
|
8
8
|
var _use = require("./use");
|
|
9
|
+
var _comp = require("../util/comp");
|
|
9
10
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
12
|
function createWidgetElSelect(VxeUI) {
|
|
@@ -61,7 +62,7 @@ function createWidgetElSelect(VxeUI) {
|
|
|
61
62
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
62
63
|
}, {
|
|
63
64
|
"default": function _default() {
|
|
64
|
-
return (0, _vue.h)((0,
|
|
65
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
65
66
|
modelValue: widget.title,
|
|
66
67
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
67
68
|
widget.title = val;
|
|
@@ -129,7 +130,7 @@ function createWidgetElSelect(VxeUI) {
|
|
|
129
130
|
title: widget.title
|
|
130
131
|
}, {
|
|
131
132
|
"default": function _default() {
|
|
132
|
-
return (0, _vue.h)((0,
|
|
133
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-select'), {
|
|
133
134
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
134
135
|
placeholder: options.placeholder,
|
|
135
136
|
onChange: changeEvent,
|
|
@@ -141,7 +142,7 @@ function createWidgetElSelect(VxeUI) {
|
|
|
141
142
|
}, {
|
|
142
143
|
"default": function _default() {
|
|
143
144
|
return options.options ? options.options.map(function (item) {
|
|
144
|
-
return (0, _vue.h)((0,
|
|
145
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-option'), {
|
|
145
146
|
label: item.value,
|
|
146
147
|
value: item.value
|
|
147
148
|
});
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createWidgetElSwitch = createWidgetElSwitch;
|
|
7
7
|
var _vue = require("vue");
|
|
8
|
+
var _comp = require("../util/comp");
|
|
8
9
|
function createWidgetElSwitch(VxeUI) {
|
|
9
10
|
var getWidgetElSwitchConfig = function getWidgetElSwitchConfig(params) {
|
|
10
11
|
return {
|
|
@@ -49,7 +50,7 @@ function createWidgetElSwitch(VxeUI) {
|
|
|
49
50
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
50
51
|
}, {
|
|
51
52
|
"default": function _default() {
|
|
52
|
-
return (0, _vue.h)((0,
|
|
53
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
53
54
|
modelValue: widget.title,
|
|
54
55
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
55
56
|
widget.title = val;
|
|
@@ -116,7 +117,7 @@ function createWidgetElSwitch(VxeUI) {
|
|
|
116
117
|
title: widget.title
|
|
117
118
|
}, {
|
|
118
119
|
"default": function _default() {
|
|
119
|
-
return (0, _vue.h)((0,
|
|
120
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-switch'), {
|
|
120
121
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
121
122
|
onChange: changeEvent,
|
|
122
123
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createWidgetElTextarea = createWidgetElTextarea;
|
|
7
7
|
var _vue = require("vue");
|
|
8
|
+
var _comp = require("../util/comp");
|
|
8
9
|
function createWidgetElTextarea(VxeUI) {
|
|
9
10
|
var getWidgetElTextareaConfig = function getWidgetElTextareaConfig(params) {
|
|
10
11
|
return {
|
|
@@ -51,7 +52,7 @@ function createWidgetElTextarea(VxeUI) {
|
|
|
51
52
|
title: VxeUI.getI18n('vxe.formDesign.widgetProp.name')
|
|
52
53
|
}, {
|
|
53
54
|
"default": function _default() {
|
|
54
|
-
return (0, _vue.h)((0,
|
|
55
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
55
56
|
modelValue: widget.title,
|
|
56
57
|
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
57
58
|
widget.title = val;
|
|
@@ -119,7 +120,7 @@ function createWidgetElTextarea(VxeUI) {
|
|
|
119
120
|
title: widget.title
|
|
120
121
|
}, {
|
|
121
122
|
"default": function _default() {
|
|
122
|
-
return (0, _vue.h)((0,
|
|
123
|
+
return (0, _vue.h)((0, _comp.getCurrComponent)('el-input'), {
|
|
123
124
|
modelValue: $formView ? $formView.getItemValue(widget) : null,
|
|
124
125
|
placeholder: options.placeholder,
|
|
125
126
|
type: 'textarea',
|
package/dist/index.common.js
CHANGED
|
@@ -7,6 +7,9 @@ exports["default"] = exports.VxeUIPluginRenderElement = void 0;
|
|
|
7
7
|
var _table = require("./table");
|
|
8
8
|
var _form = require("./form");
|
|
9
9
|
var _formDesign = require("./form-design");
|
|
10
|
+
var _store = require("./store");
|
|
11
|
+
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
13
|
// eslint-disable-next-line no-unused-vars
|
|
11
14
|
var ElementPlus;
|
|
12
15
|
function getEventTarget(evnt) {
|
|
@@ -59,12 +62,31 @@ function handleClearEvent(params) {
|
|
|
59
62
|
return false;
|
|
60
63
|
}
|
|
61
64
|
}
|
|
65
|
+
function toComponentName(name) {
|
|
66
|
+
if (name) {
|
|
67
|
+
return name.slice(0, 1).toUpperCase() + name.slice(1);
|
|
68
|
+
}
|
|
69
|
+
return name;
|
|
70
|
+
}
|
|
62
71
|
var VxeUIPluginRenderElement = exports.VxeUIPluginRenderElement = {
|
|
72
|
+
component: function component(comp) {
|
|
73
|
+
if (comp && comp.name) {
|
|
74
|
+
var kcName = _xeUtils["default"].kebabCase('el-button');
|
|
75
|
+
var ccName = toComponentName(_xeUtils["default"].camelCase('el-button'));
|
|
76
|
+
_store.componentMaps[kcName] = comp;
|
|
77
|
+
_store.componentMaps[ccName] = comp;
|
|
78
|
+
} else {
|
|
79
|
+
console.error('[@vxe-ui/plugin-render-element 4.0.12] error component.', comp);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
63
82
|
install: function install(VxeUI, options) {
|
|
64
|
-
|
|
83
|
+
if (options) {
|
|
84
|
+
ElementPlus = options.ElementPlus;
|
|
85
|
+
Object.assign(_store.globalConfig, options);
|
|
86
|
+
}
|
|
65
87
|
// 检查版本
|
|
66
88
|
if (!/^(4)\./.test(VxeUI.uiVersion)) {
|
|
67
|
-
console.error('[@vxe-ui/plugin-render-element 4.0.
|
|
89
|
+
console.error('[@vxe-ui/plugin-render-element 4.0.12] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-render-element/install');
|
|
68
90
|
}
|
|
69
91
|
(0, _table.defineTableRender)(VxeUI);
|
|
70
92
|
(0, _form.defineFormRender)(VxeUI);
|
|
@@ -76,7 +98,12 @@ var VxeUIPluginRenderElement = exports.VxeUIPluginRenderElement = {
|
|
|
76
98
|
VxeUI.interceptor.add('event.clearActived', handleClearEvent);
|
|
77
99
|
}
|
|
78
100
|
};
|
|
79
|
-
if (typeof window !== 'undefined'
|
|
80
|
-
window.VxeUI.use
|
|
101
|
+
if (typeof window !== 'undefined') {
|
|
102
|
+
if (window.VxeUI && window.VxeUI.use) {
|
|
103
|
+
window.VxeUI.use(VxeUIPluginRenderElement);
|
|
104
|
+
}
|
|
105
|
+
if (window.ElementPlus) {
|
|
106
|
+
_store.globalConfig.ElementPlus = window.ElementPlus;
|
|
107
|
+
}
|
|
81
108
|
}
|
|
82
109
|
var _default = exports["default"] = VxeUIPluginRenderElement;
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,9 @@ exports["default"] = exports.VxeUIPluginRenderElement = void 0;
|
|
|
7
7
|
var _table = require("./table");
|
|
8
8
|
var _form = require("./form");
|
|
9
9
|
var _formDesign = require("./form-design");
|
|
10
|
+
var _store = require("./store");
|
|
11
|
+
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
13
|
// eslint-disable-next-line no-unused-vars
|
|
11
14
|
var ElementPlus;
|
|
12
15
|
function getEventTarget(evnt) {
|
|
@@ -59,12 +62,31 @@ function handleClearEvent(params) {
|
|
|
59
62
|
return false;
|
|
60
63
|
}
|
|
61
64
|
}
|
|
65
|
+
function toComponentName(name) {
|
|
66
|
+
if (name) {
|
|
67
|
+
return name.slice(0, 1).toUpperCase() + name.slice(1);
|
|
68
|
+
}
|
|
69
|
+
return name;
|
|
70
|
+
}
|
|
62
71
|
var VxeUIPluginRenderElement = exports.VxeUIPluginRenderElement = {
|
|
72
|
+
component: function component(comp) {
|
|
73
|
+
if (comp && comp.name) {
|
|
74
|
+
var kcName = _xeUtils["default"].kebabCase('el-button');
|
|
75
|
+
var ccName = toComponentName(_xeUtils["default"].camelCase('el-button'));
|
|
76
|
+
_store.componentMaps[kcName] = comp;
|
|
77
|
+
_store.componentMaps[ccName] = comp;
|
|
78
|
+
} else {
|
|
79
|
+
console.error('[@vxe-ui/plugin-render-element 4.0.12] error component.', comp);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
63
82
|
install: function install(VxeUI, options) {
|
|
64
|
-
|
|
83
|
+
if (options) {
|
|
84
|
+
ElementPlus = options.ElementPlus;
|
|
85
|
+
Object.assign(_store.globalConfig, options);
|
|
86
|
+
}
|
|
65
87
|
// 检查版本
|
|
66
88
|
if (!/^(4)\./.test(VxeUI.uiVersion)) {
|
|
67
|
-
console.error('[@vxe-ui/plugin-render-element 4.0.
|
|
89
|
+
console.error('[@vxe-ui/plugin-render-element 4.0.12] Requires vxe-table 4.7.0+ version. https://vxeui.com/other4/#/plugin-render-element/install');
|
|
68
90
|
}
|
|
69
91
|
(0, _table.defineTableRender)(VxeUI);
|
|
70
92
|
(0, _form.defineFormRender)(VxeUI);
|
|
@@ -76,7 +98,12 @@ var VxeUIPluginRenderElement = exports.VxeUIPluginRenderElement = {
|
|
|
76
98
|
VxeUI.interceptor.add('event.clearActived', handleClearEvent);
|
|
77
99
|
}
|
|
78
100
|
};
|
|
79
|
-
if (typeof window !== 'undefined'
|
|
80
|
-
window.VxeUI.use
|
|
101
|
+
if (typeof window !== 'undefined') {
|
|
102
|
+
if (window.VxeUI && window.VxeUI.use) {
|
|
103
|
+
window.VxeUI.use(VxeUIPluginRenderElement);
|
|
104
|
+
}
|
|
105
|
+
if (window.ElementPlus) {
|
|
106
|
+
_store.globalConfig.ElementPlus = window.ElementPlus;
|
|
107
|
+
}
|
|
81
108
|
}
|
|
82
109
|
var _default = exports["default"] = VxeUIPluginRenderElement;
|