<template>
|
<div>
|
<h4 class="font-weight-bold py-3 mb-4">首页</h4>
|
<p>This page is an example of basic layout. For more options use
|
<strong>Vue starter template generator</strong> in the docs.</p>
|
<p>
|
<button class="btn btn-primary btn-lg" @click="test" >Button</button>
|
<button class="btn" @click="toast">toast</button>
|
<button class="btn btn-primary" @click="showSuc">notification</button>
|
<Button @click="openNewWindowtab('http://localhost:8091/#/workSignIn/workSignInManagement')">Button</Button>
|
|
<fButton authority="1231">123123</fButton>
|
<b-btn>123123</b-btn>
|
</p>
|
</div>
|
</template>
|
|
<!-- Custom template animation -->
|
|
<script>
|
import { Button } from 'element-ui'
|
import {mapActions, mapGetters} from 'vuex'
|
export default {
|
name: 'home',
|
metaInfo: {
|
title: 'Home'
|
},
|
data() {
|
return { loading: true }
|
},
|
computed: {
|
...mapGetters(['basicUserInfo'])
|
},
|
methods: {
|
...mapActions(['openNewWindowtab']),
|
test() {
|
console.log(this.$store)
|
this.$store.commit('HANDLE_LOADING_OPEN')
|
// alert(213)
|
// this.$sweetalert('错误!')
|
// console.log(this.$notify)
|
// this.$notifications('123')
|
// this.$toasted.show('hello billo', {theme:'primary',duration: 1000})
|
// this.$toast({message: '123', type: 'success'})
|
},
|
toast() {
|
this.$toast({
|
type: 'success',
|
message: 'success!'
|
})
|
},
|
showSuc() {
|
console.log(this.$notify)
|
this.$notify({
|
group: 'foo',
|
type: 'warn',
|
title: 'fff',
|
text: 'fddd'
|
})
|
}
|
},
|
created() {
|
console.log(this.$store.getters, '获取基础信息', this.$store.getters)
|
},
|
components: {
|
Button
|
}
|
}
|
</script>
|