优化细节
This commit is contained in:
@@ -387,7 +387,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
@apply relative transition-transform;
|
@apply relative duration-200;
|
||||||
|
|
||||||
&-image {
|
&-image {
|
||||||
@apply w-full h-full rounded-xl;
|
@apply w-full h-full rounded-xl;
|
||||||
|
|||||||
@@ -130,7 +130,11 @@ const hasChildren = computed(() => props.item.children != null && props.item.chi
|
|||||||
|
|
||||||
// 判断当前节点是否显示复选框
|
// 判断当前节点是否显示复选框
|
||||||
const showCheckbox = computed(() => {
|
const showCheckbox = computed(() => {
|
||||||
return ClTree?.checkable == true && ClTree?.multiple == true;
|
if (ClTree == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ClTree.checkable == true && ClTree.multiple == true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 计算当前节点应显示的图标(展开/收起)
|
// 计算当前节点应显示的图标(展开/收起)
|
||||||
@@ -163,9 +167,11 @@ function onTouchStart() {
|
|||||||
hover.value = true;
|
hover.value = true;
|
||||||
toExpand();
|
toExpand();
|
||||||
|
|
||||||
if (ClTree?.checkable == true && ClTree?.multiple != true && props.item.disabled != true) {
|
if (ClTree != null) {
|
||||||
|
if (ClTree.checkable == true && ClTree.multiple != true && props.item.disabled != true) {
|
||||||
toChecked();
|
toChecked();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触摸结束时触发,取消hover
|
// 触摸结束时触发,取消hover
|
||||||
|
|||||||
Reference in New Issue
Block a user