代码优化
This commit is contained in:
parent
557970fd87
commit
dbe5ff638c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user