vue antD model對話框底部按鈕


自帶model底部通常只有確定跟取消,如果要重新定義model底部按鈕的個數需要用到作用域插槽,如下代碼:

<a-button type="primary" @click="visible = true">打開Model</a-button>
<a-modal
title="這是一個Model"
:visible="visible"
:confirm-loading="confirmLoading"
@cancel="handleCancel"
>
<template slot="footer">
<a-button type="primary">按鈕1</a-button>
<a-button type="primary">按鈕2</a-button>
<a-button type="danger">按鈕3</a-button>
</template>
</a-modal>
數據我就不貼了,大家都有,下面是結果圖:

 

 




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM