F7.notification.create Not working

I’m trying to create a notification in Vue.

<template>
	<f7-page name="home">
		<f7-block>
			<f7-button fill @click="Notify">Notification</f7-button>
		</f7-block>
	</f7-page>
</template>
<script setup>
import { f7, f7Page, f7Block, f7Button } from "framework7-vue";

const Notify = () => {
	f7.notification.create({
		title: "Framework7",
		subtitle: "Notification with close button",
		text: "Click (x) button to close me",
		closeButton: true,
	});
};
</script>

console.log(f7) showing all the methods but still, I don’t see the notification. What am I doing wrong?

you need to open it.

$f7.notification.create({/* params */}).open();
2 Likes