mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vben.git
synced 2025-12-30 02:22:25 +00:00
fix: tree component cannot set a value (#6941)
Signed-off-by: aonoa <1991849113@qq.com>
This commit is contained in:
@@ -302,7 +302,7 @@ defineExpose({
|
||||
>
|
||||
<ChevronRight
|
||||
:class="{ 'rotate-90': expanded?.length > 0 }"
|
||||
class="text-foreground/80 hover:text-foreground size-4 cursor-pointer transition"
|
||||
class="size-4 cursor-pointer text-foreground/80 transition hover:text-foreground"
|
||||
/>
|
||||
<Checkbox
|
||||
v-if="multiple"
|
||||
@@ -329,7 +329,7 @@ defineExpose({
|
||||
:class="
|
||||
cn('cursor-pointer', getNodeClass?.(item), {
|
||||
'data-[selected]:bg-accent': !multiple,
|
||||
'text-foreground/50 cursor-not-allowed': isNodeDisabled(item),
|
||||
'cursor-not-allowed text-foreground/50': isNodeDisabled(item),
|
||||
})
|
||||
"
|
||||
v-bind="
|
||||
@@ -367,7 +367,7 @@ defineExpose({
|
||||
Array.isArray(item.value[childrenField]) &&
|
||||
item.value[childrenField].length > 0
|
||||
"
|
||||
class="text-foreground/80 hover:text-foreground size-4 cursor-pointer transition"
|
||||
class="size-4 cursor-pointer text-foreground/80 transition hover:text-foreground"
|
||||
:class="{ 'rotate-90': isExpanded }"
|
||||
@click.stop="
|
||||
() => {
|
||||
@@ -380,7 +380,7 @@ defineExpose({
|
||||
<div class="flex items-center gap-1">
|
||||
<Checkbox
|
||||
v-if="multiple"
|
||||
:checked="isSelected && !isNodeDisabled(item)"
|
||||
:model-value="isSelected && !isNodeDisabled(item)"
|
||||
:disabled="isNodeDisabled(item)"
|
||||
:indeterminate="isIndeterminate && !isNodeDisabled(item)"
|
||||
@click="
|
||||
|
||||
Reference in New Issue
Block a user