index.vue 578 Bytes
Newer Older
geqilin's avatar
geqilin committed
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
<template>
  <d2-container type="card">
    <template slot="header">
      当前状态 {{active ? '开启过渡动画' : '关闭过渡动画'}}
    </template>
    <el-button type="primary" @click="set(!active)">
      {{active ? '关闭页面过渡动画' : '打开页面过渡动画'}}
    </el-button>
  </d2-container>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
  computed: {
    ...mapState('d2admin/transition', [
      'active'
    ])
  },
  methods: {
    ...mapActions('d2admin/transition', [
      'set'
    ])
  }
}
</script>