vxe-table 3.8.21 → 3.8.23
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/helper/vetur/attributes.json +1 -1966
- package/helper/vetur/tags.json +1 -648
- package/lib/button/src/button.js +4 -2
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +11 -0
- package/lib/button/style/style.min.css +1 -1
- package/lib/button-group/style/style.css +1 -0
- package/lib/checkbox/style/style.css +1 -0
- package/lib/checkbox-group/style/style.css +1 -0
- package/lib/colgroup/style/style.css +1 -0
- package/lib/column/style/style.css +1 -0
- package/lib/custom/src/panel.js +157 -71
- package/lib/custom/src/panel.min.js +1 -1
- package/lib/custom/style/style.css +19 -34
- package/lib/custom/style/style.min.css +1 -1
- package/lib/edit/style/style.css +1 -0
- package/lib/export/src/export-panel.js +7 -1
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/style/style.css +1 -0
- package/lib/filter/style/style.css +1 -0
- package/lib/form/src/form.js +0 -3
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +1 -0
- package/lib/form-gather/style/style.css +1 -0
- package/lib/form-item/style/style.css +1 -0
- package/lib/grid/style/style.css +2 -0
- package/lib/grid/style/style.min.css +1 -1
- package/lib/icon/style/style.css +4 -2
- package/lib/icon/style/style.min.css +4 -2
- package/lib/index.css +1 -1
- package/lib/index.umd.js +4561 -4261
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +9 -2
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +4 -3
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/style/style.css +1 -0
- package/lib/list/style/style.css +1 -0
- package/lib/loading/style/style.css +1 -0
- package/lib/locale/lang/en-US.js +201 -9
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +201 -9
- package/lib/locale/lang/es-ES.js +202 -10
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +202 -10
- package/lib/locale/lang/ja-JP.js +214 -22
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +214 -22
- package/lib/locale/lang/pt-BR.js +201 -9
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +201 -9
- package/lib/locale/lang/zh-CN.js +196 -4
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +196 -4
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +200 -8
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +200 -8
- package/lib/locale/lang/zh-TC.js +200 -8
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +200 -8
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +200 -8
- package/lib/menu/src/panel.js +24 -8
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/menu/style/style.css +11 -27
- package/lib/menu/style/style.min.css +1 -1
- package/lib/modal/style/style.css +4 -0
- package/lib/modal/style/style.min.css +1 -1
- package/lib/optgroup/style/style.css +1 -0
- package/lib/option/style/style.css +1 -0
- package/lib/pager/src/pager.js +29 -25
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +2 -19
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/style/style.css +3 -1
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/radio/style/style.css +1 -0
- package/lib/radio-button/style/style.css +1 -0
- package/lib/radio-group/style/style.css +1 -0
- package/lib/select/src/select.js +5 -4
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +2 -0
- 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/style/style.css +1 -0
- package/lib/table/src/header.js +4 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +33 -46
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +17 -10
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/style/style.css +1 -0
- package/lib/toolbar/style/style.css +1 -0
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tooltip/style/style.css +1 -0
- 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/src/conf.js +1 -0
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +3 -1
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/validator/style/style.css +1 -0
- package/lib/vxe-button/style/style.css +11 -0
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-button-group/style/style.css +1 -0
- package/lib/vxe-checkbox/style/style.css +1 -0
- package/lib/vxe-checkbox-group/style/style.css +1 -0
- package/lib/vxe-colgroup/style/style.css +1 -0
- package/lib/vxe-column/style/style.css +1 -0
- package/lib/vxe-form/style/style.css +1 -0
- package/lib/vxe-form-gather/style/style.css +1 -0
- package/lib/vxe-form-item/style/style.css +1 -0
- package/lib/vxe-grid/style/style.css +2 -0
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-icon/style/style.css +3 -1
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-input/style/style.css +4 -3
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-list/style/style.css +1 -0
- package/lib/vxe-loading/style/style.css +1 -0
- package/lib/vxe-modal/style/style.css +4 -0
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-optgroup/style/style.css +1 -0
- package/lib/vxe-option/style/style.css +1 -0
- package/lib/vxe-pager/style/style.css +2 -19
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-pulldown/style/style.css +3 -1
- package/lib/vxe-pulldown/style/style.min.css +1 -1
- package/lib/vxe-radio/style/style.css +1 -0
- package/lib/vxe-radio-button/style/style.css +1 -0
- package/lib/vxe-radio-group/style/style.css +1 -0
- package/lib/vxe-select/style/style.css +2 -0
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-switch/style/style.css +1 -0
- package/lib/vxe-table/style/style.css +17 -10
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-table-custom-module/style/style.css +19 -34
- package/lib/vxe-table-custom-module/style/style.min.css +1 -1
- package/lib/vxe-table-edit-module/style/style.css +1 -0
- package/lib/vxe-table-export-module/style/style.css +1 -0
- package/lib/vxe-table-filter-module/style/style.css +1 -0
- package/lib/vxe-table-keyboard-module/style/style.css +1 -0
- package/lib/vxe-table-menu-module/style/style.css +11 -27
- package/lib/vxe-table-menu-module/style/style.min.css +1 -1
- package/lib/vxe-table-validator-module/style/style.css +1 -0
- package/lib/vxe-textarea/style/style.css +1 -0
- package/lib/vxe-toolbar/style/style.css +1 -0
- package/lib/vxe-tooltip/style/style.css +1 -0
- package/package.json +1 -1
- package/packages/button/src/button.js +4 -3
- package/packages/custom/src/panel.js +167 -85
- package/packages/export/src/export-panel.js +11 -3
- package/packages/form/src/form.js +0 -3
- package/packages/input/src/input.js +9 -2
- package/packages/locale/lang/en-US.js +201 -9
- package/packages/locale/lang/es-ES.js +202 -10
- package/packages/locale/lang/ja-JP.js +214 -22
- package/packages/locale/lang/pt-BR.js +201 -9
- package/packages/locale/lang/zh-CN.js +196 -4
- package/packages/locale/lang/zh-TC.js +200 -8
- package/packages/menu/src/panel.js +38 -10
- package/packages/pager/src/pager.js +24 -21
- package/packages/select/src/select.js +5 -4
- package/packages/table/src/header.js +4 -3
- package/packages/table/src/methods.js +28 -38
- package/packages/v-x-e-table/src/conf.js +1 -0
- package/styles/button.scss +10 -0
- package/styles/custom.scss +23 -37
- package/styles/grid.scss +1 -0
- package/styles/input.scss +3 -3
- package/styles/menu.scss +21 -39
- package/styles/modal.scss +3 -0
- package/styles/old-icon.scss +1 -1
- package/styles/pager.scss +1 -19
- package/styles/pulldown.scss +2 -1
- package/styles/select.scss +1 -0
- package/styles/table.scss +14 -8
- package/styles/variable.scss +5 -1
- package/types/module/menu.d.ts +40 -3
- package/types/v-x-e-table/renderer.d.ts +6 -1
- /package/lib/icon/style/{iconfont.1724212116436.ttf → iconfont.1724894779531.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1724212116436.woff → iconfont.1724894779531.woff} +0 -0
- /package/lib/icon/style/{iconfont.1724212116436.woff2 → iconfont.1724894779531.woff2} +0 -0
- /package/lib/{iconfont.1724212116436.ttf → iconfont.1724894779531.ttf} +0 -0
- /package/lib/{iconfont.1724212116436.woff → iconfont.1724894779531.woff} +0 -0
- /package/lib/{iconfont.1724212116436.woff2 → iconfont.1724894779531.woff2} +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/*size*/
|
|
4
4
|
/*icon*/
|
|
5
5
|
/*color*/
|
|
6
|
+
/*layout*/
|
|
6
7
|
/*input/radio/checkbox*/
|
|
7
8
|
/*popup*/
|
|
8
9
|
/*table*/
|
|
@@ -51,46 +52,29 @@
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
.vxe-context-menu--link {
|
|
54
|
-
display:
|
|
55
|
-
|
|
56
|
-
width:
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
width: 198px;
|
|
57
58
|
line-height: 26px;
|
|
59
|
+
padding: 0 0.8em;
|
|
58
60
|
color: #606266;
|
|
59
61
|
cursor: pointer;
|
|
60
62
|
}
|
|
61
63
|
.vxe-context-menu--link .vxe-context-menu--link-prefix,
|
|
62
64
|
.vxe-context-menu--link .vxe-context-menu--link-suffix {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
.vxe-context-menu--link .vxe-context-menu--link-prefix {
|
|
69
|
-
left: 5px;
|
|
70
|
-
}
|
|
71
|
-
.vxe-context-menu--link .vxe-context-menu--link-suffix {
|
|
72
|
-
right: 5px;
|
|
73
|
-
}
|
|
74
|
-
.vxe-context-menu--link .vxe-context-menu--link-suffix.suffix--haschild {
|
|
75
|
-
top: 8px;
|
|
76
|
-
}
|
|
77
|
-
.vxe-context-menu--link .vxe-context-menu--link-suffix.suffix--haschild:before {
|
|
78
|
-
position: absolute;
|
|
79
|
-
content: "";
|
|
80
|
-
border: 4px solid transparent;
|
|
81
|
-
border-left-color: #727272;
|
|
65
|
+
min-width: 2em;
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
text-align: center;
|
|
68
|
+
padding: 0 0.2em;
|
|
82
69
|
}
|
|
83
70
|
.vxe-context-menu--link .vxe-context-menu--link-content {
|
|
84
|
-
|
|
71
|
+
flex-grow: 1;
|
|
72
|
+
padding: 0 0.2em;
|
|
85
73
|
overflow: hidden;
|
|
86
74
|
text-overflow: ellipsis;
|
|
87
75
|
white-space: nowrap;
|
|
88
76
|
}
|
|
89
77
|
|
|
90
|
-
.vxe-table--context-menu-clild-wrapper .vxe-context-menu--link {
|
|
91
|
-
padding: 0 2em 0 2.5em;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
78
|
.vxe-context-menu--option-wrapper,
|
|
95
79
|
.vxe-table--context-menu-clild-wrapper {
|
|
96
80
|
margin: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.vxe-table--context-menu-wrapper{display:none}.vxe-table--context-menu-wrapper.is--visible{display:block}.vxe-table--context-menu-clild-wrapper,.vxe-table--context-menu-wrapper{position:absolute;top:0;left:0;font-size:12px;border:1px solid #dadce0;box-shadow:3px 3px 4px -2px rgba(0,0,0,.6);padding:0 1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#606266;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background-color:#fff}.vxe-context-menu--link{display:
|
|
1
|
+
@charset "UTF-8";.vxe-table--context-menu-wrapper{display:none}.vxe-table--context-menu-wrapper.is--visible{display:block}.vxe-table--context-menu-clild-wrapper,.vxe-table--context-menu-wrapper{position:absolute;top:0;left:0;font-size:12px;border:1px solid #dadce0;box-shadow:3px 3px 4px -2px rgba(0,0,0,.6);padding:0 1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#606266;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background-color:#fff}.vxe-context-menu--link{display:flex;flex-direction:row;width:198px;line-height:26px;padding:0 .8em;color:#606266;cursor:pointer}.vxe-context-menu--link .vxe-context-menu--link-prefix,.vxe-context-menu--link .vxe-context-menu--link-suffix{min-width:2em;flex-shrink:0;text-align:center;padding:0 .2em}.vxe-context-menu--link .vxe-context-menu--link-content{flex-grow:1;padding:0 .2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-context-menu--option-wrapper,.vxe-table--context-menu-clild-wrapper{margin:0;padding:0;list-style-type:none;border-bottom:1px solid #e8eaed}.vxe-context-menu--option-wrapper li,.vxe-table--context-menu-clild-wrapper li{position:relative;margin:1px 0;border:1px solid transparent}.vxe-context-menu--option-wrapper li:last-child,.vxe-table--context-menu-clild-wrapper li:last-child{border:0}.vxe-context-menu--option-wrapper li.link--active,.vxe-table--context-menu-clild-wrapper li.link--active{background-color:#c5c5c5;border-color:#c5c5c5}.vxe-context-menu--option-wrapper li.link--active>.vxe-context-menu--link,.vxe-table--context-menu-clild-wrapper li.link--active>.vxe-context-menu--link{color:#2b2b2b}.vxe-context-menu--option-wrapper li.link--disabled>.vxe-context-menu--link,.vxe-table--context-menu-clild-wrapper li.link--disabled>.vxe-context-menu--link{color:#bfbfbf;cursor:no-drop}.vxe-context-menu--option-wrapper li.link--disabled.link--active,.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active{border-color:#c0c1c2;background-color:#eee}.vxe-context-menu--option-wrapper li.link--disabled.link--active:hover,.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active:hover{background-color:inherit}.vxe-table--context-menu-clild-wrapper{display:none;top:0;left:100%}.vxe-table--context-menu-clild-wrapper.is--show{display:block}
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ export default {
|
|
|
24
24
|
disabled: Boolean,
|
|
25
25
|
loading: Boolean,
|
|
26
26
|
trigger: { type: String, default: () => GlobalConfig.button.trigger },
|
|
27
|
+
align: String,
|
|
27
28
|
destroyOnClose: Boolean,
|
|
28
29
|
className: [String, Function],
|
|
29
30
|
popupClassName: [String, Function],
|
|
@@ -112,7 +113,7 @@ export default {
|
|
|
112
113
|
GlobalEvent.off(this, 'mousedown')
|
|
113
114
|
},
|
|
114
115
|
render (h) {
|
|
115
|
-
const { $scopedSlots, className, popupClassName, trigger, title, inited, type, destroyOnClose, isFormBtn, btnMode, btnStatus, btnRound, btnCircle, vSize, name, disabled, loading, visiblePanel, animatVisible, panelPlacement } = this
|
|
116
|
+
const { $scopedSlots, className, popupClassName, trigger, align, title, inited, type, destroyOnClose, isFormBtn, btnMode, btnStatus, btnRound, btnCircle, vSize, name, disabled, loading, visiblePanel, animatVisible, panelPlacement } = this
|
|
116
117
|
const downsSlot = $scopedSlots.dropdowns
|
|
117
118
|
const btnOns = {}
|
|
118
119
|
const panelOns = {}
|
|
@@ -132,7 +133,7 @@ export default {
|
|
|
132
133
|
}, [
|
|
133
134
|
h('button', {
|
|
134
135
|
ref: 'xBtn',
|
|
135
|
-
class: ['vxe-button', `type--${btnMode}`, {
|
|
136
|
+
class: ['vxe-button', `type--${btnMode}`, align ? `align--${align}` : '', {
|
|
136
137
|
[`size--${vSize}`]: vSize,
|
|
137
138
|
[`theme--${btnStatus}`]: btnStatus,
|
|
138
139
|
'is--round': btnRound,
|
|
@@ -178,7 +179,7 @@ export default {
|
|
|
178
179
|
] : null)
|
|
179
180
|
]) : h('button', {
|
|
180
181
|
ref: 'xBtn',
|
|
181
|
-
class: ['vxe-button', `type--${btnMode}`, className ? (XEUtils.isFunction(className) ? className({ $button: this }) : className) : '', {
|
|
182
|
+
class: ['vxe-button', `type--${btnMode}`, align ? `align--${align}` : '', className ? (XEUtils.isFunction(className) ? className({ $button: this }) : className) : '', {
|
|
182
183
|
[`size--${vSize}`]: vSize,
|
|
183
184
|
[`theme--${btnStatus}`]: btnStatus,
|
|
184
185
|
'is--round': btnRound,
|
|
@@ -3,6 +3,7 @@ import UtilTools from '../../tools/utils'
|
|
|
3
3
|
import DomTools from '../../tools/dom'
|
|
4
4
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
5
5
|
import XEUtils from 'xe-utils'
|
|
6
|
+
import VxeButtonComponent from '../../button/src/button'
|
|
6
7
|
|
|
7
8
|
const { formatText } = UtilTools
|
|
8
9
|
const { addClass, removeClass } = DomTools
|
|
@@ -24,7 +25,7 @@ function updateDropHint (_vm, evnt) {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
const renderSimplePanel = (h, _vm) => {
|
|
27
|
-
const { _e, $xetable, customStore } = _vm
|
|
28
|
+
const { _e, $xetable, customStore, dragColumn } = _vm
|
|
28
29
|
const { customColumnList, customOpts, isMaxFixedColumn } = $xetable
|
|
29
30
|
const { maxHeight } = customStore
|
|
30
31
|
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts
|
|
@@ -43,6 +44,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
43
44
|
const isColGroup = column.children && column.children.length
|
|
44
45
|
const colTitle = formatText(column.getTitle(), 1)
|
|
45
46
|
const isDisabled = checkMethod ? !checkMethod({ column }) : false
|
|
47
|
+
const isHidden = !isChecked
|
|
46
48
|
colVNs.push(
|
|
47
49
|
h('li', {
|
|
48
50
|
key: column.id,
|
|
@@ -50,6 +52,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
50
52
|
colid: column.id
|
|
51
53
|
},
|
|
52
54
|
class: ['vxe-table-custom--option', `level--${column.level}`, {
|
|
55
|
+
'is--hidden': isHidden,
|
|
53
56
|
'is--group': isColGroup
|
|
54
57
|
}],
|
|
55
58
|
on: {
|
|
@@ -84,11 +87,13 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
84
87
|
class: 'vxe-table-custom--sort-option'
|
|
85
88
|
}, [
|
|
86
89
|
h('span', {
|
|
87
|
-
class: 'vxe-table-custom--sort-btn',
|
|
90
|
+
class: ['vxe-table-custom--sort-btn', {
|
|
91
|
+
'is--disabled': isHidden
|
|
92
|
+
}],
|
|
88
93
|
attrs: {
|
|
89
94
|
title: GlobalConfig.i18n('vxe.custom.setting.sortHelpTip')
|
|
90
95
|
},
|
|
91
|
-
on: {
|
|
96
|
+
on: isHidden ? {} : {
|
|
92
97
|
mousedown: _vm.sortMousedownEvent,
|
|
93
98
|
mouseup: _vm.sortMouseupEvent
|
|
94
99
|
}
|
|
@@ -99,22 +104,30 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
99
104
|
])
|
|
100
105
|
])
|
|
101
106
|
: _e(),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
column.type === 'html'
|
|
108
|
+
? h('div', {
|
|
109
|
+
key: '1',
|
|
110
|
+
class: 'vxe-table-custom--checkbox-label',
|
|
111
|
+
domProps: {
|
|
112
|
+
innerHTML: colTitle
|
|
113
|
+
}
|
|
114
|
+
}) : h('div', {
|
|
115
|
+
key: '0',
|
|
116
|
+
class: 'vxe-table-custom--checkbox-label',
|
|
117
|
+
attrs: {
|
|
118
|
+
title: colTitle
|
|
119
|
+
}
|
|
120
|
+
}, colTitle),
|
|
108
121
|
!parent && allowFixed
|
|
109
122
|
? h('div', {
|
|
110
123
|
class: 'vxe-table-custom--fixed-option'
|
|
111
124
|
}, [
|
|
112
|
-
h(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
'
|
|
116
|
-
|
|
117
|
-
|
|
125
|
+
h(VxeButtonComponent, {
|
|
126
|
+
props: {
|
|
127
|
+
mode: 'text',
|
|
128
|
+
icon: column.renderFixed === 'left' ? GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_LEFT,
|
|
129
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
130
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
118
131
|
title: GlobalConfig.i18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
|
|
119
132
|
},
|
|
120
133
|
on: {
|
|
@@ -123,16 +136,15 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
123
136
|
}
|
|
124
137
|
}
|
|
125
138
|
}),
|
|
126
|
-
h(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
'
|
|
130
|
-
|
|
131
|
-
|
|
139
|
+
h(VxeButtonComponent, {
|
|
140
|
+
props: {
|
|
141
|
+
mode: 'text',
|
|
142
|
+
icon: column.renderFixed === 'right' ? GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
143
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
144
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
132
145
|
title: GlobalConfig.i18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
|
|
133
146
|
},
|
|
134
147
|
on: {
|
|
135
|
-
|
|
136
148
|
click: () => {
|
|
137
149
|
_vm.changeFixedOption(column, 'right')
|
|
138
150
|
}
|
|
@@ -174,7 +186,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
174
186
|
title: GlobalConfig.i18n('vxe.table.allTitle')
|
|
175
187
|
},
|
|
176
188
|
on: {
|
|
177
|
-
click: _vm.
|
|
189
|
+
click: _vm.allOptionEvent
|
|
178
190
|
}
|
|
179
191
|
}, [
|
|
180
192
|
h('span', {
|
|
@@ -203,32 +215,52 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
203
215
|
h('div', {
|
|
204
216
|
ref: 'dragHintElemRef',
|
|
205
217
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
206
|
-
}, GlobalConfig.i18n('vxe.custom.cstmDragTarget', [
|
|
218
|
+
}, GlobalConfig.i18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))
|
|
207
219
|
]),
|
|
208
220
|
customOpts.showFooter
|
|
209
221
|
? h('div', {
|
|
210
222
|
class: 'vxe-table-custom--footer'
|
|
211
223
|
}, [
|
|
212
|
-
h(
|
|
213
|
-
|
|
224
|
+
h(VxeButtonComponent, {
|
|
225
|
+
props: {
|
|
226
|
+
mode: 'text',
|
|
227
|
+
content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.table.customRestore')
|
|
228
|
+
},
|
|
214
229
|
on: {
|
|
215
230
|
click: _vm.resetCustomEvent
|
|
216
231
|
}
|
|
217
|
-
}
|
|
232
|
+
}),
|
|
218
233
|
customOpts.immediate
|
|
219
|
-
?
|
|
220
|
-
|
|
221
|
-
|
|
234
|
+
? h(VxeButtonComponent, {
|
|
235
|
+
props: {
|
|
236
|
+
mode: 'text',
|
|
237
|
+
content: customOpts.closeButtonText || GlobalConfig.i18n('vxe.table.customClose')
|
|
238
|
+
},
|
|
239
|
+
on: {
|
|
240
|
+
click: _vm.cancelCloseEvent
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
: h(VxeButtonComponent, {
|
|
244
|
+
props: {
|
|
245
|
+
mode: 'text',
|
|
246
|
+
content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.table.customCancel')
|
|
247
|
+
},
|
|
222
248
|
on: {
|
|
223
249
|
click: _vm.cancelCustomEvent
|
|
224
250
|
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
251
|
+
}),
|
|
252
|
+
customOpts.immediate
|
|
253
|
+
? _e()
|
|
254
|
+
: h(VxeButtonComponent, {
|
|
255
|
+
props: {
|
|
256
|
+
mode: 'text',
|
|
257
|
+
status: 'primary',
|
|
258
|
+
content: customOpts.confirmButtonText || GlobalConfig.i18n('vxe.table.customConfirm')
|
|
259
|
+
},
|
|
260
|
+
on: {
|
|
261
|
+
click: _vm.confirmCustomEvent
|
|
262
|
+
}
|
|
263
|
+
})
|
|
232
264
|
])
|
|
233
265
|
: null
|
|
234
266
|
]
|
|
@@ -250,6 +282,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
250
282
|
const colTitle = formatText(column.getTitle(), 1)
|
|
251
283
|
const isColGroup = column.children && column.children.length
|
|
252
284
|
const isDisabled = checkMethod ? !checkMethod({ column }) : false
|
|
285
|
+
const isHidden = !isChecked
|
|
253
286
|
trVNs.push(
|
|
254
287
|
h('tr', {
|
|
255
288
|
key: column.id,
|
|
@@ -296,11 +329,13 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
296
329
|
}, [
|
|
297
330
|
column.level === 1
|
|
298
331
|
? h('span', {
|
|
299
|
-
class: 'vxe-table-custom-popup--column-sort-btn',
|
|
332
|
+
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
333
|
+
'is--disabled': isHidden
|
|
334
|
+
}],
|
|
300
335
|
attrs: {
|
|
301
336
|
title: GlobalConfig.i18n('vxe.custom.setting.sortHelpTip')
|
|
302
337
|
},
|
|
303
|
-
on: {
|
|
338
|
+
on: isHidden ? {} : {
|
|
304
339
|
mousedown: _vm.sortMousedownEvent,
|
|
305
340
|
mouseup: _vm.sortMouseupEvent
|
|
306
341
|
}
|
|
@@ -315,22 +350,31 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
315
350
|
h('td', {
|
|
316
351
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
317
352
|
}, [
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
353
|
+
column.type === 'html'
|
|
354
|
+
? h('div', {
|
|
355
|
+
key: '1',
|
|
356
|
+
class: 'vxe-table-custom-popup--name',
|
|
357
|
+
domProps: {
|
|
358
|
+
innerHTML: colTitle
|
|
359
|
+
}
|
|
360
|
+
}) : h('div', {
|
|
361
|
+
key: '0',
|
|
362
|
+
class: 'vxe-table-custom-popup--name',
|
|
363
|
+
attrs: {
|
|
364
|
+
title: colTitle
|
|
365
|
+
}
|
|
366
|
+
}, colTitle)
|
|
324
367
|
]),
|
|
325
368
|
allowResizable
|
|
326
369
|
? h('td', {
|
|
327
370
|
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
328
371
|
}, [
|
|
329
|
-
|
|
372
|
+
column.children && column.children.length
|
|
330
373
|
? h('span', '-')
|
|
331
374
|
: h('vxe-input', {
|
|
332
375
|
props: {
|
|
333
376
|
type: 'integer',
|
|
377
|
+
disabled: isHidden,
|
|
334
378
|
value: column.renderResizeWidth
|
|
335
379
|
},
|
|
336
380
|
on: {
|
|
@@ -352,19 +396,17 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
352
396
|
value: column.renderFixed || '',
|
|
353
397
|
type: 'button',
|
|
354
398
|
size: 'mini',
|
|
399
|
+
disabled: isHidden,
|
|
355
400
|
options: [
|
|
356
|
-
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isMaxFixedColumn },
|
|
357
|
-
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedUnset'), value: '' },
|
|
358
|
-
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isMaxFixedColumn }
|
|
401
|
+
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isHidden || isMaxFixedColumn },
|
|
402
|
+
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedUnset'), value: '', disabled: isHidden },
|
|
403
|
+
{ label: GlobalConfig.i18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isHidden || isMaxFixedColumn }
|
|
359
404
|
]
|
|
360
405
|
},
|
|
361
406
|
on: {
|
|
362
407
|
input (value) {
|
|
363
408
|
column.renderFixed = value
|
|
364
409
|
}
|
|
365
|
-
// onChange () {
|
|
366
|
-
// changePopupFixedOption(column)
|
|
367
|
-
// }
|
|
368
410
|
}
|
|
369
411
|
})
|
|
370
412
|
])
|
|
@@ -453,7 +495,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
453
495
|
title: GlobalConfig.i18n('vxe.table.allTitle')
|
|
454
496
|
},
|
|
455
497
|
on: {
|
|
456
|
-
click: _vm.
|
|
498
|
+
click: _vm.allOptionEvent
|
|
457
499
|
}
|
|
458
500
|
|
|
459
501
|
}, [
|
|
@@ -514,7 +556,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
514
556
|
return h('div', {
|
|
515
557
|
class: 'vxe-table-custom-popup--footer'
|
|
516
558
|
}, [
|
|
517
|
-
h(
|
|
559
|
+
h(VxeButtonComponent, {
|
|
518
560
|
props: {
|
|
519
561
|
content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.custom.cstmRestore')
|
|
520
562
|
},
|
|
@@ -522,7 +564,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
522
564
|
click: _vm.resetCustomEvent
|
|
523
565
|
}
|
|
524
566
|
}),
|
|
525
|
-
h(
|
|
567
|
+
h(VxeButtonComponent, {
|
|
526
568
|
props: {
|
|
527
569
|
content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.custom.cstmCancel')
|
|
528
570
|
},
|
|
@@ -530,7 +572,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
530
572
|
click: _vm.cancelCustomEvent
|
|
531
573
|
}
|
|
532
574
|
}),
|
|
533
|
-
h(
|
|
575
|
+
h(VxeButtonComponent, {
|
|
534
576
|
props: {
|
|
535
577
|
status: 'primary',
|
|
536
578
|
content: customOpts.confirmButtonText || GlobalConfig.i18n('vxe.custom.cstmConfirm')
|
|
@@ -621,6 +663,11 @@ export default {
|
|
|
621
663
|
$xetable.emitCustomEvent('confirm', evnt)
|
|
622
664
|
$xetable.saveCustomStore('confirm')
|
|
623
665
|
},
|
|
666
|
+
cancelCloseEvent ({ $event }) {
|
|
667
|
+
const { $xetable } = this
|
|
668
|
+
$xetable.closeCustom()
|
|
669
|
+
$xetable.emitCustomEvent('cancel', $event)
|
|
670
|
+
},
|
|
624
671
|
cancelCustomEvent (evnt) {
|
|
625
672
|
const { $xetable } = this
|
|
626
673
|
const { customStore, customOpts, customColumnList } = $xetable
|
|
@@ -701,49 +748,73 @@ export default {
|
|
|
701
748
|
const { $xetable } = this
|
|
702
749
|
const { customOpts } = $xetable
|
|
703
750
|
const isChecked = !column.renderVisible
|
|
704
|
-
XEUtils.eachTree([column], (item) => {
|
|
705
|
-
item.renderVisible = isChecked
|
|
706
|
-
item.halfVisible = false
|
|
707
|
-
})
|
|
708
|
-
this.handleOptionCheck(column)
|
|
709
751
|
if (customOpts.immediate) {
|
|
752
|
+
XEUtils.eachTree([column], (item) => {
|
|
753
|
+
item.visible = isChecked
|
|
754
|
+
item.renderVisible = isChecked
|
|
755
|
+
item.halfVisible = false
|
|
756
|
+
})
|
|
710
757
|
$xetable.handleCustom()
|
|
711
758
|
$xetable.saveCustomStore('update:visible')
|
|
759
|
+
} else {
|
|
760
|
+
XEUtils.eachTree([column], (item) => {
|
|
761
|
+
item.renderVisible = isChecked
|
|
762
|
+
item.halfVisible = false
|
|
763
|
+
})
|
|
712
764
|
}
|
|
765
|
+
this.handleOptionCheck(column)
|
|
713
766
|
$xetable.checkCustomStatus()
|
|
714
767
|
},
|
|
715
768
|
changeFixedOption (column, colFixed) {
|
|
716
769
|
const { $xetable } = this
|
|
717
|
-
const { isMaxFixedColumn } = $xetable
|
|
718
|
-
if (
|
|
719
|
-
column.renderFixed
|
|
720
|
-
|
|
770
|
+
const { isMaxFixedColumn, customOpts } = $xetable
|
|
771
|
+
if (customOpts.immediate) {
|
|
772
|
+
if (column.renderFixed === colFixed) {
|
|
773
|
+
column.fixed = ''
|
|
774
|
+
column.renderFixed = ''
|
|
775
|
+
} else {
|
|
776
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
777
|
+
column.fixed = colFixed
|
|
778
|
+
column.renderFixed = colFixed
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
$xetable.handleCustom()
|
|
782
|
+
$xetable.saveCustomStore('update:fixed')
|
|
721
783
|
} else {
|
|
722
|
-
if (
|
|
723
|
-
column.renderFixed =
|
|
724
|
-
|
|
784
|
+
if (column.renderFixed === colFixed) {
|
|
785
|
+
column.renderFixed = ''
|
|
786
|
+
} else {
|
|
787
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
788
|
+
column.renderFixed = colFixed
|
|
789
|
+
}
|
|
725
790
|
}
|
|
726
791
|
}
|
|
727
792
|
},
|
|
728
|
-
|
|
729
|
-
// const { $xetable } = this
|
|
730
|
-
// const { isMaxFixedColumn } = $xetable
|
|
731
|
-
// if (!isMaxFixedColumn) {
|
|
732
|
-
// $xetable.setColumnFixed(column, column.fixed)
|
|
733
|
-
// }
|
|
734
|
-
// },
|
|
735
|
-
allCustomEvent () {
|
|
793
|
+
allOptionEvent () {
|
|
736
794
|
const { $xetable, customStore } = this
|
|
737
|
-
const {
|
|
795
|
+
const { customColumnList, customOpts } = $xetable
|
|
738
796
|
const { checkMethod } = customOpts
|
|
739
797
|
const isAll = !customStore.isAll
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
column
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
798
|
+
if (customOpts.immediate) {
|
|
799
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
800
|
+
if (!checkMethod || checkMethod({ column })) {
|
|
801
|
+
column.visible = isAll
|
|
802
|
+
column.renderVisible = isAll
|
|
803
|
+
column.halfVisible = false
|
|
804
|
+
}
|
|
805
|
+
})
|
|
806
|
+
customStore.isAll = isAll
|
|
807
|
+
$xetable.handleCustom()
|
|
808
|
+
$xetable.saveCustomStore('update:visible')
|
|
809
|
+
} else {
|
|
810
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
811
|
+
if (!checkMethod || checkMethod({ column })) {
|
|
812
|
+
column.renderVisible = isAll
|
|
813
|
+
column.halfVisible = false
|
|
814
|
+
}
|
|
815
|
+
})
|
|
816
|
+
customStore.isAll = isAll
|
|
817
|
+
}
|
|
747
818
|
$xetable.checkCustomStatus()
|
|
748
819
|
},
|
|
749
820
|
sortMousedownEvent (evnt) {
|
|
@@ -777,7 +848,7 @@ export default {
|
|
|
777
848
|
},
|
|
778
849
|
sortDragendEvent (evnt) {
|
|
779
850
|
const { $xetable, prevDropTrEl } = this
|
|
780
|
-
const { customColumnList } = $xetable
|
|
851
|
+
const { customColumnList, customOpts } = $xetable
|
|
781
852
|
const trEl = evnt.currentTarget
|
|
782
853
|
const dragHintEl = this.$refs.dragHintElemRef
|
|
783
854
|
if (prevDropTrEl) {
|
|
@@ -813,6 +884,17 @@ export default {
|
|
|
813
884
|
}
|
|
814
885
|
removeClass(trEl, 'active--drag-target')
|
|
815
886
|
removeClass(trEl, 'active--drag-origin')
|
|
887
|
+
|
|
888
|
+
if (customOpts.immediate) {
|
|
889
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
890
|
+
if (!parent) {
|
|
891
|
+
const sortIndex = index + 1
|
|
892
|
+
column.renderSortNumber = sortIndex
|
|
893
|
+
}
|
|
894
|
+
})
|
|
895
|
+
$xetable.handleCustom()
|
|
896
|
+
$xetable.saveCustomStore('update:sort')
|
|
897
|
+
}
|
|
816
898
|
},
|
|
817
899
|
sortDragoverEvent (evnt) {
|
|
818
900
|
const { $xetable, prevDropTrEl } = this
|