网站首页 网站建设 IT知识 IT知识教程 vue树形结构获取键值的方法示例

vue树形结构获取键值的方法示例

2021-05-26 21:10:57

本文介绍了vue树形结构获取键值的方法示例,分享给大家,具体如下:

把键值文件放入

引入控件

import { getTypeValue } from '@/api/dict/dictValue/index';

点击搜索,打开弹窗

<el-form-item label="机构名称" placeholder="请选择机构" prop="orgName"> <el-input readonly type="text" v-model="form.orgName"> <el-button slot="append" icon="el-icon-search" @click="openDepartDialog()"></el-button> </el-input></el-form-item>

打开控件事件,关闭控件事件

openDepartDialog() { this.dialogDepartVisible = true},closeDepartDialog(depart) { console.log(depart) this.form.orgName = depart.label this.form.code = depart.id this.form.departId = depart.id this.dialogDepartVisible = false},

关闭弹窗按钮

<el-dialog title="选择机构" width="30%" :visible.sync="dialogDepartVisible"> <depart-selector @closeDepartDialog="closeDepartDialog" ref="departSelector"></depart-selector> <span slot="footer" class="dialog-footer"> <el-button class="filter-item" style="margin-left: 10px;" @click="handlerAddDepart" type="primary" icon="edit">添加</el-button> </span></el-dialog>

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。 如涉及版权问题,请提交至online#300.cn邮箱联系删除。

以上产品还未完全满足我的所有需求,在下方提交我的专属需求
我的专属需求:
*手机号:
*验证码:
img
咨询报价
现在咨询
img

在线咨询

建站在线咨询

img

微信咨询

扫一扫添加
动力姐姐微信

img
img

TOP