@blocklet/pages-kit 0.6.76 → 0.6.78
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.
|
@@ -229,8 +229,8 @@ const customComponentStates = () => {
|
|
|
229
229
|
if (!instance)
|
|
230
230
|
return null;
|
|
231
231
|
const props = instance.locales?.[locale]?.props;
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
// 为了修复频繁触发 /preload 的问题,这里注释掉了如果找不到 props 就返回 null 的逻辑,这个逻辑现在应该是没用的 2025-09-26
|
|
233
|
+
// if (!props) return null;
|
|
234
234
|
return { component, Component, props, componentProperties: components[componentId]?.component.properties };
|
|
235
235
|
},
|
|
236
236
|
async loadComponents(input) {
|
|
@@ -318,7 +318,7 @@ const COMPONENT_LOADER_MAP = {};
|
|
|
318
318
|
const getRealLocale = (locale) => {
|
|
319
319
|
const requestLocale = (0, exports.customComponentStates)()((s) => s.state.config.supportedLocales?.some((i) => i.locale === locale) ? locale : undefined);
|
|
320
320
|
const defaultLocale = (0, exports.customComponentStates)()((s) => s.state.config.defaultLocale);
|
|
321
|
-
return requestLocale || defaultLocale;
|
|
321
|
+
return requestLocale || defaultLocale || 'en';
|
|
322
322
|
};
|
|
323
323
|
const getComponentByComponentId = ({ componentId, locale, instanceId, }) => {
|
|
324
324
|
const realLocale = getRealLocale(locale);
|