Ant Design Vue模态框modal 去除确认或添加按钮

 <a-modal
                v-model="uploadVisible"
                :title="title"
                :maskClosable="false"
                width="1000px"
                :destroyOnClose="true"
                @cancel="closeModal"
                :footer="!isshowFooter ? null : undefined"
            >
                <template #footer>
                    <a-button type="primary" @click="handleOk">确定发送短信</a-button>
                </template>
</a-modal>
 
 
data: 
 isshowFooter: false,
 
总结:footer属性名动态更改为undefined之后,会执行插槽内的语句。footer为null则不显示
posted @ 2022-06-08 11:43  赵辉Coder  阅读(1877)  评论(0编辑  收藏  举报