aldehyde 0.2.366 → 0.2.367

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 (85) hide show
  1. package/lib/lowcode-components/bar-chart/index.d.ts.map +1 -1
  2. package/lib/lowcode-components/bar-chart/index.js +9 -3
  3. package/lib/lowcode-components/bar-chart/index.js.map +1 -1
  4. package/lib/lowcode-components/base-map/index.d.ts.map +1 -1
  5. package/lib/lowcode-components/base-map/index.js +9 -3
  6. package/lib/lowcode-components/base-map/index.js.map +1 -1
  7. package/lib/lowcode-components/base-radio/index.js +4 -4
  8. package/lib/lowcode-components/base-radio/index.js.map +1 -1
  9. package/lib/lowcode-components/capsule-bar-chart/index.d.ts.map +1 -1
  10. package/lib/lowcode-components/capsule-bar-chart/index.js +9 -3
  11. package/lib/lowcode-components/capsule-bar-chart/index.js.map +1 -1
  12. package/lib/lowcode-components/carousel/index.d.ts.map +1 -1
  13. package/lib/lowcode-components/carousel/index.js +9 -3
  14. package/lib/lowcode-components/carousel/index.js.map +1 -1
  15. package/lib/lowcode-components/circular-progress-chart/index.d.ts.map +1 -1
  16. package/lib/lowcode-components/circular-progress-chart/index.js +9 -3
  17. package/lib/lowcode-components/circular-progress-chart/index.js.map +1 -1
  18. package/lib/lowcode-components/column-3d-chart/index.d.ts.map +1 -1
  19. package/lib/lowcode-components/column-3d-chart/index.js +9 -3
  20. package/lib/lowcode-components/column-3d-chart/index.js.map +1 -1
  21. package/lib/lowcode-components/column-chart/index.d.ts.map +1 -1
  22. package/lib/lowcode-components/column-chart/index.js +9 -3
  23. package/lib/lowcode-components/column-chart/index.js.map +1 -1
  24. package/lib/lowcode-components/data-number/index.d.ts.map +1 -1
  25. package/lib/lowcode-components/data-number/index.js +9 -3
  26. package/lib/lowcode-components/data-number/index.js.map +1 -1
  27. package/lib/lowcode-components/effectScatter-map/index.d.ts.map +1 -1
  28. package/lib/lowcode-components/effectScatter-map/index.js +9 -3
  29. package/lib/lowcode-components/effectScatter-map/index.js.map +1 -1
  30. package/lib/lowcode-components/effectScatter-map-3d/index.d.ts.map +1 -1
  31. package/lib/lowcode-components/effectScatter-map-3d/index.js +9 -3
  32. package/lib/lowcode-components/effectScatter-map-3d/index.js.map +1 -1
  33. package/lib/lowcode-components/gauge-chart/index.d.ts.map +1 -1
  34. package/lib/lowcode-components/gauge-chart/index.js +9 -3
  35. package/lib/lowcode-components/gauge-chart/index.js.map +1 -1
  36. package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
  37. package/lib/lowcode-components/line-bar-chart/index.js +9 -3
  38. package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
  39. package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
  40. package/lib/lowcode-components/line-chart/index.js +9 -3
  41. package/lib/lowcode-components/line-chart/index.js.map +1 -1
  42. package/lib/lowcode-components/liquid-chart/index.d.ts.map +1 -1
  43. package/lib/lowcode-components/liquid-chart/index.js +9 -3
  44. package/lib/lowcode-components/liquid-chart/index.js.map +1 -1
  45. package/lib/lowcode-components/lowcode-view/component/component-container.js.map +1 -1
  46. package/lib/lowcode-components/lowcode-view/component/component-controller.d.ts.map +1 -1
  47. package/lib/lowcode-components/lowcode-view/component/component-controller.js +7 -2
  48. package/lib/lowcode-components/lowcode-view/component/component-controller.js.map +1 -1
  49. package/lib/lowcode-components/lowcode-view/index.js +1 -1
  50. package/lib/lowcode-components/lowcode-view/index.js.map +1 -1
  51. package/lib/lowcode-components/pie-chart/index.d.ts.map +1 -1
  52. package/lib/lowcode-components/pie-chart/index.js +9 -3
  53. package/lib/lowcode-components/pie-chart/index.js.map +1 -1
  54. package/lib/lowcode-components/progress-chart/index.d.ts.map +1 -1
  55. package/lib/lowcode-components/progress-chart/index.js +9 -3
  56. package/lib/lowcode-components/progress-chart/index.js.map +1 -1
  57. package/lib/lowcode-components/stroke-animation/index.d.ts.map +1 -1
  58. package/lib/lowcode-components/stroke-animation/index.js +9 -3
  59. package/lib/lowcode-components/stroke-animation/index.js.map +1 -1
  60. package/lib/lowcode-components/text-scroller/index.d.ts.map +1 -1
  61. package/lib/lowcode-components/text-scroller/index.js +9 -3
  62. package/lib/lowcode-components/text-scroller/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/src/aldehyde/lowcode-components/bar-chart/index.tsx +8 -3
  65. package/src/aldehyde/lowcode-components/base-map/index.tsx +8 -3
  66. package/src/aldehyde/lowcode-components/base-radio/index.tsx +4 -4
  67. package/src/aldehyde/lowcode-components/capsule-bar-chart/index.tsx +8 -3
  68. package/src/aldehyde/lowcode-components/carousel/index.tsx +8 -3
  69. package/src/aldehyde/lowcode-components/circular-progress-chart/index.tsx +8 -3
  70. package/src/aldehyde/lowcode-components/column-3d-chart/index.tsx +8 -3
  71. package/src/aldehyde/lowcode-components/column-chart/index.tsx +8 -3
  72. package/src/aldehyde/lowcode-components/data-number/index.tsx +8 -3
  73. package/src/aldehyde/lowcode-components/effectScatter-map/index.tsx +8 -3
  74. package/src/aldehyde/lowcode-components/effectScatter-map-3d/index.tsx +8 -3
  75. package/src/aldehyde/lowcode-components/gauge-chart/index.tsx +8 -3
  76. package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +8 -3
  77. package/src/aldehyde/lowcode-components/line-chart/index.tsx +8 -3
  78. package/src/aldehyde/lowcode-components/liquid-chart/index.tsx +8 -3
  79. package/src/aldehyde/lowcode-components/lowcode-view/component/component-container.tsx +1 -1
  80. package/src/aldehyde/lowcode-components/lowcode-view/component/component-controller.ts +5 -0
  81. package/src/aldehyde/lowcode-components/lowcode-view/index.tsx +1 -1
  82. package/src/aldehyde/lowcode-components/pie-chart/index.tsx +8 -3
  83. package/src/aldehyde/lowcode-components/progress-chart/index.tsx +8 -3
  84. package/src/aldehyde/lowcode-components/stroke-animation/index.tsx +8 -3
  85. package/src/aldehyde/lowcode-components/text-scroller/index.tsx +8 -3
