matrix_components 2.0.336 → 2.0.338
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,
|
|
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";
|
|
@@ -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(
|
|
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(
|
|
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 =
|
|
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(
|
|
76927
|
+
_url.value = path.startsWith(getImageBaseUrl()) ? path : getImageBaseUrl() + path;
|
|
76923
76928
|
}
|
|
76924
76929
|
}
|
|
76925
76930
|
} else {
|
|
@@ -76939,9 +76944,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76939
76944
|
}
|
|
76940
76945
|
async function getFilePathByIds(id) {
|
|
76941
76946
|
if (props.apiUrl.method === "get") {
|
|
76942
|
-
return await get(props.apiUrl.url, { ...props.apiUrl.params, [props.apiUrl.
|
|
76947
|
+
return await get(props.apiUrl.url, { ...props.apiUrl.params, [props.apiUrl.paramkey]: id });
|
|
76943
76948
|
} else if (props.apiUrl.method === "post") {
|
|
76944
|
-
return await post(props.apiUrl.url, { ...props.apiUrl.params, [props.apiUrl.
|
|
76949
|
+
return await post(props.apiUrl.url, { ...props.apiUrl.params, [props.apiUrl.paramkey]: id });
|
|
76945
76950
|
}
|
|
76946
76951
|
}
|
|
76947
76952
|
return (_ctx, _cache) => {
|
|
@@ -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-
|
|
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
|
};
|