Ant Design of Vue对话框a-model动态实现显示隐藏底部

时间:2025-03-21 08:10:38
<template> <a-button type="primary" @click="look">查看</a-button> <a-button type="primary" @click="edit">编辑</a-button> <a-modal v-model="visible" :title="title" ok-text="确认" cancel-text="取消" :width="700" @ok="hideModal" destroyOnClose :footer='showFooter' > <p>123123132132132132132132</p> </a-modal> </template> <script> export default { data(){ return{ visible:false, title:'', showFooter:undefined, } }, methods: { edit(){ this.visible = true this.title = '编辑' this.showFooter=undefined }, look(){ this.visible = true this.title = '查看' this.showFooter=null }, hideModal(){ this.visible = false }, }, } </script>