@@ -181,7 +181,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
181
181
  * 1、编辑态不请求数据
182
182
  */
183
183
  useEffect(() => {
184
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
184
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
185
185
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
186
186
  initSearchParams && getInitData(initSearchParams);
187
187
  } else {
@@ -195,9 +195,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
195
195
  // 搜索参数变化时重新请求数据
196
196
  useEffect(() => {
197
197
  if (searchParams) {
198
- getInitData({ ...(initSearchParams || {}), ...searchParams });
198
+ const params = { ...(initSearchParams || {}), ...searchParams };
199
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
200
+ initSearchParams && getInitData(params);
201
+ } else {
202
+ getInitData(params);
203
+ }
199
204
  }
200
- }, [searchParams]);
205
+ }, [searchParams, initSearchParams]);
201
206
 
202
207
  const renderChart = () => {
203
208
  const { grid, barMaxWidth, legend, tooltip, color, xAxis, yAxis, } = config
@@ -167,7 +167,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
167
167
  * 1、编辑态不请求数据
168
168
  */
169
169
  useEffect(() => {
170
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
170
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
171
171
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
172
172
  initSearchParams && getInitData(initSearchParams);
173
173
  } else {
@@ -182,9 +182,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
182
182
  // 搜索参数变化时重新请求数据
183
183
  useEffect(() => {
184
184
  if (searchParams) {
185
- getInitData({ ...(initSearchParams || {}), ...searchParams });
185
+ const params = { ...(initSearchParams || {}), ...searchParams };
186
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
187
+ initSearchParams && getInitData(params);
188
+ } else {
189
+ getInitData(params);
190
+ }
186
191
  }
187
- }, [searchParams]);
192
+ }, [searchParams, initSearchParams]);
188
193
 
