feat: add slot-listener for dropdown and others
This commit is contained in:
5
docs/components/PLAYGROUND/PLAYGROUND.md
Normal file
5
docs/components/PLAYGROUND/PLAYGROUND.md
Normal file
@@ -0,0 +1,5 @@
|
||||
<script setup>
|
||||
import SlotListenerExample from './examples/SlotListenerExample.vue'
|
||||
</script>
|
||||
|
||||
<SlotListenerExample />
|
||||
17
docs/components/PLAYGROUND/examples/SlotListenerExample.vue
Normal file
17
docs/components/PLAYGROUND/examples/SlotListenerExample.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<slot-listener @click="onClick" @mouseleave="onMouseleave" @mouseenter="onMouseenter">
|
||||
<Button>HELLO</Button>
|
||||
</slot-listener>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { SlotListener, Button } from '../../../../src/index'
|
||||
const onClick = () => {
|
||||
console.log('onClick from slot-listener')
|
||||
}
|
||||
const onMouseenter = () => {
|
||||
console.log('onMouseenter from slot-listener')
|
||||
}
|
||||
const onMouseleave = () => {
|
||||
console.log('onMouseleave from slot-listener')
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user