TeachingNote

uni-app获取单选按钮的值

电脑版发表于:2022/1/20 20:20

页面:

<radio-group @change="radioChange" name="radio" style="margin-top: 5px;">
	<view class="uni-flex uni-row">
		<view class="flex-item-ispass">
			<radio value="1" /><text>通过</text>
		</view>
		<view class="flex-item-ispass">
			<radio value="2" /><text>失败</text>
		</view>
		<view class="flex-item-ispass">
			<radio value="0" /><text>待审</text>
		</view>
		<view class="flex-item-ispass">
			<radio value="-1" /><text>所有</text>
		</view>
	</view>
</radio-group>

js:

radioChange(evt) {
	alert(evt.detail.value);
},


关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