aldehyde 0.2.366 → 0.2.368
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.
- package/lib/layout2/components/user-button.d.ts.map +1 -1
- package/lib/layout2/components/user-button.js +1 -0
- package/lib/layout2/components/user-button.js.map +1 -1
- package/lib/layout4/sider.d.ts.map +1 -1
- package/lib/layout4/sider.js +0 -1
- package/lib/layout4/sider.js.map +1 -1
- package/lib/lowcode-components/bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/bar-chart/index.js +9 -3
- package/lib/lowcode-components/bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/base-map/index.d.ts.map +1 -1
- package/lib/lowcode-components/base-map/index.js +9 -3
- package/lib/lowcode-components/base-map/index.js.map +1 -1
- package/lib/lowcode-components/base-radio/index.js +4 -4
- package/lib/lowcode-components/base-radio/index.js.map +1 -1
- package/lib/lowcode-components/capsule-bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/capsule-bar-chart/index.js +9 -3
- package/lib/lowcode-components/capsule-bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/carousel/index.d.ts.map +1 -1
- package/lib/lowcode-components/carousel/index.js +9 -3
- package/lib/lowcode-components/carousel/index.js.map +1 -1
- package/lib/lowcode-components/circular-progress-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/circular-progress-chart/index.js +9 -3
- package/lib/lowcode-components/circular-progress-chart/index.js.map +1 -1
- package/lib/lowcode-components/column-3d-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/column-3d-chart/index.js +9 -3
- package/lib/lowcode-components/column-3d-chart/index.js.map +1 -1
- package/lib/lowcode-components/column-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/column-chart/index.js +9 -3
- package/lib/lowcode-components/column-chart/index.js.map +1 -1
- package/lib/lowcode-components/data-number/index.d.ts.map +1 -1
- package/lib/lowcode-components/data-number/index.js +9 -3
- package/lib/lowcode-components/data-number/index.js.map +1 -1
- package/lib/lowcode-components/effectScatter-map/index.d.ts.map +1 -1
- package/lib/lowcode-components/effectScatter-map/index.js +9 -3
- package/lib/lowcode-components/effectScatter-map/index.js.map +1 -1
- package/lib/lowcode-components/effectScatter-map-3d/index.d.ts.map +1 -1
- package/lib/lowcode-components/effectScatter-map-3d/index.js +9 -3
- package/lib/lowcode-components/effectScatter-map-3d/index.js.map +1 -1
- package/lib/lowcode-components/gauge-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/gauge-chart/index.js +9 -3
- package/lib/lowcode-components/gauge-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.js +9 -3
- package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-chart/index.js +9 -3
- package/lib/lowcode-components/line-chart/index.js.map +1 -1
- package/lib/lowcode-components/liquid-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/liquid-chart/index.js +9 -3
- package/lib/lowcode-components/liquid-chart/index.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/component-container.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/component-controller.d.ts.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/component-controller.js +7 -2
- package/lib/lowcode-components/lowcode-view/component/component-controller.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/index.js +1 -1
- package/lib/lowcode-components/lowcode-view/index.js.map +1 -1
- package/lib/lowcode-components/pie-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/pie-chart/index.js +9 -3
- package/lib/lowcode-components/pie-chart/index.js.map +1 -1
- package/lib/lowcode-components/progress-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/progress-chart/index.js +9 -3
- package/lib/lowcode-components/progress-chart/index.js.map +1 -1
- package/lib/lowcode-components/stroke-animation/index.d.ts.map +1 -1
- package/lib/lowcode-components/stroke-animation/index.js +9 -3
- package/lib/lowcode-components/stroke-animation/index.js.map +1 -1
- package/lib/lowcode-components/text-scroller/index.d.ts.map +1 -1
- package/lib/lowcode-components/text-scroller/index.js +9 -3
- package/lib/lowcode-components/text-scroller/index.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +3 -1
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/units/index.d.ts +1 -0
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +3 -0
- package/lib/units/index.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/layout2/components/user-button.tsx +1 -0
- package/src/aldehyde/layout4/sider.tsx +0 -1
- package/src/aldehyde/lowcode-components/bar-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/base-map/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/base-radio/index.tsx +4 -4
- package/src/aldehyde/lowcode-components/capsule-bar-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/carousel/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/circular-progress-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/column-3d-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/column-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/data-number/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/effectScatter-map/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/effectScatter-map-3d/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/gauge-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/line-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/liquid-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/lowcode-view/component/component-container.tsx +1 -1
- package/src/aldehyde/lowcode-components/lowcode-view/component/component-controller.ts +5 -0
- package/src/aldehyde/lowcode-components/lowcode-view/index.tsx +1 -1
- package/src/aldehyde/lowcode-components/pie-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/progress-chart/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/stroke-animation/index.tsx +8 -3
- package/src/aldehyde/lowcode-components/text-scroller/index.tsx +8 -3
- package/src/aldehyde/routable/ltmpl-route.tsx +11 -10
- package/src/aldehyde/units/index.tsx +3 -0
|
@@ -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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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].
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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}>
|
|
@@ -387,16 +387,17 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
387
387
|
</Drawer>
|
|
388
388
|
) : null}
|
|
389
389
|
{showViewDrawer && selectedCode ? (
|
|
390
|
-
<
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
390
|
+
toCustomPage && ltmplConfig.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showViewModal} customPath={ltmplConfig.customViewPagePath} onCancel={this.doClose} />
|
|
391
|
+
:
|
|
392
|
+
<DtmplViewDrawer
|
|
393
|
+
serverKey={null} placement={ltmplConfig?.buttonViewConfig?.windowPosition}
|
|
394
|
+
width={windowWidth}
|
|
395
|
+
height={windowHeight}
|
|
396
|
+
onClose={this.doClose}
|
|
397
|
+
open={showViewDrawer}
|
|
398
|
+
sourceId={viewSourceId ? viewSourceId : sourceId}
|
|
399
|
+
code={selectedCode}
|
|
400
|
+
/>
|
|
400
401
|
) : null}
|
|
401
402
|
{showViewModal && selectedCode ? (
|
|
402
403
|
toCustomPage && ltmplConfig.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showViewModal} customPath={ltmplConfig.customViewPagePath} onCancel={this.doClose} />
|