Commit 092395d1 by xiaohai

.

parent b0133da7
<template> <template>
<div class="searh-menu-container"> <div class="searh-menu-container">
<el-input prefix-icon="el-icon-search" placeholder="请输入内容"></el-input> <el-input prefix-icon="el-icon-search" v-model="searchKey" placeholder="请输入内容" clearable @clear="clearFn" @keyup.enter.native="searchFn"></el-input>
<ul class="search-menu"> <el-tree
<li class="cpn-submenu" style="padding: 0;"> v-show="!searchResultShow"
<div class="cpn-submenu_title">
<i class="iconfont icon-2zuzhijiagou"></i>
<span>品牌一</span>
</div>
<ul>
<li class="menuitem cpn-submenu-item">
<i class="iconfont icon-chengyuan"></i>
<span>陈景良</span>
</li>
<li class="cpn-submenu">
<div class="cpn-submenu_title">
<i class="iconfont icon-tongshi-zuzhijiagou"></i>
<span>人事部</span>
</div>
<ul>
<li class="menuitem cpn-submenu-item">
<i class="iconfont icon-chengyuan"></i>
<span>陈景良</span>
</li>
<li class="cpn-submenu">
<div class="cpn-submenu_title">
<i class="iconfont icon-tongshi-zuzhijiagou"></i>
<span>人事部</span>
</div>
<ul>
<li class="menuitem cpn-submenu-item">
<i class="iconfont icon-chengyuan"></i>
<span>陈景良</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- <el-menu
class="search-menu" class="search-menu"
@open="handleOpen" :default-expanded-keys="[1, 2]"
@close="handleClose"> :data="data"
<el-submenu index="1"> :highlight-current="true"
<template slot="title"> :expand-on-click-node="false"
<i class="iconfont icon-2zuzhijiagou"></i> @node-click="handleNodeClick">
<span>品牌一</span> <span class="custom-tree-node" slot-scope="{ node, data }">
</template> <i class="iconfont" :class="node.level == 1 ? 'icon-2zuzhijiagou' : node.isLeaf ? 'icon-chengyuan' : 'icon-tongshi-zuzhijiagou'"></i>
<el-submenu index="1-1"> <span>{{ node.label }}</span>
<template slot="title"> </span>
<i class="icon-tongshi-zuzhijiagou iconfont"></i> </el-tree>
<span>选项4</span>
</template>
<el-menu-item index="1-1-1">
<i class="iconfont icon-chengyuan"></i>
<span>张三</span>
</el-menu-item>
</el-submenu>
</el-submenu>
</el-menu> -->
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "searchMenu", name: "searchMenu",
components: {}, components: {},
props: {}, props: {},
data: { data() {
data: [ return {
{ data: [ // el-tree mock data
brand_name: "江南布衣", {
brand_code: "001", id: 1,
brand_id: "jnby001", label: '一级 1',
sort: 1, children: [
status: 1, {
id: 4,
label: '二级 1-1',
children: [
{
id: 9,
label: '三级 1-1-1'
},
{
id: 10,
label: '三级 1-1-2'
}
]
}
]
},
{
id: 2,
label: '一级 2',
children: [
{
id: 5,
label: '二级 2-1'
},
{
id: 6,
label: '二级 2-2'
}
]
},
{
id: 3,
label: '一级 3',
children: [
{
id: 7,
label: '二级 3-1'
},
{
id: 8,
label: '二级 3-2'
}
]
}
],
searchKey: "",
searchResultShow: false,
};
},
created() {},
methods: {
/**
* 清楚输入框
*/
clearFn() {},
/**
* 关键字搜索
*/
searchFn() {
console.log(this.searchKey);
},
} /**
] * 树形菜单选择
}, */
created() {}, handleNodeClick(obj, node) {
metods: {}, console.log(obj, node);
filter: {}, this.$emit("handleTreeSelection", obj, node);
computed: {}, }
watch: {} },
filter: {},
computed: {},
watch: {}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.searh-menu-container { .searh-menu-container {
overflow-y: scroll;
overflow-x: scroll;
width: 260px; width: 260px;
background: #eef1f8; background: #eef1f8;
height: 100%; height: 690px;
min-height: 600px;
padding: 20px 15px; padding: 20px 15px;
box-sizing: border-box;
.search-menu { .search-menu {
margin-top: 30px; margin-top: 30px;
color: #606266; color: #606266;
font-size: 14px; font-size: 14px;
background: #EEF1F8; background: #EEF1F8;
.iconfont { min-width: 100%;
color: #409EFF; display:inline-block !important;
font-size: 16px; .el-tree-node {
margin-right: 5px; .el-tree-node__content {
} height: 36px;
.cpn-submenu {
list-style: none;
margin: 0;
}
.cpn-submenu_title {
height: 36px;
line-height: 36px;
padding: 0 20px;
&:hover {
background:#409EFF;
color: #fff;
.iconfont { .iconfont {
color: #fff; color: #409EFF;
margin-right: 5px;
} }
} &:hover {
}
.cpn-submenu-item {
height: 36px;
line-height: 36px;
padding: 0 40px;
&:hover {
background: #409EFF;
color: #fff;
.iconfont {
color: #fff; color: #fff;
background: #409EFF;
.iconfont {
color: #fff;
}
} }
} }
} }
} }
// .search-menu { .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
// margin-top: 30px; background: #409EFF;
// background: none; color: #fff;
// border: none; .iconfont {
// .el-submenu__title { color: #fff;
// height: 36px; }
// line-height: 36px; }
// .iconfont {
// font-size: 16px;
// color: #409EFF;
// margin-right: 5px;
// }
// }
// .el-menu {
// background: none;
// .el-menu-item {
// height: 36px;
// line-height: 36px;
// .iconfont {
// font-size: 16px;
// color: #409EFF;
// margin-right: 5px;
// }
// }
// }
// }
} }
</style> </style>
......
...@@ -327,6 +327,9 @@ input:focus { ...@@ -327,6 +327,9 @@ input:focus {
.m-t-10 { .m-t-10 {
margin-top: 10px; margin-top: 10px;
} }
.m-t-30 {
margin-top: 30px;
}
.font-0 .el-form-item__content, .dialog-footer { .font-0 .el-form-item__content, .dialog-footer {
font-size: 0; font-size: 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment