添加左侧的侧边栏
This commit is contained in:
@ -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>
|
||||
Reference in New Issue
Block a user