49 lines
		
	
	
		
			1005 B
		
	
	
	
		
			Vue
		
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1005 B
		
	
	
	
		
			Vue
		
	
	
| <docs>
 | |
| ---
 | |
| order: 11
 | |
| title:
 | |
|   zh-CN: ่ชๅฎไน้กต่ๆ้ฎๅฑๆง
 | |
|   en-US: Customize footer buttons props
 | |
| ---
 | |
| 
 | |
| ## zh-CN
 | |
| 
 | |
| ไผ ๅ
ฅ `okButtonProps` ๅ `cancelButtonProps` ๅฏๅๅซ่ชๅฎไน็กฎๅฎๆ้ฎๅๅๆถๆ้ฎ็ propsใ
 | |
| 
 | |
| ## en-US
 | |
| 
 | |
| Passing `okButtonProps` and `cancelButtonProps` can customize the ok button and cancel button props.
 | |
| 
 | |
| </docs>
 | |
| 
 | |
| <template>
 | |
|   <div>
 | |
|     <a-button type="primary" @click="showModal">Open Modal with customized button props</a-button>
 | |
|     <a-modal
 | |
|       v-model:open="open"
 | |
|       title="Basic Modal"
 | |
|       :ok-button-props="{ disabled: true }"
 | |
|       :cancel-button-props="{ disabled: true }"
 | |
|       @ok="handleOk"
 | |
|     >
 | |
|       <p>Some contents...</p>
 | |
|       <p>Some contents...</p>
 | |
|       <p>Some contents...</p>
 | |
|     </a-modal>
 | |
|   </div>
 | |
| </template>
 | |
| <script lang="ts" setup>
 | |
| import { ref } from 'vue';
 | |
| 
 | |
| const open = ref<boolean>(false);
 | |
| 
 | |
| const showModal = () => {
 | |
|   open.value = true;
 | |
| };
 | |
| 
 | |
| const handleOk = (e: MouseEvent) => {
 | |
|   console.log(e);
 | |
|   open.value = false;
 | |
| };
 | |
| </script>
 |