<button class="marginLeft2" @click="showAddVisible = true">添加下级单位 </button>
<addUnit :visible.sync="showAddVisible"></addUnit>
import addUnit from '@/views/BusinessAuthManage/BusinessLine/components/addUnit'
showAddVisible: false,
addUnit.vue文件主要代码
<a-modal
:width="1200"
:visible="visible"
@ok="handleOk"
@cancel="cancel"
title="昆明市-添加单位"
:maskClosable="false"
>
</a-modal>
props: {
visible: {
type: Boolean,
default: false,
},
},
cancel() {
this.$emit("update:visible", false);//更新状态
},