<van-tabs type="card" animated swipeable sticky color:red   v-model="detail.postname">
              <van-tab v-for="(item,index) in tabs" :title="item.title"  :key="item.name" :name="item.name"  >
                <img :src="item.content" />
              </van-tab>

           </van-tabs>

  

 tabs: [
        {    name: '生产岗',    title: '生产岗',    content: '../../static/img/role_scg.png'
        },
        {    name: '营销岗',    title: '营销岗',    content: '../../static/img/role_yxg.png'
        },
        {    name: '服务岗',    title: '服务岗',    content: '../../static/img/role_fwg.png'
        },
        {    name: '研发岗',    title: '研发岗',    content: '../../static/img/role_yfg.png'
        },
        {    name: '管理岗',    title: '管理岗',    content: '../../static/img/role_glg.png'
        },
      ],

 查找了很多,后来发现很简单,设置了

v-model就可以设置默认选项

相关文章:

  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-06
  • 2021-12-23
  • 2021-09-10
  • 2021-09-10
  • 2022-12-23
  • 2021-07-20
相关资源
相似解决方案