✨(component): update
This commit is contained in:
parent
97f2231ca9
commit
4e6a77ee19
@ -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 {
|
||||||
|
@ -75,8 +75,8 @@ const className = computed(() => {
|
|||||||
|
|
||||||
let tree = ref();
|
let tree = ref();
|
||||||
let nodeList = ref();
|
let nodeList = ref();
|
||||||
const unWatch=ref(false);
|
const unWatch = ref(false);
|
||||||
const initStatus=ref(false);
|
const initStatus = ref(false);
|
||||||
const loadNodeList = () => {
|
const loadNodeList = () => {
|
||||||
let { tree: _tree, nodeList: _nodeList } = useTree(props, emit);
|
let { tree: _tree, nodeList: _nodeList } = useTree(props, emit);
|
||||||
tree.value = _tree;
|
tree.value = _tree;
|
||||||
@ -92,13 +92,14 @@ watch(
|
|||||||
watch(
|
watch(
|
||||||
() => props.checkedKeys,
|
() => props.checkedKeys,
|
||||||
() => {
|
() => {
|
||||||
if(!unWatch.value){
|
if (!unWatch.value) {
|
||||||
loadNodeList();
|
loadNodeList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user