|
@@ -14,25 +14,28 @@
|
|
|
</a-row>
|
|
|
<a-row :gutter="24" >
|
|
|
<a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" />
|
|
|
- <a-tree
|
|
|
- @expand="onExpand"
|
|
|
- :treeData="getMenus"
|
|
|
- :expandedKeys="expandedKeys"
|
|
|
- :autoExpandParent="autoExpandParent"
|
|
|
- @select="onSelect"
|
|
|
- :selectedKeys="selectedKeys"
|
|
|
- >
|
|
|
- <template slot="title" slot-scope="{title}">
|
|
|
- <span v-if="title.indexOf(searchValue) > -1">
|
|
|
- {{ title.substr(0, title.indexOf(searchValue)) }}
|
|
|
- <span style="color: #f50">{{ searchValue }}</span>
|
|
|
- {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
|
|
- </span>
|
|
|
- <span v-else>{{ title }}</span>
|
|
|
- </template>
|
|
|
- <a-icon slot="file" type="file" />
|
|
|
- <a-icon slot="pushpin" type="pushpin" />
|
|
|
- </a-tree>
|
|
|
+ <div style="max-height: 600px;overflow: auto;">
|
|
|
+ <a-tree
|
|
|
+ @expand="onExpand"
|
|
|
+ :treeData="getMenus"
|
|
|
+ :expandedKeys="expandedKeys"
|
|
|
+ :autoExpandParent="autoExpandParent"
|
|
|
+ @select="onSelect"
|
|
|
+ :selectedKeys="selectedKeys"
|
|
|
+ showIcon
|
|
|
+ >
|
|
|
+ <template slot="title" slot-scope="{title}">
|
|
|
+ <span v-if="title.indexOf(searchValue) > -1">
|
|
|
+ {{ title.substr(0, title.indexOf(searchValue)) }}
|
|
|
+ <span style="color: #f50">{{ searchValue }}</span>
|
|
|
+ {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ title }}</span>
|
|
|
+ </template>
|
|
|
+ <a-icon slot="file" type="file" />
|
|
|
+ <a-icon slot="pushpin" type="pushpin" />
|
|
|
+ </a-tree>
|
|
|
+ </div>
|
|
|
</a-row>
|
|
|
</a-col>
|
|
|
<!-- 右侧 -->
|