refactor: 项目优化

This commit is contained in:
郝先瑞
2022-03-07 21:17:22 +08:00
parent 3a5399e7d5
commit 5420e8ed77
9 changed files with 25 additions and 20 deletions

View File

@@ -111,8 +111,8 @@ function clearSelected() {
allNode.forEach((element) => element.classList.remove('is-current'))
}
onMounted(() => {
nextTick(() => {
function initHandle(){
nextTick(() => {
const selectedValue = modelValue.value;
if (selectedValue !== null && typeof (selectedValue) !== "undefined") {
const node = proxy.$refs.selectTree.getNode(selectedValue)
@@ -125,6 +125,10 @@ onMounted(() => {
}
}
})
}
onMounted(() => {
initHandle();
})
watch(modelValue, () => {