mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
优化
This commit is contained in:
parent
0f440cae4c
commit
561b6a670d
@ -36,9 +36,10 @@
|
||||
:props="tree.props"
|
||||
:load="tree.onLoad"
|
||||
:default-expanded-keys="tree.defaultExpandedKeys"
|
||||
@node-click="select"
|
||||
>
|
||||
<template #default="{ data }">
|
||||
<div class="item" @click="select(data)">
|
||||
<div class="item">
|
||||
<component :is="data.icon" v-if="data.icon" />
|
||||
<span>{{ data[tree.props.label] }}</span>
|
||||
</div>
|
||||
@ -508,6 +509,7 @@ defineExpose({
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 1;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,7 @@
|
||||
v-loading="loading"
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
highlight-current
|
||||
:data="list"
|
||||
:props="{
|
||||
label: 'name'
|
||||
@ -42,6 +43,7 @@
|
||||
:allow-drop="allowDrop"
|
||||
:expand-on-click-node="false"
|
||||
@node-contextmenu="onContextMenu"
|
||||
@node-click="rowClick"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<div class="dept-tree__node">
|
||||
@ -50,7 +52,6 @@
|
||||
:class="{
|
||||
'is-active': data.id == ViewGroup?.selected?.id
|
||||
}"
|
||||
@click="rowClick(data)"
|
||||
>{{ node.label }}</span
|
||||
>
|
||||
<span
|
||||
|
Loading…
Reference in New Issue
Block a user