Skip to content

Commit

Permalink
feat(tree):树形控件选中节点添加选中类名 (#1881)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwt444 committed Jun 16, 2024
1 parent 3a9f834 commit 94f99c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface IUseTreeNode {
}

export function useTreeNode(data: ComputedRef<IInnerTreeNode>): IUseTreeNode {
const nodeClass = computed(() => [ns.e('node'), data.value?.expanded && ns.em('node', 'open')]);
const nodeClass = computed(() => [ns.e('node'), data.value?.expanded && ns.em('node', 'open'), data.value?.selected && 'active']);
const nodeStyle = computed(() => {
return { paddingLeft: `${NODE_INDENT * (data.value?.level - 1)}px` };
});
Expand Down

0 comments on commit 94f99c3

Please sign in to comment.