189
194
  // 自定义弹窗渲染
190
195
  const customizeTooltipConfig = (config) => {
@@ -14,11 +14,11 @@ const handleTimes = (type: string) => {
14
14
  temTime = dayjs().subtract(1, "day");
15
15
  return `${temTime.startOf("day").format(format)}~${temTime.endOf("day").format(format)}`;
16
16
  case "last7days":
17
- temTime = dayjs().subtract(7, "day");
18
- return `${temTime.startOf("day").format(format)}~${temTime.endOf("day").format(format)}`;
17
+ temTime = dayjs().subtract(6, "day");
18
+ return `${temTime.startOf("day").format(format)}~${dayjs().endOf("day").format(format)}`;
19
19
  case "last30days":
20
- temTime = dayjs().subtract(30, "day");
21
- return `${temTime.startOf("day").format(format)}~${temTime.endOf("day").format(format)}`;
20
+ temTime = dayjs().subtract(29, "day");
21
+ return `${temTime.startOf("day").format(format)}~${dayjs().endOf("day").format(format)}`;
22
22
  case "thisMonth":
23
23
  return `${dayjs().startOf("month").format(format)}~${dayjs().endOf("day").format(format)}`;
24
24
  case "lastMonth":
@@ -199,7 +199,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
199
199
  * 1、编辑态不请求数据
200
200
  */
201
201
  useEffect(() => {
202
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
202
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
203
203
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
204
204
  initSearchParams && getInitData(initSearchParams);
205
205
  } else {
@@ -213,9 +213,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
213
213
  // 搜索参数变化时重新请求数据
214
214
  useEffect(() => {
215
215
  if (searchParams) {
216
- getInitData({ ...(initSearchParams || {}), ...searchParams });
216
+ const params = { ...(initSearchParams || {}), ...searchParams };
217
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
218
+ initSearchParams && getInitData(params);
219
+ } else {
220
+ getInitData(params);
221
+ }
217
222
  }
218
- }, [searchParams]);
223
+ }, [searchParams, initSearchParams]);
219
224
 
220
225
  const renderChart = () => {
221
226
  const { grid, barMaxWidth, legend, tooltip, color, xAxis, yAxis, label } = config
@@ -142,7 +142,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
142
142
  * 1、编辑态不请求数据
143
143
  */
144
144
  useEffect(() => {
145
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
145
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
146
146
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
147
147
  initSearchParams && getInitData(initSearchParams);
148
148
  } else {
@@ -156,9 +156,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
156
156
  // 搜索参数变化时重新请求数据
157
157
  useEffect(() => {
158
158
  if (searchParams) {
159
- getInitData({ ...(initSearchParams || {}), ...searchParams });
159
+ const params = { ...(initSearchParams || {}), ...searchParams };
160
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
161
+ initSearchParams && getInitData(params);
162
+ } else {
163
+ getInitData(params);
164
+ }
160
165
  }
161
- }, [searchParams]);
166
+ }, [searchParams, initSearchParams]);
162
167
 
163
168
  return <Carousel adaptiveHeight={true} {...config} autoplaySpeed={(config.autoplaySpeed || 3) * 1000}>
164
169
  {data.length && data.map((r, index) => <div key={index}> <Image style={{ width: size.width, height: size.height }} src={r} preview={isDesignMode ? false : config.preview} /></div>)}
@@ -189,7 +189,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
189
189
  * 1、编辑态不请求数据
190
190
  */
191
191
  useEffect(() => {
192
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
192
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
193
193
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
194
194
  initSearchParams && getInitData(initSearchParams);
195
195
  } else {
@@ -203,9 +203,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
203
203
  // 搜索参数变化时重新请求数据
204
204
  useEffect(() => {
205
205
  if (searchParams) {
206
- getInitData({ ...(initSearchParams || {}), ...searchParams });
206
+ const params = { ...(initSearchParams || {}), ...searchParams };
207
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
208
+ initSearchParams && getInitData(params);
209
+ } else {
210
+ getInitData(params);
211
+ }
207
212
  }
208
- }, [searchParams]);
213
+ }, [searchParams, initSearchParams]);
209
214
 
