浏览代码

Table组件去除checkboxField,统一使用keyField

Yue 2 年之前
父节点
当前提交
3880f3cd48
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      UI/VA.Vue_V1.0/src/components/table/VbDataTable.vue

+ 1 - 2
UI/VA.Vue_V1.0/src/components/table/VbDataTable.vue

@@ -25,7 +25,6 @@ const props = withDefaults(
     //itemsPerPage?: number //每页数量
     pageArray?: Array<number> //下拉选择每页数量
     pageDropdown?: boolean //是否下拉选择
-    checkboxField?: string //选择框字段
     checkMultiple?: boolean //是否多选
     checkPageMultiple?: boolean //是否跨页多选
     hasCheckbox?: boolean //是否有选择框 (checkMultiple 和 checkPageMultiple 为true 时不起作用)
@@ -132,7 +131,7 @@ const emits = defineEmits<{
   (e: "on-items-all-change", isChecked: boolean, rows: Array<any>): void
 }>()
 const id = ref("")
-const checkboxField = ref(props.checkboxField ? props.checkboxField : props.header[0].field)
+const checkboxField = ref(props.keyField ? props.keyField : props.header[0].field)
 const currentPage = ref(props.currentPage)
 const itemsInTable = ref(props.pagination ? props.pageArray[0] : 1000)
 const selectedIds = ref(props.selectedIds)