<button class="marginLeft2" @click="showAddVisible = true">添加下級(jí)單位 </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);//更新狀態(tài)
? ? },