Skip to content

Commit 177ca52

Browse files
author
wyc001122
committed
fix(@vben-core/shadcn-ui): add cursor-not-allowed className when disabled and disable onfocus
1 parent 05a4d0f commit 177ca52

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,12 @@ defineExpose({
224224
:class="
225225
cn('cursor-pointer', getNodeClass?.(item), {
226226
'data-[selected]:bg-accent': !multiple,
227+
'cursor-not-allowed': disabled,
227228
})
228229
"
229230
v-bind="
230231
Object.assign(item.bind, {
231-
tabindex: !disabled ? -1 : undefined,
232+
onfocus: disabled ? 'this.blur()' : undefined,
232233
})
233234
"
234235
@select="

0 commit comments

Comments
 (0)