210
215
  const renderChart = () => {
211
216
  const { title, color, backgroundColor, barWidth } = config;
@@ -238,7 +238,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
238
238
  * 1、编辑态不请求数据
239
239
  */
240
240
  useEffect(() => {
241
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
241
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
242
242
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
243
243
  initSearchParams && getInitData(initSearchParams);
244
244
  } else {
@@ -252,9 +252,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
252
252
  // 搜索参数变化时重新请求数据
253
253
  useEffect(() => {
254
254
  if (searchParams) {
255
- getInitData({ ...(initSearchParams || {}), ...searchParams });
255
+ const params = { ...(initSearchParams || {}), ...searchParams };
256
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
257
+ initSearchParams && getInitData(params);
258
+ } else {
259
+ getInitData(params);
260
+ }
256
261
  }
257
- }, [searchParams]);
262
+ }, [searchParams, initSearchParams]);
258
263
 
259
264
  const renderChart = () => {
260
265
  const { grid, barWidth, legend, tooltip, color, xAxis, yAxis, isBackground } = config;
@@ -203,7 +203,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
203
203
  * 1、编辑态不请求数据
204
204
  */
205
205
  useEffect(() => {
206
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit) {
206
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
207
207
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
208
208
  initSearchParams && getInitData(initSearchParams);
209
209
  } else {
@@ -217,9 +217,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
217
217
  // 搜索参数变化时重新请求数据
218
218
  useEffect(() => {
219
219
  if (searchParams) {
220
- getInitData({ ...(initSearchParams || {}), ...searchParams });
220
+ const params = { ...(initSearchParams || {}), ...searchParams };
221
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
222
+ initSearchParams && getInitData(params);
223
+ } else {
224
+ getInitData(params);
225
+ }
221
226
  }
222
- }, [searchParams]);
227
+ }, [searchParams, initSearchParams]);
223
228
 
224
229
  const renderChart = () => {
225
230
  const { grid, barMaxWidth, legend, tooltip, color, xAxis, yAxis, } = config
@@ -159,7 +159,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
159
159
  * 1、编辑态不请求数据
160
160
  */
161
161
  useEffect(() => {
162
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
162
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
163
163
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
164
164
  initSearchParams && getInitData(initSearchParams);
165
165
  } else {
@@ -171,9 +171,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
171
171
  // 搜索参数变化时重新请求数据
172
172
  useEffect(() => {
173
173
  if (searchParams) {
174
- getInitData({ ...(initSearchParams || {}), ...searchParams });
174
+ const params = { ...(initSearchParams || {}), ...searchParams };
175
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
176
+ initSearchParams && getInitData(params);
177
+ } else {
178
+ getInitData(params);
179
+ }
175
180
  }
176
- }, [searchParams]);
181
+ }, [searchParams, initSearchParams]);
177
182
 
