fix(Accordion): toggle correct element when keyboard press (#805)

Co-authored-by: Haytham Salama <haythamasalama@gmail.com>
This commit is contained in:
Sma11X
2023-10-12 17:46:02 +08:00
committed by GitHub
parent 94cabca65a
commit 96296c3d38
2 changed files with 16 additions and 40 deletions

View File

@@ -1,22 +0,0 @@
import { watch, defineComponent } from 'vue'
export default defineComponent({
props: {
open: {
type: Boolean,
default: false
}
},
emits: ['open', 'close'],
setup (props, { emit }) {
watch(() => props.open, (value) => {
if (value) {
emit('open')
} else {
emit('close')
}
})
return () => {}
}
})