vxe-table 4.23.7 → 4.23.9
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/dist/all.esm.js +5859 -4018
- package/es/colgroup/index.js +1 -1
- package/es/column/index.js +1 -1
- package/es/components.d.ts +3 -0
- package/es/components.js +4 -8
- package/es/grid/index.js +1 -1
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +398 -121
- package/es/grid/src/props.js +1 -1
- package/es/index.esm.js +6 -0
- package/es/index.js +6 -0
- package/es/table/index.js +1 -1
- package/es/table/module/custom/hook.js +50 -43
- package/es/table/module/custom/panel.js +778 -528
- package/es/table/module/edit/hook.js +141 -63
- package/es/table/module/export/export-panel.js +400 -317
- package/es/table/module/export/hook.js +396 -338
- package/es/table/module/export/import-panel.js +153 -124
- package/es/table/module/filter/hook.js +17 -3
- package/es/table/module/filter/panel.js +147 -85
- package/es/table/module/keyboard/hook.js +9 -5
- package/es/table/module/menu/hook.js +1 -1
- package/es/table/module/menu/panel.js +198 -127
- package/es/table/module/validator/hook.js +1 -1
- package/es/table/render/index.js +152 -99
- package/es/table/src/body.js +356 -234
- package/es/table/src/cell.js +427 -270
- package/es/table/src/columnInfo.js +2 -1
- package/es/table/src/footer.js +145 -100
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +230 -173
- package/es/table/src/props.js +1 -1
- package/es/table/src/table.js +1504 -1031
- package/es/table/src/util.js +15 -19
- package/es/toolbar/index.js +1 -1
- package/es/toolbar/src/toolbar.js +133 -76
- package/es/ui/index.d.ts +0 -1
- package/es/ui/index.js +1 -2
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/es/v-x-e-table/index.d.ts +0 -1
- package/es/v-x-e-table/index.js +0 -1
- package/lib/colgroup/index.js +5 -5
- package/lib/column/index.js +5 -5
- package/lib/components.js +8 -12
- package/lib/grid/index.js +4 -4
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +419 -142
- package/lib/grid/src/props.js +2 -2
- package/lib/index.common.js +6 -0
- package/lib/index.js +6 -0
- package/lib/index.umd.js +5825 -3945
- package/lib/index.umd.min.js +3 -3
- package/lib/table/index.js +5 -5
- package/lib/table/module/custom/hook.js +51 -44
- package/lib/table/module/custom/panel.js +790 -540
- package/lib/table/module/edit/hook.js +142 -64
- package/lib/table/module/export/export-panel.js +406 -323
- package/lib/table/module/export/hook.js +419 -361
- package/lib/table/module/export/import-panel.js +157 -128
- package/lib/table/module/filter/hook.js +18 -4
- package/lib/table/module/filter/panel.js +149 -87
- package/lib/table/module/keyboard/hook.js +10 -6
- package/lib/table/module/menu/hook.js +2 -2
- package/lib/table/module/menu/panel.js +199 -128
- package/lib/table/module/validator/hook.js +2 -2
- package/lib/table/render/index.js +153 -100
- package/lib/table/src/body.js +357 -235
- package/lib/table/src/cell.js +428 -271
- package/lib/table/src/columnInfo.js +3 -2
- package/lib/table/src/footer.js +146 -101
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +231 -174
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/table.js +1487 -1045
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/index.js +4 -4
- package/lib/toolbar/src/toolbar.js +135 -78
- package/lib/ui/index.js +1 -3
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/lib/v-x-e-table/index.js +0 -2
- package/package.json +8 -3
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -43
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -4
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -521
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -4
- package/packages/v-x-e-table/index.ts +3 -4
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, ref, computed, inject, reactive, nextTick } from "vue";
|
|
2
2
|
import { defineVxeComponent } from "../../../ui/src/comp";
|
|
3
|
-
import { VxeUI } from "
|
|
3
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
4
4
|
import XEUtils from "xe-utils";
|
|
5
5
|
import { getDefaultConfig, parseFile } from "../../../ui/src/utils";
|
|
6
6
|
import { createComponentLog } from "../../../ui/src/log";
|
|
@@ -99,135 +99,164 @@ var import_panel_default = defineVxeComponent({
|
|
|
99
99
|
const bottomSlot = slots.bottom;
|
|
100
100
|
const defaultSlot = slots.default;
|
|
101
101
|
const footerSlot = slots.footer;
|
|
102
|
-
return VxeUIModalComponent ? h(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
102
|
+
return VxeUIModalComponent ? h(
|
|
103
|
+
VxeUIModalComponent,
|
|
104
|
+
{
|
|
105
|
+
id: "VXE_IMPORT_MODAL",
|
|
106
|
+
modelValue: storeData.visible,
|
|
107
|
+
title: modelOptions.title || getI18n("vxe.import.impTitle"),
|
|
108
|
+
className: "vxe-table-export-popup-wrapper",
|
|
109
|
+
width: modelOptions.width || 540,
|
|
110
|
+
height: modelOptions.height,
|
|
111
|
+
minWidth: modelOptions.minWidth || 360,
|
|
112
|
+
minHeight: modelOptions.minHeight || 240,
|
|
113
|
+
mask: getDefaultConfig(modelOptions.mask, true),
|
|
114
|
+
lockView: getDefaultConfig(modelOptions.lockView, true),
|
|
115
|
+
showFooter: true,
|
|
116
|
+
escClosable: true,
|
|
117
|
+
maskClosable: true,
|
|
118
|
+
position: modelOptions.position,
|
|
119
|
+
fullscreen: modelOptions.fullscreen,
|
|
120
|
+
remember: modelOptions.remember,
|
|
121
|
+
showMinimize: modelOptions.showMinimize,
|
|
122
|
+
showMaximize: getDefaultConfig(modelOptions.showMaximize, true),
|
|
123
|
+
resize: getDefaultConfig(modelOptions.resize, true),
|
|
124
|
+
loading: reactData.loading,
|
|
125
|
+
"onUpdate:modelValue"(value) {
|
|
126
|
+
storeData.visible = value;
|
|
127
|
+
},
|
|
128
|
+
onShow: showEvent
|
|
125
129
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return h("div", {
|
|
137
|
-
class: "vxe-table-export--panel"
|
|
138
|
-
}, [
|
|
139
|
-
topSlot ? h("div", {
|
|
140
|
-
class: "vxe-table-export--panel-top"
|
|
141
|
-
}, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable),
|
|
142
|
-
h(
|
|
130
|
+
{
|
|
131
|
+
default: () => {
|
|
132
|
+
const params = {
|
|
133
|
+
$table: $xeTable,
|
|
134
|
+
$grid: $xeGrid,
|
|
135
|
+
$gantt: $xeGantt,
|
|
136
|
+
options: defaultOptions,
|
|
137
|
+
params: defaultOptions.params
|
|
138
|
+
};
|
|
139
|
+
return h(
|
|
143
140
|
"div",
|
|
144
141
|
{
|
|
145
|
-
class: "vxe-table-export--panel
|
|
142
|
+
class: "vxe-table-export--panel"
|
|
146
143
|
},
|
|
147
|
-
|
|
148
|
-
h(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
144
|
+
[
|
|
145
|
+
topSlot ? h(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
class: "vxe-table-export--panel-top"
|
|
149
|
+
},
|
|
150
|
+
$xeTable.callSlot(topSlot, params)
|
|
151
|
+
) : renderEmptyElement($xeTable),
|
|
152
|
+
h(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
class: "vxe-table-export--panel-body"
|
|
156
|
+
},
|
|
157
|
+
defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
|
|
158
|
+
h(
|
|
159
|
+
"table",
|
|
160
|
+
{
|
|
161
|
+
class: "vxe-table-export--panel-table",
|
|
162
|
+
cellspacing: 0,
|
|
163
|
+
cellpadding: 0,
|
|
164
|
+
border: 0
|
|
165
|
+
},
|
|
166
|
+
[
|
|
167
|
+
h("tbody", [
|
|
168
|
+
h("tr", [
|
|
169
|
+
h("td", getI18n("vxe.import.impFile")),
|
|
170
|
+
h("td", [
|
|
171
|
+
hasFile ? h(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
class: "vxe-table-export--selected--file",
|
|
175
|
+
title: selectName
|
|
176
|
+
},
|
|
177
|
+
[
|
|
178
|
+
h("span", selectName),
|
|
179
|
+
h("i", {
|
|
180
|
+
class: getIcon().INPUT_CLEAR,
|
|
181
|
+
onClick: clearFileEvent
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
) : h(
|
|
185
|
+
"button",
|
|
186
|
+
{
|
|
187
|
+
ref: refFileBtn,
|
|
188
|
+
class: "vxe-table-export--select--file",
|
|
189
|
+
onClick: selectFileEvent
|
|
190
|
+
},
|
|
191
|
+
getI18n("vxe.import.impSelect")
|
|
192
|
+
)
|
|
193
|
+
])
|
|
194
|
+
]),
|
|
195
|
+
h("tr", [h("td", getI18n("vxe.import.impType")), h("td", parseTypeLabel)]),
|
|
196
|
+
settingOptions.showMode === false ? renderEmptyElement($xeTable) : h("tr", [
|
|
197
|
+
h("td", getI18n("vxe.import.impMode")),
|
|
198
|
+
h("td", [
|
|
199
|
+
VxeUISelectComponent ? h(VxeUISelectComponent, {
|
|
200
|
+
modelValue: defaultOptions.mode,
|
|
201
|
+
options: storeData.modeList,
|
|
202
|
+
"onUpdate:modelValue"(value) {
|
|
203
|
+
defaultOptions.mode = value;
|
|
204
|
+
}
|
|
205
|
+
}) : renderEmptyElement($xeTable)
|
|
206
|
+
])
|
|
207
|
+
])
|
|
208
|
+
])
|
|
209
|
+
]
|
|
210
|
+
)
|
|
211
|
+
]
|
|
212
|
+
),
|
|
213
|
+
bottomSlot ? h(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
class: "vxe-table-export--panel-bottom"
|
|
217
|
+
},
|
|
218
|
+
$xeTable.callSlot(bottomSlot, params)
|
|
219
|
+
) : renderEmptyElement($xeTable)
|
|
192
220
|
]
|
|
193
|
-
)
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
221
|
+
);
|
|
222
|
+
},
|
|
223
|
+
footer() {
|
|
224
|
+
const params = {
|
|
225
|
+
$table: $xeTable,
|
|
226
|
+
$grid: $xeGrid,
|
|
227
|
+
$gantt: $xeGantt,
|
|
228
|
+
options: defaultOptions,
|
|
229
|
+
params: defaultOptions.params
|
|
230
|
+
};
|
|
231
|
+
return h(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
class: "vxe-table-export--panel-footer"
|
|
235
|
+
},
|
|
236
|
+
footerSlot ? $xeTable.callSlot(footerSlot, params) : [
|
|
237
|
+
h(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
class: "vxe-table-export--panel-btns"
|
|
241
|
+
},
|
|
242
|
+
[
|
|
243
|
+
VxeUIButtonComponent ? h(VxeUIButtonComponent, {
|
|
244
|
+
content: getI18n("vxe.import.impCancel"),
|
|
245
|
+
onClick: cancelEvent
|
|
246
|
+
}) : renderEmptyElement($xeTable),
|
|
247
|
+
VxeUIButtonComponent ? h(VxeUIButtonComponent, {
|
|
248
|
+
status: "primary",
|
|
249
|
+
disabled: !hasFile || reactData.loading,
|
|
250
|
+
content: getI18n("vxe.import.impConfirm"),
|
|
251
|
+
onClick: importEvent
|
|
252
|
+
}) : renderEmptyElement($xeTable)
|
|
253
|
+
]
|
|
254
|
+
)
|
|
255
|
+
]
|
|
256
|
+
);
|
|
257
|
+
}
|
|
229
258
|
}
|
|
230
|
-
|
|
259
|
+
) : renderEmptyElement($xeTable);
|
|
231
260
|
};
|
|
232
261
|
nextTick(() => {
|
|
233
262
|
if (!VxeUIModalComponent) {
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { nextTick } from "vue";
|
|
2
2
|
import XEUtils from "xe-utils";
|
|
3
|
-
import { VxeUI } from "
|
|
3
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
4
4
|
import { toFilters, handleFieldOrColumn, getRefElem } from "../../src/util";
|
|
5
5
|
import { toCssUnit, triggerEvent, updatePanelPlacement } from "../../../ui/src/dom";
|
|
6
6
|
import { hasEnableConf, isEnableConf } from "../../../ui/src/utils";
|
|
7
7
|
const { renderer, hooks } = VxeUI;
|
|
8
|
-
const tableFilterMethodKeys = [
|
|
8
|
+
const tableFilterMethodKeys = [
|
|
9
|
+
"openFilter",
|
|
10
|
+
"setFilter",
|
|
11
|
+
"clearFilter",
|
|
12
|
+
"saveFilter",
|
|
13
|
+
"saveFilterByEvent",
|
|
14
|
+
"saveFilterPanel",
|
|
15
|
+
"saveFilterPanelByEvent",
|
|
16
|
+
"resetFilter",
|
|
17
|
+
"resetFilterByEvent",
|
|
18
|
+
"resetFilterPanel",
|
|
19
|
+
"resetFilterPanelByEvent",
|
|
20
|
+
"getCheckedFilters",
|
|
21
|
+
"updateFilterOptionStatus"
|
|
22
|
+
];
|
|
9
23
|
const sourceType = "table";
|
|
10
24
|
hooks.add("tableFilterModule", {
|
|
11
25
|
setupTable($xeTable) {
|
|
@@ -198,7 +212,7 @@ hooks.add("tableFilterModule", {
|
|
|
198
212
|
$xeTable.closeFilter();
|
|
199
213
|
return $xeTable.updateFooter().then(() => {
|
|
200
214
|
const { scrollXLoad, scrollYLoad } = reactData;
|
|
201
|
-
if (oldScrollXLoad || scrollXLoad ||
|
|
215
|
+
if (oldScrollXLoad || scrollXLoad || oldScrollYLoad || scrollYLoad) {
|
|
202
216
|
if (oldScrollXLoad || scrollXLoad) {
|
|
203
217
|
$xeTable.updateScrollXSpace();
|
|
204
218
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, ref, computed, inject, Teleport } from "vue";
|
|
2
2
|
import { defineVxeComponent } from "../../../ui/src/comp";
|
|
3
|
-
import { VxeUI } from "
|
|
3
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
4
4
|
import { formatText, isEnableConf } from "../../../ui/src/utils";
|
|
5
5
|
import { getPropClass } from "../../../ui/src/dom";
|
|
6
6
|
import { getSlotVNs } from "../../../ui/src/vn";
|
|
@@ -102,15 +102,23 @@ var panel_default = defineVxeComponent({
|
|
|
102
102
|
const rtFilter = compConf ? compConf.renderTableFilter || compConf.renderFilter : null;
|
|
103
103
|
if (filterSlot) {
|
|
104
104
|
return [
|
|
105
|
-
h(
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
h(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
class: "vxe-table--filter-template"
|
|
109
|
+
},
|
|
110
|
+
$xeTable.callSlot(filterSlot, params)
|
|
111
|
+
)
|
|
108
112
|
];
|
|
109
113
|
} else if (filterRender && rtFilter) {
|
|
110
114
|
return [
|
|
111
|
-
h(
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
h(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
class: "vxe-table--filter-template"
|
|
119
|
+
},
|
|
120
|
+
getSlotVNs(rtFilter(filterRender, params))
|
|
121
|
+
)
|
|
114
122
|
];
|
|
115
123
|
}
|
|
116
124
|
const isAllChecked = filterMultiple ? filterStore.isAllSelected : !filterOptions.some((item) => item._checked);
|
|
@@ -118,55 +126,89 @@ var panel_default = defineVxeComponent({
|
|
|
118
126
|
const optVNs = filterOptions.map((item) => {
|
|
119
127
|
const isChecked = item._checked;
|
|
120
128
|
const isIndeterminate = false;
|
|
121
|
-
return h(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
132
|
-
})
|
|
133
|
-
] : []).concat([
|
|
134
|
-
h("span", {
|
|
135
|
-
class: "vxe-checkbox--label"
|
|
136
|
-
}, formatText(item.label, 1))
|
|
137
|
-
]));
|
|
138
|
-
});
|
|
139
|
-
return [
|
|
140
|
-
h("div", {
|
|
141
|
-
class: "vxe-table--filter-header"
|
|
142
|
-
}, [
|
|
143
|
-
h("div", {
|
|
144
|
-
class: ["vxe-table--filter-option", {
|
|
145
|
-
"is--checked": isAllChecked,
|
|
146
|
-
"is--indeterminate": isAllIndeterminate
|
|
147
|
-
}],
|
|
148
|
-
title: getI18n(filterMultiple ? "vxe.table.allTitle" : "vxe.table.allFilter"),
|
|
129
|
+
return h(
|
|
130
|
+
"div",
|
|
131
|
+
{
|
|
132
|
+
class: [
|
|
133
|
+
"vxe-table--filter-option",
|
|
134
|
+
{
|
|
135
|
+
"is--checked": item._checked
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
title: item.label,
|
|
149
139
|
onClick: (evnt) => {
|
|
150
|
-
|
|
140
|
+
changeOption(evnt, !item._checked, item);
|
|
151
141
|
}
|
|
152
|
-
},
|
|
142
|
+
},
|
|
143
|
+
(filterMultiple ? [
|
|
153
144
|
h("span", {
|
|
154
|
-
class: ["vxe-checkbox--icon",
|
|
145
|
+
class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
155
146
|
})
|
|
156
147
|
] : []).concat([
|
|
157
|
-
h(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
148
|
+
h(
|
|
149
|
+
"span",
|
|
150
|
+
{
|
|
151
|
+
class: "vxe-checkbox--label"
|
|
152
|
+
},
|
|
153
|
+
formatText(item.label, 1)
|
|
154
|
+
)
|
|
155
|
+
])
|
|
156
|
+
);
|
|
157
|
+
});
|
|
158
|
+
return [
|
|
159
|
+
h(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
class: "vxe-table--filter-header"
|
|
163
|
+
},
|
|
164
|
+
[
|
|
165
|
+
h(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
class: [
|
|
169
|
+
"vxe-table--filter-option",
|
|
170
|
+
{
|
|
171
|
+
"is--checked": isAllChecked,
|
|
172
|
+
"is--indeterminate": isAllIndeterminate
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
title: getI18n(filterMultiple ? "vxe.table.allTitle" : "vxe.table.allFilter"),
|
|
176
|
+
onClick: (evnt) => {
|
|
177
|
+
changeAllOption(evnt, !filterStore.isAllSelected);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
(filterMultiple ? [
|
|
181
|
+
h("span", {
|
|
182
|
+
class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
183
|
+
})
|
|
184
|
+
] : []).concat([
|
|
185
|
+
h(
|
|
186
|
+
"span",
|
|
187
|
+
{
|
|
188
|
+
class: "vxe-checkbox--label"
|
|
189
|
+
},
|
|
190
|
+
getI18n("vxe.table.allFilter")
|
|
191
|
+
)
|
|
192
|
+
])
|
|
193
|
+
)
|
|
194
|
+
]
|
|
195
|
+
),
|
|
196
|
+
useScrollbar ? h(
|
|
197
|
+
VxeUIScrollbarComponent,
|
|
198
|
+
{
|
|
199
|
+
class: "vxe-table--scrollbar-filter-body",
|
|
200
|
+
viewClassName: "vxe-table--scrollbar-filter-body-view"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
default: () => optVNs
|
|
204
|
+
}
|
|
205
|
+
) : h(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
class: "vxe-table--filter-body"
|
|
209
|
+
},
|
|
210
|
+
optVNs
|
|
211
|
+
)
|
|
170
212
|
];
|
|
171
213
|
};
|
|
172
214
|
const renderFooters = () => {
|
|
@@ -189,20 +231,32 @@ var panel_default = defineVxeComponent({
|
|
|
189
231
|
showFlFoot = !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false);
|
|
190
232
|
}
|
|
191
233
|
return showFlFoot ? [
|
|
192
|
-
h(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
234
|
+
h(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
class: "vxe-table--filter-footer"
|
|
238
|
+
},
|
|
239
|
+
[
|
|
240
|
+
h(
|
|
241
|
+
"button",
|
|
242
|
+
{
|
|
243
|
+
class: {
|
|
244
|
+
"is--disabled": isDisabled
|
|
245
|
+
},
|
|
246
|
+
disabled: isDisabled,
|
|
247
|
+
onClick: confirmFilter
|
|
248
|
+
},
|
|
249
|
+
confirmButtonText || getI18n("vxe.table.confirmFilter")
|
|
250
|
+
),
|
|
251
|
+
h(
|
|
252
|
+
"button",
|
|
253
|
+
{
|
|
254
|
+
onClick: resetFilter
|
|
255
|
+
},
|
|
256
|
+
resetButtonText || getI18n("vxe.table.resetFilter")
|
|
257
|
+
)
|
|
258
|
+
]
|
|
259
|
+
)
|
|
206
260
|
] : [];
|
|
207
261
|
};
|
|
208
262
|
const renderVN = () => {
|
|
@@ -222,27 +276,35 @@ var panel_default = defineVxeComponent({
|
|
|
222
276
|
const vSize = computeSize.value;
|
|
223
277
|
const filterOpts = computeFilterOpts.value;
|
|
224
278
|
const { transfer, destroyOnClose, className } = filterOpts;
|
|
225
|
-
return h(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
"
|
|
234
|
-
className,
|
|
235
|
-
getPropClass(filterClassName, params),
|
|
279
|
+
return h(
|
|
280
|
+
Teleport,
|
|
281
|
+
{
|
|
282
|
+
to: "body",
|
|
283
|
+
disabled: !transfer
|
|
284
|
+
},
|
|
285
|
+
[
|
|
286
|
+
h(
|
|
287
|
+
"div",
|
|
236
288
|
{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
289
|
+
ref: refElem,
|
|
290
|
+
class: [
|
|
291
|
+
"vxe-table--filter-wrapper",
|
|
292
|
+
"filter--prevent-default",
|
|
293
|
+
className,
|
|
294
|
+
getPropClass(filterClassName, params),
|
|
295
|
+
{
|
|
296
|
+
[`size--${vSize}`]: vSize,
|
|
297
|
+
"is--animat": tableProps.animat,
|
|
298
|
+
"is--multiple": column.filterMultiple,
|
|
299
|
+
"is--active": visible
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
style: filterStore.style
|
|
303
|
+
},
|
|
304
|
+
initStore.filter && (destroyOnClose ? visible : true) && column ? renderOptions(filterRender, compConf).concat(renderFooters()) : []
|
|
305
|
+
)
|
|
306
|
+
]
|
|
307
|
+
);
|
|
246
308
|
};
|
|
247
309
|
$xeFilterPanel.renderVN = renderVN;
|
|
248
310
|
return $xeFilterPanel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import XEUtils from "xe-utils";
|
|
2
|
-
import { VxeUI } from "
|
|
2
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
3
3
|
import { getRefElem } from "../../src/util";
|
|
4
4
|
import { getAbsolutePos, addClass, removeClass, hasControlKey } from "../../../ui/src/dom";
|
|
5
5
|
import { hasEnableConf } from "../../../ui/src/utils";
|
|
@@ -109,10 +109,14 @@ hooks.add("tableKeyboardModule", {
|
|
|
109
109
|
let isMouseScrollDown = false;
|
|
110
110
|
let mouseScrollSpaceSize = 1;
|
|
111
111
|
const triggerEvent = (type, evnt2) => {
|
|
112
|
-
$xeTable.dispatchEvent(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
$xeTable.dispatchEvent(
|
|
113
|
+
`checkbox-range-${type}`,
|
|
114
|
+
{
|
|
115
|
+
records: () => $xeTable.getCheckboxRecords(),
|
|
116
|
+
reserves: () => $xeTable.getCheckboxReserveRecords()
|
|
117
|
+
},
|
|
118
|
+
evnt2
|
|
119
|
+
);
|
|
116
120
|
};
|
|
117
121
|
const handleChecked = (evnt2) => {
|
|
118
122
|
const { clientX, clientY } = evnt2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nextTick } from "vue";
|
|
2
2
|
import XEUtils from "xe-utils";
|
|
3
|
-
import { VxeUI } from "
|
|
3
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
4
4
|
import { getDomNode, getAbsolutePos, getEventTargetNode, toCssUnit } from "../../../ui/src/dom";
|
|
5
5
|
import { isEnableConf, hasChildrenList, hasEnableConf } from "../../../ui/src/utils";
|
|
6
6
|
const { menus, hooks, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI;
|