This commit is contained in:
icssoa 2021-11-08 17:14:16 +08:00
parent db2a2d71c9
commit 2610677c34
2 changed files with 29 additions and 22 deletions

View File

@ -1,10 +1,10 @@
<template>
<div class="cl-menu-tree">
<el-popover
:visible="visible"
placement="bottom-start"
trigger="click"
width="500px"
popper-class="popper-menu-tree"
popper-class="cl-menu-tree"
>
<el-input v-model="keyword" size="small">
<template #prefix>
@ -12,6 +12,7 @@
</template>
</el-input>
<div class="cl-menu-tree__scroller scroller1">
<el-tree
ref="treeRef"
node-key="menuId"
@ -26,12 +27,12 @@
:filter-node-method="filterNode"
@current-change="onCurrentChange"
/>
</div>
<template #reference>
<el-input v-model="name" readonly placeholder="请选择" />
<el-input v-model="name" readonly placeholder="请选择" @click="visible = true" />
</template>
</el-popover>
</div>
</template>
<script lang="ts">
@ -54,6 +55,8 @@ export default defineComponent({
//
const keyword = ref<string>("");
const visible = ref<boolean>(false);
//
const list = ref<any[]>([]);
@ -66,6 +69,7 @@ export default defineComponent({
//
function onCurrentChange({ id }: any) {
emit("update:modelValue", id);
visible.value = false;
}
//
@ -107,6 +111,7 @@ export default defineComponent({
});
return {
visible,
keyword,
list,
expandedKeys,
@ -122,11 +127,16 @@ export default defineComponent({
</script>
<style lang="scss">
.popper-menu-tree {
.cl-menu-tree {
box-sizing: border-box;
.el-input {
margin-bottom: 10px;
}
&__scroller {
max-height: 400px;
overflow: hidden auto;
}
}
</style>

View File

@ -1,9 +1,6 @@
import { BaseService, Service, Permission } from "/@/core";
@Service({
namespace: "base/sys/department",
proxy: "/dev"
})
@Service("base/sys/department")
class SysDepartment extends BaseService {
@Permission("order")
order(data: any) {