matrix_components 2.0.337 → 2.0.339

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.
@@ -1,5 +1,5 @@
1
1
  var _a2;
2
- import { defineComponent, createElementBlock, openBlock, createElementVNode, reactive, withDirectives, normalizeStyle, Fragment, renderList, toDisplayString, vShow, nextTick, useCssVars, ref as ref$1, unref, inject, watch, onMounted, normalizeClass, renderSlot, createCommentVNode, createBlock, isRef, onUnmounted, onBeforeUnmount, resolveDirective, resolveComponent, createVNode, withCtx, resolveDynamicComponent, createTextVNode, useSlots, provide, computed, Teleport, defineAsyncComponent, createSlots, mergeProps, toHandlers, createApp, render, useAttrs, watchEffect, shallowRef, createStaticVNode, vModelText, Transition, withModifiers, getCurrentInstance, h as h$2, onUpdated } from "vue";
2
+ import { defineComponent, createElementBlock, openBlock, createElementVNode, reactive, withDirectives, normalizeStyle, Fragment, renderList, toDisplayString, vShow, nextTick, useCssVars, ref as ref$1, unref, inject, watch, onMounted, normalizeClass, renderSlot, createCommentVNode, createBlock, isRef, onUnmounted, onBeforeUnmount, resolveDirective, resolveComponent, createVNode, withCtx, resolveDynamicComponent, createTextVNode, useSlots, provide, computed, Teleport, defineAsyncComponent, createSlots, mergeProps, toHandlers, createApp, render, useAttrs, watchEffect, shallowRef, createStaticVNode, vModelText, Transition, getCurrentInstance, withModifiers, h as h$2, onUpdated } from "vue";
3
3
  import { ElMessage, ElImage, ElImageViewer } from "element-plus";
4
4
  import VuePdfApp from "vue3-pdf-app";
5
5
  import axios from "axios";
@@ -76535,7 +76535,7 @@ function createAxiosInstance(customConfig = {}, errorCallback) {
76535
76535
  * @returns {AxiosRequestConfig} 返回处理后的请求配置对象
76536
76536
  */
76537
76537
  (config) => {
76538
- var _a3, _b, _c2, _d;
76538
+ var _a3, _b, _c2, _d, _e, _f;
76539
76539
  try {
76540
76540
  const requestId = `${Date.now()}_${parseInt(Math.random() * 9999999 + "")}`;
76541
76541
  config.requestId = requestId;
@@ -76550,8 +76550,8 @@ function createAxiosInstance(customConfig = {}, errorCallback) {
76550
76550
  } catch (error) {
76551
76551
  console.error("请求的ID生成失败:", error);
76552
76552
  }
76553
- const tokenName = ((_b = (_a3 = app$1 == null ? void 0 : app$1.config) == null ? void 0 : _a3.globalProperties) == null ? void 0 : _b.$TonkenKey) || localStorage.getItem("TonkenKey") || localStorage.getItem("tonkenKey") || sessionStorage.getItem("TonkenKey") || sessionStorage.getItem("tonkenKey") || globalThis.TonkenKey || globalThis.tonkenKey || "satoken";
76554
- const tokenValue = ((_d = (_c2 = app$1 == null ? void 0 : app$1.config) == null ? void 0 : _c2.globalProperties) == null ? void 0 : _d.$TonkenValue) || localStorage.getItem(tokenName) || sessionStorage.getItem(tokenName) || localStorage.getItem("TonkenValue") || sessionStorage.getItem("TonkenValue") || localStorage.getItem("tonkenValue") || sessionStorage.getItem("tonkenValue") || globalThis.TonkenValue || globalThis.tonkenValue || "";
76553
+ const tokenName = ((_b = (_a3 = app$1 == null ? void 0 : app$1.config) == null ? void 0 : _a3.globalProperties) == null ? void 0 : _b.$TokenName) || ((_d = (_c2 = app$1 == null ? void 0 : app$1.config) == null ? void 0 : _c2.globalProperties) == null ? void 0 : _d.$TonkenKey) || localStorage.getItem("TokenName") || localStorage.getItem("tokenName") || sessionStorage.getItem("TokenName") || sessionStorage.getItem("tokenName") || globalThis.TokenName || globalThis.tokenName || localStorage.getItem("TonkenKey") || localStorage.getItem("tonkenKey") || sessionStorage.getItem("TonkenKey") || sessionStorage.getItem("tonkenKey") || globalThis.TonkenKey || globalThis.tonkenKey || "satoken";
76554
+ const tokenValue = ((_f = (_e = app$1 == null ? void 0 : app$1.config) == null ? void 0 : _e.globalProperties) == null ? void 0 : _f.$TonkenValue) || localStorage.getItem(tokenName) || sessionStorage.getItem(tokenName) || localStorage.getItem("TonkenValue") || sessionStorage.getItem("TonkenValue") || localStorage.getItem("tonkenValue") || sessionStorage.getItem("tonkenValue") || globalThis.TonkenValue || globalThis.tonkenValue || "";
76555
76555
  if (tokenValue) {
76556
76556
  config.headers[tokenName] = tokenValue;
76557
76557
  }
@@ -76882,8 +76882,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76882
76882
  }
76883
76883
  },
76884
76884
  setup(__props) {
76885
+ const instance = getCurrentInstance();
76885
76886
  const props = __props;
76886
76887
  const showPreview = ref$1(false);
76888
+ function getImageBaseUrl() {
76889
+ var _a3, _b, _c2, _d;
76890
+ return ((_d = (_c2 = (_b = (_a3 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a3.app) == null ? void 0 : _b.config) == null ? void 0 : _c2.globalProperties) == null ? void 0 : _d.$ImageBaseUrl) || getBaseUrl();
76891
+ }
76887
76892
  const _url = ref$1("");
76888
76893
  watch(
76889
76894
  [() => props.src, () => props.url],
@@ -76891,7 +76896,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76891
76896
  var _a3, _b;
76892
76897
  const nv = new1 || new2;
76893
76898
  if (nv) {
76894
- if (nv.startsWith(getBaseUrl())) {
76899
+ if (nv.startsWith(getImageBaseUrl())) {
76895
76900
  let _tmp = nv.split("/");
76896
76901
  _tmp = _tmp[_tmp.length - 1];
76897
76902
  if (isNotNull(_tmp)) {
@@ -76901,7 +76906,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76901
76906
  const res = await getFilePathByIds(_tmp) || "";
76902
76907
  if ((res == null ? void 0 : res.length) && ((_a3 = res[0]) == null ? void 0 : _a3.filePath)) {
76903
76908
  const path = res[0].filePath;
76904
- _url.value = path.startsWith(getBaseUrl()) ? path : getBaseUrl() + path;
76909
+ _url.value = path.startsWith(getImageBaseUrl()) ? path : getImageBaseUrl() + path;
76905
76910
  }
76906
76911
  }
76907
76912
  } else {
@@ -76914,12 +76919,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76914
76919
  _tmp = _tmp[_tmp.length - 1];
76915
76920
  if (isNotNull(_tmp)) {
76916
76921
  if (_tmp.indexOf(".") !== -1) {
76917
- _url.value = getBaseUrl() + _tmp;
76922
+ _url.value = getImageBaseUrl() + _tmp;
76918
76923
  } else {
76919
76924
  const res = await getFilePathByIds(_tmp) || "";
76920
76925
  if ((res == null ? void 0 : res.length) && ((_b = res[0]) == null ? void 0 : _b.filePath)) {
76921
76926
  const path = res[0].filePath;
76922
- _url.value = path.startsWith(getBaseUrl()) ? path : getBaseUrl() + path;
76927
+ _url.value = path.startsWith(getImageBaseUrl()) ? path : getImageBaseUrl() + path;
76923
76928
  }
76924
76929
  }
76925
76930
  } else {
@@ -76985,7 +76990,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76985
76990
  };
76986
76991
  }
76987
76992
  });
76988
- const NsImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fa46ea98"]]);
76993
+ const NsImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-639a6f70"]]);
76989
76994
  NsImage.install = (app2) => {
76990
76995
  app2.component(NsImage.name, NsImage);
76991
76996
  };