🐛(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) => {
|
const changeAll = (isChecked: boolean) => {
|
||||||
// Selected
|
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
const datasources = props.dataSource.filter((item: any, index: number) => {
|
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) => {
|
const ids = datasources.map((item) => {
|
||||||
return item[props.id];
|
return item[props.id];
|
||||||
});
|
});
|
||||||
tableSelectedKeys.value = [...ids];
|
tableSelectedKeys.value = [...ids];
|
||||||
} else {
|
} else {
|
||||||
// unSelected
|
|
||||||
tableSelectedKeys.value = [];
|
tableSelectedKeys.value = [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -698,7 +698,7 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-button @click="changeSelectedKeys">修改选中值 {{ selectedKeys5 }}</lay-button>
|
<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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
Reference in New Issue
Block a user