@blocklet/pages-kit 0.4.68 → 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.
@@ -248,7 +248,14 @@ export function useComponent({ instanceId, componentId, properties, locale, dev
248
248
  const property = componentProperties?.[key]?.data;
249
249
  if (!property)
250
250
  return undefined;
251
- const v = parsePropertyValue(property, value, { locale, defaultLocale: dev?.defaultLocale });
251
+ // keep preload props
252
+ let v = parsePropertyValue(property, value, { locale, defaultLocale: dev?.defaultLocale });
253
+ if (property.type === 'component' && property.key && preload?.props?.[property.key]) {
254
+ v = {
255
+ ...(preload?.props?.[property.key] ?? {}),
256
+ ...v,
257
+ };
258
+ }
252
259
  // if key is undefined, use id
253
260
  return [property.key || property.id, v];
254
261
  })