178
183
  const value = useMemo(() => {
179
184
  if (enume?.length > 0) { // 枚举
@@ -193,7 +193,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
193
193
  * 1、编辑态不请求数据
194
194
  */
195
195
  useEffect(() => {
196
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
196
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
197
197
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
198
198
  initSearchParams && getInitData(initSearchParams);
199
199
  } else {
@@ -207,9 +207,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
207
207
  // 搜索参数变化时重新请求数据
208
208
  useEffect(() => {
209
209
  if (searchParams) {
210
- getInitData({ ...(initSearchParams || {}), ...searchParams });
210
+ const params = { ...(initSearchParams || {}), ...searchParams };
211
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
212
+ initSearchParams && getInitData(params);
213
+ } else {
214
+ getInitData(params);
215
+ }
211
216
  }
212
- }, [searchParams]);
217
+ }, [searchParams, initSearchParams]);
213
218
 
214
219
  // 自定义弹窗渲染
215
220
  const customizeTooltipConfig = (config) => {
@@ -289,7 +289,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
289
289
  * 1、编辑态不请求数据
290
290
  */
291
291
  useEffect(() => {
292
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
292
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
293
293
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
294
294
  initSearchParams && getInitData(initSearchParams);
295
295
  } else {
@@ -303,9 +303,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
303
303
  // 搜索参数变化时重新请求数据
304
304
  useEffect(() => {
305
305
  if (searchParams) {
306
- getInitData({ ...(initSearchParams || {}), ...searchParams });
306
+ const params = { ...(initSearchParams || {}), ...searchParams };
307
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
308
+ initSearchParams && getInitData(params);
309
+ } else {
310
+ getInitData(params);
311
+ }
307
312
  }
308
- }, [searchParams]);
313
+ }, [searchParams, initSearchParams]);
309
314
 
310
315
  // 自定义弹窗渲染
311
316
  const customizeTooltipConfig = (config) => {
@@ -150,7 +150,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
150
150
  * 1、编辑态不请求数据
151
151
  */
152
152
  useEffect(() => {
153
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
153
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
154
154
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
155
155
  initSearchParams && getInitData(initSearchParams);
156
156
  } else {
@@ -164,9 +164,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
164
164
  // 搜索参数变化时重新请求数据
165
165
  useEffect(() => {
166
166
  if (searchParams) {
167
- getInitData({ ...(initSearchParams || {}), ...searchParams });
167
+ const params = { ...(initSearchParams || {}), ...searchParams };
168
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
169
+ initSearchParams && getInitData(params);
170
+ } else {
171
+ getInitData(params);
172
+ }
168
173
  }
169
- }, [searchParams]);
174
+ }, [searchParams, initSearchParams]);
170
175
 
171
176
  const renderChart = () => {
172
177
  const { tooltip, radius, startAngle, endAngle, min, max, axisLine, splitLine, axisTick, axisLabel, detail, progress, center } = config;
@@ -193,7 +193,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
193
193
  * 1、编辑态不请求数据
194
194
  */
195
195
  useEffect(() => {
196
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
196
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
197
197
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
198
198
  initSearchParams && getInitData(initSearchParams);
199
199
  } else {
@@ -207,9 +207,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
207
207
  // 搜索参数变化时重新请求数据
208
208
  useEffect(() => {
209
209
  if (searchParams) {
210
- getInitData({ ...(initSearchParams || {}), ...searchParams });
210
+ const params = { ...(initSearchParams || {}), ...searchParams };
211
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
212
+ initSearchParams && getInitData(params);
213
+ } else {
214
+ getInitData(params);
215
+ }
211
216
  }
212
- }, [searchParams]);
217
+ }, [searchParams, initSearchParams]);
213
218
 
214
219
  const renderChart = () => {
215
220
  const { grid, legend, tooltip, color, xAxis, yAxis, smooth, lineStyle, step, isArea, isGradient, areaStyle, barMaxWidth, symbol } = config;
@@ -187,7 +187,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
187
187
  * 1、编辑态不请求数据
188
188
  */
189
189
  useEffect(() => {
190
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
190
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
191
191
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
192
192
  initSearchParams && getInitData(initSearchParams);
193
193
  } else {
@@ -201,9 +201,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
201
201
  // 搜索参数变化时重新请求数据
202
202
  useEffect(() => {
203
203
  if (searchParams) {
204
- getInitData({ ...(initSearchParams || {}), ...searchParams });
204
+ const params = { ...(initSearchParams || {}), ...searchParams };
205
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
206
+ initSearchParams && getInitData(params);
207
+ } else {
208
+ getInitData(params);
209
+ }
205
210
  }
206
- }, [searchParams]);
211
+ }, [searchParams, initSearchParams]);
207
212
 
208
213
  const renderChart = () => {
209
214
  const { grid, legend, tooltip, color, xAxis, yAxis, smooth, lineStyle, step, isArea, isGradient, areaStyle, symbol: { itemStyle, ...symbol } } = config;
@@ -166,7 +166,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
166
166
  * 1、编辑态不请求数据
167
167
  */
168
168
  useEffect(() => {
169
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
169
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
170
170
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
171
171
  initSearchParams && getInitData(initSearchParams);
172
172
  } else {
@@ -180,9 +180,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
180
180
  // 搜索参数变化时重新请求数据
181
181
  useEffect(() => {
182
182
  if (searchParams) {
183
- getInitData({ ...(initSearchParams || {}), ...searchParams });
183
+ const params = { ...(initSearchParams || {}), ...searchParams };
184
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
185
+ initSearchParams && getInitData(params);
186
+ } else {
187
+ getInitData(params);
188
+ }
184
189
  }
185
- }, [searchParams]);
190
+ }, [searchParams, initSearchParams]);
186
191
 
187
192
  const renderChart = () => {
188
193
  const { tooltip, radius, center, shape, amplitude, dataNum, color, backgroundStyle, label } = config;
@@ -47,7 +47,7 @@ const ComponentContainer = memo((props: ComponentContainerProps) => {
47
47
  */
48
48
  //todo 此处逻辑应该使用设计模式优化,而非写死
49
49
  registerProxy(layer.id!, Controller);
50
- setCompController(val => ({ ...val, [layer.id]: Controller }))
50
+ setCompController(val => ({ ...val, [layer.id]: Controller }));
51
51
  Controller.create(ref.current!, { ...config, navigate, setSearchParams }).then(() => {
52
52
  //设置组件滤镜效果(todo 考虑是否应该在此处设置?)
53
53
  Controller.updateFilter(Controller.getConfig()?.filter);
@@ -103,6 +103,11 @@ export class ComponentController extends AbstractDesignerController {
103
103
  this.instance?.updateConfig(this.config);
104
104
  return;
105
105
  }
106
+ if (data?.type === "initSearchParams") { // 外部传参,组件参数更新
107
+ this.config.initSearchParams = data?.initSearchParams;
108
+ this.instance?.updateConfig(this.config);
109
+ return;
110
+ }
106
111
  // 默认组件静态数据更新
107
112
  this.config.data.staticData = data;
108
113
  this.instance?.updateConfig(this.config);
@@ -94,7 +94,7 @@ const LowcodeView = (props: Props) => {
94
94
  const dataSourceConfigs = Object.keys(elemConfigs || {}).reduce((total, next) => {
95
95
  const { data: item = {}, base } = elemConfigs[next] || {};
96
96
  if ((item.isInitParams || base.type === "PlaceholderComponent") && controllers[next]) {
97
- controllers[next].instance.updateConfig({ ...elemConfigs[next], initSearchParams });
97
+ controllers[next].changeData({ ...elemConfigs[next], initSearchParams, type: "initSearchParams" });
98
98
  }
99
99
  if (item.sourceType === "sourceId" && item.sourceId && item.isInit) {
100
100
  total.push({ sourceId: item.sourceId, chartCode: next, ...(item.isInitParams ? initSearchParams : {}) });
@@ -223,7 +223,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
223
223
  * 1、编辑态不请求数据
224
224
  */
225
225
  useEffect(() => {
226
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
226
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
227
227
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
228
228
  initSearchParams && getInitData(initSearchParams);
229
229
  } else {
@@ -237,9 +237,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
237
237
  // 搜索参数变化时重新请求数据
238
238
  useEffect(() => {
239
239
  if (searchParams) {
240
- getInitData({ ...(initSearchParams || {}), ...searchParams });
240
+ const params = { ...(initSearchParams || {}), ...searchParams };
241
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
242
+ initSearchParams && getInitData(params);
243
+ } else {
244
+ getInitData(params);
245
+ }
241
246
  }
242
- }, [searchParams]);
247
+ }, [searchParams, initSearchParams]);
243
248
 
244
249
  const legendFormatter = ({ name, formatter }) => {
245
250
  if (!formatter || formatter === "a") {
@@ -197,7 +197,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
197
197
  * 1、编辑态不请求数据
198
198
  */
199
199
  useEffect(() => {
200
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
200
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
201
201
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
202
202
  initSearchParams && getInitData(initSearchParams);
203
203
  } else {
@@ -211,9 +211,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
211
211
  // 搜索参数变化时重新请求数据
212
212
  useEffect(() => {
213
213
  if (searchParams) {
214
- getInitData({ ...(initSearchParams || {}), ...searchParams });
214
+ const params = { ...(initSearchParams || {}), ...searchParams };
215
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
216
+ initSearchParams && getInitData(params);
217
+ } else {
218
+ getInitData(params);
219
+ }
215
220
  }
216
- }, [searchParams]);
221
+ }, [searchParams, initSearchParams]);
217
222
 
218
223
  const renderChart = () => {
219
224
  const { title, max, background, barWidth, label, color } = config;
@@ -119,7 +119,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
119
119
  * 1、编辑态不请求数据
120
120
  */
121
121
  useEffect(() => {
122
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
122
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
123
123
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
124
124
  initSearchParams && getInitData(initSearchParams);
125
125
  } else {
@@ -133,9 +133,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
133
133
  // 搜索参数变化时重新请求数据
134
134
  useEffect(() => {
135
135
  if (searchParams) {
136
- getInitData({ ...(initSearchParams || {}), ...searchParams });
136
+ const params = { ...(initSearchParams || {}), ...searchParams };
137
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
138
+ initSearchParams && getInitData(params);
139
+ } else {
140
+ getInitData(params);
141
+ }
137
142
  }
138
- }, [searchParams]);
143
+ }, [searchParams, initSearchParams]);
139
144
 
140
145
  const renderChart = () => {
141
146
  const { fontSize, fontWeight, color, lineWidth, duration = 3, loop, fontFamily } = config;
@@ -127,7 +127,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
127
127
  * 1、编辑态不请求数据
128
128
  */
129
129
  useEffect(() => {
130
- if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest == false) {
130
+ if (!isDesignMode && dataConfig?.sourceType === 'sourceId' && dataConfig?.sourceId && !dataConfig?.isInit && dataConfig?.isDefRequest !== false) {
131
131
  if (dataConfig?.isInitParams) { // 组件数据源接收外部参数
132
132
  initSearchParams && getInitData(initSearchParams);
133
133
  } else {
@@ -141,9 +141,14 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
141
141
  // 搜索参数变化时重新请求数据
142
142
  useEffect(() => {
143
143
  if (searchParams) {
144
- getInitData({ ...(initSearchParams || {}), ...searchParams });
144
+ const params = { ...(initSearchParams || {}), ...searchParams };
145
+ if (dataConfig?.isInitParams) { // 数据源接收外部参数,则参数存在再请求
146
+ initSearchParams && getInitData(params);
147
+ } else {
148
+ getInitData(params);
149
+ }
145
150
  }
146
- }, [searchParams]);
151
+ }, [searchParams, initSearchParams]);
147
152
 
148
153
  return (
149
154
  <div className="text-scroller-container" ref={textContainerRef}>