From 48b7e03ef4a3bc7e0c5becb923a15340be8cfe30 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 15 七月 2022 16:24:05 +0800 Subject: [PATCH] 2022-07-15 --- src/tabviews/zshare/mutilform/mkCascader/index.jsx | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/src/tabviews/zshare/mutilform/mkCascader/index.jsx b/src/tabviews/zshare/mutilform/mkCascader/index.jsx index 2533b21..34b1713 100644 --- a/src/tabviews/zshare/mutilform/mkCascader/index.jsx +++ b/src/tabviews/zshare/mutilform/mkCascader/index.jsx @@ -21,7 +21,30 @@ } if (config.resourceType === '2') { - options = provinces + options = provinces.map(pro => { + let _pro = { + label: pro[0], + value: pro[0] + } + if (pro[1]) { + _pro.children = pro[1].map(city => { + let _city = { + label: city[0], + value: city[0] + } + if (city[1]) { + _city.children = city[1].map(county => { + return { + label: county, + value: county + } + }) + } + return _city + }) + } + return _pro + }) } else if (options.length > 0) { options = this.getOptionTree(options) } -- Gitblit v1.8.0