vxe-table 3.6.10 → 3.6.12-beta.0
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 +7 -22
- 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 +3 -13
- 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 +26 -26
- 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 +73 -73
- package/lib/export/style/style.css +2 -9
- 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 +1 -5
- 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 +24 -28
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-gather.js +5 -5
- package/lib/form/src/form-item.js +30 -30
- package/lib/form/src/form.js +61 -61
- package/lib/form/src/render.js +9 -9
- package/lib/form/src/util.js +6 -6
- package/lib/form/style/style.css +11 -57
- 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 +0 -1
- 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 +33 -80
- package/lib/icon/style/style.min.css +33 -80
- package/lib/index.common.js +3 -3
- package/lib/index.css +1 -1
- package/lib/index.umd.js +1831 -1228
- 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 +243 -243
- package/lib/input/src/number.js +4 -4
- package/lib/input/style/style.css +39 -159
- 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 +21 -20
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/index.js +6 -6
- package/lib/loading/src/loading.js +13 -13
- package/lib/loading/style/style.css +5 -21
- 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/ja-JP.js +7 -7
- package/lib/locale/lang/ja-JP.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 -3
- 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 +14 -49
- 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 +66 -66
- package/lib/pager/style/style.css +4 -15
- 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 +5 -13
- 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 +3 -13
- 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 +56 -56
- package/lib/select/src/util.js +2 -2
- package/lib/select/style/style.css +6 -19
- 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 +3 -9
- package/lib/switch/style/style.min.css +1 -1
- package/lib/table/index.js +14 -14
- 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 +226 -223
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +120 -120
- package/lib/table/src/util.js +19 -19
- package/lib/table/style/style.css +25 -106
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/index.js +5 -5
- package/lib/textarea/src/textarea.js +25 -25
- package/lib/textarea/style/style.css +0 -9
- package/lib/textarea/style/style.min.css +1 -1
- package/lib/toolbar/index.js +5 -5
- package/lib/toolbar/src/toolbar.js +73 -73
- package/lib/toolbar/style/style.css +9 -34
- 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 +12 -12
- package/lib/tools/vn.js +2 -2
- package/lib/tooltip/index.js +6 -6
- package/lib/tooltip/src/tooltip.js +30 -30
- package/lib/tooltip/style/style.css +2 -4
- package/lib/tooltip/style/style.min.css +1 -1
- 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 +2 -2
- package/lib/v-x-e-table/src/conf.js +4 -4
- package/lib/v-x-e-table/src/formats.js +2 -2
- package/lib/v-x-e-table/src/interceptor.js +5 -5
- package/lib/v-x-e-table/src/menus.js +2 -2
- package/lib/v-x-e-table/src/renderer.js +47 -47
- package/lib/v-x-e-table/src/setup.js +2 -2
- package/lib/v-x-e-table/src/store.js +6 -6
- package/lib/v-x-e-table/style/style.css +37 -100
- 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 +25 -25
- package/package.json +2 -6
- package/packages/form/src/form-config-item.js +1 -5
- package/packages/list/src/list.js +2 -1
- package/packages/table/src/methods.js +10 -5
- /package/lib/icon/style/{iconfont.1676471822832.ttf → iconfont.1677164683133.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1676471822832.woff → iconfont.1677164683133.woff} +0 -0
- /package/lib/icon/style/{iconfont.1676471822832.woff2 → iconfont.1677164683133.woff2} +0 -0
- /package/lib/{iconfont.1676471822832.ttf → iconfont.1677164683133.ttf} +0 -0
- /package/lib/{iconfont.1676471822832.woff → iconfont.1677164683133.woff} +0 -0
- /package/lib/{iconfont.1676471822832.woff2 → iconfont.1677164683133.woff2} +0 -0
package/lib/switch/index.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports["default"] = exports.Switch = void 0;
|
|
7
7
|
var _switch = _interopRequireDefault(require("./src/switch"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var Switch = Object.assign(_switch
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
var Switch = Object.assign(_switch["default"], {
|
|
10
10
|
install: function install(Vue) {
|
|
11
|
-
Vue.component(_switch
|
|
11
|
+
Vue.component(_switch["default"].name, _switch["default"]);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
exports.Switch = Switch;
|
|
15
15
|
var _default = Switch;
|
|
16
|
-
exports
|
|
16
|
+
exports["default"] = _default;
|
package/lib/switch/src/switch.js
CHANGED
|
@@ -3,45 +3,45 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
var _utils = require("../../tools/utils");
|
|
8
8
|
var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
|
|
9
9
|
var _size = _interopRequireDefault(require("../../mixins/size"));
|
|
10
10
|
var _dom = require("../../tools/dom");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
12
|
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; }
|
|
13
13
|
var _default2 = {
|
|
14
14
|
name: 'VxeSwitch',
|
|
15
|
-
mixins: [_size
|
|
15
|
+
mixins: [_size["default"]],
|
|
16
16
|
props: {
|
|
17
17
|
value: [String, Number, Boolean],
|
|
18
18
|
disabled: Boolean,
|
|
19
19
|
className: String,
|
|
20
20
|
size: {
|
|
21
21
|
type: String,
|
|
22
|
-
default: function _default() {
|
|
23
|
-
return _conf
|
|
22
|
+
"default": function _default() {
|
|
23
|
+
return _conf["default"]["switch"].size || _conf["default"].size;
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
openLabel: String,
|
|
27
27
|
closeLabel: String,
|
|
28
28
|
openValue: {
|
|
29
29
|
type: [String, Number, Boolean],
|
|
30
|
-
default: true
|
|
30
|
+
"default": true
|
|
31
31
|
},
|
|
32
32
|
closeValue: {
|
|
33
33
|
type: [String, Number, Boolean],
|
|
34
|
-
default: false
|
|
34
|
+
"default": false
|
|
35
35
|
},
|
|
36
36
|
openIcon: String,
|
|
37
37
|
closeIcon: String
|
|
38
38
|
},
|
|
39
39
|
inject: {
|
|
40
40
|
$xeform: {
|
|
41
|
-
default: null
|
|
41
|
+
"default": null
|
|
42
42
|
},
|
|
43
43
|
$xeformiteminfo: {
|
|
44
|
-
default: null
|
|
44
|
+
"default": null
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
data: function data() {
|
|
@@ -84,10 +84,10 @@ var _default2 = {
|
|
|
84
84
|
openIcon = this.openIcon,
|
|
85
85
|
closeIcon = this.closeIcon;
|
|
86
86
|
return h('div', {
|
|
87
|
-
class: ['vxe-switch', className, isChecked ? 'is--on' : 'is--off', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--animat', this.hasAnimat), _ref)]
|
|
87
|
+
"class": ['vxe-switch', className, isChecked ? 'is--on' : 'is--off', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--animat', this.hasAnimat), _ref)]
|
|
88
88
|
}, [h('button', {
|
|
89
89
|
ref: 'btn',
|
|
90
|
-
class: 'vxe-switch--button',
|
|
90
|
+
"class": 'vxe-switch--button',
|
|
91
91
|
attrs: {
|
|
92
92
|
type: 'button',
|
|
93
93
|
disabled: disabled
|
|
@@ -98,15 +98,15 @@ var _default2 = {
|
|
|
98
98
|
blur: this.blurEvent
|
|
99
99
|
}
|
|
100
100
|
}, [h('span', {
|
|
101
|
-
class: 'vxe-switch--label vxe-switch--label-on'
|
|
101
|
+
"class": 'vxe-switch--label vxe-switch--label-on'
|
|
102
102
|
}, [openIcon ? h('i', {
|
|
103
|
-
class: ['vxe-switch--label-icon', openIcon]
|
|
103
|
+
"class": ['vxe-switch--label-icon', openIcon]
|
|
104
104
|
}) : null, this.onShowLabel]), h('span', {
|
|
105
|
-
class: 'vxe-switch--label vxe-switch--label-off'
|
|
105
|
+
"class": 'vxe-switch--label vxe-switch--label-off'
|
|
106
106
|
}, [closeIcon ? h('i', {
|
|
107
|
-
class: ['vxe-switch--label-icon', closeIcon]
|
|
107
|
+
"class": ['vxe-switch--label-icon', closeIcon]
|
|
108
108
|
}) : null, this.offShowLabel]), h('span', {
|
|
109
|
-
class: 'vxe-switch--icon',
|
|
109
|
+
"class": 'vxe-switch--icon',
|
|
110
110
|
style: this.styles
|
|
111
111
|
})])]);
|
|
112
112
|
},
|
|
@@ -155,4 +155,4 @@ var _default2 = {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
exports
|
|
158
|
+
exports["default"] = _default2;
|
|
@@ -30,16 +30,13 @@
|
|
|
30
30
|
padding: 0.4em;
|
|
31
31
|
-webkit-user-select: none;
|
|
32
32
|
-moz-user-select: none;
|
|
33
|
-
-ms-user-select: none;
|
|
34
33
|
user-select: none;
|
|
35
34
|
text-align: center;
|
|
36
35
|
}
|
|
37
36
|
.vxe-switch.is--animat .vxe-switch--button {
|
|
38
|
-
-webkit-transition: border-color 0.3s, background-color 0.3s;
|
|
39
37
|
transition: border-color 0.3s, background-color 0.3s;
|
|
40
38
|
}
|
|
41
39
|
.vxe-switch.is--animat .vxe-switch--icon {
|
|
42
|
-
-webkit-transition: all 0.3s;
|
|
43
40
|
transition: all 0.3s;
|
|
44
41
|
}
|
|
45
42
|
.vxe-switch.is--on .vxe-switch--button {
|
|
@@ -48,8 +45,7 @@
|
|
|
48
45
|
}
|
|
49
46
|
.vxe-switch.is--on .vxe-switch--icon {
|
|
50
47
|
left: 100%;
|
|
51
|
-
|
|
52
|
-
transform: translateX(-1.4em);
|
|
48
|
+
transform: translateX(-1.4em);
|
|
53
49
|
}
|
|
54
50
|
.vxe-switch.is--off .vxe-switch--button {
|
|
55
51
|
padding-left: 1.7em;
|
|
@@ -57,8 +53,7 @@
|
|
|
57
53
|
}
|
|
58
54
|
.vxe-switch.is--off .vxe-switch--icon {
|
|
59
55
|
left: 0.2em;
|
|
60
|
-
|
|
61
|
-
transform: translateX(0);
|
|
56
|
+
transform: translateX(0);
|
|
62
57
|
}
|
|
63
58
|
.vxe-switch.is--on .vxe-switch--label-off, .vxe-switch.is--off .vxe-switch--label-on {
|
|
64
59
|
height: 0;
|
|
@@ -72,8 +67,7 @@
|
|
|
72
67
|
cursor: pointer;
|
|
73
68
|
}
|
|
74
69
|
.vxe-switch:not(.is--disabled) .vxe-switch--button:focus {
|
|
75
|
-
|
|
76
|
-
box-shadow: 0 0 0.4em 0 #409eff;
|
|
70
|
+
box-shadow: 0 0 0.4em 0 #409eff;
|
|
77
71
|
}
|
|
78
72
|
.vxe-switch.is--disabled .vxe-switch--button {
|
|
79
73
|
cursor: no-drop;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-switch{display:inline-block;color:#606266;vertical-align:middle;padding:.4em;-webkit-user-select:none;-moz-user-select:none
|
|
1
|
+
.vxe-switch{display:inline-block;color:#606266;vertical-align:middle;padding:.4em;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.vxe-switch.is--animat .vxe-switch--button{transition:border-color .3s,background-color .3s}.vxe-switch.is--animat .vxe-switch--icon{transition:all .3s}.vxe-switch.is--on .vxe-switch--button{padding-right:1.7em;background-color:#409eff}.vxe-switch.is--on .vxe-switch--icon{left:100%;transform:translateX(-1.4em)}.vxe-switch.is--off .vxe-switch--button{padding-left:1.7em;background-color:rgba(0,0,0,.35)}.vxe-switch.is--off .vxe-switch--icon{left:.2em;transform:translateX(0)}.vxe-switch.is--off .vxe-switch--label-on,.vxe-switch.is--on .vxe-switch--label-off{height:0;visibility:hidden;overflow:hidden}.vxe-switch.is--off .vxe-switch--label,.vxe-switch.is--on .vxe-switch--label{opacity:1}.vxe-switch:not(.is--disabled) .vxe-switch--button{cursor:pointer}.vxe-switch:not(.is--disabled) .vxe-switch--button:focus{box-shadow:0 0 .4em 0 #409eff}.vxe-switch.is--disabled .vxe-switch--button{cursor:no-drop}.vxe-switch.is--disabled.is--on .vxe-switch--button{background-color:#a6d2ff}.vxe-switch.is--disabled.is--off .vxe-switch--button{background-color:rgba(0,0,0,.15)}.vxe-switch .vxe-switch--button{display:block;position:relative;height:1.6em;line-height:1;min-width:3.2em;padding:0 .6em;border-radius:1em;border:0;outline:0}.vxe-switch .vxe-switch--label{opacity:0;display:block;color:#fff;font-size:.8em}.vxe-switch .vxe-switch--icon{position:absolute;top:.2em;left:0;width:1.2em;height:1.2em;border-radius:50%;background-color:#fff}.vxe-switch .vxe-switch--label-icon{margin-right:.25em}.vxe-switch{font-size:14px}.vxe-switch.size--medium{font-size:14px}.vxe-switch.size--small{font-size:13px}.vxe-switch.size--mini{font-size:12px}
|
package/lib/table/index.js
CHANGED
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports["default"] = exports.Table = void 0;
|
|
7
7
|
var _table = _interopRequireDefault(require("./src/table"));
|
|
8
8
|
var _body = _interopRequireDefault(require("./src/body"));
|
|
9
9
|
var _vXETable = _interopRequireDefault(require("../v-x-e-table"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
var Table = Object.assign(_table
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
var Table = Object.assign(_table["default"], {
|
|
12
12
|
install: function install(Vue) {
|
|
13
13
|
if (typeof window !== 'undefined' && window.VXETableMixin) {
|
|
14
|
-
_table
|
|
14
|
+
_table["default"].mixins.push(window.VXETableMixin);
|
|
15
15
|
delete window.VXETableMixin;
|
|
16
16
|
}
|
|
17
|
-
_vXETable
|
|
18
|
-
_vXETable
|
|
19
|
-
_vXETable
|
|
17
|
+
_vXETable["default"].Vue = Vue;
|
|
18
|
+
_vXETable["default"].Table = _table["default"];
|
|
19
|
+
_vXETable["default"].TableComponent = _table["default"];
|
|
20
20
|
if (!Vue.prototype.$vxe) {
|
|
21
21
|
Vue.prototype.$vxe = {
|
|
22
|
-
t: _vXETable
|
|
23
|
-
_t: _vXETable
|
|
22
|
+
t: _vXETable["default"].t,
|
|
23
|
+
_t: _vXETable["default"]._t
|
|
24
24
|
};
|
|
25
25
|
} else {
|
|
26
|
-
Vue.prototype.$vxe.t = _vXETable
|
|
27
|
-
Vue.prototype.$vxe._t = _vXETable
|
|
26
|
+
Vue.prototype.$vxe.t = _vXETable["default"].t;
|
|
27
|
+
Vue.prototype.$vxe._t = _vXETable["default"]._t;
|
|
28
28
|
}
|
|
29
|
-
Vue.component(_table
|
|
30
|
-
Vue.component(_body
|
|
29
|
+
Vue.component(_table["default"].name, _table["default"]);
|
|
30
|
+
Vue.component(_body["default"].name, _body["default"]);
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
exports.Table = Table;
|
|
34
34
|
var _default = Table;
|
|
35
|
-
exports
|
|
35
|
+
exports["default"] = _default;
|
package/lib/table/src/body.js
CHANGED
|
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
9
9
|
var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
|
|
10
10
|
var _vXETable = _interopRequireDefault(require("../../v-x-e-table"));
|
|
@@ -13,8 +13,8 @@ var _util = require("./util");
|
|
|
13
13
|
var _dom = _interopRequireDefault(require("../../tools/dom"));
|
|
14
14
|
var _vn = require("../../tools/vn");
|
|
15
15
|
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); }
|
|
16
|
-
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
|
|
17
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
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; }
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
18
|
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; }
|
|
19
19
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
20
20
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -51,9 +51,9 @@ function renderLine(h, _vm, $xetable, params) {
|
|
|
51
51
|
}
|
|
52
52
|
if (treeConfig && treeNode && treeOpts.line) {
|
|
53
53
|
return [h('div', {
|
|
54
|
-
class: 'vxe-tree--line-wrapper'
|
|
54
|
+
"class": 'vxe-tree--line-wrapper'
|
|
55
55
|
}, [h('div', {
|
|
56
|
-
class: 'vxe-tree--line',
|
|
56
|
+
"class": 'vxe-tree--line',
|
|
57
57
|
style: {
|
|
58
58
|
height: "".concat((0, _util.calcTreeLine)(params, items, rIndex), "px"),
|
|
59
59
|
left: "".concat(rLevel * treeOpts.indent + (rLevel ? 2 - (0, _util.getOffsetSize)($xetable) : 0) + 16, "px")
|
|
@@ -112,14 +112,14 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
112
112
|
var scrollYRHeight = sYOpts.rHeight;
|
|
113
113
|
var rowHeight = rowOpts.height;
|
|
114
114
|
var renderOpts = editRender || cellRender;
|
|
115
|
-
var compConf = renderOpts ? _vXETable
|
|
115
|
+
var compConf = renderOpts ? _vXETable["default"].renderer.get(renderOpts.name) : null;
|
|
116
116
|
var cellClassName = compConf ? compConf.cellClassName : '';
|
|
117
117
|
var showAllTip = tooltipOpts.showAll || tooltipOpts.enabled;
|
|
118
118
|
var columnIndex = $xetable.getColumnIndex(column);
|
|
119
119
|
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
120
120
|
var isEdit = (0, _utils.isEnableConf)(editRender);
|
|
121
121
|
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
122
|
-
var cellOverflow = _xeUtils
|
|
122
|
+
var cellOverflow = _xeUtils["default"].isUndefined(showOverflow) || _xeUtils["default"].isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
123
123
|
var showEllipsis = cellOverflow === 'ellipsis';
|
|
124
124
|
var showTitle = cellOverflow === 'title';
|
|
125
125
|
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
@@ -166,7 +166,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
if (showTitle) {
|
|
169
|
-
_dom
|
|
169
|
+
_dom["default"].updateCellTitle(evnt.currentTarget, column);
|
|
170
170
|
} else if (showTooltip || showAllTip) {
|
|
171
171
|
// 如果配置了显示 tooltip
|
|
172
172
|
$xetable.triggerBodyTooltipEvent(evnt, params);
|
|
@@ -258,7 +258,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
258
258
|
var tdVNs = [];
|
|
259
259
|
if (fixedHiddenColumn && (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
260
260
|
tdVNs.push(h('div', {
|
|
261
|
-
class: ['vxe-cell', {
|
|
261
|
+
"class": ['vxe-cell', {
|
|
262
262
|
'c--title': showTitle,
|
|
263
263
|
'c--tooltip': showTooltip,
|
|
264
264
|
'c--ellipsis': showEllipsis
|
|
@@ -270,7 +270,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
270
270
|
} else {
|
|
271
271
|
// 渲染单元格
|
|
272
272
|
tdVNs.push.apply(tdVNs, _toConsumableArray(renderLine(h, _vm, $xetable, params)).concat([h('div', {
|
|
273
|
-
class: ['vxe-cell', {
|
|
273
|
+
"class": ['vxe-cell', {
|
|
274
274
|
'c--title': showTitle,
|
|
275
275
|
'c--tooltip': showTooltip,
|
|
276
276
|
'c--ellipsis': showEllipsis
|
|
@@ -284,22 +284,22 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
284
284
|
}, column.renderCell(h, params))]));
|
|
285
285
|
if (showValidTip && hasValidError) {
|
|
286
286
|
tdVNs.push(h('div', {
|
|
287
|
-
class: 'vxe-cell--valid',
|
|
287
|
+
"class": 'vxe-cell--valid',
|
|
288
288
|
style: validStore.rule && validStore.rule.maxWidth ? {
|
|
289
289
|
width: "".concat(validStore.rule.maxWidth, "px")
|
|
290
290
|
} : null
|
|
291
291
|
}, [h('span', {
|
|
292
|
-
class: 'vxe-cell--valid-msg'
|
|
292
|
+
"class": 'vxe-cell--valid-msg'
|
|
293
293
|
}, validStore.content)]));
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
return h('td', {
|
|
297
|
-
class: ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), _utils
|
|
297
|
+
"class": ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), _utils["default"].getClass(cellClassName, params), _utils["default"].getClass(className, params), _utils["default"].getClass(allCellClassName, params)],
|
|
298
298
|
key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
|
|
299
299
|
attrs: attrs,
|
|
300
300
|
style: Object.assign({
|
|
301
301
|
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
302
|
-
}, cellStyle ? _xeUtils
|
|
302
|
+
}, cellStyle ? _xeUtils["default"].isFunction(cellStyle) ? cellStyle(params) : cellStyle : null),
|
|
303
303
|
on: tdOns
|
|
304
304
|
}, tdVNs);
|
|
305
305
|
}
|
|
@@ -380,7 +380,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
380
380
|
isExpandTree = rowChildren && rowChildren.length && treeExpandeds.indexOf(row) > -1;
|
|
381
381
|
}
|
|
382
382
|
rows.push(h('tr', {
|
|
383
|
-
class: ['vxe-body--row', treeConfig ? "row--level-".concat(rowLevel) : '', {
|
|
383
|
+
"class": ['vxe-body--row', treeConfig ? "row--level-".concat(rowLevel) : '', {
|
|
384
384
|
'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
385
385
|
'is--new': isNewRow,
|
|
386
386
|
'is--expand-row': isExpandRow,
|
|
@@ -388,11 +388,11 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
388
388
|
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
389
389
|
'row--radio': radioOpts.highlight && $xetable.selectRow === row,
|
|
390
390
|
'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row)
|
|
391
|
-
}, rowClassName ? _xeUtils
|
|
391
|
+
}, rowClassName ? _xeUtils["default"].isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''],
|
|
392
392
|
attrs: {
|
|
393
393
|
rowid: rowid
|
|
394
394
|
},
|
|
395
|
-
style: rowStyle ? _xeUtils
|
|
395
|
+
style: rowStyle ? _xeUtils["default"].isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
396
396
|
key: rowKey || rowOpts.useKey || treeConfig ? rowid : $rowIndex,
|
|
397
397
|
on: trOn
|
|
398
398
|
}, tableColumn.map(function (column, $columnIndex) {
|
|
@@ -409,7 +409,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
409
409
|
cellStyle.paddingLeft = "".concat(rowLevel * treeOpts.indent + 30, "px");
|
|
410
410
|
}
|
|
411
411
|
var showOverflow = expandColumn.showOverflow;
|
|
412
|
-
var hasEllipsis = _xeUtils
|
|
412
|
+
var hasEllipsis = _xeUtils["default"].isUndefined(showOverflow) || _xeUtils["default"].isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
413
413
|
var expandParams = {
|
|
414
414
|
$table: $xetable,
|
|
415
415
|
seq: seq,
|
|
@@ -422,12 +422,12 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
422
422
|
$rowIndex: $rowIndex
|
|
423
423
|
};
|
|
424
424
|
rows.push(h('tr', {
|
|
425
|
-
class: 'vxe-body--expanded-row',
|
|
425
|
+
"class": 'vxe-body--expanded-row',
|
|
426
426
|
key: "expand_".concat(rowid),
|
|
427
|
-
style: rowStyle ? _xeUtils
|
|
427
|
+
style: rowStyle ? _xeUtils["default"].isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle : null,
|
|
428
428
|
on: trOn
|
|
429
429
|
}, [h('td', {
|
|
430
|
-
class: {
|
|
430
|
+
"class": {
|
|
431
431
|
'vxe-body--expanded-column': 1,
|
|
432
432
|
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
433
433
|
'col--ellipsis': hasEllipsis
|
|
@@ -436,7 +436,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
436
436
|
colspan: tableColumn.length
|
|
437
437
|
}
|
|
438
438
|
}, [h('div', {
|
|
439
|
-
class: {
|
|
439
|
+
"class": {
|
|
440
440
|
'vxe-body--expanded-cell': 1,
|
|
441
441
|
'is--ellipsis': expandHeight
|
|
442
442
|
},
|
|
@@ -590,18 +590,18 @@ var _default = {
|
|
|
590
590
|
$table: $xetable
|
|
591
591
|
}, h);
|
|
592
592
|
} else {
|
|
593
|
-
var compConf = emptyOpts.name ? _vXETable
|
|
593
|
+
var compConf = emptyOpts.name ? _vXETable["default"].renderer.get(emptyOpts.name) : null;
|
|
594
594
|
var renderEmpty = compConf ? compConf.renderEmpty : null;
|
|
595
595
|
if (renderEmpty) {
|
|
596
596
|
emptyContent = (0, _vn.getSlotVNs)(renderEmpty.call(this, h, emptyOpts, {
|
|
597
597
|
$table: $xetable
|
|
598
598
|
}));
|
|
599
599
|
} else {
|
|
600
|
-
emptyContent = $xetable.emptyText || _conf
|
|
600
|
+
emptyContent = $xetable.emptyText || _conf["default"].i18n('vxe.table.emptyText');
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
return h('div', {
|
|
604
|
-
class: ['vxe-table--body-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
604
|
+
"class": ['vxe-table--body-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
605
605
|
attrs: {
|
|
606
606
|
xid: tId
|
|
607
607
|
},
|
|
@@ -609,13 +609,13 @@ var _default = {
|
|
|
609
609
|
wheel: this.wheelEvent
|
|
610
610
|
} : {}
|
|
611
611
|
}, [fixedType ? _e() : h('div', {
|
|
612
|
-
class: 'vxe-body--x-space',
|
|
612
|
+
"class": 'vxe-body--x-space',
|
|
613
613
|
ref: 'xSpace'
|
|
614
614
|
}), h('div', {
|
|
615
|
-
class: 'vxe-body--y-space',
|
|
615
|
+
"class": 'vxe-body--y-space',
|
|
616
616
|
ref: 'ySpace'
|
|
617
617
|
}), h('table', {
|
|
618
|
-
class: 'vxe-table--body',
|
|
618
|
+
"class": 'vxe-table--body',
|
|
619
619
|
attrs: {
|
|
620
620
|
xid: tId,
|
|
621
621
|
cellspacing: 0,
|
|
@@ -643,13 +643,13 @@ var _default = {
|
|
|
643
643
|
h('tbody', {
|
|
644
644
|
ref: 'tbody'
|
|
645
645
|
}, renderRows(h, this, $xetable, fixedType, tableData, tableColumn))]), h('div', {
|
|
646
|
-
class: 'vxe-table--checkbox-range'
|
|
646
|
+
"class": 'vxe-table--checkbox-range'
|
|
647
647
|
}), mouseConfig && mouseOpts.area ? h('div', {
|
|
648
|
-
class: 'vxe-table--cell-area'
|
|
648
|
+
"class": 'vxe-table--cell-area'
|
|
649
649
|
}, [h('span', {
|
|
650
|
-
class: 'vxe-table--cell-main-area'
|
|
650
|
+
"class": 'vxe-table--cell-main-area'
|
|
651
651
|
}, mouseOpts.extension ? [h('span', {
|
|
652
|
-
class: 'vxe-table--cell-main-area-btn',
|
|
652
|
+
"class": 'vxe-table--cell-main-area-btn',
|
|
653
653
|
on: {
|
|
654
654
|
mousedown: function mousedown(evnt) {
|
|
655
655
|
$xetable.triggerCellExtendMousedownEvent(evnt, {
|
|
@@ -660,18 +660,18 @@ var _default = {
|
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
662
|
})] : null), h('span', {
|
|
663
|
-
class: 'vxe-table--cell-copy-area'
|
|
663
|
+
"class": 'vxe-table--cell-copy-area'
|
|
664
664
|
}), h('span', {
|
|
665
|
-
class: 'vxe-table--cell-extend-area'
|
|
665
|
+
"class": 'vxe-table--cell-extend-area'
|
|
666
666
|
}), h('span', {
|
|
667
|
-
class: 'vxe-table--cell-multi-area'
|
|
667
|
+
"class": 'vxe-table--cell-multi-area'
|
|
668
668
|
}), h('span', {
|
|
669
|
-
class: 'vxe-table--cell-active-area'
|
|
669
|
+
"class": 'vxe-table--cell-active-area'
|
|
670
670
|
})]) : null, !fixedType ? h('div', {
|
|
671
|
-
class: 'vxe-table--empty-block',
|
|
671
|
+
"class": 'vxe-table--empty-block',
|
|
672
672
|
ref: 'emptyBlock'
|
|
673
673
|
}, [h('div', {
|
|
674
|
-
class: 'vxe-table--empty-content'
|
|
674
|
+
"class": 'vxe-table--empty-content'
|
|
675
675
|
}, emptyContent)]) : null]);
|
|
676
676
|
},
|
|
677
677
|
methods: {
|
|
@@ -872,4 +872,4 @@ var _default = {
|
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
};
|
|
875
|
-
exports
|
|
875
|
+
exports["default"] = _default;
|