liuxiaolong
2019-05-06 acc45d2ece02563964d7b8a22ff0c40bd8358889
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<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>