@cloudbase/weda-ui 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/configs/actions/showModal.json +21 -0
  2. package/dist/configs/actions/showToast.json +11 -2
  3. package/dist/configs/components/button.json +1 -1
  4. package/dist/configs/components/calendar.json +1 -1
  5. package/dist/configs/components/carousel.json +1 -1
  6. package/dist/configs/components/chart/bar.json +2 -2
  7. package/dist/configs/components/chart/line.json +2 -2
  8. package/dist/configs/components/chart/pie.json +2 -2
  9. package/dist/configs/components/chart/statisticsCard.json +6 -6
  10. package/dist/configs/components/container.json +1 -1
  11. package/dist/configs/components/dataView.json +2 -2
  12. package/dist/configs/components/form/departTreeSelect.json +1 -1
  13. package/dist/configs/components/form/form.json +1 -1
  14. package/dist/configs/components/form/location.json +1 -1
  15. package/dist/configs/components/form/richText.json +1 -1
  16. package/dist/configs/components/form/uploader.json +1 -1
  17. package/dist/configs/components/form/uploaderFile.json +1 -1
  18. package/dist/configs/components/form/userTreeSelect.json +1 -1
  19. package/dist/configs/components/formdetail.json +1 -1
  20. package/dist/configs/components/graphicCard.json +1 -1
  21. package/dist/configs/components/image.json +1 -1
  22. package/dist/configs/components/link.json +1 -1
  23. package/dist/configs/components/listView.json +39 -9
  24. package/dist/configs/components/lottery.json +1 -1
  25. package/dist/configs/components/modal.json +2 -1
  26. package/dist/configs/components/navLayout.json +1 -1
  27. package/dist/configs/components/navigationBar.json +1 -1
  28. package/dist/configs/components/richtextview.json +1 -1
  29. package/dist/configs/components/scrollVeiw.json +93 -72
  30. package/dist/configs/components/swiper.json +1 -1
  31. package/dist/configs/components/tabs.json +1 -1
  32. package/dist/configs/components/text.json +1 -1
  33. package/dist/configs/components/wedaVideo.json +1 -1
  34. package/dist/configs/components/wxOpenApi/phone.json +1 -1
  35. package/dist/configs/components/wxOpenApi/phoneCode.json +1 -1
  36. package/dist/configs/components/wxOpenApi/share.json +9 -8
  37. package/dist/configs/components/wxOpenApi/userInfo.json +3 -3
  38. package/dist/web/components/form/form/index.js +18 -7
  39. package/dist/web/components/form/userOrgSelect/comTool.js +2 -4
  40. package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +3 -4
  41. package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +3 -4
  42. package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.js +4 -6
  43. package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.js +30 -28
  44. package/dist/web/components/listView/interface.d.ts +1 -1
  45. package/package.json +11 -1
@@ -2,95 +2,119 @@
2
2
  "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
