vxe-table 3.7.2 → 3.7.3
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/lib/all.js +3 -3
- package/lib/button/index.js +5 -5
- package/lib/button/src/button.js +29 -29
- package/lib/button/style/style.css +2 -2
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/index.js +5 -5
- package/lib/checkbox/src/checkbox.js +17 -17
- package/lib/checkbox/src/group.js +10 -10
- package/lib/checkbox/style/style.css +1 -0
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/checkbox-group/index.js +5 -5
- package/lib/colgroup/index.js +6 -6
- package/lib/column/index.js +6 -6
- package/lib/edit/index.js +5 -5
- package/lib/edit/src/mixin.js +28 -28
- package/lib/export/index.js +15 -15
- package/lib/export/src/export-panel.js +57 -57
- package/lib/export/src/import-panel.js +21 -21
- package/lib/export/src/mixin.js +72 -72
- package/lib/export/style/style.css +5 -0
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/index.js +7 -7
- package/lib/filter/src/mixin.js +8 -8
- package/lib/filter/src/panel.js +24 -24
- package/lib/filter/style/style.css +3 -0
- package/lib/filter/style/style.min.css +1 -1
- package/lib/footer/index.js +5 -5
- package/lib/footer/src/footer.js +14 -14
- package/lib/form/index.js +5 -5
- package/lib/form/src/form-config-item.js +27 -27
- package/lib/form/src/form-gather.js +5 -5
- package/lib/form/src/form-item.js +36 -36
- package/lib/form/src/form.js +69 -69
- package/lib/form/src/render.js +9 -9
- package/lib/form/src/util.js +6 -6
- package/lib/form/style/style.css +10 -2
- package/lib/form/style/style.min.css +1 -1
- package/lib/form-gather/index.js +5 -5
- package/lib/form-item/index.js +5 -5
- package/lib/grid/index.js +7 -7
- package/lib/grid/src/grid.js +77 -77
- package/lib/grid/style/style.css +1 -0
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/index.js +5 -5
- package/lib/header/src/header.js +21 -21
- package/lib/icon/index.js +5 -5
- package/lib/icon/src/icon.js +3 -3
- package/lib/icon/style/style.css +2 -1
- package/lib/icon/style/style.min.css +2 -1
- package/lib/index.common.js +3 -3
- package/lib/index.css +1 -1
- package/lib/index.umd.js +1238 -1836
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +5 -5
- package/lib/input/src/date.js +3 -3
- package/lib/input/src/input.js +248 -248
- package/lib/input/src/number.js +4 -4
- package/lib/input/style/style.css +9 -2
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/index.js +5 -5
- package/lib/keyboard/src/mixin.js +15 -15
- package/lib/list/index.js +5 -5
- package/lib/list/src/list.js +19 -19
- package/lib/loading/index.js +6 -6
- package/lib/loading/src/loading.js +13 -13
- package/lib/loading/style/style.css +1 -0
- package/lib/loading/style/style.min.css +1 -1
- package/lib/locale/lang/en-US.js +7 -7
- package/lib/locale/lang/en-US.umd.js +7 -7
- package/lib/locale/lang/es-ES.js +5 -5
- package/lib/locale/lang/es-ES.umd.js +5 -5
- package/lib/locale/lang/ja-JP.js +7 -7
- package/lib/locale/lang/ja-JP.umd.js +7 -7
- package/lib/locale/lang/pt-BR.js +7 -7
- package/lib/locale/lang/pt-BR.umd.js +7 -7
- package/lib/locale/lang/zh-CN.js +7 -7
- package/lib/locale/lang/zh-CN.umd.js +7 -7
- package/lib/locale/lang/zh-HK.js +4 -4
- package/lib/locale/lang/zh-HK.umd.js +7 -7
- package/lib/locale/lang/zh-MO.js +4 -4
- package/lib/locale/lang/zh-MO.umd.js +7 -7
- package/lib/locale/lang/zh-TC.js +7 -7
- package/lib/locale/lang/zh-TC.umd.js +7 -7
- package/lib/locale/lang/zh-TW.js +4 -4
- package/lib/locale/lang/zh-TW.umd.js +7 -7
- package/lib/menu/index.js +7 -7
- package/lib/menu/src/mixin.js +16 -16
- package/lib/menu/src/panel.js +14 -14
- package/lib/menu/style/style.css +1 -0
- package/lib/menu/style/style.min.css +1 -1
- package/lib/mixins/size.js +2 -2
- package/lib/modal/index.js +12 -12
- package/lib/modal/src/modal.js +104 -104
- package/lib/modal/style/style.css +2 -0
- package/lib/modal/style/style.min.css +1 -1
- package/lib/optgroup/index.js +5 -5
- package/lib/option/index.js +5 -5
- package/lib/pager/index.js +5 -5
- package/lib/pager/src/pager.js +67 -67
- package/lib/pager/style/style.css +2 -0
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/index.js +5 -5
- package/lib/pulldown/src/pulldown.js +16 -16
- package/lib/pulldown/style/style.css +1 -2
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/radio/index.js +5 -5
- package/lib/radio/src/button.js +14 -14
- package/lib/radio/src/group.js +12 -12
- package/lib/radio/src/radio.js +16 -16
- package/lib/radio/style/style.css +1 -0
- package/lib/radio/style/style.min.css +1 -1
- package/lib/radio-button/index.js +5 -5
- package/lib/radio-group/index.js +5 -5
- package/lib/select/index.js +9 -9
- package/lib/select/src/optgroup.js +6 -6
- package/lib/select/src/option.js +6 -6
- package/lib/select/src/select.js +58 -58
- package/lib/select/src/util.js +2 -2
- package/lib/select/style/style.css +2 -2
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +5 -5
- package/lib/switch/src/switch.js +17 -17
- package/lib/switch/style/style.css +1 -0
- package/lib/switch/style/style.min.css +1 -1
- package/lib/table/index.js +15 -15
- package/lib/table/src/body.js +39 -39
- package/lib/table/src/cell.js +77 -77
- package/lib/table/src/column.js +17 -17
- package/lib/table/src/columnInfo.js +13 -13
- package/lib/table/src/group.js +4 -4
- package/lib/table/src/methods.js +223 -223
- package/lib/table/src/table.js +124 -124
- package/lib/table/src/util.js +19 -19
- package/lib/table/style/style.css +10 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/index.js +5 -5
- package/lib/textarea/src/textarea.js +27 -27
- package/lib/textarea/style/style.css +3 -0
- package/lib/textarea/style/style.min.css +1 -1
- package/lib/toolbar/index.js +5 -5
- package/lib/toolbar/src/toolbar.js +79 -79
- package/lib/toolbar/style/style.css +3 -0
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +8 -8
- package/lib/tools/event.js +3 -3
- package/lib/tools/log.js +2 -2
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/resize.js +4 -4
- package/lib/tools/utils.js +13 -13
- package/lib/tools/vn.js +2 -2
- package/lib/tooltip/index.js +6 -6
- package/lib/tooltip/src/tooltip.js +30 -30
- package/lib/v-x-e-table/index.js +9 -9
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/commands.js +6 -6
- package/lib/v-x-e-table/src/conf.js +4 -4
- package/lib/v-x-e-table/src/config.js +6 -2
- package/lib/v-x-e-table/src/config.min.js +1 -1
- package/lib/v-x-e-table/src/formats.js +6 -6
- package/lib/v-x-e-table/src/interceptor.js +5 -5
- package/lib/v-x-e-table/src/menus.js +6 -6
- package/lib/v-x-e-table/src/renderer.js +49 -49
- package/lib/v-x-e-table/src/store.js +7 -7
- package/lib/v-x-e-table/src/validators.js +2 -2
- package/lib/v-x-e-table/style/style.css +2 -0
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/validator/index.js +5 -5
- package/lib/validator/src/mixin.js +29 -29
- package/package.json +4 -4
- package/packages/v-x-e-table/src/config.js +4 -0
- package/styles/form.scss +3 -2
- /package/lib/icon/style/{iconfont.1694939101562.ttf → iconfont.1695255877135.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1694939101562.woff → iconfont.1695255877135.woff} +0 -0
- /package/lib/icon/style/{iconfont.1694939101562.woff2 → iconfont.1695255877135.woff2} +0 -0
- /package/lib/{iconfont.1694939101562.ttf → iconfont.1695255877135.ttf} +0 -0
- /package/lib/{iconfont.1694939101562.woff → iconfont.1695255877135.woff} +0 -0
- /package/lib/{iconfont.1694939101562.woff2 → iconfont.1695255877135.woff2} +0 -0
|
@@ -10,8 +10,8 @@ var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
|
|
|
10
10
|
var _utils = _interopRequireWildcard(require("../../tools/utils"));
|
|
11
11
|
var _log = require("../../tools/log");
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return {
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
16
|
var defaultCompProps = {
|
|
17
17
|
transfer: true
|
|
@@ -31,15 +31,15 @@ function getChangeEvent(renderOpts) {
|
|
|
31
31
|
return 'change';
|
|
32
32
|
}
|
|
33
33
|
function parseDate(value, props) {
|
|
34
|
-
return value && props.valueFormat ? _xeUtils
|
|
34
|
+
return value && props.valueFormat ? _xeUtils.default.toStringDate(value, props.valueFormat) : value;
|
|
35
35
|
}
|
|
36
36
|
function getFormatDate(value, props, defaultFormat) {
|
|
37
37
|
var _props$dateConfig = props.dateConfig,
|
|
38
38
|
dateConfig = _props$dateConfig === void 0 ? {} : _props$dateConfig;
|
|
39
|
-
return _xeUtils
|
|
39
|
+
return _xeUtils.default.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
|
|
40
40
|
}
|
|
41
41
|
function getLabelFormatDate(value, props) {
|
|
42
|
-
return getFormatDate(value, props, _conf
|
|
42
|
+
return getFormatDate(value, props, _conf.default.i18n("vxe.input.date.labelFormat.".concat(props.type)));
|
|
43
43
|
}
|
|
44
44
|
function getDefaultComponentName(_ref) {
|
|
45
45
|
var name = _ref.name;
|
|
@@ -81,7 +81,7 @@ function isImmediateCell(renderOpts, params) {
|
|
|
81
81
|
}
|
|
82
82
|
function getCellEditProps(renderOpts, params, value, defaultProps) {
|
|
83
83
|
var vSize = params.$table.vSize;
|
|
84
|
-
return _xeUtils
|
|
84
|
+
return _xeUtils.default.assign({
|
|
85
85
|
immediate: getInputImmediateModel(renderOpts)
|
|
86
86
|
}, vSize ? {
|
|
87
87
|
size: vSize
|
|
@@ -89,31 +89,31 @@ function getCellEditProps(renderOpts, params, value, defaultProps) {
|
|
|
89
89
|
}
|
|
90
90
|
function getFilterProps(renderOpts, params, value, defaultProps) {
|
|
91
91
|
var vSize = params.$table.vSize;
|
|
92
|
-
return _xeUtils
|
|
92
|
+
return _xeUtils.default.assign(vSize ? {
|
|
93
93
|
size: vSize
|
|
94
94
|
} : {}, defaultCompProps, defaultProps, renderOpts.props, _defineProperty({}, componentDefaultModelProp, value));
|
|
95
95
|
}
|
|
96
96
|
function getItemProps(renderOpts, params, value, defaultProps) {
|
|
97
97
|
var vSize = params.$form.vSize;
|
|
98
|
-
return _xeUtils
|
|
98
|
+
return _xeUtils.default.assign(vSize ? {
|
|
99
99
|
size: vSize
|
|
100
100
|
} : {}, defaultCompProps, defaultProps, renderOpts.props, _defineProperty({}, componentDefaultModelProp, value));
|
|
101
101
|
}
|
|
102
102
|
function getCellLabelVNs(h, renderOpts, params, cellLabel) {
|
|
103
103
|
var placeholder = renderOpts.placeholder;
|
|
104
104
|
return [h('span', {
|
|
105
|
-
|
|
105
|
+
class: 'vxe-cell--label'
|
|
106
106
|
}, placeholder && isEmptyValue(cellLabel) ? [h('span', {
|
|
107
|
-
|
|
108
|
-
}, _utils
|
|
107
|
+
class: 'vxe-cell--placeholder'
|
|
108
|
+
}, _utils.default.formatText((0, _utils.getFuncText)(placeholder), 1))] : _utils.default.formatText(cellLabel, 1))];
|
|
109
109
|
}
|
|
110
110
|
function getNativeOns(renderOpts, params) {
|
|
111
111
|
var nativeEvents = renderOpts.nativeEvents;
|
|
112
112
|
var nativeOns = {};
|
|
113
|
-
_xeUtils
|
|
113
|
+
_xeUtils.default.objectEach(nativeEvents, function (func, key) {
|
|
114
114
|
nativeOns[key] = function () {
|
|
115
115
|
if (process.env.NODE_ENV === 'development') {
|
|
116
|
-
if (!_xeUtils
|
|
116
|
+
if (!_xeUtils.default.isFunction(func)) {
|
|
117
117
|
(0, _log.errLog)('vxe.error.errFunc', [func]);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -132,10 +132,10 @@ function getOns(renderOpts, params, inputFunc, changeFunc) {
|
|
|
132
132
|
var changeEvent = getChangeEvent(renderOpts);
|
|
133
133
|
var isSameEvent = changeEvent === modelEvent;
|
|
134
134
|
var ons = {};
|
|
135
|
-
_xeUtils
|
|
135
|
+
_xeUtils.default.objectEach(events, function (func, key) {
|
|
136
136
|
ons[key] = function () {
|
|
137
137
|
if (process.env.NODE_ENV === 'development') {
|
|
138
|
-
if (!_xeUtils
|
|
138
|
+
if (!_xeUtils.default.isFunction(func)) {
|
|
139
139
|
(0, _log.errLog)('vxe.error.errFunc', [func]);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -180,7 +180,7 @@ function getEditOns(renderOpts, params) {
|
|
|
180
180
|
return getOns(renderOpts, params, function (cellValue) {
|
|
181
181
|
// 处理 model 值双向绑定
|
|
182
182
|
if (isImmediate) {
|
|
183
|
-
_utils
|
|
183
|
+
_utils.default.setCellValue(row, column, cellValue);
|
|
184
184
|
} else {
|
|
185
185
|
model.update = true;
|
|
186
186
|
model.value = cellValue;
|
|
@@ -199,7 +199,7 @@ function getFilterOns(renderOpts, params, option) {
|
|
|
199
199
|
// 处理 model 值双向绑定
|
|
200
200
|
option.data = value;
|
|
201
201
|
}, function () {
|
|
202
|
-
handleConfirmFilter(params, !_xeUtils
|
|
202
|
+
handleConfirmFilter(params, !_xeUtils.default.eqNull(option.data), option);
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
function getItemOns(renderOpts, params) {
|
|
@@ -208,7 +208,7 @@ function getItemOns(renderOpts, params) {
|
|
|
208
208
|
property = params.property;
|
|
209
209
|
return getOns(renderOpts, params, function (value) {
|
|
210
210
|
// 处理 model 值双向绑定
|
|
211
|
-
_xeUtils
|
|
211
|
+
_xeUtils.default.set(data, property, value);
|
|
212
212
|
}, function () {
|
|
213
213
|
// 处理 change 事件相关逻辑
|
|
214
214
|
$form.updateStatus(params);
|
|
@@ -223,7 +223,7 @@ function getNativeEditOns(renderOpts, params) {
|
|
|
223
223
|
// 处理 model 值双向绑定
|
|
224
224
|
var cellValue = evnt.target.value;
|
|
225
225
|
if (isImmediateCell(renderOpts, params)) {
|
|
226
|
-
_utils
|
|
226
|
+
_utils.default.setCellValue(row, column, cellValue);
|
|
227
227
|
} else {
|
|
228
228
|
model.update = true;
|
|
229
229
|
model.value = cellValue;
|
|
@@ -239,7 +239,7 @@ function getNativeFilterOns(renderOpts, params, option) {
|
|
|
239
239
|
// 处理 model 值双向绑定
|
|
240
240
|
option.data = evnt.target.value;
|
|
241
241
|
}, function () {
|
|
242
|
-
handleConfirmFilter(params, !_xeUtils
|
|
242
|
+
handleConfirmFilter(params, !_xeUtils.default.eqNull(option.data), option);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
function getNativeItemOns(renderOpts, params) {
|
|
@@ -249,7 +249,7 @@ function getNativeItemOns(renderOpts, params) {
|
|
|
249
249
|
return getOns(renderOpts, params, function (evnt) {
|
|
250
250
|
// 处理 model 值双向绑定
|
|
251
251
|
var itemValue = evnt.target.value;
|
|
252
|
-
_xeUtils
|
|
252
|
+
_xeUtils.default.set(data, property, itemValue);
|
|
253
253
|
}, function () {
|
|
254
254
|
// 处理 change 事件相关逻辑
|
|
255
255
|
$form.updateStatus(params);
|
|
@@ -265,9 +265,9 @@ function nativeEditRender(h, renderOpts, params) {
|
|
|
265
265
|
column = params.column;
|
|
266
266
|
var name = renderOpts.name;
|
|
267
267
|
var attrs = getNativeAttrs(renderOpts);
|
|
268
|
-
var cellValue = isImmediateCell(renderOpts, params) ? _utils
|
|
268
|
+
var cellValue = isImmediateCell(renderOpts, params) ? _utils.default.getCellValue(row, column) : column.model.value;
|
|
269
269
|
return [h(name, {
|
|
270
|
-
|
|
270
|
+
class: "vxe-default-".concat(name),
|
|
271
271
|
attrs: attrs,
|
|
272
272
|
domProps: {
|
|
273
273
|
value: cellValue
|
|
@@ -278,7 +278,7 @@ function nativeEditRender(h, renderOpts, params) {
|
|
|
278
278
|
function defaultEditRender(h, renderOpts, params) {
|
|
279
279
|
var row = params.row,
|
|
280
280
|
column = params.column;
|
|
281
|
-
var cellValue = _utils
|
|
281
|
+
var cellValue = _utils.default.getCellValue(row, column);
|
|
282
282
|
return [h(getDefaultComponentName(renderOpts), {
|
|
283
283
|
props: getCellEditProps(renderOpts, params, cellValue),
|
|
284
284
|
on: getEditOns(renderOpts, params),
|
|
@@ -324,7 +324,7 @@ function renderNativeOptions(h, options, renderOpts, params) {
|
|
|
324
324
|
var labelProp = optionProps.label || 'label';
|
|
325
325
|
var valueProp = optionProps.value || 'value';
|
|
326
326
|
var disabledProp = optionProps.disabled || 'disabled';
|
|
327
|
-
var cellValue = isImmediateCell(renderOpts, params) ? _utils
|
|
327
|
+
var cellValue = isImmediateCell(renderOpts, params) ? _utils.default.getCellValue(row, column) : column.model.value;
|
|
328
328
|
return options.map(function (option, oIndex) {
|
|
329
329
|
return h('option', {
|
|
330
330
|
key: oIndex,
|
|
@@ -346,7 +346,7 @@ function nativeFilterRender(h, renderOpts, params) {
|
|
|
346
346
|
return column.filters.map(function (option, oIndex) {
|
|
347
347
|
return h(name, {
|
|
348
348
|
key: oIndex,
|
|
349
|
-
|
|
349
|
+
class: "vxe-default-".concat(name),
|
|
350
350
|
attrs: attrs,
|
|
351
351
|
domProps: {
|
|
352
352
|
value: option.data
|
|
@@ -371,13 +371,13 @@ function handleFilterMethod(_ref4) {
|
|
|
371
371
|
row = _ref4.row,
|
|
372
372
|
column = _ref4.column;
|
|
373
373
|
var data = option.data;
|
|
374
|
-
var cellValue = _xeUtils
|
|
374
|
+
var cellValue = _xeUtils.default.get(row, column.property);
|
|
375
375
|
/* eslint-disable eqeqeq */
|
|
376
376
|
return cellValue == data;
|
|
377
377
|
}
|
|
378
378
|
function nativeSelectEditRender(h, renderOpts, params) {
|
|
379
379
|
return [h('select', {
|
|
380
|
-
|
|
380
|
+
class: 'vxe-default-select',
|
|
381
381
|
attrs: getNativeAttrs(renderOpts),
|
|
382
382
|
on: getNativeEditOns(renderOpts, params)
|
|
383
383
|
}, renderOpts.optionGroups ? renderNativeOptgroups(h, renderOpts, params, renderNativeOptions) : renderNativeOptions(h, renderOpts.options, renderOpts, params))];
|
|
@@ -389,7 +389,7 @@ function defaultSelectEditRender(h, renderOpts, params) {
|
|
|
389
389
|
optionProps = renderOpts.optionProps,
|
|
390
390
|
optionGroups = renderOpts.optionGroups,
|
|
391
391
|
optionGroupProps = renderOpts.optionGroupProps;
|
|
392
|
-
var cellValue = _utils
|
|
392
|
+
var cellValue = _utils.default.getCellValue(row, column);
|
|
393
393
|
return [h(getDefaultComponentName(renderOpts), {
|
|
394
394
|
props: getCellEditProps(renderOpts, params, cellValue, {
|
|
395
395
|
options: options,
|
|
@@ -411,16 +411,16 @@ function getSelectCellValue(renderOpts, _ref5) {
|
|
|
411
411
|
optionProps = _renderOpts$optionPro2 === void 0 ? {} : _renderOpts$optionPro2,
|
|
412
412
|
_renderOpts$optionGro2 = renderOpts.optionGroupProps,
|
|
413
413
|
optionGroupProps = _renderOpts$optionGro2 === void 0 ? {} : _renderOpts$optionGro2;
|
|
414
|
-
var cellValue = _xeUtils
|
|
414
|
+
var cellValue = _xeUtils.default.get(row, column.property);
|
|
415
415
|
var selectItem;
|
|
416
416
|
var labelProp = optionProps.label || 'label';
|
|
417
417
|
var valueProp = optionProps.value || 'value';
|
|
418
418
|
if (!isEmptyValue(cellValue)) {
|
|
419
|
-
return _xeUtils
|
|
419
|
+
return _xeUtils.default.map(props.multiple ? cellValue : [cellValue], optionGroups ? function (value) {
|
|
420
420
|
var groupOptions = optionGroupProps.options || 'options';
|
|
421
421
|
for (var index = 0; index < optionGroups.length; index++) {
|
|
422
422
|
/* eslint-disable eqeqeq */
|
|
423
|
-
selectItem = _xeUtils
|
|
423
|
+
selectItem = _xeUtils.default.find(optionGroups[index][groupOptions], function (item) {
|
|
424
424
|
return item[valueProp] == value;
|
|
425
425
|
});
|
|
426
426
|
if (selectItem) {
|
|
@@ -430,7 +430,7 @@ function getSelectCellValue(renderOpts, _ref5) {
|
|
|
430
430
|
return selectItem ? selectItem[labelProp] : value;
|
|
431
431
|
} : function (value) {
|
|
432
432
|
/* eslint-disable eqeqeq */
|
|
433
|
-
selectItem = _xeUtils
|
|
433
|
+
selectItem = _xeUtils.default.find(options, function (item) {
|
|
434
434
|
return item[valueProp] == value;
|
|
435
435
|
});
|
|
436
436
|
return selectItem ? selectItem[labelProp] : value;
|
|
@@ -448,9 +448,9 @@ function nativeItemRender(h, renderOpts, params) {
|
|
|
448
448
|
property = params.property;
|
|
449
449
|
var name = renderOpts.name;
|
|
450
450
|
var attrs = getNativeAttrs(renderOpts);
|
|
451
|
-
var itemValue = _xeUtils
|
|
451
|
+
var itemValue = _xeUtils.default.get(data, property);
|
|
452
452
|
return [h(name, {
|
|
453
|
-
|
|
453
|
+
class: "vxe-default-".concat(name),
|
|
454
454
|
attrs: attrs,
|
|
455
455
|
domProps: attrs && name === 'input' && (attrs.type === 'submit' || attrs.type === 'reset') ? null : {
|
|
456
456
|
value: itemValue
|
|
@@ -461,7 +461,7 @@ function nativeItemRender(h, renderOpts, params) {
|
|
|
461
461
|
function defaultItemRender(h, renderOpts, params) {
|
|
462
462
|
var data = params.data,
|
|
463
463
|
property = params.property;
|
|
464
|
-
var itemValue = _xeUtils
|
|
464
|
+
var itemValue = _xeUtils.default.get(data, property);
|
|
465
465
|
return [h(getDefaultComponentName(renderOpts), {
|
|
466
466
|
props: getItemProps(renderOpts, params, itemValue),
|
|
467
467
|
on: getItemOns(renderOpts, params),
|
|
@@ -492,7 +492,7 @@ function renderNativeFormOptions(h, options, renderOpts, params) {
|
|
|
492
492
|
var labelProp = optionProps.label || 'label';
|
|
493
493
|
var valueProp = optionProps.value || 'value';
|
|
494
494
|
var disabledProp = optionProps.disabled || 'disabled';
|
|
495
|
-
var cellValue = _xeUtils
|
|
495
|
+
var cellValue = _xeUtils.default.get(data, property);
|
|
496
496
|
return options.map(function (item, oIndex) {
|
|
497
497
|
return h('option', {
|
|
498
498
|
key: oIndex,
|
|
@@ -511,7 +511,7 @@ function handleExportSelectMethod(params) {
|
|
|
511
511
|
var row = params.row,
|
|
512
512
|
column = params.column,
|
|
513
513
|
options = params.options;
|
|
514
|
-
return options.original ? _utils
|
|
514
|
+
return options.original ? _utils.default.getCellValue(row, column) : getSelectCellValue(column.editRender || column.cellRender, params);
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
/**
|
|
@@ -527,7 +527,7 @@ function defaultFormItemRadioAndCheckboxRender(h, renderOpts, params) {
|
|
|
527
527
|
var labelProp = optionProps.label || 'label';
|
|
528
528
|
var valueProp = optionProps.value || 'value';
|
|
529
529
|
var disabledProp = optionProps.disabled || 'disabled';
|
|
530
|
-
var itemValue = _xeUtils
|
|
530
|
+
var itemValue = _xeUtils.default.get(data, property);
|
|
531
531
|
var name = getDefaultComponentName(renderOpts);
|
|
532
532
|
// 如果是分组
|
|
533
533
|
if (options) {
|
|
@@ -581,7 +581,7 @@ var renderMap = {
|
|
|
581
581
|
return column.filters.map(function (option, oIndex) {
|
|
582
582
|
return h('select', {
|
|
583
583
|
key: oIndex,
|
|
584
|
-
|
|
584
|
+
class: 'vxe-default-select',
|
|
585
585
|
attrs: getNativeAttrs(renderOpts),
|
|
586
586
|
on: getNativeFilterOns(renderOpts, params, option)
|
|
587
587
|
}, renderOpts.optionGroups ? renderNativeOptgroups(h, renderOpts, params, renderNativeOptions) : renderNativeOptions(h, renderOpts.options, renderOpts, params));
|
|
@@ -590,7 +590,7 @@ var renderMap = {
|
|
|
590
590
|
defaultFilterMethod: handleFilterMethod,
|
|
591
591
|
renderItemContent: function renderItemContent(h, renderOpts, params) {
|
|
592
592
|
return [h('select', {
|
|
593
|
-
|
|
593
|
+
class: 'vxe-default-select',
|
|
594
594
|
attrs: getNativeAttrs(renderOpts),
|
|
595
595
|
on: getNativeItemOns(renderOpts, params)
|
|
596
596
|
}, renderOpts.optionGroups ? renderNativeOptgroups(h, renderOpts, params, renderNativeFormOptions) : renderNativeFormOptions(h, renderOpts.options, renderOpts, params))];
|
|
@@ -605,8 +605,8 @@ var renderMap = {
|
|
|
605
605
|
props = _renderOpts$props2 === void 0 ? {} : _renderOpts$props2;
|
|
606
606
|
var row = params.row,
|
|
607
607
|
column = params.column;
|
|
608
|
-
var digits = props.digits || _conf
|
|
609
|
-
var cellValue = _xeUtils
|
|
608
|
+
var digits = props.digits || _conf.default.input.digits;
|
|
609
|
+
var cellValue = _xeUtils.default.get(row, column.property);
|
|
610
610
|
if (cellValue) {
|
|
611
611
|
switch (props.type) {
|
|
612
612
|
case 'date':
|
|
@@ -616,7 +616,7 @@ var renderMap = {
|
|
|
616
616
|
cellValue = getLabelFormatDate(cellValue, props);
|
|
617
617
|
break;
|
|
618
618
|
case 'float':
|
|
619
|
-
cellValue = _xeUtils
|
|
619
|
+
cellValue = _xeUtils.default.toFixed(_xeUtils.default.floor(cellValue, digits), digits);
|
|
620
620
|
break;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
@@ -676,7 +676,7 @@ var renderMap = {
|
|
|
676
676
|
optionProps = renderOpts.optionProps,
|
|
677
677
|
optionGroups = renderOpts.optionGroups,
|
|
678
678
|
optionGroupProps = renderOpts.optionGroupProps;
|
|
679
|
-
var itemValue = _xeUtils
|
|
679
|
+
var itemValue = _xeUtils.default.get(data, property);
|
|
680
680
|
return [h(getDefaultComponentName(renderOpts), {
|
|
681
681
|
props: getItemProps(renderOpts, params, itemValue, {
|
|
682
682
|
options: options,
|
|
@@ -711,7 +711,7 @@ var renderMap = {
|
|
|
711
711
|
*/
|
|
712
712
|
var renderer = {
|
|
713
713
|
mixin: function mixin(map) {
|
|
714
|
-
_xeUtils
|
|
714
|
+
_xeUtils.default.each(map, function (options, name) {
|
|
715
715
|
return renderer.add(name, options);
|
|
716
716
|
});
|
|
717
717
|
return renderer;
|
|
@@ -725,8 +725,8 @@ var renderer = {
|
|
|
725
725
|
if (renders) {
|
|
726
726
|
// 检测是否覆盖
|
|
727
727
|
if (process.env.NODE_ENV === 'development') {
|
|
728
|
-
_xeUtils
|
|
729
|
-
if (!_xeUtils
|
|
728
|
+
_xeUtils.default.each(options, function (val, key) {
|
|
729
|
+
if (!_xeUtils.default.eqNull(renders[key]) && renders[key] !== val) {
|
|
730
730
|
(0, _log.warnLog)('vxe.error.coverProp', ["Renderer.".concat(name), key]);
|
|
731
731
|
}
|
|
732
732
|
});
|
|
@@ -738,7 +738,7 @@ var renderer = {
|
|
|
738
738
|
}
|
|
739
739
|
return renderer;
|
|
740
740
|
},
|
|
741
|
-
|
|
741
|
+
delete: function _delete(name) {
|
|
742
742
|
delete renderMap[name];
|
|
743
743
|
return renderer;
|
|
744
744
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
8
8
|
var _log = require("../../tools/log");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
11
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
12
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -22,7 +22,7 @@ var Store = /*#__PURE__*/function () {
|
|
|
22
22
|
key: "mixin",
|
|
23
23
|
value: function mixin(options) {
|
|
24
24
|
var _this = this;
|
|
25
|
-
_xeUtils
|
|
25
|
+
_xeUtils.default.each(options, function (item, key) {
|
|
26
26
|
_this.add(key, item);
|
|
27
27
|
});
|
|
28
28
|
return Store;
|
|
@@ -38,14 +38,14 @@ var Store = /*#__PURE__*/function () {
|
|
|
38
38
|
var conf = this.store[name];
|
|
39
39
|
// 检测是否覆盖
|
|
40
40
|
if (process.env.NODE_ENV === 'development') {
|
|
41
|
-
var confKeys = _xeUtils
|
|
42
|
-
_xeUtils
|
|
41
|
+
var confKeys = _xeUtils.default.keys(conf);
|
|
42
|
+
_xeUtils.default.each(render, function (item, key) {
|
|
43
43
|
if (confKeys.includes(key)) {
|
|
44
44
|
(0, _log.warnLog)('vxe.error.coverProp', [name, key]);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
this.store[name] = conf ? _xeUtils
|
|
48
|
+
this.store[name] = conf ? _xeUtils.default.merge(conf, render) : render;
|
|
49
49
|
return Store;
|
|
50
50
|
}
|
|
51
51
|
}, {
|
|
@@ -58,4 +58,4 @@ var Store = /*#__PURE__*/function () {
|
|
|
58
58
|
return Store;
|
|
59
59
|
}();
|
|
60
60
|
var _default = Store;
|
|
61
|
-
exports
|
|
61
|
+
exports.default = _default;
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.validators = void 0;
|
|
7
7
|
var _store = _interopRequireDefault(require("./store"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
9
|
-
var validators = new _store
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
var validators = new _store.default();
|
|
10
10
|
exports.validators = validators;
|
|
11
11
|
if (process.env.NODE_ENV === 'development') {
|
|
12
12
|
Object.assign(validators, {
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
font-weight: normal;
|
|
59
59
|
-webkit-user-select: none;
|
|
60
60
|
-moz-user-select: none;
|
|
61
|
+
-ms-user-select: none;
|
|
61
62
|
user-select: none;
|
|
62
63
|
}
|
|
63
64
|
[class*=vxe-icon--].rotate45 {
|
|
@@ -1343,6 +1344,7 @@
|
|
|
1343
1344
|
z-index: 99;
|
|
1344
1345
|
-webkit-user-select: none;
|
|
1345
1346
|
-moz-user-select: none;
|
|
1347
|
+
-ms-user-select: none;
|
|
1346
1348
|
user-select: none;
|
|
1347
1349
|
background-color: rgba(255, 255, 255, 0.5);
|
|
1348
1350
|
}
|