✨(component): 优化 table 组件 dataSource 属性改变时, 清空 selectedKey 与 selectedKeys 属性
This commit is contained in:
parent
6450dfb1ad
commit
08a682eaba
@ -93,6 +93,7 @@ const emit = defineEmits([
|
||||
const slot = useSlots();
|
||||
const slots = slot.default && slot.default();
|
||||
|
||||
const s = "";
|
||||
const allChecked = ref(false);
|
||||
const hasChecked = ref(false);
|
||||
const tableDataSource = ref<any[]>([...props.dataSource]);
|
||||
@ -257,6 +258,8 @@ watch(
|
||||
() => props.dataSource,
|
||||
() => {
|
||||
tableDataSource.value = [...props.dataSource];
|
||||
tableSelectedKeys.value = [];
|
||||
tableSelectedKey.value = s;
|
||||
nextTick(() => {
|
||||
getScrollWidth();
|
||||
});
|
||||
@ -316,11 +319,11 @@ const rowDoubleClick = function (data: any, evt: MouseEvent) {
|
||||
emit("row-double", data, evt);
|
||||
};
|
||||
|
||||
const rowContextmenu = function (data: any, evt: MouseEvent) {
|
||||
const rowContextmenu = (data: any, evt: MouseEvent) => {
|
||||
emit("row-contextmenu", data, evt);
|
||||
};
|
||||
|
||||
const print = function () {
|
||||
const print = () => {
|
||||
let subOutputRankPrint = document.getElementById(tableId) as HTMLElement;
|
||||
let newContent = subOutputRankPrint.innerHTML;
|
||||
let oldContent = document.body.innerHTML;
|
||||
|
@ -11,7 +11,16 @@
|
||||
<template>
|
||||
<lay-timeline>
|
||||
<lay-timeline-item title="1.4.x">
|
||||
<ul>
|
||||
<ul>
|
||||
<a name="1-3-14"></a>
|
||||
<li>
|
||||
<h3>1.4.1 <span class="layui-badge-rim">2022-08-14</span></h3>
|
||||
<ul>
|
||||
<li>[修复] 表格开启复选框之后,不使用getCheckboxProps属性,点击时全选会报错。</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<a name="1-3-14"></a>
|
||||
<li>
|
||||
<h3>1.4.1 <span class="layui-badge-rim">2022-08-14</span></h3>
|
||||
|
Loading…
Reference in New Issue
Block a user