mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-14 05:40:53 +08:00
28 lines
517 B
Vue
28 lines
517 B
Vue
<script lang="ts" setup>
|
|
import { useVbenDrawer, VbenButton } from '@vben/common-ui';
|
|
|
|
import ExtraDrawer from './drawer.vue';
|
|
|
|
const [Drawer, drawerApi] = useVbenDrawer({
|
|
// 连接抽离的组件
|
|
connectedComponent: ExtraDrawer,
|
|
});
|
|
|
|
function open() {
|
|
drawerApi
|
|
.setData({
|
|
content: '外部传递的数据 content',
|
|
payload: '外部传递的数据 payload',
|
|
})
|
|
.open();
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<Drawer />
|
|
|
|
<VbenButton @click="open">Open</VbenButton>
|
|
</div>
|
|
</template>
|