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
|
<ChevronRight
|
||||||
:class="{ 'rotate-90': expanded?.length > 0 }"
|
: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
|
<Checkbox
|
||||||
v-if="multiple"
|
v-if="multiple"
|
||||||
@@ -329,7 +329,7 @@ defineExpose({
|
|||||||
:class="
|
:class="
|
||||||
cn('cursor-pointer', getNodeClass?.(item), {
|
cn('cursor-pointer', getNodeClass?.(item), {
|
||||||
'data-[selected]:bg-accent': !multiple,
|
'data-[selected]:bg-accent': !multiple,
|
||||||
'text-foreground/50 cursor-not-allowed': isNodeDisabled(item),
|
'cursor-not-allowed text-foreground/50': isNodeDisabled(item),
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
v-bind="
|
v-bind="
|
||||||
@@ -367,7 +367,7 @@ defineExpose({
|
|||||||
Array.isArray(item.value[childrenField]) &&
|
Array.isArray(item.value[childrenField]) &&
|
||||||
item.value[childrenField].length > 0
|
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 }"
|
:class="{ 'rotate-90': isExpanded }"
|
||||||
@click.stop="
|
@click.stop="
|
||||||
() => {
|
() => {
|
||||||
@@ -380,7 +380,7 @@ defineExpose({
|
|||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
v-if="multiple"
|
v-if="multiple"
|
||||||
:checked="isSelected && !isNodeDisabled(item)"
|
:model-value="isSelected && !isNodeDisabled(item)"
|
||||||
:disabled="isNodeDisabled(item)"
|
:disabled="isNodeDisabled(item)"
|
||||||
:indeterminate="isIndeterminate && !isNodeDisabled(item)"
|
:indeterminate="isIndeterminate && !isNodeDisabled(item)"
|
||||||
@click="
|
@click="
|
||||||
|
|||||||
Reference in New Issue
Block a user