自帶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>
數據我就不貼了,大家都有,下面是結果圖: