<view class="container" style="flex-direction:{{vertical?'column':'row'}}" bindtap='onCheckedChanged'> <slot></slot> </view> <xradiogroup vertical="{{false}}"> <view class="radio checked" data-id="{{0}}">A</view> <view class="radio uncheck" data-id="{{1}}">B</view> <view class="radio uncheck" data-id="{{2}}">C</view> </xradiogroup> methods: { onCheckedChanged:function(e){ console.log(e); var select = e.target.dataset.id; console.log('selected ->' + select); } }