@blocklet/pages-kit 0.4.69 → 0.4.70
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.
|
@@ -281,7 +281,14 @@ function useComponent({ instanceId, componentId, properties, locale, dev }) {
|
|
|
281
281
|
const property = componentProperties?.[key]?.data;
|
|
282
282
|
if (!property)
|
|
283
283
|
return undefined;
|
|
284
|
-
|
|
284
|
+
// keep preload props
|
|
285
|
+
let v = (0, property_1.parsePropertyValue)(property, value, { locale, defaultLocale: dev?.defaultLocale });
|
|
286
|
+
if (property.type === 'component' && property.key && preload?.props?.[property.key]) {
|
|
287
|
+
v = {
|
|
288
|
+
...(preload?.props?.[property.key] ?? {}),
|
|
289
|
+
...v,
|
|
290
|
+
};
|
|
291
|
+
}
|
|
285
292
|
// if key is undefined, use id
|
|
286
293
|
return [property.key || property.id, v];
|
|
287
294
|
})
|