代码优化

This commit is contained in:
wangxk 2025-04-10 08:59:38 +08:00
parent 557970fd87
commit dbe5ff638c

View File

@ -131,7 +131,7 @@ function diffSure() {
})
}
//-
const ChangeSize = ref(10)
const ChangeSize = ref(100)
const ChangeTotal = ref()
const ChangeCurrent = ref(1)
function diffChange() {
@ -237,6 +237,8 @@ function diffColor() {
});
}
function diffClose() {
comparearr.value.length = 0
workall.value.length = 0
differential.value = false
getlocaltree()
getminiotree()
@ -300,10 +302,11 @@ const handleCheckChange = (
// 使
const updateCompare = debounce(() => {
const compareNodes = getclickdata(workall.value);
//
comparearr.value = getclickdata(workall.value);
const comparearrval = getclickdata(workall.value);
//
const checkedKeys = compareNodes
const checkedKeys = comparearrval
.map(node => node.id)
nextTick(() => {
beifentree.value?.setCheckedKeys(checkedKeys, false);
@ -449,10 +452,11 @@ const backupsChange = (
// 使
const updateCompare = debounce(() => {
const compareNodes = getclickdata(workall.value);
// comparearr.value.length = 0
comparearr.value = getclickdata(workall.value);
const comparearrval = getclickdata(workall.value);
//
const checkedKeys = compareNodes
const checkedKeys = comparearrval
.map(node => node.id)
nextTick(() => {
workref.value?.setCheckedKeys(checkedKeys, false);