kz-ui-base 1.0.105 → 1.0.106

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.
@@ -396,7 +396,7 @@ export function isNumberStr(str) {
396
396
  */
397
397
  export function tableHandleSelect(selection, row, tableRef) {
398
398
  if (selection.indexOf(row) >= 0) {
399
- tableRef.setCurrentRow(row)
399
+ tableRef&&tableRef.setCurrentRow&&tableRef.setCurrentRow(row)
400
400
  }
401
401
  }
402
402
 
@@ -408,8 +408,8 @@ export function tableHandleSelect(selection, row, tableRef) {
408
408
  */
409
409
  export function tableOnSelectionChange(val, multipleChoice, tableRef) {
410
410
  if (!multipleChoice && val.length > 1) {
411
- tableRef.clearSelection()
412
- tableRef.toggleRowSelection(val.pop())
411
+ tableRef&&tableRef.clearSelection&&tableRef.clearSelection()
412
+ tableRef&&tableRef.toggleRowSelection&&tableRef.toggleRowSelection(val.pop())
413
413
  }
414
414
  }
415
415
 
@@ -423,14 +423,14 @@ export function tableOnSelectionChange(val, multipleChoice, tableRef) {
423
423
  export function tableRowClick(row, multipleChoice, tableRef, multipleSelection) {
424
424
  const findRow = multipleSelection.find((c) => c.rowIndex === row.rowIndex) // 找到选中的行
425
425
  if (findRow) {
426
- tableRef?.toggleRowSelection?.(row, false) // 如过重复选中,则取消选中
426
+ tableRef&&tableRef.toggleRowSelection&&tableRef.toggleRowSelection(row, false) // 如过重复选中,则取消选中
427
427
  return
428
428
  }
429
429
  // 如果是单选模式
430
430
  if (!multipleChoice && multipleSelection.length > 0) {
431
- tableRef.toggleRowSelection(multipleSelection[0], false)
431
+ tableRef&&tableRef.toggleRowSelection&&tableRef.toggleRowSelection(multipleSelection[0], false)
432
432
  }
433
- tableRef.toggleRowSelection(row, true) // 实现选中行中选中事件
433
+ tableRef&&tableRef.toggleRowSelection&&tableRef.toggleRowSelection(row, true) // 实现选中行中选中事件
434
434
  }
435
435
 
436
436
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.105",
3
+ "version": "1.0.106",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {