vue 点击切换变色 tab 改变class 跳转链接

vue 点击切换变色 tab 改变class


1.
 
{{item.name}}

2.
  data(){
      return {
        footlist: [
          {
            name: '首页',
            path: '/msite',
            svg: '#icon-shouye2'
          },
          {
            name: '个人中心',
            path: '/profile',
            svg: '#icon-user'
          }

        ],
        activeIndex: 0,

      }
    },

 methods: {
      gotoAddress(path, index){
        this.$router.push(path);
        this.activeIndex = index
      }
    },
3.
  .active div {
    color: #FFBC00;
  }

  .active svg use {
    fill: #FFBC00;
  }

你可能感兴趣的:(webpack,vue,svg)