Skip to content

Commit b17fec4

Browse files
authored
fix: tree component cannot set a value (#6941)
Signed-off-by: aonoa <1991849113@qq.com>
1 parent 5fcfabf commit b17fec4

File tree

1 file changed

+4
-4
lines changed
  • packages/@core/ui-kit/shadcn-ui/src/ui/tree

1 file changed

+4
-4
lines changed

packages/@core/ui-kit/shadcn-ui/src/ui/tree/tree.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ defineExpose({
302302
>
303303
<ChevronRight
304304
:class="{ 'rotate-90': expanded?.length > 0 }"
305-
class="text-foreground/80 hover:text-foreground size-4 cursor-pointer transition"
305+
class="size-4 cursor-pointer text-foreground/80 transition hover:text-foreground"
306306
/>
307307
<Checkbox
308308
v-if="multiple"
@@ -329,7 +329,7 @@ defineExpose({
329329
:class="
330330
cn('cursor-pointer', getNodeClass?.(item), {
331331
'data-[selected]:bg-accent': !multiple,
332-
'text-foreground/50 cursor-not-allowed': isNodeDisabled(item),
332+
'cursor-not-allowed text-foreground/50': isNodeDisabled(item),
333333
})
334334
"
335335
v-bind="
@@ -367,7 +367,7 @@ defineExpose({
367367
Array.isArray(item.value[childrenField]) &&
368368
item.value[childrenField].length > 0
369369
"
370-
class="text-foreground/80 hover:text-foreground size-4 cursor-pointer transition"
370+
class="size-4 cursor-pointer text-foreground/80 transition hover:text-foreground"
371371
:class="{ 'rotate-90': isExpanded }"
372372
@click.stop="
373373
() => {
@@ -380,7 +380,7 @@ defineExpose({
380380
<div class="flex items-center gap-1">
381381
<Checkbox
382382
v-if="multiple"
383-
:checked="isSelected && !isNodeDisabled(item)"
383+
:model-value="isSelected && !isNodeDisabled(item)"
384384
:disabled="isNodeDisabled(item)"
385385
:indeterminate="isIndeterminate && !isNodeDisabled(item)"
386386
@click="

0 commit comments

Comments
 (0)