mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 21:18:14 +08:00
868 B
868 B
#### 附加内容
在 TimePicker 选择框底部显示自定义的内容。
#### Addon
Render addon contents to timepicker panel's bottom.
<template>
<div>
<a-time-picker @openChange="handleOpenChange" :open="open">
<a-button slot="addon" size="small" type="primary" @click="handleClose">Ok</a-button>
</a-time-picker>
<a-time-picker :open.sync="open2">
<a-button slot="addon" size="small" type="primary" @click="handleClose">Ok</a-button>
</a-time-picker>
</div>
</template>
<script>
import moment from 'moment';
export default {
data() {
return {
open: false,
open2: false,
}
},
methods: {
handleOpenChange(open){
console.log('open', open);
this.open = open
},
handleClose(){
this.open = false
this.open2 = false
}
},
}
</script>