@gct-paas/word 0.1.73-patch.12 → 0.1.73-patch.13

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.
Files changed (2) hide show
  1. package/dist/index.es.js +8 -5
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @gct-paas/word v0.1.73-patch.12 */
1
+ /*! @gct-paas/word v0.1.73-patch.13 */
2
2
  import { Fragment, Suspense, Teleport, Transition, TransitionGroup, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, h, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, render, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toRef, toValue, unref, useCssVars, useModel, useSlots, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import FloatingVue, { PopperWrapper } from "floating-vue";
4
4
  import VueKonva from "vue-konva";
@@ -94840,10 +94840,13 @@ async function readApiLabel(strategy, value, fieldBinding, loadFieldByKey) {
94840
94840
  refModelKey: fieldInfo === null || fieldInfo === void 0 ? void 0 : fieldInfo.bindInfo
94841
94841
  };
94842
94842
  try {
94843
- const isSingle = strategy.fetcher === "rdo2ref";
94844
- const idList = isSingle ? [String(value)] : getValue$1(value, true);
94845
- const result = isSingle ? await fetcher.getOptionById(idList[0], params) : await fetcher.getOptionByIds(idList, params);
94846
- const labelByValue = new Map((Array.isArray(result) ? result : result ? [result] : []).filter((item) => (item === null || item === void 0 ? void 0 : item.value) != null && (item === null || item === void 0 ? void 0 : item.label) != null).map((item) => [String(item.value), String(item.label)]));
94843
+ if (strategy.fetcher === "rdo2ref") {
94844
+ const result = await fetcher.getOptionById(String(value), params);
94845
+ return (result === null || result === void 0 ? void 0 : result.label) || strategy.fallback;
94846
+ }
94847
+ const idList = getValue$1(value, true);
94848
+ const list = await fetcher.getOptionByIds(idList, params);
94849
+ const labelByValue = new Map(list.filter((item) => (item === null || item === void 0 ? void 0 : item.value) != null && (item === null || item === void 0 ? void 0 : item.label) != null).map((item) => [String(item.value), String(item.label)]));
94847
94850
  const labels = idList.map((id) => labelByValue.get(String(id))).filter(Boolean);
94848
94851
  if (labels.length) return labels.join(",");
94849
94852
  return strategy.fallback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.73-patch.12",
3
+ "version": "0.1.73-patch.13",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",