From 4241db39e3c74680280375562a5bea77ea59b908 Mon Sep 17 00:00:00 2001 From: v_szheshi Date: Fri, 18 Oct 2024 16:54:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=AC=AC=E4=B8=80=E5=B1=82?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=80=89=E6=8B=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/src/components/cascader/td_multi_cascader.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tdesign-component/lib/src/components/cascader/td_multi_cascader.dart b/tdesign-component/lib/src/components/cascader/td_multi_cascader.dart index f793f95ae..c81b01b7d 100644 --- a/tdesign-component/lib/src/components/cascader/td_multi_cascader.dart +++ b/tdesign-component/lib/src/components/cascader/td_multi_cascader.dart @@ -353,7 +353,7 @@ class _TDMultiCascaderState extends State with TickerProviderSt return GestureDetector( onTap: () { int level = 0; - if (_tabListData.length > 2 && _currentTabIndex == 0) { + if (item.level ==0 && _currentTabIndex == 0) { _tabListData.clear(); _tabListData.add(MultiCascaderListModel( label: '选择选项', @@ -439,7 +439,7 @@ class _TDMultiCascaderState extends State with TickerProviderSt void _getChildrenListData(int level, String value) { //查询层级数据 - var selectLevelData = _listData.where((element) => element.level == (level)).toList(); + var selectLevelData = _listData.where((element) => element.level == (level)&&element.parentValue==value).toList(); //判断下级是否存在 if (selectLevelData.isNotEmpty) { //获取下级数据