打印/下载
使用
案例

Action 动作菜单

import wmAction from '@/components/action'
<wm-action :url="store.action.url" :menus="store.action.menus"></wm-action>
  • url: (String) //需要验证的URL名称,以sys_menus表为准(注意大小写),返回对应的权限动作
  • menus: (String | Array) //追加自定义动作菜单

Action 动作菜单

export default {
  data(){
    return {
      store: this.$store.state,
    }
  },
  computed: {
    // 动作菜单-监听
    actionType(){ return this.$store.state.action.type; }
  },
  watch:{
    // 动作菜单-点击
    actionType(val){
      if(!val) return false;
      console.log(val);
    }
  },
  activated(){
    // 动作菜单-获取
    this.store.action.url = '';
    this.store.action.menus = '';
  },
  mounted(){
  },
  methods:{

  },
}
{{copy}}