vxe-table 3.7.0-beta.16 → 3.7.0-beta.18
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/button/style/style.css +2 -3
- package/lib/button/style/style.min.css +1 -1
- package/lib/edit/src/mixin.js +6 -4
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +571 -404
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +24 -1
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +21 -0
- package/lib/input/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +6 -6
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +20 -16
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +498 -360
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +15 -13
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +2 -2
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/package.json +3 -8
- package/packages/edit/src/mixin.js +7 -5
- package/packages/input/src/input.js +24 -1
- package/packages/table/src/body.js +6 -6
- package/packages/table/src/cell.js +18 -14
- package/packages/table/src/methods.js +375 -181
- package/packages/table/src/table.js +15 -13
- package/styles/button.scss +5 -3
- package/styles/css-variable.scss +3 -3
- package/styles/input.scss +25 -0
- package/styles/table.scss +6 -2
- package/styles/textarea.scss +3 -3
- package/styles/variable.scss +3 -3
- /package/lib/icon/style/{iconfont.1693009490086.ttf → iconfont.1693698495640.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1693009490086.woff → iconfont.1693698495640.woff} +0 -0
- /package/lib/icon/style/{iconfont.1693009490086.woff2 → iconfont.1693698495640.woff2} +0 -0
- /package/lib/{iconfont.1693009490086.ttf → iconfont.1693698495640.ttf} +0 -0
- /package/lib/{iconfont.1693009490086.woff → iconfont.1693698495640.woff} +0 -0
- /package/lib/{iconfont.1693009490086.woff2 → iconfont.1693698495640.woff2} +0 -0
|
@@ -3,7 +3,7 @@ import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
|
3
3
|
import VXETable from '../../v-x-e-table'
|
|
4
4
|
import DomTools from '../../tools/dom'
|
|
5
5
|
import UtilTools, { eqEmptyValue, isEnableConf, getFuncText } from '../../tools/utils'
|
|
6
|
-
import { getColumnConfig } from './util'
|
|
6
|
+
import { getRowid, getColumnConfig } from './util'
|
|
7
7
|
import { getSlotVNs } from '../../tools/vn'
|
|
8
8
|
|
|
9
9
|
function renderHelpIcon (h, params) {
|
|
@@ -204,7 +204,7 @@ export const Cell = {
|
|
|
204
204
|
*/
|
|
205
205
|
renderTreeIcon (h, params, cellVNodes) {
|
|
206
206
|
const { $table, isHidden } = params
|
|
207
|
-
const { treeOpts,
|
|
207
|
+
const { treeOpts, treeExpandedMaps, treeExpandLazyLoadedMaps } = $table
|
|
208
208
|
const { row, column, level } = params
|
|
209
209
|
const { slots } = column
|
|
210
210
|
const { indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts
|
|
@@ -219,9 +219,10 @@ export const Cell = {
|
|
|
219
219
|
return $table.callSlot(slots.icon, params, h, cellVNodes)
|
|
220
220
|
}
|
|
221
221
|
if (!isHidden) {
|
|
222
|
-
|
|
222
|
+
const rowid = getRowid($table, row)
|
|
223
|
+
isAceived = !!treeExpandedMaps[rowid]
|
|
223
224
|
if (lazy) {
|
|
224
|
-
isLazyLoaded =
|
|
225
|
+
isLazyLoaded = !!treeExpandLazyLoadedMaps[rowid]
|
|
225
226
|
hasLazyChilds = row[hasChildField]
|
|
226
227
|
}
|
|
227
228
|
}
|
|
@@ -296,13 +297,13 @@ export const Cell = {
|
|
|
296
297
|
},
|
|
297
298
|
renderRadioCell (h, params) {
|
|
298
299
|
const { $table, column, isHidden } = params
|
|
299
|
-
const { radioOpts,
|
|
300
|
+
const { radioOpts, selectRadioRow } = $table
|
|
300
301
|
const { slots } = column
|
|
301
302
|
const { labelField, checkMethod, visibleMethod } = radioOpts
|
|
302
303
|
const { row } = params
|
|
303
304
|
const defaultSlot = slots ? slots.default : null
|
|
304
305
|
const radioSlot = slots ? slots.radio : null
|
|
305
|
-
const isChecked = row ===
|
|
306
|
+
const isChecked = row === selectRadioRow
|
|
306
307
|
const isVisible = !visibleMethod || visibleMethod({ row })
|
|
307
308
|
let isDisabled = !!checkMethod
|
|
308
309
|
let on
|
|
@@ -409,7 +410,7 @@ export const Cell = {
|
|
|
409
410
|
},
|
|
410
411
|
renderCheckboxCell (h, params) {
|
|
411
412
|
const { $table, row, column, isHidden } = params
|
|
412
|
-
const { treeConfig,
|
|
413
|
+
const { treeConfig, treeIndeterminateMaps, selectCheckboxMaps } = $table
|
|
413
414
|
const { labelField, checkMethod, visibleMethod } = $table.checkboxOpts
|
|
414
415
|
const { slots } = column
|
|
415
416
|
const defaultSlot = slots ? slots.default : null
|
|
@@ -420,7 +421,8 @@ export const Cell = {
|
|
|
420
421
|
let isDisabled = !!checkMethod
|
|
421
422
|
let on
|
|
422
423
|
if (!isHidden) {
|
|
423
|
-
|
|
424
|
+
const rowid = getRowid($table, row)
|
|
425
|
+
isChecked = !!selectCheckboxMaps[rowid]
|
|
424
426
|
on = {
|
|
425
427
|
click (evnt) {
|
|
426
428
|
if (!isDisabled && isVisible) {
|
|
@@ -433,7 +435,7 @@ export const Cell = {
|
|
|
433
435
|
isDisabled = !checkMethod({ row })
|
|
434
436
|
}
|
|
435
437
|
if (treeConfig) {
|
|
436
|
-
indeterminate =
|
|
438
|
+
indeterminate = !!treeIndeterminateMaps[rowid]
|
|
437
439
|
}
|
|
438
440
|
}
|
|
439
441
|
const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate }
|
|
@@ -471,7 +473,7 @@ export const Cell = {
|
|
|
471
473
|
},
|
|
472
474
|
renderCheckboxCellByProp (h, params) {
|
|
473
475
|
const { $table, row, column, isHidden } = params
|
|
474
|
-
const { treeConfig,
|
|
476
|
+
const { treeConfig, treeIndeterminateMaps, checkboxOpts } = $table
|
|
475
477
|
const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts
|
|
476
478
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField
|
|
477
479
|
const { slots } = column
|
|
@@ -483,6 +485,7 @@ export const Cell = {
|
|
|
483
485
|
let isDisabled = !!checkMethod
|
|
484
486
|
let on
|
|
485
487
|
if (!isHidden) {
|
|
488
|
+
const rowid = getRowid($table, row)
|
|
486
489
|
isChecked = XEUtils.get(row, checkField)
|
|
487
490
|
on = {
|
|
488
491
|
click (evnt) {
|
|
@@ -496,7 +499,7 @@ export const Cell = {
|
|
|
496
499
|
isDisabled = !checkMethod({ row })
|
|
497
500
|
}
|
|
498
501
|
if (treeConfig) {
|
|
499
|
-
isIndeterminate =
|
|
502
|
+
isIndeterminate = !!treeIndeterminateMaps[rowid]
|
|
500
503
|
}
|
|
501
504
|
}
|
|
502
505
|
const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate: isIndeterminate }
|
|
@@ -538,7 +541,7 @@ export const Cell = {
|
|
|
538
541
|
*/
|
|
539
542
|
renderExpandCell (h, params) {
|
|
540
543
|
const { $table, isHidden, row, column } = params
|
|
541
|
-
const { expandOpts,
|
|
544
|
+
const { expandOpts, rowExpandedMaps, rowExpandLazyLoadedMaps } = $table
|
|
542
545
|
const { lazy, labelField, iconLoaded, showIcon, iconOpen, iconClose, visibleMethod } = expandOpts
|
|
543
546
|
const { slots } = column
|
|
544
547
|
const defaultSlot = slots ? slots.default : null
|
|
@@ -548,9 +551,10 @@ export const Cell = {
|
|
|
548
551
|
return $table.callSlot(slots.icon, params, h)
|
|
549
552
|
}
|
|
550
553
|
if (!isHidden) {
|
|
551
|
-
|
|
554
|
+
const rowid = getRowid($table, row)
|
|
555
|
+
isAceived = !!rowExpandedMaps[rowid]
|
|
552
556
|
if (lazy) {
|
|
553
|
-
isLazyLoaded =
|
|
557
|
+
isLazyLoaded = !!rowExpandLazyLoadedMaps[rowid]
|
|
554
558
|
}
|
|
555
559
|
}
|
|
556
560
|
return [
|