3
  "data": {
4
4
  "properties": {
5
- "scrollY": {
6
- "title": "允许纵向滚动",
5
+ "showScrollbar": {
6
+ "title": "滚动条显隐控制",
7
7
  "type": "boolean",
8
8
  "default": true,
9
+ "x-platforms": ["MP"],
10
+ "x-category": "基础属性",
11
+ "x-index": 1,
12
+ "remarks": "控制滚动条是否显示/隐藏"
13
+ },
14
+ "scrollX": {
15
+ "title": "允许横向滚动",
16
+ "type": "boolean",
17
+ "default": false,
9
18
  "x-linkages": [
10
19
  {
11
20
  "type": "value:visible",
12
- "target": "*(scrollTop)",
21
+ "target": "*(scrollLeft)",
13
22
  "condition": "{{ $self.value }}"
14
23
  }
15
24
  ],
16
25
  "x-category": "基础属性",
17
- "remarks": "开启后,将开启纵向滚动条,组件支持上下滚动"
26
+ "x-index": 2,
27
+ "remarks": "开启后,将开启横向滚动条,组件支持左右滚动"
18
28
  },
19
- "scrollX": {
20
- "title": "允许横向滚动",
29
+ "scrollY": {
30
+ "title": "允许纵向滚动",
21
31
  "type": "boolean",
22
- "default": false,
32
+ "default": true,
23
33
  "x-linkages": [
24
34
  {
25
35
  "type": "value:visible",
26
- "target": "*(scrollLeft)",
36
+ "target": "*(scrollTop)",
27
37
  "condition": "{{ $self.value }}"
28
38
  }
29
39
  ],
30
40
  "x-category": "基础属性",
31
- "remarks": "开启后,将开启横向滚动条,组件支持左右滚动"
41
+ "x-index": 3,
42
+ "remarks": "开启后,将开启纵向滚动条,组件支持上下滚动"
32
43
  },
33
- "upperThreshold": {
34
- "title": "距顶部/左边多远时,触发scrolltoupper事件",
35
- "type": "number",
36
- "default": 50,
37
- "x-category": "高级属性"
44
+ "scrollIntoView": {
45
+ "title": "滚到的元素ID",
46
+ "type": "string",
47
+ "x-category": "高级属性",
48
+ "x-index": 4,
49
+ "remarks": "将当前的元素滚动到浏览器窗口的可视区域内"
38
50
  },
39
- "lowerThreshold": {
40
- "title": "距底部/右边多远时,触发scrolltolower事件",
51
+ "scrollLeft": {
52
+ "title": "横向滚动条位置",
41
53
  "type": "number",
42
- "default": 50,
43
- "x-category": "高级属性"
54
+ "x-category": "高级属性",
55
+ "x-index": 5,
56
+ "remarks": "输入默认值,横向滚动条将默认移动到该位置"
44
57
  },
45
58
  "scrollTop": {
46
59
  "title": "竖向滚动条位置",
47
60
  "type": "number",
48
61
  "x-category": "高级属性",
62
+ "x-index": 6,
49
63
  "remarks": "输入默认值,竖向滚动条将默认移动到该位置"
50
64
  },
51
- "scrollLeft": {
52
- "title": "横向滚动条位置",
65
+ "lowerThreshold": {
66
+ "title": "距底部/右边多远时,触发scrolltolower事件",
53
67
  "type": "number",
54
- "x-category": "高级属性",
55
- "remarks": "输入默认值,横向滚动条将默认移动到该位置"
68
+ "default": 50,
69
+ "x-index": 7,
70
+ "x-category": "高级属性"
56
71
  },
57
- "scrollIntoView": {
58
- "title": "滚到的元素ID",
59
- "type": "string",
60
- "x-category": "高级属性",
61
- "remarks": "将当前的元素滚动到浏览器窗口的可视区域内"
72
+ "upperThreshold": {
73
+ "title": "距顶部/左边多远时,触发scrolltoupper事件",
74
+ "type": "number",
75
+ "default": 50,
76
+ "x-index": 8,
77
+ "x-category": "高级属性"
62
78
  },
63
- "scrollWithAnimation": {
64
- "title": "在设置滚动条位置时使用动画过渡",
79
+ "enhanced": {
80
+ "title": "启用 scroll-view 增强特性",
65
81
  "type": "boolean",
66
82
  "default": false,
83
+ "x-linkages": [
84
+ {
85
+ "type": "value:visible",
86
+ "target": "*(bounces,showScrollbar,pagingEnabled,fastDeceleration)",
87
+ "condition": "{{ $self.value }}"
88
+ }
89
+ ],
67
90
  "x-platforms": ["MP"],
68
91
  "x-category": "高级属性",
69
- "remarks": "开启滚动条动画"
92
+ "x-index": 90,
93
+ "remarks": "开启scroll-view增强特性 "
70
94
  },
71
- "enableBackToTop": {
72
- "title": "iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向",
95
+ "bounces": {
96
+ "title": "iOS 下 scroll-view 边界弹性控制",
73
97
  "type": "boolean",
74
- "default": false,
98
+ "default": true,
75
99
  "x-platforms": ["MP"],
76
- "x-category": "高级属性",
77
- "remarks": "开启后当执行对应操作后滚动条将自动返回顶部"
100
+ "x-index": 91,
101
+ "x-category": "高级属性"
78
102
  },
79
- "enableFlex": {
80
- "title": "启用 flexbox 布局",
103
+ "pagingEnabled": {
104
+ "title": "分页滑动效果",
81
105
  "type": "boolean",
82
106
  "default": false,
83
107
  "x-platforms": ["MP"],
84
- "x-category": "高级属性",
85
- "remarks": "开启flexbox布局"
108
+ "x-index": 93,
109
+ "x-category": "高级属性"
86
110
  },
87
- "scrollAnchoring": {
88
- "title": "开启 scroll anchoring 特性",
111
+ "fastDeceleration": {
112
+ "title": "滑动减速速率控制",
89
113
  "type": "boolean",
90
114
  "default": false,
91
115
  "x-platforms": ["MP"],
92
- "x-category": "高级属性",
93
- "remarks": "开启scroll-anchoring特性"
116
+ "x-index": 94,
117
+ "x-category": "高级属性"
94
118
  },
95
119
  "refresherEnabled": {
96
120
  "title": "开启自定义下拉刷新",
@@ -105,12 +129,14 @@
105
129
  ],
106
130
  "x-platforms": ["MP"],
107
131
  "x-category": "高级属性",
132
+ "x-index": 100,
108
133
  "remarks": "开启后可自定义对下拉刷新进行相关配置"
109
134
  },
110
135
  "refresherThreshold": {
111
136
  "title": "设置自定义下拉刷新阈值",
112
137
  "type": "number",
113
138
  "default": 50,
139
+ "x-index": 101,
114
140
  "x-platforms": ["MP"],
115
141
  "x-category": "高级属性"
116
142
  },
@@ -134,6 +160,7 @@
134
160
  }
135
161
  ],
136
162
  "x-platforms": ["MP"],
163
+ "x-index": 102,
137
164
  "x-category": "高级属性"
138
165
  },
139
166
  "refresherBackground": {
@@ -141,6 +168,7 @@
141
168
  "type": "color",
142
169
  "default": "#fff",
143
170
  "x-platforms": ["MP"],
171
+ "x-index": 103,
144
172
  "x-category": "高级属性"
145
173
  },
146
174
  "refresherTriggered": {
@@ -148,51 +176,44 @@
148
176
  "type": "boolean",
149
177
  "default": false,
150
178
  "x-platforms": ["MP"],
179
+ "x-index": 104,
151
180
  "x-category": "高级属性"
152
181
  },
153
- "enhanced": {
154
- "title": "启用 scroll-view 增强特性",
182
+ "scrollAnchoring": {
183
+ "title": "开启 scroll anchoring 特性",
155
184
  "type": "boolean",
156
185
  "default": false,
157
- "x-linkages": [
158
- {
159
- "type": "value:visible",
160
- "target": "*(bounces,showScrollbar,pagingEnabled,fastDeceleration)",
161
- "condition": "{{ $self.value }}"
162
- }
163
- ],
164
186
  "x-platforms": ["MP"],
165
187
  "x-category": "高级属性",
166
- "remarks": "开启scroll-view增强特性 "
167
- },
168
- "bounces": {
169
- "title": "iOS 下 scroll-view 边界弹性控制",
170
- "type": "boolean",
171
- "default": true,
172
- "x-platforms": ["MP"],
173
- "x-category": "高级属性"
188
+ "x-index": 110,
189
+ "remarks": "开启scroll-anchoring特性"
174
190
  },
175
- "showScrollbar": {
176
- "title": "滚动条显隐控制",
191
+ "enableFlex": {
192
+ "title": "启用 flexbox 布局",
177
193
  "type": "boolean",
178
- "default": true,
194
+ "default": false,
179
195
  "x-platforms": ["MP"],
180
- "x-category": "基础属性",
181
- "remarks": "控制滚动条是否显示/隐藏"
196
+ "x-category": "高级属性",
197
+ "x-index": 120,
198
+ "remarks": "开启flexbox布局"
182
199
  },
183
- "pagingEnabled": {
184
- "title": "分页滑动效果",
200
+ "enableBackToTop": {
201
+ "title": "iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向",
185
202
  "type": "boolean",
186
203
  "default": false,
187
204
  "x-platforms": ["MP"],
188
- "x-category": "高级属性"
205
+ "x-category": "高级属性",
206
+ "x-index": 130,
207
+ "remarks": "开启后当执行对应操作后滚动条将自动返回顶部"
189
208
  },
190
- "fastDeceleration": {
191
- "title": "滑动减速速率控制",
209
+ "scrollWithAnimation": {
210
+ "title": "在设置滚动条位置时使用动画过渡",
192
211
  "type": "boolean",
193
212
  "default": false,
194
213
  "x-platforms": ["MP"],
195
- "x-category": "高级属性"
214
+ "x-index": 140,
215
+ "x-category": "高级属性",
216
+ "remarks": "开启滚动条动画"
196
217
  }
197
218
  }
198
219
  },
@@ -243,7 +264,7 @@
243
264
  "description": "当组件元素内容长度大于滚动容器时,滚动容器会出滚动条用来对页面内容进行滑动展示。",
244
265
  "category": "布局容器",
245
266
  "componentOrder": 80,
246
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/ScrollView.svg"
267
+ "icon": "../icons/ScrollView.svg"
247
268
  },
248
269
  "configMeta": {
249
270
  "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/ScrollView",
@@ -89,7 +89,7 @@
89
89
  "description": "用于快速在页面搭建轮播图展示效果,并支持轮播图的跳转、播放配置。",
90
90
  "category": "布局容器",
91
91
  "componentOrder": 80,
92
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Swiper.svg"
92
+ "icon": "../icons/Swiper.svg"
93
93
  },
94
94
  "configMeta": {
95
95
  "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/Swiper"
@@ -114,7 +114,7 @@
114
114
  "title": "选项卡",
115
115
  "description": "用于实现常见的选项卡切换效果。",
116
116
  "category": "展示",
117
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/TabsContainer.svg"
117
+ "icon": "../icons/Tabs.svg"
118
118
  },
119
119
  "configMeta": {
120
120
  "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/Tabs"
@@ -101,7 +101,7 @@
101
101
  "description": "用于展示页面中的文本内容。",
102
102
  "category": "文本",
103
103
  "componentOrder": 100,
104
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Text.svg"
104
+ "icon": "../icons/Text.svg"
105
105
  },
106
106
  "configMeta": {
107
107
  "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/text/Text",
@@ -82,7 +82,7 @@
82
82
  "name": "wedaVideo",
83
83
  "title": "视频播放",
84
84
  "description": "用于视频播放",
85
- "icon": "https://qcloudimg.tencent-cloud.cn/raw/c622c16cc4841ef7e99cfe3c05c76f2f.svg",
85
+ "icon": "../icons/WedaVideo.svg",
86
86
  "category": "多媒体",
87
87
  "visible": ["APP"]
88
88
  }
@@ -102,7 +102,7 @@
102
102
  "meta": {
103
103
  "title": "获取用户手机号",
104
104
  "description": "在小程序运行态对用户的手机号进行获取。",
105
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Phone.svg",
105
+ "icon": "../../icons/Phone.svg",
106
106
  "category": "微信开放能力",
107
107
  "categoryOrder": 100,
108
108
  "componentOrder": 2,
@@ -87,7 +87,7 @@
87
87
  "meta": {
88
88
  "title": "获取用户手机号授权令牌",
89
89
  "description": "获取用户手机号授权令牌组件",
90
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Phone.svg",
90
+ "icon": "../../icons/PhoneCode.svg",
91
91
  "category": "微信开放能力",
92
92
  "categoryOrder": 100,
93
93
  "componentOrder": 2,
@@ -62,18 +62,19 @@
62
62
  "x-index": 3
63
63
  },
64
64
  "title": {
65
- "title": "{{text('分享标题', help('分享(转发)卡片的标题'))}}",
65
+ "title": "分享标题",
66
+ "description": "分享(转发)卡片的标题",
66
67
  "type": "string",
67
68
  "default": "",
68
69
  "x-category": "基础属性",
69
- "description": "",
70
70
  "remarks": "分享(转发)卡片的标题",
71
71
  "x-component": "textarea",
72
72
  "x-platforms": ["MP"],
73
73
  "x-index": 4
74
74
  },
75
75
  "image": {
76
- "title": "{{text('分享图片', help('分享(转发)卡片的图片'))}}",
76
+ "title": "分享图片",
77
+ "description": "分享(转发)卡片的图片",
77
78
  "type": "string",
78
79
  "x-component": "image",
79
80
  "x-rules": [
@@ -84,14 +85,14 @@
84
85
  ],
85
86
  "default": "",
86
87
  "x-platforms": ["MP"],
87
- "description": "",
88
88
  "remarks": "分享(转发)卡片的图片",
89
89
  "x-category": "基础属性",
90
90
  "x-index": 5
91
91
  },
92
92
  "path": {
93
93
  "type": "string",
94
- "title": "{{text('选择页面', help('选择分享(转发)的页面'))}}",
94
+ "title": "选择页面",
95
+ "description": "选择分享(转发)的页面",
95
96
  "default": "",
96
97
  "x-index": 6,
97
98
  "addHidden": true,
@@ -107,7 +108,6 @@
107
108
  "condition": "{{$self.value && $self.value.length>0}}"
108
109
  }
109
110
  ],
110
- "description": "",
111
111
  "x-component": "page-list",
112
112
  "x-component-props": {
113
113
  "hideAddPlatform": ["MP"]
@@ -133,12 +133,13 @@
133
133
  },
134
134
  "params": {
135
135
  "type": "array",
136
- "title": "{{text('参数', help('如果采用绑定数据的方式,数据格式参考如下:[{key: \"paramKey1\", value: \"paramValue1\"}, {key: \"paramKey2\", value: \"paramValue2\"}]'))}}",
136
+ "title": "参数",
137
137
  "x-category": "基础属性",
138
138
  "remarks": "分享(转发)的页面的参数,会自动获取到当前选择页面内存在的页面参数并自动根据页面参数进行展开,当用户通过转发的链接进入小程序时,页面便会按照配置的参数进行渲染。如果采用绑定数据的方式,数据格式参考如下:[{key: 'paramKey1', value: 'paramValue1'}, {key: 'paramKey2', value: 'paramValue2'}]",
139
139
  "pageId": "",
140
140
  "default": [],
141
141
  "x-index": 8,
142
+ "description": "如果采用绑定数据的方式,数据格式参考如下:[{key: \"paramKey1\", value: \"paramValue1\"}, {key: \"paramKey2\", value: \"paramValue2\"}]",
142
143
  "x-component": "page-params"
143
144
  }
144
145
  }
@@ -147,7 +148,7 @@
147
148
  "meta": {
148
149
  "title": "小程序分享",
149
150
  "description": "支持快捷实现小程序分享功能。",
150
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Share.svg",
151
+ "icon": "../../icons/Share.svg",
151
152
  "category": "微信开放能力",
152
153
  "categoryOrder": 100,
153
154
  "componentOrder": 3,
@@ -141,14 +141,14 @@
141
141
  }
142
142
  ],
143
143
  "meta": {
144
- "title": "获取用户信息",
144
+ "title": "获取用户信息(已废弃)",
145
145
  "description": "能够在小程序运行态对用户的微信头像、微信昵称等信息进行获取。",
146
- "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/UserInfo.svg",
146
+ "icon": "../../icons/UserInfo.svg",
147
147
  "category": "微信开放能力",
148
148
  "categoryOrder": 100,
149
149
  "componentOrder": 1,
150
150
  "platform": ["MP"],
151
- "visible": ["APP"],
151
+ "visible": [],
152
152
  "validate": [
153
153
  {
154
154
  "rule": "checkIsUsedPreAvartNickComp",
@@ -6,7 +6,6 @@ import { callDataSource, callConnector } from '../../../utils/tcb';
6
6
  import weui from '../../../utils/weui';
7
7
  import './index.css';
8
8
  import isObjectEqual from '../../../utils/isObjectEqual';
9
- import { usePrevious, useThrottledEffect } from '@react-hookz/web';
10
9
  const formTypeWithInitValue = ['edit', 'read'];
11
10
  /**
12
11
  * 表单容器组件
@@ -22,9 +21,10 @@ export default function Form({ className, contentSlot, style, id, layout, formTy
22
21
  'gsd-h5-react-form-pc': platform === 'pc',
23
22
  [className]: className,
24
23
  });
25
- const preParamGetItem = usePrevious(paramGetItem);
26
- const preDataId = usePrevious(_id);
27
- useThrottledEffect(() => {
24
+ const preParamGetItemRef = React.useRef(null);
25
+ const preDataIdRef = React.useRef(null);
26
+ const timeoutRef = React.useRef(null);
27
+ React.useEffect(() => {
28
28
  const getData = async () => {
29
29
  var _a, _b;
30
30
  try {
@@ -68,11 +68,22 @@ export default function Form({ className, contentSlot, style, id, layout, formTy
68
68
  };
69
69
  if (dataSourceName && formTypeWithInitValue.includes(formType)) {
70
70
  // https://git.woa.com/QBase/lcap/weda-ui/merge_requests/542 对象要小心死循环
71
- if ((isDataModel && _id && !isObjectEqual(preDataId, _id, true)) ||
71
+ if ((isDataModel &&
72
+ _id &&
73
+ !isObjectEqual(preDataIdRef.current, _id, true)) ||
72
74
  (!isDataModel &&
73
75
  paramGetItem &&
74
76
  methodGetItem &&
75
- !isObjectEqual(preParamGetItem, paramGetItem))) {
77
+ !isObjectEqual(preParamGetItemRef.current, paramGetItem))) {
78
+ if (timeoutRef.current !== null) {
79
+ return () => {
80
+ clearTimeout(timeoutRef.current);
81
+ };
82
+ }
83
+ preParamGetItemRef.current = paramGetItem;
84
+ preDataIdRef.current = _id;
85
+ // eslint-disable-next-line rulesdir/no-timer
86
+ timeoutRef.current = setTimeout(getData, 100);
76
87
  getData();
77
88
  }
78
89
  }
@@ -84,7 +95,7 @@ export default function Form({ className, contentSlot, style, id, layout, formTy
84
95
  platform,
85
96
  methodGetItem,
86
97
  paramGetItem,
87
- ], 100);
98
+ ]);
88
99
  // pc 渲染
89
100
  const renderPc = () => {
90
101
  return (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
@@ -7,7 +7,6 @@ export const DimTreeContent = (props) => {
7
7
  //const commonParams = [callWedaApi, showToast, showError];
8
8
  const [loading, setLoading] = useState(false);
9
9
  const [errInfo, setErrInfo] = useState(errorInfo);
10
- const [selectedTreeIds, setSelectTreeIds] = useState(selectedIds);
11
10
  const loadDepartData = async (id) => {
12
11
  const node = getNode(treeData, id, 'id');
13
12
  if (node.children) {
@@ -57,7 +56,6 @@ export const DimTreeContent = (props) => {
57
56
  //@ts-ignore jsx
58
57
  const treeUsers = getUserDepartID(Users);
59
58
  resData = dealOrgData(Orgs).concat(needUser ? dealUserData(treeUsers) : []);
60
- setSelectTreeIds(treeUsers);
61
59
  setTreeData(resData);
62
60
  }
63
61
  }
@@ -67,13 +65,13 @@ export const DimTreeContent = (props) => {
67
65
  }
68
66
  };
69
67
  return (React.createElement(React.Fragment, null,
70
- React.createElement(SearchBox, { onSearch: search, onClear: () => onReset(), onChange: (val) => !val && onReset() }),
68
+ React.createElement(SearchBox, { onSearch: search, onClear: () => onReset(), onChange: (val) => !val && onReset(), "data-testid": "SearchBox" }),
71
69
  React.createElement("div", { className: "tree-search-loading" }, loading && React.createElement(LoadingTip, null)),
72
70
  (errInfo === null || errInfo === void 0 ? void 0 : errInfo.errorStatus) && (React.createElement(ErrorStatus, { size: "l", title: "\u63A5\u53E3\u8C03\u7528\u5931\u8D25", description: (errInfo === null || errInfo === void 0 ? void 0 : errInfo.errorMessage) || null })),
73
71
  !(treeData === null || treeData === void 0 ? void 0 : treeData.length) && !loading && !(errInfo === null || errInfo === void 0 ? void 0 : errInfo.errorStatus) && (React.createElement(Status, { className: "dim-tree-select--blank", icon: 'blank', size: 's', title: `暂无${needUser ? '成员' : '部门'}数据` })),
74
72
  !!(treeData === null || treeData === void 0 ? void 0 : treeData.length) && !loading && !(errInfo === null || errInfo === void 0 ? void 0 : errInfo.errorStatus) && (React.createElement(React.Fragment, null,
75
73
  React.createElement("div", { className: "tree-select-warp" },
76
- React.createElement(Tree, { selectable: false, selectStrictly: true, activable: true, activeIds: activeIds, selectedIds: selectedTreeIds, data: treeData, onLoad: loadDepartData, onActive: onActive, onSelect: onSelect, height: 324, fullExpandable: needUser ? true : false, className: `tree-select ${treeClassName}` })),
74
+ React.createElement(Tree, { selectable: false, selectStrictly: true, activable: true, activeIds: activeIds, selectedIds: selectedIds, data: treeData, onLoad: loadDepartData, onActive: onActive, onSelect: onSelect, height: 324, fullExpandable: needUser ? true : false, className: `tree-select ${treeClassName}` })),
77
75
  React.createElement("div", { className: "dim-tree-footer" },
78
76
  React.createElement(Button, { type: "weak", className: "din-btn din-btn--cancle", onClick: onCancel }, "\u53D6\u6D88"),
79
77
  React.createElement(Button, { type: "primary", className: "din-btn din-btn--primary", onClick: onConfirm }, "\u786E\u5B9A"))))));
@@ -117,16 +117,15 @@ export function DepartTreeSelectH5({ id, className, style, events = emptyObject,
117
117
  //获取组织结构
118
118
  useEffect(() => {
119
119
  initOrgsData();
120
- if ((defaultValue &&
121
- !isObjectEqual(prevDefaultRef.current !== defaultValue)) ||
122
- (confirmValue && !isObjectEqual(prevConfirmRef.current !== confirmValue))) {
120
+ if ((defaultValue && !isObjectEqual(prevDefaultRef.current, defaultValue)) ||
121
+ (confirmValue && !isObjectEqual(prevConfirmRef.current, confirmValue))) {
123
122
  const getdefaultUser = async () => {
124
123
  var _a;
125
124
  try {
126
125
  if ((defaultValueType === 'confirmDepart' &&
127
126
  confirmValue.length !== 0) ||
128
127
  defaultValue.length !== 0) {
129
- const orgId = confirmValue.length !== 0 ? confirmValue : defaultValue;
128
+ const orgId = defaultValue.length !== 0 ? defaultValue : confirmValue;
130
129
  const defaultDepart = await getDepartById({
131
130
  _id: orgId,
132
131
  });
@@ -61,15 +61,14 @@ export function DepartTreeSelectPC({ id, className, style, events = emptyObject,
61
61
  }
62
62
  };
63
63
  initOrgsData();
64
- if ((defaultValue &&
65
- !isObjectEqual(prevDefaultRef.current !== defaultValue)) ||
66
- (confirmValue && !isObjectEqual(prevConfirmRef.current !== confirmValue))) {
64
+ if ((defaultValue && !isObjectEqual(prevDefaultRef.current, defaultValue)) ||
65
+ (confirmValue && !isObjectEqual(prevConfirmRef.current, confirmValue))) {
67
66
  getdefaultUser();
68
67
  prevDefaultRef.current = defaultValue;
69
68
  prevConfirmRef.current = confirmValue;
70
69
  }
71
70
  // eslint-disable-next-line react-hooks/exhaustive-deps
72
- }, [defaultValueType]);
71
+ }, [defaultValueType, confirmValue, defaultValue]);
73
72
  useEffect(() => {
74
73
  if (open) {
75
74
  setErrorInfo({ errorStatus: false, errorMessage: null });
@@ -51,7 +51,7 @@ focus: autoFocus = false, onChange = null, modelOpen = false, request = defaultR
51
51
  try {
52
52
  const sValue = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
53
53
  if (sValue) {
54
- setSearchValue(multiple ? [...searchValue, sValue] : [sValue]);
54
+ setSearchValue([sValue]);
55
55
  const { Users = [] } = await request('SearchByCondition', {
56
56
  KeyWords: sValue.trim(),
57
57
  SearchCondition: {
@@ -103,10 +103,8 @@ focus: autoFocus = false, onChange = null, modelOpen = false, request = defaultR
103
103
  }, [modelOpen]);
104
104
  useEffect(() => {
105
105
  initOrgsData();
106
- if ((defaultValue &&
107
- !isObjectEqual(prevDefaultRef.current !== defaultValue)) ||
108
- (confirmValue &&
109
- !isObjectEqual(prevConfirmRef.current !== confirmValue)) ||
106
+ if ((defaultValue && !isObjectEqual(prevDefaultRef.current, defaultValue)) ||
107
+ (confirmValue && !isObjectEqual(prevConfirmRef.current, confirmValue)) ||
110
108
  defaultValueType === 'loginUser') {
111
109
  getDefaultUser();
112
110
  prevDefaultRef.current = defaultValue;
@@ -135,7 +133,7 @@ focus: autoFocus = false, onChange = null, modelOpen = false, request = defaultR
135
133
  }
136
134
  else if ((defaultValueType === 'confirmUser' && confirmValue.length !== 0) ||
137
135
  defaultValue.length !== 0) {
138
- const userIdList = filterStrList(confirmValue.length !== 0 ? confirmValue : defaultValue);
136
+ const userIdList = filterStrList(defaultValue.length !== 0 ? defaultValue : confirmValue);
139
137
  const userSelectList = await request('getUserById', {
140
138
  idList: userIdList || [],
141
139
  }, 'callDataSource');