使用 NDrawer
javascript
import { useDrawerManager } from "@nbicc/common-components";
import SimpleDrawer from "./simple-drawer.vue";
const { showDrawer } = useDrawerManager();
function openDrawer() {
showDrawer(SimpleDrawer, { subtitle: "Drawer Body" }, { title: "Drawer Title" });
}
html
<template>
<n-button @click="openDrawer()">打开抽屉</n-button>
</template>