🐛(component): close issues https://gitee.com/layui/layui-vue/issues/I5M7A9
This commit is contained in:
parent
ee3eb47b3f
commit
c2a24dc9ed
@ -265,17 +265,15 @@ watch(
|
||||
);
|
||||
|
||||
const changeAll = (isChecked: boolean) => {
|
||||
// Selected
|
||||
if (isChecked) {
|
||||
const datasources = props.dataSource.filter((item: any, index: number) => {
|
||||
return !props.getCheckboxProps(item, index).disabled;
|
||||
return !props.getCheckboxProps(item, index)?.disabled;
|
||||
});
|
||||
const ids = datasources.map((item) => {
|
||||
return item[props.id];
|
||||
});
|
||||
tableSelectedKeys.value = [...ids];
|
||||
} else {
|
||||
// unSelected
|
||||
tableSelectedKeys.value = [];
|
||||
}
|
||||
};
|
||||
|
@ -698,7 +698,7 @@ export default {
|
||||
|
||||
<template>
|
||||
<lay-button @click="changeSelectedKeys">修改选中值 {{ selectedKeys5 }}</lay-button>
|
||||
<lay-table :columns="columns23" :data-source="dataSource23" v-model:selectedKeys="selectedKeys5" :getCheckboxProps="getCheckboxProps"></lay-table>
|
||||
<lay-table :columns="columns23" :data-source="dataSource23" v-model:selectedKeys="selectedKeys5"></lay-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user