vxe-table 3.15.39 → 3.15.41
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/es/grid/src/grid.js +73 -49
- package/es/{iconfont.1749800510225.ttf → iconfont.1750153781820.ttf} +0 -0
- package/es/iconfont.1750153781820.woff +0 -0
- package/es/iconfont.1750153781820.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +29 -3
- package/es/table/module/custom/panel.js +118 -105
- package/es/table/src/body.js +8 -5
- package/es/table/src/cell.js +12 -12
- package/es/table/src/methods.js +34 -26
- package/es/table/src/props.js +32 -8
- package/es/table/src/table.js +57 -38
- package/es/table/style.css +22 -3
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +163 -63
- package/es/ui/index.js +12 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +22 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +81 -82
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/{iconfont.1749800510225.ttf → iconfont.1750153781820.ttf} +0 -0
- package/lib/iconfont.1750153781820.woff +0 -0
- package/lib/iconfont.1750153781820.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +495 -288
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +6 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +6 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +6 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +6 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +6 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +6 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +6 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +6 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +6 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +6 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +6 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +6 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +6 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +6 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +6 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +6 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +6 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +6 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +6 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +6 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +6 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +32 -5
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +14 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/body.js +11 -11
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +14 -14
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +38 -25
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +32 -8
- package/lib/table/src/table.js +64 -50
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +22 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +189 -88
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +12 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +22 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +93 -54
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/custom/mixin.ts +27 -3
- package/packages/table/module/custom/panel.ts +119 -106
- package/packages/table/src/body.ts +13 -10
- package/packages/table/src/cell.ts +12 -12
- package/packages/table/src/methods.ts +35 -26
- package/packages/table/src/props.ts +32 -8
- package/packages/table/src/table.ts +76 -49
- package/packages/toolbar/src/toolbar.ts +167 -62
- package/packages/ui/index.ts +11 -0
- package/styles/components/icon.scss +13 -1
- package/styles/components/table-module/custom.scss +9 -2
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/es/iconfont.1749800510225.woff +0 -0
- package/es/iconfont.1749800510225.woff2 +0 -0
- package/lib/iconfont.1749800510225.woff +0 -0
- package/lib/iconfont.1749800510225.woff2 +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -41,8 +41,11 @@ function renderDefaultForm(h, $xeGrid) {
|
|
|
41
41
|
const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
|
|
42
42
|
const props = $xeGrid;
|
|
43
43
|
const slots = $xeGrid.$scopedSlots;
|
|
44
|
+
const reactData = $xeGrid;
|
|
44
45
|
const { proxyConfig, formConfig } = props;
|
|
45
|
-
const {
|
|
46
|
+
const { formData } = reactData;
|
|
47
|
+
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
48
|
+
const formOpts = $xeGrid.computeFormOpts;
|
|
46
49
|
if (isEnableConf(formConfig) && formOpts.items && formOpts.items.length) {
|
|
47
50
|
const formSlots = {};
|
|
48
51
|
if (!formOpts.inited) {
|
|
@@ -121,29 +124,44 @@ const getConfigSlot = ($xeGrid, slotConfigs) => {
|
|
|
121
124
|
});
|
|
122
125
|
return slotConf;
|
|
123
126
|
};
|
|
124
|
-
function getToolbarSlots(
|
|
125
|
-
const
|
|
127
|
+
function getToolbarSlots($xeGrid) {
|
|
128
|
+
const slots = $xeGrid.$scopedSlots;
|
|
129
|
+
const toolbarOpts = $xeGrid.computeToolbarOpts;
|
|
126
130
|
const toolbarOptSlots = toolbarOpts.slots;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const slots = {};
|
|
130
|
-
if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
|
|
131
|
+
const toolbarSlots = {};
|
|
132
|
+
if (slots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
|
|
131
133
|
warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons']);
|
|
132
134
|
}
|
|
133
|
-
if (
|
|
135
|
+
if (slots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
|
|
134
136
|
warnLog('vxe.error.reqProp', ['toolbar-config.slots.tools']);
|
|
135
137
|
}
|
|
136
138
|
if (toolbarOptSlots) {
|
|
137
|
-
buttonsSlot = getFuncSlot(
|
|
138
|
-
|
|
139
|
+
const buttonsSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'buttons');
|
|
140
|
+
const buttonPrefixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'buttonPrefix');
|
|
141
|
+
const buttonSuffixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'buttonSuffix');
|
|
142
|
+
const toolsSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'tools');
|
|
143
|
+
const toolPrefixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'toolPrefix');
|
|
144
|
+
const toolSuffixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'toolSuffix');
|
|
139
145
|
if (buttonsSlot) {
|
|
140
|
-
|
|
146
|
+
toolbarSlots.buttons = buttonsSlot;
|
|
147
|
+
}
|
|
148
|
+
if (buttonPrefixSlot) {
|
|
149
|
+
toolbarSlots.buttonPrefix = buttonPrefixSlot;
|
|
150
|
+
}
|
|
151
|
+
if (buttonSuffixSlot) {
|
|
152
|
+
toolbarSlots.buttonSuffix = buttonSuffixSlot;
|
|
141
153
|
}
|
|
142
154
|
if (toolsSlot) {
|
|
143
|
-
|
|
155
|
+
toolbarSlots.tools = toolsSlot;
|
|
156
|
+
}
|
|
157
|
+
if (toolPrefixSlot) {
|
|
158
|
+
toolbarSlots.toolPrefix = toolPrefixSlot;
|
|
159
|
+
}
|
|
160
|
+
if (toolSuffixSlot) {
|
|
161
|
+
toolbarSlots.toolSuffix = toolSuffixSlot;
|
|
144
162
|
}
|
|
145
163
|
}
|
|
146
|
-
return
|
|
164
|
+
return toolbarSlots;
|
|
147
165
|
}
|
|
148
166
|
function getTableOns(_vm) {
|
|
149
167
|
const { $listeners, proxyConfig, proxyOpts } = _vm;
|
|
@@ -182,90 +200,96 @@ function pageChangeEvent($xeGrid, params) {
|
|
|
182
200
|
/**
|
|
183
201
|
* 渲染表单
|
|
184
202
|
*/
|
|
185
|
-
function renderForm(h,
|
|
186
|
-
const
|
|
187
|
-
const
|
|
203
|
+
function renderForm(h, $xeGrid) {
|
|
204
|
+
const slots = $xeGrid.$scopedSlots;
|
|
205
|
+
const props = $xeGrid;
|
|
206
|
+
const { formConfig } = props;
|
|
207
|
+
const formSlot = slots.form;
|
|
188
208
|
const hasForm = !!(formSlot || isEnableConf(formConfig));
|
|
189
209
|
if (hasForm) {
|
|
190
210
|
return h('div', {
|
|
191
211
|
key: 'form',
|
|
192
212
|
ref: 'refFormWrapper',
|
|
193
213
|
class: 'vxe-grid--form-wrapper'
|
|
194
|
-
}, formSlot ? formSlot.call(
|
|
214
|
+
}, formSlot ? formSlot.call($xeGrid, { $grid: $xeGrid }) : renderDefaultForm(h, $xeGrid));
|
|
195
215
|
}
|
|
196
|
-
return
|
|
216
|
+
return renderEmptyElement($xeGrid);
|
|
197
217
|
}
|
|
198
218
|
/**
|
|
199
219
|
* 渲染工具栏
|
|
200
220
|
*/
|
|
201
|
-
function renderToolbar(h,
|
|
202
|
-
const
|
|
203
|
-
const
|
|
221
|
+
function renderToolbar(h, $xeGrid) {
|
|
222
|
+
const slots = $xeGrid.$scopedSlots;
|
|
223
|
+
const props = $xeGrid;
|
|
224
|
+
const { toolbarConfig } = props;
|
|
225
|
+
const toolbarSlot = slots.toolbar;
|
|
204
226
|
const hasToolbar = !!(toolbarSlot || isEnableConf(toolbarConfig) || toolbar);
|
|
227
|
+
const toolbarOpts = $xeGrid.computeToolbarOpts;
|
|
205
228
|
if (hasToolbar) {
|
|
206
229
|
return h('div', {
|
|
207
230
|
key: 'toolbar',
|
|
208
231
|
ref: 'refToolbarWrapper',
|
|
209
232
|
class: 'vxe-grid--toolbar-wrapper'
|
|
210
233
|
}, toolbarSlot
|
|
211
|
-
? toolbarSlot.call(
|
|
234
|
+
? toolbarSlot.call($xeGrid, { $grid: $xeGrid })
|
|
212
235
|
: [
|
|
213
236
|
h(VxeToolbarComponent, {
|
|
214
|
-
props: Object.assign({},
|
|
237
|
+
props: Object.assign({}, toolbarOpts, { slots: undefined }),
|
|
215
238
|
ref: 'xToolbar',
|
|
216
|
-
scopedSlots: getToolbarSlots(
|
|
239
|
+
scopedSlots: getToolbarSlots($xeGrid)
|
|
217
240
|
})
|
|
218
241
|
]);
|
|
219
242
|
}
|
|
220
|
-
return
|
|
243
|
+
return renderEmptyElement($xeGrid);
|
|
221
244
|
}
|
|
222
245
|
/**
|
|
223
246
|
* 渲染表格顶部区域
|
|
224
247
|
*/
|
|
225
|
-
function renderTop(h,
|
|
226
|
-
const
|
|
227
|
-
const topSlot =
|
|
248
|
+
function renderTop(h, $xeGrid) {
|
|
249
|
+
const slots = $xeGrid.$scopedSlots;
|
|
250
|
+
const topSlot = slots.top;
|
|
228
251
|
return topSlot
|
|
229
252
|
? h('div', {
|
|
230
253
|
key: 'top',
|
|
231
254
|
ref: 'refTopWrapper',
|
|
232
255
|
class: 'vxe-grid--top-wrapper'
|
|
233
|
-
}, topSlot.call(
|
|
234
|
-
:
|
|
256
|
+
}, topSlot.call($xeGrid, { $grid: $xeGrid }))
|
|
257
|
+
: renderEmptyElement($xeGrid);
|
|
235
258
|
}
|
|
236
|
-
function renderTableLeft(h,
|
|
237
|
-
const
|
|
238
|
-
const leftSlot =
|
|
259
|
+
function renderTableLeft(h, $xeGrid) {
|
|
260
|
+
const slots = $xeGrid.$scopedSlots;
|
|
261
|
+
const leftSlot = slots.left;
|
|
239
262
|
if (leftSlot) {
|
|
240
263
|
return h('div', {
|
|
241
264
|
class: 'vxe-grid--left-wrapper'
|
|
242
|
-
}, leftSlot({ $grid:
|
|
265
|
+
}, leftSlot({ $grid: $xeGrid }));
|
|
243
266
|
}
|
|
244
|
-
return
|
|
267
|
+
return renderEmptyElement($xeGrid);
|
|
245
268
|
}
|
|
246
|
-
function renderTableRight(h,
|
|
247
|
-
const
|
|
248
|
-
const rightSlot =
|
|
269
|
+
function renderTableRight(h, $xeGrid) {
|
|
270
|
+
const slots = $xeGrid.$scopedSlots;
|
|
271
|
+
const rightSlot = slots.right;
|
|
249
272
|
if (rightSlot) {
|
|
250
273
|
return h('div', {
|
|
251
274
|
class: 'vxe-grid--right-wrapper'
|
|
252
|
-
}, rightSlot({ $grid:
|
|
275
|
+
}, rightSlot({ $grid: $xeGrid }));
|
|
253
276
|
}
|
|
254
|
-
return
|
|
277
|
+
return renderEmptyElement($xeGrid);
|
|
255
278
|
}
|
|
256
279
|
/**
|
|
257
280
|
* 渲染表格
|
|
258
281
|
*/
|
|
259
|
-
function renderTable(h,
|
|
260
|
-
const
|
|
282
|
+
function renderTable(h, $xeGrid) {
|
|
283
|
+
const slots = $xeGrid.$scopedSlots;
|
|
284
|
+
const tableProps = $xeGrid.computeTableProps;
|
|
261
285
|
return h('div', {
|
|
262
286
|
class: 'vxe-grid--table-wrapper'
|
|
263
287
|
}, [
|
|
264
288
|
h('vxe-table', {
|
|
265
289
|
key: 'table',
|
|
266
290
|
props: tableProps,
|
|
267
|
-
on: getTableOns(
|
|
268
|
-
scopedSlots:
|
|
291
|
+
on: getTableOns($xeGrid),
|
|
292
|
+
scopedSlots: slots,
|
|
269
293
|
ref: 'xTable'
|
|
270
294
|
})
|
|
271
295
|
]);
|
|
@@ -273,16 +297,16 @@ function renderTable(h, _vm) {
|
|
|
273
297
|
/**
|
|
274
298
|
* 渲染表格底部区域
|
|
275
299
|
*/
|
|
276
|
-
function renderBottom(h,
|
|
277
|
-
const
|
|
278
|
-
const bottomSlot =
|
|
300
|
+
function renderBottom(h, $xeGrid) {
|
|
301
|
+
const slots = $xeGrid.$scopedSlots;
|
|
302
|
+
const bottomSlot = slots.bottom;
|
|
279
303
|
return bottomSlot
|
|
280
304
|
? h('div', {
|
|
281
305
|
key: 'bottom',
|
|
282
306
|
ref: 'refBottomWrapper',
|
|
283
307
|
class: 'vxe-grid--bottom-wrapper'
|
|
284
|
-
}, bottomSlot.call(
|
|
285
|
-
:
|
|
308
|
+
}, bottomSlot.call($xeGrid, { $grid: $xeGrid }))
|
|
309
|
+
: renderEmptyElement($xeGrid);
|
|
286
310
|
}
|
|
287
311
|
/**
|
|
288
312
|
* 渲染分页
|
|
Binary file
|
|
Binary file
|
|
Binary file
|