<template><div><divclass="hello-world">HelloWorld!</div><buttonclass="button is-primary is-medium"v-on:click="toggle_modal()">OpenModal</button><buttonclass="button is-secondary is-medium"v-on:click="add_message()">AddaMessage</button><b-modal:active.sync="modal_open"><divclass="card"><divclass="card-content">Thisisamodal</div></div></b-modal></div></template><script>importMessageStorefrom'../stores/messages'import{MessageTypes,MessageScopes}from'../stores/messages'exportdefault{name:'hello-world',data(){return{modal_open:false}},methods:{toggle_modal(){this.modal_open=!this.modal_open},add_message(){MessageStore.dispatch('add_message',{scope:MessageScopes.default,message:'This is a Message',type:MessageTypes.info})}}}</script><stylelang="scss">@import'../../css/_base-template';.hello-world{color:$color_app_primary;}</style>
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.