mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +08:00
feat(pop-select): add show/hide event
This commit is contained in:
parent
73c97cc816
commit
a0774cbe33
@ -51,15 +51,22 @@ export default {
|
||||
const slots = context.scopedSlots
|
||||
const activator = slots.activator || slots.default
|
||||
const controller = context.props.controller || {}
|
||||
return h(
|
||||
NPopover, {
|
||||
const onHide = context.listeners.hide || (() => {})
|
||||
const onShow = context.listeners.show || (() => {})
|
||||
|
||||
return h(NPopover, {
|
||||
props: {
|
||||
trigger: 'click',
|
||||
controller
|
||||
},
|
||||
on: {
|
||||
show: onShow,
|
||||
hide: onHide
|
||||
},
|
||||
scopedSlots: {
|
||||
activator: () => activator(),
|
||||
default: () => h(NPopselectPanel, {
|
||||
default: () =>
|
||||
h(NPopselectPanel, {
|
||||
props: {
|
||||
...context.props,
|
||||
controller
|
||||
|
Loading…
Reference in New Issue
Block a user