ss-component-new 1.1.509 → 1.1.511
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.
- package/dist/{array-BTjyzwbz.js → array-6rfRfZoy.js} +1 -1
- package/dist/{array-T-glopHk.cjs → array-BKzrrmWD.cjs} +2 -2
- package/dist/{index-BqlWuQ7F.cjs → index-3GfpOmBm.cjs} +1 -1
- package/dist/index-9keTbNci.js +1490 -0
- package/dist/{index-BPe56KwL.js → index-B72kja43.js} +12 -13
- package/dist/{index-B3sFb3ED.js → index-BBFJJ4tl.js} +5 -5
- package/dist/index-BBQKck4p.cjs +1 -0
- package/dist/index-BBQrfTQg.cjs +1 -0
- package/dist/index-BDmXVjP1.cjs +1 -0
- package/dist/{index-BC6o_HwA.js → index-BPQ17KYZ.js} +1 -1
- package/dist/{index-OUNz_X1-.js → index-BSC7EQfO.js} +15 -15
- package/dist/{index-B6WyqdEq.js → index-BY-71neG.js} +27 -28
- package/dist/{index-pWCRQCtH.cjs → index-BdCeB39f.cjs} +1 -1
- package/dist/{index-0Aj-6Pfy.cjs → index-Bk9CevKt.cjs} +3 -3
- package/dist/{index-WupiV34P.js → index-Bsluws3x.js} +1 -1
- package/dist/{index-D-3H8d48.js → index-Btfqm3Aj.js} +16 -17
- package/dist/index-Bw7fhgWa.js +186 -0
- package/dist/{index-BrZj-udo.js → index-Bz3SW9qv.js} +6 -6
- package/dist/{index--d0-FcKi.js → index-C-RVIq7e.js} +3 -3
- package/dist/{index-BcRfxlOl.cjs → index-C3G2rcyE.cjs} +1 -1
- package/dist/{index-18OPgy7M.js → index-C3Lo66u2.js} +4 -4
- package/dist/index-C8zdykvt.cjs +1 -0
- package/dist/{index-D9fT9K4k.js → index-COMGfNcR.js} +3 -3
- package/dist/index-CRSpuXYg.cjs +1 -0
- package/dist/index-CT9N59g0.cjs +1 -0
- package/dist/{index-cyR-UE9m.cjs → index-CbWlMlxi.cjs} +1 -1
- package/dist/{index-DXv077SA.cjs → index-Cd0szVvZ.cjs} +1 -1
- package/dist/{index-C17_NPz0.cjs → index-Ci1hpo3R.cjs} +1 -1
- package/dist/{index-JqG9oXli.js → index-CmUqS1hN.js} +1 -1
- package/dist/{index-MDG-_61i.js → index-CqmGUncB.js} +3 -3
- package/dist/index-D42emtHS.cjs +1 -0
- package/dist/{index-qlszF_bh.js → index-D5AYFKTM.js} +2 -2
- package/dist/{index-B-3rJW5B.cjs → index-D8QyJVl9.cjs} +1 -1
- package/dist/{index-Dx6aORao.cjs → index-D9ZIJbHw.cjs} +12 -12
- package/dist/{index-DpBfp4fC.js → index-DF8AKNJv.js} +16 -17
- package/dist/index-DGHLPooK.js +457 -0
- package/dist/{index-BeUJWi0x.js → index-DLfWd1qr.js} +5 -5
- package/dist/index-DQxqAo5T.cjs +1 -0
- package/dist/index-DRXd1T3-.cjs +1 -0
- package/dist/{index-TnYimoKI.cjs → index-DgsMW7lK.cjs} +1 -1
- package/dist/{index-B35jXtRb.js → index-DnGhhxPP.js} +5 -5
- package/dist/{index-pxmLD5OC.cjs → index-Dw520ieR.cjs} +1 -1
- package/dist/{index-uN3j6KsS.cjs → index-Dy4AlOOz.cjs} +1 -1
- package/dist/{index-DNQe9fKA.js → index-DzjXzyVN.js} +1 -1
- package/dist/{index-OYYGU2YE.js → index-LCDlyiVS.js} +4 -4
- package/dist/index-NJKX8un9.js +3995 -0
- package/dist/{index-DYRVEBa9.js → index-NkBocgtR.js} +111 -112
- package/dist/{index-55yBsyRr.cjs → index-Oixs__9V.cjs} +1 -1
- package/dist/{index-Dh39r6dj.cjs → index-XKC9uwi7.cjs} +1 -1
- package/dist/{index-DtUmPH3r.cjs → index-YT4yRM1k.cjs} +1 -1
- package/dist/{index-CRkYxnL4.cjs → index-lZj2FVM-.cjs} +1 -1
- package/dist/{index-DwMyURBu.js → index-t25R8oz_.js} +9 -9
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dzi9C_6v.js → index.vue_vue_type_script_setup_true_lang-D0IUrek5.js} +40 -40
- package/dist/{index.vue_vue_type_script_setup_true_lang-CGZnYRAf.cjs → index.vue_vue_type_script_setup_true_lang-DWwRe3NO.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0GZj6SDy.js} +9343 -9713
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BruAa-uD.cjs} +86 -86
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-9V0_8cmZ.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang--3mE_B9B.js} +15 -15
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B-GFoPJ9.cjs → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B2bfU2M4.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BFaKxxEb.cjs +56 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BSG1ySNA.js → index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BZQSdupd.js} +9759 -9781
- package/dist/{login-CW3Tv6wk.cjs → login-BHMBhU8d.cjs} +1 -1
- package/dist/{login-Bb_Ovfvl.js → login-CROQ1_RU.js} +4 -4
- package/dist/{main-DeaRuNYD.js → main-1yb7Pay5.js} +7 -8
- package/dist/main-DkeO8sGR.cjs +1 -0
- package/dist/{menu-jWcM5fkr.js → menu-BPLW-L8U.js} +3946 -3581
- package/dist/menu-CQ3_ZXwC.cjs +21 -0
- package/dist/menuIndex-BJdEj1Et.cjs +1 -0
- package/dist/menuIndex-BsKyxgvr.js +60 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-AKBKLvxK.js → threeModel-CFiMikXU.js} +322 -321
- package/dist/{threeModel-CEMnXOw2.cjs → threeModel-Cz-eN53p.cjs} +1 -1
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-BOOCIUn8.js → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-DZ9BnDSy.js} +2 -2
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-C1EygWi0.cjs → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-MfXPrK37.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index--3QjFI9W.cjs +0 -1
- package/dist/index-BkKYXjJ0.cjs +0 -1
- package/dist/index-Bpt6Hcq2.cjs +0 -1
- package/dist/index-CI__ZdC-.cjs +0 -1
- package/dist/index-CPfseYEB.cjs +0 -1
- package/dist/index-CZN1K7bK.js +0 -408
- package/dist/index-Cdxp_a8K.js +0 -185
- package/dist/index-CxS1YyFs.cjs +0 -1
- package/dist/index-DXIV-OAV.cjs +0 -1
- package/dist/index-DY4cro4C.js +0 -3995
- package/dist/index-DtsLJPQK.js +0 -1493
- package/dist/index-jVYlDMIh.cjs +0 -1
- package/dist/index-qHbYDYso.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-Cek8Ghpc.cjs +0 -56
- package/dist/main-BrbcMu5X.cjs +0 -1
- package/dist/menu-BXTfsfTB.cjs +0 -21
- package/dist/menuIndex-BWim3TlH.js +0 -33
- package/dist/menuIndex-Cg6xI-jR.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BruAa-uD.cjs");require("./menu-CQ3_ZXwC.cjs");const n=require("./index-CT9N59g0.cjs"),r=require("./index-DgsMW7lK.cjs"),a=require("./index-C8zdykvt.cjs"),i=e.defineComponent({__name:"index",setup(u){const t=e.reactive({...r.State});return e.onMounted(async()=>{t.structureId=await a.getActivePageStructureId()}),(c,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(n.ssTable,{itemData:t.pageData,onChange:t.handleItemDataChange},null,8,["itemData","onChange"])]))}});exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./menu-
|
|
1
|
+
"use strict";const a=require("./menu-CQ3_ZXwC.cjs"),h=require("./login-BHMBhU8d.cjs"),x=require("vue"),q=a.useMenuState(a.pinia),v=h.useLoginState(a.pinia),D=x.ref(!1),E=x.ref(!1),w=async()=>{const I=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),K=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});return await Promise.all([I,K]).then(s=>{var r,u,o,n,i,l,c,g,y,d,S,f,m,p;const t=s==null?void 0:s[0],e=s==null?void 0:s[1];if(t.data.code===200){const M=(c=(l=(i=(n=(o=(u=(r=t==null?void 0:t.data)==null?void 0:r.result)==null?void 0:u[0])==null?void 0:o.value)==null?void 0:n.pageData)==null?void 0:i.compData)==null?void 0:l[0])==null?void 0:c.contents;q.setRawMenus(M??[]),D.value=((g=t==null?void 0:t.data)==null?void 0:g.result)&&((d=(y=t==null?void 0:t.data)==null?void 0:y.result)==null?void 0:d.length)>0}else a.ElMessage.error("获取模型菜单响应失败");e.data.code===200?e.data.result&&((S=e.data.result)==null?void 0:S.length)>0&&(v.setStructureData(e.data.result),v.setIsStructureExist(!0),E.value=((f=e==null?void 0:e.data)==null?void 0:f.result)&&((p=(m=e==null?void 0:e.data)==null?void 0:m.result)==null?void 0:p.length)>0):a.ElMessage.error("获取模型结构响应失败")}),{menuExist:D.value,structureExist:E.value}};exports.verifyStructureDataToStore=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./menu-
|
|
1
|
+
"use strict";const o=require("./menu-CQ3_ZXwC.cjs");function a(t){const e=sessionStorage.getItem("loginToken")??"123456";return o.service({url:"/api/sysFile/uploadAvatar",method:"post",data:t,headers:{Authorization:e,"Content-Type":"multipart/form-data"}})}function i(t){const e=sessionStorage.getItem("loginToken")??"123456";return o.service({url:"/api/sysFile/downloadFile",method:"post",data:t,headers:{Authorization:e,Accept:"application/octet-stream"},responseType:"blob"})}exports.downloadAvatarApi=i;exports.uploadAvatarApi=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-DWwRe3NO.cjs");exports.default=e._sfc_main;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { onMounted as s, resolveComponent as f, createElementBlock as C, openBlock as h, createVNode as B } from "vue";
|
|
2
|
-
import "./index-
|
|
3
|
-
import "./menu-
|
|
4
|
-
import "./array-
|
|
2
|
+
import "./index-NJKX8un9.js";
|
|
3
|
+
import "./menu-BPLW-L8U.js";
|
|
4
|
+
import "./array-6rfRfZoy.js";
|
|
5
5
|
import { _ as v } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import "./index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang
|
|
7
|
-
import "./index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-
|
|
8
|
-
import "./login-
|
|
6
|
+
import "./index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang--3mE_B9B.js";
|
|
7
|
+
import "./index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BZQSdupd.js";
|
|
8
|
+
import "./login-CROQ1_RU.js";
|
|
9
9
|
import "./index-BHtNKL1L.js";
|
|
10
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
11
|
-
import "./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-
|
|
10
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0GZj6SDy.js";
|
|
11
|
+
import "./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-DZ9BnDSy.js";
|
|
12
12
|
import "vue-router";
|
|
13
|
-
import "./index-
|
|
13
|
+
import "./index-9keTbNci.js";
|
|
14
14
|
const _ = {
|
|
15
15
|
__name: "index",
|
|
16
16
|
props: {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as R, ref as b, reactive as A, resolveComponent as m, createElementBlock as k, openBlock as B, createVNode as u, withCtx as d, createElementVNode as l, createTextVNode as w, toDisplayString as T, nextTick as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
6
|
-
class
|
|
1
|
+
import { defineComponent as R, ref as b, reactive as A, resolveComponent as m, createElementBlock as k, openBlock as B, createVNode as u, withCtx as d, createElementVNode as l, createTextVNode as w, toDisplayString as T, nextTick as $, Fragment as q, withDirectives as N, renderSlot as V, vShow as z } from "vue";
|
|
2
|
+
import { C as H } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0GZj6SDy.js";
|
|
3
|
+
import { $ as M, al as X, af as J, U, V as c, aM as S, ac as g } from "./menu-BPLW-L8U.js";
|
|
4
|
+
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const K = "ElUpload";
|
|
6
|
+
class Q extends Error {
|
|
7
7
|
constructor(t, a, n, p) {
|
|
8
8
|
super(t), this.name = "UploadAjaxError", this.status = a, this.method = n, this.url = p;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
function I(r, t, a) {
|
|
12
12
|
let n;
|
|
13
|
-
return a.response ? n = `${a.response.error || a.response}` : a.responseText ? n = `${a.responseText}` : n = `fail to ${t.method} ${r} ${a.status}`, new
|
|
13
|
+
return a.response ? n = `${a.response.error || a.response}` : a.responseText ? n = `${a.responseText}` : n = `fail to ${t.method} ${r} ${a.status}`, new Q(n, a.status, t.method, r);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function W(r) {
|
|
16
16
|
const t = r.responseText || r.response;
|
|
17
17
|
if (!t)
|
|
18
18
|
return t;
|
|
@@ -22,8 +22,8 @@ function K(r) {
|
|
|
22
22
|
return t;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
typeof XMLHttpRequest > "u" && M(
|
|
25
|
+
const Y = (r) => {
|
|
26
|
+
typeof XMLHttpRequest > "u" && M(K, "XMLHttpRequest is undefined");
|
|
27
27
|
const t = new XMLHttpRequest(), a = r.action;
|
|
28
28
|
t.upload && t.upload.addEventListener("progress", (e) => {
|
|
29
29
|
const i = e;
|
|
@@ -38,7 +38,7 @@ const Q = (r) => {
|
|
|
38
38
|
}), t.addEventListener("load", () => {
|
|
39
39
|
if (t.status < 200 || t.status >= 300)
|
|
40
40
|
return r.onError(I(a, r, t));
|
|
41
|
-
r.onSuccess(
|
|
41
|
+
r.onSuccess(W(t));
|
|
42
42
|
}), t.open(r.method, a, !0), r.withCredentials && "withCredentials" in t && (t.withCredentials = !0);
|
|
43
43
|
const p = r.headers || {};
|
|
44
44
|
if (p instanceof Headers)
|
|
@@ -47,9 +47,9 @@ const Q = (r) => {
|
|
|
47
47
|
for (const [e, i] of Object.entries(p))
|
|
48
48
|
J(i) || t.setRequestHeader(e, String(i));
|
|
49
49
|
return t.send(n), t;
|
|
50
|
-
},
|
|
50
|
+
}, Z = ["text", "picture", "picture-card"];
|
|
51
51
|
let ee = 1;
|
|
52
|
-
const te = () => Date.now() + ee++, re =
|
|
52
|
+
const te = () => Date.now() + ee++, re = U({
|
|
53
53
|
action: {
|
|
54
54
|
type: String,
|
|
55
55
|
default: "#"
|
|
@@ -90,16 +90,16 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
90
90
|
},
|
|
91
91
|
listType: {
|
|
92
92
|
type: String,
|
|
93
|
-
values:
|
|
93
|
+
values: Z,
|
|
94
94
|
default: "text"
|
|
95
95
|
},
|
|
96
96
|
httpRequest: {
|
|
97
97
|
type: c(Function),
|
|
98
|
-
default:
|
|
98
|
+
default: Y
|
|
99
99
|
},
|
|
100
100
|
disabled: Boolean,
|
|
101
101
|
limit: Number
|
|
102
|
-
}), be =
|
|
102
|
+
}), be = U({
|
|
103
103
|
...re,
|
|
104
104
|
beforeUpload: {
|
|
105
105
|
type: c(Function),
|
|
@@ -157,22 +157,22 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
157
157
|
}), i = async (s) => {
|
|
158
158
|
if (!s) return;
|
|
159
159
|
let o = window.URL || window.webkitURL;
|
|
160
|
-
e.cropperImg = o.createObjectURL(s), e.isShowDialog = !0,
|
|
160
|
+
e.cropperImg = o.createObjectURL(s), e.isShowDialog = !0, $(() => {
|
|
161
161
|
h();
|
|
162
162
|
});
|
|
163
|
-
},
|
|
163
|
+
}, y = () => {
|
|
164
164
|
var s;
|
|
165
165
|
(s = e.cropper) == null || s.destroy(), e.isShowDialog = !1;
|
|
166
|
-
},
|
|
167
|
-
|
|
166
|
+
}, v = () => {
|
|
167
|
+
y();
|
|
168
168
|
}, f = async () => {
|
|
169
|
-
const s = await
|
|
170
|
-
n("submitImage", { file: s }),
|
|
169
|
+
const s = await x();
|
|
170
|
+
n("submitImage", { file: s }), y();
|
|
171
171
|
}, C = async () => {
|
|
172
172
|
n("deleteImage");
|
|
173
173
|
}, h = () => {
|
|
174
174
|
const s = document.querySelector(".cropper-warp-left-img");
|
|
175
|
-
s && s.setAttribute("crossOrigin", "anonymous"), e.cropper = new
|
|
175
|
+
s && s.setAttribute("crossOrigin", "anonymous"), e.cropper = new H(s, {
|
|
176
176
|
viewMode: 1,
|
|
177
177
|
dragMode: "none",
|
|
178
178
|
initialAspectRatio: 1,
|
|
@@ -186,14 +186,14 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
186
186
|
e.cropperImgBase64 = e.cropper.getCroppedCanvas().toDataURL("image/jpeg");
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
|
-
},
|
|
189
|
+
}, x = () => new Promise((s) => {
|
|
190
190
|
e.cropper.getCroppedCanvas().toBlob((o) => {
|
|
191
191
|
s(o);
|
|
192
192
|
});
|
|
193
|
-
}),
|
|
193
|
+
}), E = async (s) => {
|
|
194
194
|
let o = window.URL || window.webkitURL;
|
|
195
195
|
e.cropperImg = o.createObjectURL(s.raw), e.cropper.replace(e.cropperImg);
|
|
196
|
-
},
|
|
196
|
+
}, D = (s) => {
|
|
197
197
|
p.value.clearFiles();
|
|
198
198
|
const o = s[0];
|
|
199
199
|
o.uid = te(), p.value.handleStart(o);
|
|
@@ -207,7 +207,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
207
207
|
modelValue: e.isShowDialog,
|
|
208
208
|
"onUpdate:modelValue": o[0] || (o[0] = (j) => e.isShowDialog = j),
|
|
209
209
|
width: "769px",
|
|
210
|
-
"before-close":
|
|
210
|
+
"before-close": v
|
|
211
211
|
}, {
|
|
212
212
|
header: d(() => [
|
|
213
213
|
l("div", ae, [
|
|
@@ -233,8 +233,8 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
233
233
|
limit: 1,
|
|
234
234
|
"show-file-list": !1,
|
|
235
235
|
"auto-upload": !1,
|
|
236
|
-
"on-change":
|
|
237
|
-
"on-exceed":
|
|
236
|
+
"on-change": E,
|
|
237
|
+
"on-exceed": D
|
|
238
238
|
}, {
|
|
239
239
|
trigger: d(() => [
|
|
240
240
|
u(_, {
|
|
@@ -266,7 +266,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
266
266
|
}, 512),
|
|
267
267
|
l("div", null, [
|
|
268
268
|
u(_, {
|
|
269
|
-
onClick:
|
|
269
|
+
onClick: v,
|
|
270
270
|
id: "themeBorderButton"
|
|
271
271
|
}, {
|
|
272
272
|
default: d(() => o[6] || (o[6] = [
|
|
@@ -324,7 +324,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
324
324
|
]);
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
}),
|
|
327
|
+
}), ye = /* @__PURE__ */ G(me, [["__scopeId", "data-v-5d760968"]]), Ce = /* @__PURE__ */ R({
|
|
328
328
|
__name: "index",
|
|
329
329
|
props: {
|
|
330
330
|
avatarUrl: {
|
|
@@ -353,14 +353,14 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
353
353
|
const a = r, n = b(), p = b(null), e = t, i = async () => {
|
|
354
354
|
var f;
|
|
355
355
|
a != null && a.banClick || (e("clickAvatar", a.avatarUrl), (f = n.value) == null || f.openDialog(a.avatarBlob));
|
|
356
|
-
},
|
|
356
|
+
}, y = async (f) => {
|
|
357
357
|
e("submitImage", f);
|
|
358
|
-
},
|
|
358
|
+
}, v = async () => {
|
|
359
359
|
e("deleteImage");
|
|
360
360
|
};
|
|
361
361
|
return (f, C) => {
|
|
362
362
|
const h = m("el-avatar");
|
|
363
|
-
return B(), k(
|
|
363
|
+
return B(), k(q, null, [
|
|
364
364
|
u(h, {
|
|
365
365
|
src: r.avatarUrl,
|
|
366
366
|
onClick: i,
|
|
@@ -370,19 +370,19 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
370
370
|
ref: p
|
|
371
371
|
}, {
|
|
372
372
|
default: d(() => [
|
|
373
|
-
|
|
373
|
+
V(f.$slots, "avatarDefault")
|
|
374
374
|
]),
|
|
375
375
|
_: 3
|
|
376
376
|
}, 8, ["src", "size"]),
|
|
377
|
-
|
|
377
|
+
N(u(ye, {
|
|
378
378
|
ref_key: "cropperDialogRef",
|
|
379
379
|
ref: n,
|
|
380
380
|
title: "更改头像",
|
|
381
381
|
avatarUrl: r.avatarUrl,
|
|
382
|
-
onSubmitImage:
|
|
383
|
-
onDeleteImage:
|
|
382
|
+
onSubmitImage: y,
|
|
383
|
+
onDeleteImage: v
|
|
384
384
|
}, null, 8, ["avatarUrl"]), [
|
|
385
|
-
[
|
|
385
|
+
[z, r.showCropper]
|
|
386
386
|
])
|
|
387
387
|
], 64);
|
|
388
388
|
};
|
|
@@ -393,5 +393,5 @@ export {
|
|
|
393
393
|
re as a,
|
|
394
394
|
be as b,
|
|
395
395
|
te as g,
|
|
396
|
-
|
|
396
|
+
Z as u
|
|
397
397
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),S=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
1
|
+
"use strict";const e=require("vue"),S=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BruAa-uD.cjs"),a=require("./menu-CQ3_ZXwC.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O="ElUpload";class k extends Error{constructor(o,n,i,p){super(o),this.name="UploadAjaxError",this.status=n,this.method=i,this.url=p}}function _(r,o,n){let i;return n.response?i=`${n.response.error||n.response}`:n.responseText?i=`${n.responseText}`:i=`fail to ${o.method} ${r} ${n.status}`,new k(i,n.status,o.method,r)}function R(r){const o=r.responseText||r.response;if(!o)return o;try{return JSON.parse(o)}catch{return o}}const T=r=>{typeof XMLHttpRequest>"u"&&a.throwError(O,"XMLHttpRequest is undefined");const o=new XMLHttpRequest,n=r.action;o.upload&&o.upload.addEventListener("progress",t=>{const c=t;c.percent=t.total>0?t.loaded/t.total*100:0,r.onProgress(c)});const i=new FormData;if(r.data)for(const[t,c]of Object.entries(r.data))a.isArray$1(c)&&c.length?i.append(t,...c):i.append(t,c);i.append(r.filename,r.file,r.file.name),o.addEventListener("error",()=>{r.onError(_(n,r,o))}),o.addEventListener("load",()=>{if(o.status<200||o.status>=300)return r.onError(_(n,r,o));r.onSuccess(R(o))}),o.open(r.method,n,!0),r.withCredentials&&"withCredentials"in o&&(o.withCredentials=!0);const p=r.headers||{};if(p instanceof Headers)p.forEach((t,c)=>o.setRequestHeader(c,t));else for(const[t,c]of Object.entries(p))a.isNil(c)||o.setRequestHeader(t,String(c));return o.send(i),o},v=["text","picture","picture-card"];let U=1;const w=()=>Date.now()+U++,h=a.buildProps({action:{type:String,default:"#"},headers:{type:a.definePropType(Object)},method:{type:String,default:"post"},data:{type:a.definePropType([Object,Function,Promise]),default:()=>a.mutable({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:a.definePropType(Array),default:()=>a.mutable([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:v,default:"text"},httpRequest:{type:a.definePropType(Function),default:T},disabled:Boolean,limit:Number}),D=a.buildProps({...h,beforeUpload:{type:a.definePropType(Function),default:a.NOOP},beforeRemove:{type:a.definePropType(Function)},onRemove:{type:a.definePropType(Function),default:a.NOOP},onChange:{type:a.definePropType(Function),default:a.NOOP},onPreview:{type:a.definePropType(Function),default:a.NOOP},onSuccess:{type:a.definePropType(Function),default:a.NOOP},onProgress:{type:a.definePropType(Function),default:a.NOOP},onError:{type:a.definePropType(Function),default:a.NOOP},onExceed:{type:a.definePropType(Function),default:a.NOOP},crossorigin:{type:a.definePropType(String)}}),L={style:{"text-align":"left"}},F={class:"cropper-warp"},j={class:"cropper-warp-left"},q=["src"],A={class:"cropper-warp-right"},$={class:"cropper-warp-right-item"},H={class:"cropper-warp-right-value"},z=["src"],M={class:"cropper-warp-right-item"},X={class:"cropper-warp-right-value"},J=["src"],G={class:"dialog-footer"},K=e.defineComponent({__name:"index",props:{title:{type:String,default:""}},emits:["submitImage","deleteImage"],setup(r,{expose:o,emit:n}){const i=n,p=e.ref(),t=e.reactive({isShowDialog:!1,cropperImg:"",cropperImgBase64:"",cropper:null}),c=async l=>{if(!l)return;let s=window.URL||window.webkitURL;t.cropperImg=s.createObjectURL(l),t.isShowDialog=!0,e.nextTick(()=>{g()})},u=()=>{var l;(l=t.cropper)==null||l.destroy(),t.isShowDialog=!1},f=()=>{u()},d=async()=>{const l=await C();i("submitImage",{file:l}),u()},y=async()=>{i("deleteImage")},g=()=>{const l=document.querySelector(".cropper-warp-left-img");l&&l.setAttribute("crossOrigin","anonymous"),t.cropper=new S.Cropper(l,{viewMode:1,dragMode:"none",initialAspectRatio:1,aspectRatio:1,preview:".before",background:!0,autoCropArea:1,checkCrossOrigin:!1,crop:()=>{t.cropperImgBase64=t.cropper.getCroppedCanvas().toDataURL("image/jpeg")}})},C=()=>new Promise(l=>{t.cropper.getCroppedCanvas().toBlob(s=>{l(s)})}),N=async l=>{let s=window.URL||window.webkitURL;t.cropperImg=s.createObjectURL(l.raw),t.cropper.replace(t.cropperImg)},E=l=>{p.value.clearFiles();const s=l[0];s.uid=w(),p.value.handleStart(s)};return o({openDialog:c}),(l,s)=>{const P=e.resolveComponent("ele-Edit"),x=e.resolveComponent("el-icon"),m=e.resolveComponent("el-button"),b=e.resolveComponent("el-upload"),V=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(V,{modelValue:t.isShowDialog,"onUpdate:modelValue":s[0]||(s[0]=I=>t.isShowDialog=I),width:"769px","before-close":f},{header:e.withCtx(()=>[e.createElementVNode("div",L,[e.createVNode(x,{size:"16",style:{"margin-right":"3px",display:"inline","vertical-align":"middle"}},{default:e.withCtx(()=>[e.createVNode(P)]),_:1}),e.createElementVNode("span",null,e.toDisplayString(r.title),1)])]),footer:e.withCtx(()=>[e.createElementVNode("span",G,[e.createVNode(b,{class:"avatar-uploader",ref_key:"uploadSignRef",ref:p,accept:".jpg,.png",limit:1,"show-file-list":!1,"auto-upload":!1,"on-change":N,"on-exceed":E},{trigger:e.withCtx(()=>[e.createVNode(m,{type:"info",icon:"ele-Picture"},{default:e.withCtx(()=>s[4]||(s[4]=[e.createTextVNode("选择图片")])),_:1,__:[4]})]),default:e.withCtx(()=>[e.createVNode(m,{onClick:y,type:"danger",icon:"ele-Picture",style:{"margin-left":"8px"}},{default:e.withCtx(()=>s[5]||(s[5]=[e.createTextVNode("删除图片")])),_:1,__:[5]})]),_:1},512),e.createElementVNode("div",null,[e.createVNode(m,{onClick:f,id:"themeBorderButton"},{default:e.withCtx(()=>s[6]||(s[6]=[e.createTextVNode("取 消")])),_:1,__:[6]}),e.createVNode(m,{onClick:d,id:"themeButton"},{default:e.withCtx(()=>s[7]||(s[7]=[e.createTextVNode("确 定")])),_:1,__:[7]})])])]),default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("div",j,[e.createElementVNode("img",{src:t.cropperImg,class:"cropper-warp-left-img"},null,8,q)]),e.createElementVNode("div",A,[s[3]||(s[3]=e.createElementVNode("div",{class:"cropper-warp-right-title"},"预览",-1)),e.createElementVNode("div",$,[e.createElementVNode("div",H,[e.createElementVNode("img",{src:t.cropperImgBase64,class:"cropper-warp-right-value-img"},null,8,z)]),s[1]||(s[1]=e.createElementVNode("div",{class:"cropper-warp-right-label"},"100 x 100",-1))]),e.createElementVNode("div",M,[e.createElementVNode("div",X,[e.createElementVNode("img",{src:t.cropperImgBase64,class:"cropper-warp-right-value-img cropper-size"},null,8,J)]),s[2]||(s[2]=e.createElementVNode("div",{class:"cropper-warp-right-label"},"50 x 50",-1))])])])]),_:1},8,["modelValue"])])}}}),Q=B._export_sfc(K,[["__scopeId","data-v-5d760968"]]),W=e.defineComponent({__name:"index",props:{avatarUrl:{type:String,default:""},avatarBlob:{type:Blob,default:""},size:{type:String,default:"large"},showCropper:{type:Boolean,default:!0},banClick:{type:Boolean,default:!1}},emits:["submitImage","deleteImage","clickAvatar"],setup(r,{emit:o}){const n=r,i=e.ref(),p=e.ref(null),t=o,c=async()=>{var d;n!=null&&n.banClick||(t("clickAvatar",n.avatarUrl),(d=i.value)==null||d.openDialog(n.avatarBlob))},u=async d=>{t("submitImage",d)},f=async()=>{t("deleteImage")};return(d,y)=>{const g=e.resolveComponent("el-avatar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(g,{src:r.avatarUrl,onClick:c,fit:"cover",size:n==null?void 0:n.size,ref_key:"avatarRef",ref:p},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"avatarDefault")]),_:3},8,["src","size"]),e.withDirectives(e.createVNode(Q,{ref_key:"cropperDialogRef",ref:i,title:"更改头像",avatarUrl:r.avatarUrl,onSubmitImage:u,onDeleteImage:f},null,8,["avatarUrl"]),[[e.vShow,r.showCropper]])],64)}}});exports._sfc_main=W;exports.genFileId=w;exports.uploadBaseProps=h;exports.uploadListTypes=v;exports.uploadProps=D;
|