zhaoxiaohai 3 年之前
父節點
當前提交
c0cf6f8920
共有 2 個文件被更改,包括 12 次插入2 次删除
  1. 9 0
      components/My_Checkbox/index.js
  2. 3 2
      pages/annunciate/newAndChange.js

+ 9 - 0
components/My_Checkbox/index.js

@@ -213,6 +213,15 @@ Component({
             const {
                 value
             } = e.detail;
+            if (value == 0) {
+                let dataList = this.data.dataList;
+                for (let i = 0; i < dataList.length; i++) {
+                    dataList[i].checked = true;
+                }
+                this.setData({
+                    dataList
+                })
+            };
             this.setData({
                 isAll: value,
                 manual: value

+ 3 - 2
pages/annunciate/newAndChange.js

@@ -288,9 +288,10 @@ Page({
     radioChange({
         detail
     }) {
-        console.log(detail)
+        let ftype = (detail.length!=0) ? detail : this.data.ftype;
+        console.log(ftype)
         this.setData({
-            ftype: detail,
+            ftype,
             popups: false,
             'errTips.ftype': false
         })