添加左侧的侧边栏

This commit is contained in:
lq
2025-09-15 20:26:31 +08:00
parent 7c8495ed7c
commit 1ccf8b991e
2 changed files with 66 additions and 22 deletions

View File

@ -0,0 +1,33 @@
<template>
<a-drawer
title="创建任务"
cancel-text="取消"
ok-text="创建任务"
placement="right"
v-model:visible="showDriwer"
@after-visible-change="showDriwerChange"
width="480px"
class="rounded-left"
>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const showDriwer = ref(false);
// 暴露方法给父组件
const showDrawer = () => {
showDriwer.value = true;
};
const showDriwerChange = (visible: boolean) => {
console.log('Drawer visible: ', visible);
};
// 使用defineExpose暴露方法
defineExpose({
showDrawer
});
</script>