diff --git a/package.json b/package.json index e0e5a4356..9f2f5b926 100644 --- a/package.json +++ b/package.json @@ -52,12 +52,10 @@ "primeicons": "4.0.0", "prismjs": "^1.15.0", "quill": "1.3.3", + "mitt": "^2.1.0", "@fullcalendar/core": "4.0.2", "@fullcalendar/daygrid": "4.0.1", "@fullcalendar/interaction": "4.0.2", "@fullcalendar/timegrid": "4.0.1" - }, - "dependencies": { - "mitt": "^2.1.0" } } diff --git a/src/views/setup/Setup.vue b/src/views/setup/Setup.vue index 8d9581db1..5e7d706d5 100755 --- a/src/views/setup/Setup.vue +++ b/src/views/setup/Setup.vue @@ -97,6 +97,10 @@ dependencies: { PrimeFlex DataView + + Mitt + Toast and Terminal + diff --git a/src/views/terminal/TerminalDoc.vue b/src/views/terminal/TerminalDoc.vue index 41ad861d9..f28481299 100755 --- a/src/views/terminal/TerminalDoc.vue +++ b/src/views/terminal/TerminalDoc.vue @@ -2,6 +2,12 @@
+
Mitt EventBus
+

Terminal requires Mitt, a tiny 200b EventBus implementation.

+ +npm install mitt --save + +
Import
import Terminal from 'primevue/terminal'; @@ -120,7 +126,7 @@ export default {
Dependencies
-

None.

+

Mitt.

diff --git a/src/views/toast/ToastDoc.vue b/src/views/toast/ToastDoc.vue index 298daa522..b76576061 100755 --- a/src/views/toast/ToastDoc.vue +++ b/src/views/toast/ToastDoc.vue @@ -2,18 +2,21 @@
+
Mitt EventBus
+

Toast requires Mitt, a tiny 200b EventBus implementation.

+ +npm install mitt --save + +
ToastService

Toast messages are dynamically created using a ToastService that needs to be installed globally before the application instance is created.

+import {createApp} from 'vue'; import ToastService from 'primevue/toastservice'; -Vue.use(ToastService); -//example application instance -new Vue({ - router, - render: h => h(App) -}).$mount('#app'); +const app = createApp(App); +app.use(ToastService);
Import
@@ -21,6 +24,7 @@ new Vue({ import Toast from 'primevue/toast'; +
Getting Started

Ideal location of a Toast is the main application template so that it can be used by any component within the application.

@@ -243,7 +247,7 @@ this.$toast.removeAllGroups();
Dependencies
-

None.

+

Mitt.