vxe-table 4.3.0-beta.7 → 4.3.1
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.en.md +3 -3
- package/README.md +3 -3
- package/README.zh-TW.md +3 -3
- package/es/checkbox/src/checkbox.js +20 -7
- package/es/checkbox/src/group.js +14 -2
- package/es/checkbox/style.css +1 -1
- package/es/export/style.css +1 -1
- package/es/filter/style.css +1 -1
- package/es/form/src/form.js +1 -1
- package/es/form/style.css +1 -0
- package/es/grid/style.css +1 -1
- package/es/icon/src/icon.js +3 -2
- package/es/icon/style.css +73 -512
- package/es/list/src/list.js +1 -1
- package/es/loading/src/loading.js +33 -23
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/ja-JP.js +1 -1
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/locale/lang/zh-TC.js +1 -1
- package/es/modal/src/modal.js +1 -1
- package/es/modal/style.css +2 -2
- package/es/pager/style.css +1 -1
- package/es/select/src/select.js +25 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +17 -10
- package/es/table/src/props.js +2 -0
- package/es/table/src/table.js +8 -1
- package/es/table/style.css +4 -1
- package/es/toolbar/src/toolbar.js +7 -6
- package/es/toolbar/style.css +2 -2
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/style.css +74 -513
- package/es/vxe-checkbox/style.css +1 -1
- package/es/vxe-form/style.css +1 -0
- package/es/vxe-grid/style.css +1 -1
- package/es/vxe-icon/style.css +73 -512
- package/es/vxe-modal/style.css +2 -2
- package/es/vxe-module-export/style.css +1 -1
- package/es/vxe-module-filter/style.css +1 -1
- package/es/vxe-pager/style.css +1 -1
- package/es/vxe-table/style.css +4 -1
- package/es/vxe-toolbar/style.css +2 -2
- package/helper/vetur/attributes.json +17 -5
- package/helper/vetur/tags.json +10 -2
- package/lib/checkbox/src/checkbox.js +23 -7
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +21 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox/style/style.css +1 -1
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/export/style/style.css +1 -1
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/style/style.css +1 -1
- package/lib/filter/style/style.min.css +1 -1
- package/lib/form/src/form.js +1 -1
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +1 -0
- package/lib/form/style/style.min.css +1 -1
- package/lib/grid/style/style.css +1 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/icon/src/icon.js +3 -2
- package/lib/icon/src/icon.min.js +1 -1
- package/lib/icon/style/style.css +73 -512
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +155 -51
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +1 -1
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/src/loading.js +28 -18
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -1
- package/lib/locale/lang/ja-JP.js +1 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +1 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +1 -1
- package/lib/locale/lang/zh-TC.js +1 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +1 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +1 -1
- package/lib/modal/src/modal.js +1 -1
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +2 -2
- package/lib/modal/style/style.min.css +1 -1
- package/lib/pager/style/style.css +1 -1
- package/lib/pager/style/style.min.css +1 -1
- package/lib/select/src/select.js +37 -3
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +16 -7
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/props.js +2 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +8 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +4 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +7 -6
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +2 -2
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +74 -513
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/vxe-checkbox/style/style.css +1 -1
- package/lib/vxe-checkbox/style/style.min.css +1 -1
- package/lib/vxe-form/style/style.css +1 -0
- package/lib/vxe-form/style/style.min.css +1 -1
- package/lib/vxe-grid/style/style.css +1 -1
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-icon/style/style.css +73 -512
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-modal/style/style.css +2 -2
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-module-export/style/style.css +1 -1
- package/lib/vxe-module-export/style/style.min.css +1 -1
- package/lib/vxe-module-filter/style/style.css +1 -1
- package/lib/vxe-module-filter/style/style.min.css +1 -1
- package/lib/vxe-pager/style/style.css +1 -1
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-table/style/style.css +4 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-toolbar/style/style.css +2 -2
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/checkbox/src/checkbox.ts +20 -7
- package/packages/checkbox/src/group.ts +18 -3
- package/packages/form/src/form.ts +1 -1
- package/packages/icon/src/icon.ts +3 -2
- package/packages/list/src/list.ts +1 -1
- package/packages/loading/src/loading.ts +34 -22
- package/packages/locale/lang/en-US.ts +1 -1
- package/packages/locale/lang/ja-JP.ts +1 -1
- package/packages/locale/lang/zh-CN.ts +1 -1
- package/packages/locale/lang/zh-TC.ts +1 -1
- package/packages/modal/src/modal.ts +1 -1
- package/packages/select/src/select.ts +27 -3
- package/packages/table/src/body.ts +15 -8
- package/packages/table/src/props.ts +2 -0
- package/packages/table/src/table.ts +9 -1
- package/packages/toolbar/src/toolbar.ts +7 -6
- package/styles/base/checked.scss +1 -1
- package/styles/form.scss +1 -0
- package/styles/icon.scss +103 -21
- package/styles/loading.scss +1 -1
- package/styles/table.scss +4 -0
- package/styles/variable.scss +2 -1
- package/types/checkbox-group.d.ts +8 -1
- package/types/icon.d.ts +2 -0
- package/types/select.d.ts +2 -0
- package/types/table.d.ts +9 -0
- package/types/toolbar.d.ts +6 -1
- package/types/v-x-e-table/index.d.ts +1 -1
package/es/list/src/list.js
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
|
-
import { defineComponent, h } from 'vue';
|
|
1
|
+
import { defineComponent, h, computed } from 'vue';
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
3
3
|
export default defineComponent({
|
|
4
4
|
name: 'VxeLoading',
|
|
5
5
|
props: {
|
|
6
|
-
|
|
6
|
+
modelValue: Boolean,
|
|
7
|
+
icon: String,
|
|
8
|
+
text: String
|
|
7
9
|
},
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
setup: function (props) {
|
|
11
|
+
var computeLoadingIcon = computed(function () {
|
|
12
|
+
return props.icon || GlobalConfig.icon.LOADING;
|
|
13
|
+
});
|
|
14
|
+
var computeLoadingText = computed(function () {
|
|
15
|
+
var loadingText = GlobalConfig.loadingText;
|
|
16
|
+
return props.text || (loadingText === null ? loadingText : GlobalConfig.i18n('vxe.loading.text'));
|
|
17
|
+
});
|
|
18
|
+
return function () {
|
|
19
|
+
var loadingIcon = computeLoadingIcon.value;
|
|
20
|
+
var loadingText = computeLoadingText.value;
|
|
21
|
+
return h('div', {
|
|
22
|
+
class: ['vxe-loading', {
|
|
23
|
+
'is--visible': props.modelValue
|
|
24
|
+
}]
|
|
19
25
|
}, [
|
|
20
|
-
|
|
21
|
-
class:
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
h('div', {
|
|
27
|
+
class: 'vxe-loading--chunk'
|
|
28
|
+
}, [
|
|
29
|
+
loadingIcon ? h('i', {
|
|
30
|
+
class: loadingIcon
|
|
31
|
+
}) : h('div', {
|
|
32
|
+
class: 'vxe-loading--spinner'
|
|
33
|
+
}),
|
|
34
|
+
loadingText ? h('div', {
|
|
35
|
+
class: 'vxe-loading--text'
|
|
36
|
+
}, "".concat(loadingText)) : null
|
|
37
|
+
])
|
|
38
|
+
]);
|
|
39
|
+
};
|
|
30
40
|
}
|
|
31
41
|
});
|
package/es/locale/lang/en-US.js
CHANGED
package/es/locale/lang/ja-JP.js
CHANGED
package/es/locale/lang/zh-CN.js
CHANGED
package/es/locale/lang/zh-TC.js
CHANGED
package/es/modal/src/modal.js
CHANGED
package/es/modal/style.css
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
.vxe-modal--wrapper.is--loading .vxe-modal--header,
|
|
48
48
|
.vxe-modal--wrapper.is--loading .vxe-modal--footer {
|
|
49
49
|
position: relative;
|
|
50
|
-
border-bottom-color: rgba(
|
|
50
|
+
border-bottom-color: rgba(255, 255, 255, 0.5); }
|
|
51
51
|
.vxe-modal--wrapper.is--loading .vxe-modal--header:before,
|
|
52
52
|
.vxe-modal--wrapper.is--loading .vxe-modal--footer:before {
|
|
53
53
|
content: "";
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
-moz-user-select: none;
|
|
62
62
|
-ms-user-select: none;
|
|
63
63
|
user-select: none;
|
|
64
|
-
background-color: rgba(
|
|
64
|
+
background-color: rgba(255, 255, 255, 0.5); }
|
|
65
65
|
.vxe-modal--wrapper:not(.lock--view) {
|
|
66
66
|
pointer-events: none; }
|
|
67
67
|
.vxe-modal--wrapper:not(.type--message).lock--scroll {
|
package/es/pager/style.css
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
-moz-user-select: none;
|
|
51
51
|
-ms-user-select: none;
|
|
52
52
|
user-select: none;
|
|
53
|
-
background-color: rgba(
|
|
53
|
+
background-color: rgba(255, 255, 255, 0.5); }
|
|
54
54
|
.vxe-pager .vxe-pager--prev-btn,
|
|
55
55
|
.vxe-pager .vxe-pager--next-btn,
|
|
56
56
|
.vxe-pager .vxe-pager--num-btn,
|
package/es/select/src/select.js
CHANGED
|
@@ -31,6 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
optionGroupProps: Object,
|
|
32
32
|
optionConfig: Object,
|
|
33
33
|
className: [String, Function],
|
|
34
|
+
max: { type: [String, Number], default: null },
|
|
34
35
|
size: { type: String, default: function () { return GlobalConfig.select.size || GlobalConfig.size; } },
|
|
35
36
|
filterable: Boolean,
|
|
36
37
|
filterMethod: Function,
|
|
@@ -111,6 +112,13 @@ export default defineComponent({
|
|
|
111
112
|
var groupPropsOpts = computeGroupPropsOpts.value;
|
|
112
113
|
return groupPropsOpts.options || 'options';
|
|
113
114
|
});
|
|
115
|
+
var computeIsMaximize = computed(function () {
|
|
116
|
+
var modelValue = props.modelValue, multiple = props.multiple, max = props.max;
|
|
117
|
+
if (multiple && max) {
|
|
118
|
+
return (modelValue ? modelValue.length : 0) >= XEUtils.toNumber(max);
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
});
|
|
114
122
|
var computeOptionOpts = computed(function () {
|
|
115
123
|
return Object.assign({}, GlobalConfig.select.optionConfig, props.optionConfig);
|
|
116
124
|
});
|
|
@@ -646,6 +654,19 @@ export default defineComponent({
|
|
|
646
654
|
showOptionPanel();
|
|
647
655
|
}
|
|
648
656
|
};
|
|
657
|
+
var checkOptionDisabled = function (isSelected, option, group) {
|
|
658
|
+
if (option.disabled) {
|
|
659
|
+
return true;
|
|
660
|
+
}
|
|
661
|
+
if (group && group.disabled) {
|
|
662
|
+
return true;
|
|
663
|
+
}
|
|
664
|
+
var isMaximize = computeIsMaximize.value;
|
|
665
|
+
if (isMaximize && !isSelected) {
|
|
666
|
+
return true;
|
|
667
|
+
}
|
|
668
|
+
return false;
|
|
669
|
+
};
|
|
649
670
|
var renderOption = function (list, group) {
|
|
650
671
|
var optionKey = props.optionKey, modelValue = props.modelValue, multiple = props.multiple;
|
|
651
672
|
var currentValue = reactData.currentValue;
|
|
@@ -656,16 +677,17 @@ export default defineComponent({
|
|
|
656
677
|
var useKey = optionOpts.useKey;
|
|
657
678
|
return list.map(function (option, cIndex) {
|
|
658
679
|
var slots = option.slots, className = option.className;
|
|
659
|
-
var isVisible = !isGroup || isOptionVisible(option);
|
|
660
|
-
var isDisabled = (group && group.disabled) || option.disabled;
|
|
661
680
|
var optionValue = option[valueField];
|
|
681
|
+
var isSelected = multiple ? (modelValue && modelValue.indexOf(optionValue) > -1) : modelValue === optionValue;
|
|
682
|
+
var isVisible = !isGroup || isOptionVisible(option);
|
|
683
|
+
var isDisabled = checkOptionDisabled(isSelected, option, group);
|
|
662
684
|
var optid = getOptid(option);
|
|
663
685
|
var defaultSlot = slots ? slots.default : null;
|
|
664
686
|
return isVisible ? h('div', {
|
|
665
687
|
key: useKey || optionKey ? optid : cIndex,
|
|
666
688
|
class: ['vxe-select-option', className ? (XEUtils.isFunction(className) ? className({ option: option, $select: $xeselect }) : className) : '', {
|
|
667
689
|
'is--disabled': isDisabled,
|
|
668
|
-
'is--selected':
|
|
690
|
+
'is--selected': isSelected,
|
|
669
691
|
'is--hover': currentValue === optionValue
|
|
670
692
|
}],
|
|
671
693
|
// attrs
|