Plugins
A plugin is a reusable add-on for Vue that can provide app-wide features without repeating code in every component.
$notify
— showing messages to the user (toast, snackbar, alert).$loading
— enabling/disabling a loading indicator (spinner, overlay).$confirm
— asking the user to confirm an action (modal window, dialog).$dialog
— custom modal window, dialog.
vue
<template>
<button @click="$notify({title: 'Success!', message: 'Object saved'})"> </button>
</template>
<script>
import { notify, confirm, loading, modal } from '@opengis/core';
// function example
notify({type: 'success', title: 'Success!', message: 'Changes saved.'});
confirm({title: "Підтвердіть дію", type:'error',
message: "Are you sure you want to delete this item?", })
loading(true);
modal({title: "Діалог 1", template: "This is the default content",});
</script>