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"
|
:props="tree.props"
|
||||||
:load="tree.onLoad"
|
:load="tree.onLoad"
|
||||||
:default-expanded-keys="tree.defaultExpandedKeys"
|
:default-expanded-keys="tree.defaultExpandedKeys"
|
||||||
|
@node-click="select"
|
||||||
>
|
>
|
||||||
<template #default="{ data }">
|
<template #default="{ data }">
|
||||||
<div class="item" @click="select(data)">
|
<div class="item">
|
||||||
<component :is="data.icon" v-if="data.icon" />
|
<component :is="data.icon" v-if="data.icon" />
|
||||||
<span>{{ data[tree.props.label] }}</span>
|
<span>{{ data[tree.props.label] }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -508,6 +509,7 @@ defineExpose({
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
|
highlight-current
|
||||||
:data="list"
|
:data="list"
|
||||||
:props="{
|
:props="{
|
||||||
label: 'name'
|
label: 'name'
|
||||||
@ -42,6 +43,7 @@
|
|||||||
:allow-drop="allowDrop"
|
:allow-drop="allowDrop"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
@node-contextmenu="onContextMenu"
|
@node-contextmenu="onContextMenu"
|
||||||
|
@node-click="rowClick"
|
||||||
>
|
>
|
||||||
<template #default="{ node, data }">
|
<template #default="{ node, data }">
|
||||||
<div class="dept-tree__node">
|
<div class="dept-tree__node">
|
||||||
@ -50,7 +52,6 @@
|
|||||||
:class="{
|
:class="{
|
||||||
'is-active': data.id == ViewGroup?.selected?.id
|
'is-active': data.id == ViewGroup?.selected?.id
|
||||||
}"
|
}"
|
||||||
@click="rowClick(data)"
|
|
||||||
>{{ node.label }}</span
|
>{{ node.label }}</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
Loading…
Reference in New Issue
Block a user