继承 Antd Drawer的所有 Api,通过函数调用的方式打开抽屉
Antd Drawer
<template> <a-button type="primary" @click="handleOpen">打开抽屉</a-button> </template> <script> export default { methods: { handleOpen() { this.$openDrawer({ title: '抽屉', content: <div>自定义组件</div>, onOk: this.handleClose }); }, handleClose() { console.log('点击确定,抽屉关闭了'); } } }; </script>
Modal 弹框