(component): update

This commit is contained in:
就眠儀式 2022-08-03 00:18:37 +08:00
parent 97f2231ca9
commit 4e6a77ee19
2 changed files with 16 additions and 11 deletions

View File

@ -280,7 +280,10 @@ const getFixedColumn = () => {
hasr.value = true; hasr.value = true;
} else { } else {
// @ts-ignore // @ts-ignore
if (tableBody.value?.scrollLeft + tableBody.value?.offsetWidth + 2 > tableBody.value?.scrollWidth) { if (
tableBody.value?.scrollLeft + tableBody.value?.offsetWidth + 2 >
tableBody.value?.scrollWidth
) {
hasl.value = true; hasl.value = true;
hasr.value = false; hasr.value = false;
} else { } else {

View File

@ -98,7 +98,8 @@ watch(
} }
); );
watch( watch(
tree, () => { tree,
() => {
if (initStatus.value) { if (initStatus.value) {
const { checkedKeys } = tree.value.getKeys(); const { checkedKeys } = tree.value.getKeys();
unWatch.value = true; unWatch.value = true;
@ -107,14 +108,15 @@ watch(
unWatch.value = false; unWatch.value = false;
}, 0); }, 0);
} }
}, { deep: true } },
{ deep: true }
); );
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
initStatus.value = true; initStatus.value = true;
}) });
}) });
function handleClick(node: TreeData) { function handleClick(node: TreeData) {
const originNode = tree.value.getOriginData(node.id); const originNode = tree.value.getOriginData(node.id);