UNPKG

@cristianglezm/vue-chatbot-widget

Version:

[![cd](https://github.com/cristianglezm/vue-chatbot-widget/actions/workflows/cd.yml/badge.svg?branch=master)](https://github.com/cristianglezm/vue-chatbot-widget/actions/workflows/cd.yml) [![pkg](https://github.com/cristianglezm/vue-chatbot-widget/actions

26 lines (25 loc) 528 B
import { defineStore } from 'pinia'; export const useErrorStore = defineStore('ErrorStore', { state: () => ({ errors: [], }), getters:{ getErrors: (state) => { return state.errors; }, getLength : (state) => { return state.errors.length; } }, actions:{ push(error){ this.errors.push(error); }, pop(){ this.errors.pop(); }, clear(){ this.errors = []; }, }, });