如何重置分段按钮的活动状态

时间:2018-11-02 16:27:05

标签: onsen-ui monaca

点击清除按钮后,如何重设细分按钮的活动状态?

<v-ons-segment ref="tabSegment" tabbar-id="tabbar" :index.sync="segmentIndex"  >
 <button  v-for="category in categories" >{{ category }}</button>
</v-ons-segment>

<button @click="clear()"></button>


data() {
  return {
     categories: [Germany, Austria, France],
     segmentIndex: 0,
  }
},
methods{ clear( ){  this.segmentIndex = null  }
}

0 个答案:

没有答案