Files
element-plus/docs/examples/drawer/nested-drawer.vue
sea b9ac07cb68 refactor(components): [drawer] resizable (#21932)
* Revert "drawer resizable #21608"

* refactor: drawer resizable

* feat: direction & event core

* docs: update

* fix: animation conflict

* fix: watchEffect onCleanup hrm error

* test: add resize case

* chore: format

* test: old case typo

* refactor: rel #21595 & add hover style

Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: cszhjh <cszhjh@gmail.com>

* chore: del useless file

* chore: del useless file

* chore: rename

Co-authored-by: Dsaquel <291874700n@gmail.com>

* fix: use min resizable error

* fix: multiple resizable style conflicts

* test: fix

---------

Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: cszhjh <cszhjh@gmail.com>
Co-authored-by: Dsaquel <291874700n@gmail.com>
2025-09-04 15:33:06 +08:00

36 lines
827 B
Vue

<template>
<el-button type="primary" @click="drawer = true"> open </el-button>
<el-drawer v-model="drawer" title="I'm outer Drawer" size="50%">
<div>
<el-button @click="innerDrawer = true">Click me!</el-button>
<el-drawer
v-model="innerDrawer"
title="I'm inner Drawer"
:append-to-body="true"
:before-close="handleClose"
>
<p>_(:зゝ)_</p>
</el-drawer>
</div>
</el-drawer>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { ElMessageBox } from 'element-plus'
const drawer = ref(false)
const innerDrawer = ref(false)
const handleClose = (done: () => void) => {
ElMessageBox.confirm('You still have unsaved data, proceed?')
.then(() => {
done()
})
.catch(() => {
// catch error
})
}
</script>