@flexem/fc-gui 3.0.0-alpha.140 → 3.0.0-alpha.141

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.
@@ -37165,9 +37165,11 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37165
37165
  this.displayOption.operationButtonMargin = 6;
37166
37166
  }
37167
37167
  }
37168
+ // 初始化时间段数据(此时文本库可能未加载,先填充空文本占位)
37169
+ this.timePeriods = this.getValidTimePeriods();
37168
37170
  this.loadFirstPage();
37169
37171
  this.initKeyboardListener();
37170
- // 订阅语种变化事件
37172
+ // 订阅语种变化事件 和 文本库缓存更新事件
37171
37173
  this.subscribeLanguageChange();
37172
37174
  }
37173
37175
  dispose() {
@@ -37200,12 +37202,25 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37200
37202
  * 订阅语种变化事件
37201
37203
  */
37202
37204
  subscribeLanguageChange() {
37205
+ var _a;
37203
37206
  if (this.guiContext && this.guiContext.languageChanged$) {
37204
37207
  this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
37205
37208
  // 只更新时间段选择器的文案,不重新查询数据
37206
37209
  this.updateLanguageTexts();
37207
37210
  });
37208
37211
  }
37212
+ // 订阅文本库缓存更新事件,解决首次加载时文本库未就绪导致下拉选项为空的问题
37213
+ if ((_a = this.systemTextLibraryService) === null || _a === void 0 ? void 0 : _a.cacheUpdated) {
37214
+ const cacheSubscription = this.systemTextLibraryService.cacheUpdated.subscribe(() => {
37215
+ this.updateLanguageTexts();
37216
+ });
37217
+ if (this.languageChangeSubscription) {
37218
+ this.languageChangeSubscription.add(cacheSubscription);
37219
+ }
37220
+ else {
37221
+ this.languageChangeSubscription = cacheSubscription;
37222
+ }
37223
+ }
37209
37224
  }
37210
37225
  /**
37211
37226
  * 更新语种相关的文案(时间段选择器)