From 1394352f6cf7547fb7f6422c7e95a44e5ecd0cdd Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Tue, 6 Aug 2024 16:12:31 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E7=82=B9=E6=8E=92=E6=9F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/investigation/task.vue | 4 ++--
uni_modules/uview-ui/components/u-checkbox/props.js | 4 ++++
uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue | 7 +++++--
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue
index f690c89..038974e 100644
--- a/pages/investigation/task.vue
+++ b/pages/investigation/task.vue
@@ -270,7 +270,7 @@
{{ indexData + 1 }}.
{{ itemData.length > 0 ? itemData[0].nname : '' }}
-
@@ -324,7 +324,7 @@
-
diff --git a/uni_modules/uview-ui/components/u-checkbox/props.js b/uni_modules/uview-ui/components/u-checkbox/props.js
index be1d842..7d21f68 100644
--- a/uni_modules/uview-ui/components/u-checkbox/props.js
+++ b/uni_modules/uview-ui/components/u-checkbox/props.js
@@ -4,6 +4,10 @@ export default {
name: {
type: [String, Number, Boolean],
default: uni.$u.props.checkbox.name,
+ },
+ isSel: {
+ type: [Boolean],
+ default:true,
},
// item
obj: {
diff --git a/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue b/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
index b9f3d6b..920903c 100644
--- a/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
+++ b/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
@@ -213,8 +213,11 @@
labelClickHandler(e) {
this.preventEvent(e)
// 如果按钮整体被禁用或者label被禁用,则不允许点击文字修改状态
- if (!this.elLabelDisabled && !this.elDisabled) {
- this.setRadioCheckedStatus()
+ if (!this.elLabelDisabled && !this.elDisabled) {
+ if(this.isSel){
+ this.setRadioCheckedStatus()
+ }
+
this.$emit('click', this.obj)
}
},