From 90fc2bcd2edadb68c98e48faaa3408381bc7262c Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 23 May 2022 16:40:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20single=5Fselect=5Fradio?= =?UTF-8?q?=5Fitem=E5=8D=95=E9=80=89=E6=A1=86once,forceSelected=20?= =?UTF-8?q?=E7=AD=89=E5=B1=9E=E6=80=A7=E6=B2=A1=E8=83=BD=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=88=B0=E9=87=8C=E9=9D=A2=E7=9A=84bi.radio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 导致设置了once,虽然节点不会被取消选中了,但是单独的radio可以被点来点去 两种改法,一种是把BasicButton的属性也都传给bi.radio,另一种就是用事件控制一下 --- src/case/button/item.singleselect.radio.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/case/button/item.singleselect.radio.js b/src/case/button/item.singleselect.radio.js index 1c80c9c14..a7c5fe04b 100644 --- a/src/case/button/item.singleselect.radio.js +++ b/src/case/button/item.singleselect.radio.js @@ -28,6 +28,16 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, { ref: function (_ref) { self.radio = _ref; }, + listeners: [ + { + eventName: BI.Controller.EVENT_CHANGE, + action: function (type) { + if (type === BI.Events.CLICK) { + self.setSelected(self.isSelected()); + } + } + } + ], }] }, { el: {