diff --git a/src/components/popover/Popover.js b/src/components/popover/Popover.js index 092113c59..872edca8c 100644 --- a/src/components/popover/Popover.js +++ b/src/components/popover/Popover.js @@ -60,7 +60,7 @@ export default { }, methods: { isNotEmpty() { - return this.title || this.content || this.$slots.popover + return this.title || this.content || this.$scopedSlots.popover }, }, } diff --git a/src/components/popover/Popover.spec.js b/src/components/popover/Popover.spec.js index 1c497b84f..5957dd32c 100644 --- a/src/components/popover/Popover.spec.js +++ b/src/components/popover/Popover.spec.js @@ -608,4 +608,31 @@ This is a very very long text. This is a very very long text. This is a very ver await sleep(600) expect(document.querySelectorAll('.popover').length).toEqual(1) }) + + it('should be able to open popover programmatically with vue latest slot syntax and without title and content passed', async () => { + const wrapper = createWrapper( + ` +