ss-component-new 1.1.621 → 1.1.624
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/{index-cwNAtWkQ.js → index-B1An8Htq.js} +3 -3
- package/dist/{index-By4IZGWU.cjs → index-B1dHNcdB.cjs} +1 -1
- package/dist/{index-BdAqAS8j.cjs → index-B36T-VF_.cjs} +1 -1
- package/dist/{index-tyYdP21K.cjs → index-B4APtXxQ.cjs} +1 -1
- package/dist/{index-B4fU_Oqr.js → index-B5t2-ZF6.js} +1 -1
- package/dist/{index-DbxbzUiK.js → index-BHNh8h0b.js} +1 -1
- package/dist/{index-CMgvFfxY.js → index-Bf_MUmNJ.js} +2 -2
- package/dist/{index-B6QTa9We.cjs → index-BjqICyT4.cjs} +1 -1
- package/dist/{index-DnY817qu.cjs → index-BpdXzn_5.cjs} +1 -1
- package/dist/{index-CPeCOE_d.js → index-CCMMXMB1.js} +4107 -3957
- package/dist/{index-CMwn0ZEb.js → index-CHFTtzVa.js} +2 -2
- package/dist/{index-YTvm8Dyq.cjs → index-CKHYXDPm.cjs} +1 -1
- package/dist/{index-CW1zJWa7.cjs → index-CTmwu9TK.cjs} +1 -1
- package/dist/index-CW3mfGB1.cjs +1 -0
- package/dist/{index-kLzEx5xq.cjs → index-CZ5Km1gh.cjs} +1 -1
- package/dist/{index-DfQCPyug.js → index-CZ7TZZkY.js} +2 -2
- package/dist/{index-JuKGX07D.js → index-CcsATbPx.js} +1 -1
- package/dist/index-D5356qth.cjs +1 -0
- package/dist/{index-rBRZ7zGU.cjs → index-DD66d4qh.cjs} +1 -1
- package/dist/{index-CgHGkDUQ.js → index-DFYsmhwk.js} +2 -2
- package/dist/{index-Dmc9yBFD.cjs → index-DGsekK7m.cjs} +13 -13
- package/dist/{index-DE4qOxcb.cjs → index-DHI2fA2V.cjs} +1 -1
- package/dist/{index-CEcr_wVS.js → index-DQg2yjYX.js} +2 -2
- package/dist/{index-twApCU3A.js → index-DSdCQ_W0.js} +2 -2
- package/dist/{index-aptPIfv7.cjs → index-DTxA0aLx.cjs} +2 -2
- package/dist/{index-BS0NY42k.js → index-DeAB8zT4.js} +1 -1
- package/dist/{index-BLUSTZzG.js → index-DfzBGyQ0.js} +2 -2
- package/dist/{index-BFWDxfM0.js → index-DpxAyiaB.js} +4 -4
- package/dist/{index-Cz_YKerb.js → index-DwZm1s3k.js} +118 -120
- package/dist/{index-B6McL4Y5.cjs → index-DxblCBeX.cjs} +1 -1
- package/dist/{index-COcl6KL3.cjs → index-JoUULW-e.cjs} +1 -1
- package/dist/{index-DKoGXjoD.js → index-OAZCfMnP.js} +3 -3
- package/dist/{index-D1eHyt-Y.js → index-XEvHnysy.js} +665 -665
- package/dist/{index-CX298lYO.cjs → index-dfd8x3YP.cjs} +1 -1
- package/dist/{index-OUcbra1H.cjs → index-gnjMHl16.cjs} +1 -1
- package/dist/{index-DUyXqunV.js → index-nWJ2cGxt.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-BH9_Te0S.js → index.vue_vue_type_script_setup_true_lang-BhbHPZ34.js} +22 -22
- package/dist/{index.vue_vue_type_script_setup_true_lang-at_JPyg5.cjs → index.vue_vue_type_script_setup_true_lang-DoqHilMG.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BfNWM92-.cjs +1339 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-EGVEMSWV.js +62017 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-DtoHG_C9.cjs → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-COKqoEa-.cjs} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-CHdL2mdi.js → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-KbQ9Rbrb.js} +7 -7
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-CZvlVQ3K.js → index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-CAQGQOWa.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-BmbIlTnn.cjs → index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-DZ-VOJA0.cjs} +1 -1
- package/dist/{main-MdhpVHXc.cjs → main-0xDyziYT.cjs} +1 -1
- package/dist/{main-DZAZF0E8.js → main-CMLGwMf_.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +7 -7
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-BRkJrghm.cjs → threeModel-CSRasN3J.cjs} +1 -1
- package/dist/{threeModel-C2biL1qd.js → threeModel-rRoqc4B5.js} +1 -1
- package/package.json +3 -1
- package/dist/index-D5P_BYL7.cjs +0 -1
- package/dist/index-Noso3rqY.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Br0-XuvP.js +0 -52928
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CZZJYhO9.cjs +0 -1286
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-DTxA0aLx.cjs"),n=require("./index-DecdMM1v.cjs"),o=require("./menu-CcabvNj6.cjs"),i=require("./login-C7jVTvUQ.cjs"),s=t.defineComponent({__name:"index",setup(l){const a=o.useMenuState(),{activeMenuPath:c}=o.storeToRefs(a),u=i.useLoginState(),e=t.reactive({...n.State});return t.onMounted(async()=>{u.getModelSecretAsync(),e.structureId=await n.getActivePageStructureId(c.value)}),(d,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(r.ssTable,{compName:e.compName,itemData:e.pageData,changedContent:e.changedRow,onChange:e.handleItemDataChange,onOnButtonClick:e.clickRowButton},null,8,["compName","itemData","changedContent","onChange","onOnButtonClick"])]))}});exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),t=require("./menu-CcabvNj6.cjs"),_=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),t=require("./menu-CcabvNj6.cjs"),_=require("./index-DTxA0aLx.cjs"),r=require("./index-ugVCM2_1.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g={class:"menu-content"},v=l.defineComponent({__name:"index",setup(h){const d=t.useMenuState(t.pinia),{menus:c}=t.storeToRefs(d),p=l.ref([]),f=async()=>{var o,n,u,a;const e=await t.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey")}});if(((o=e==null?void 0:e.data)==null?void 0:o.type)==="success"){let i=(u=(n=e==null?void 0:e.data)==null?void 0:n.result)==null?void 0:u.map(s=>s);return i=(a=t.cloneDeep(i))==null?void 0:a.map(s=>{var m;const b=Object.values((m=s==null?void 0:s.value)==null?void 0:m.tableData);return b.unshift({id:s==null?void 0:s.id}),b}),i}else return[]};l.onMounted(async()=>{var u;const e=await f(),n=[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:(u=t.cloneDeep(c.value))==null?void 0:u.map(a=>({label:a==null?void 0:a.title,value:a==null?void 0:a.title})),prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}];n.push({key:"tableContents",contents:e}),p.value=n});const y=e=>{(e==null?void 0:e.buttonName)==="新增"?r.addMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="删除"?r.deleteMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="编辑"&&r.fixMenuContent(e==null?void 0:e.singleContent)};return(e,o)=>(l.openBlock(),l.createElementBlock("div",g,[l.createVNode(_.ssTable,{itemData:p.value,class:"table-content",onChange:y},null,8,["itemData"])]))}}),x=C._export_sfc(v,[["__scopeId","data-v-26f5cadc"]]);exports.default=x;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { onMounted as f, resolveComponent as h, createElementBlock as C, openBlock as g, createVNode as y } from "vue";
|
|
2
|
-
import "./index-
|
|
2
|
+
import "./index-XEvHnysy.js";
|
|
3
3
|
import "./menu-wif0xsml.js";
|
|
4
4
|
import "./array-VzXJcPjW.js";
|
|
5
5
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import "./index.
|
|
7
|
-
import "./index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-
|
|
6
|
+
import "./index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-CAQGQOWa.js";
|
|
7
|
+
import "./index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-KbQ9Rbrb.js";
|
|
8
8
|
import "./login-wUTWXQ7u.js";
|
|
9
9
|
import "./index-BHtNKL1L.js";
|
|
10
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
11
|
-
import "./index-
|
|
10
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-EGVEMSWV.js";
|
|
11
|
+
import "./index-DpxAyiaB.js";
|
|
12
12
|
import "vue-router";
|
|
13
13
|
const v = {
|
|
14
14
|
__name: "index",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
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 N, nextTick as T, Fragment as q, withDirectives as V, renderSlot as $, vShow as z } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as H } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-EGVEMSWV.js";
|
|
3
3
|
import { a0 as M, am as X, ag as J, V as x, W as c, aN as S, ad as g } from "./menu-wif0xsml.js";
|
|
4
4
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const
|
|
6
|
-
class
|
|
5
|
+
const G = "ElUpload";
|
|
6
|
+
class K 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 K(n, a.status, t.method, r);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Q(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(G, "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(Q(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,7 +47,7 @@ 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
52
|
const te = () => Date.now() + ee++, re = x({
|
|
53
53
|
action: {
|
|
@@ -90,12 +90,12 @@ 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
|
|
@@ -163,7 +163,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
163
163
|
}, y = () => {
|
|
164
164
|
var s;
|
|
165
165
|
(s = e.cropper) == null || s.destroy(), e.isShowDialog = !1;
|
|
166
|
-
},
|
|
166
|
+
}, _ = () => {
|
|
167
167
|
y();
|
|
168
168
|
}, f = async () => {
|
|
169
169
|
const s = await U();
|
|
@@ -201,13 +201,13 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
201
201
|
return t({
|
|
202
202
|
openDialog: i
|
|
203
203
|
}), (s, o) => {
|
|
204
|
-
const L = m("ele-Edit"), F = m("el-icon"),
|
|
204
|
+
const L = m("ele-Edit"), F = m("el-icon"), v = m("el-button"), P = m("el-upload"), O = m("el-dialog");
|
|
205
205
|
return B(), k("div", null, [
|
|
206
206
|
u(O, {
|
|
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": _
|
|
211
211
|
}, {
|
|
212
212
|
header: d(() => [
|
|
213
213
|
l("div", ae, [
|
|
@@ -237,7 +237,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
237
237
|
"on-exceed": D
|
|
238
238
|
}, {
|
|
239
239
|
trigger: d(() => [
|
|
240
|
-
u(
|
|
240
|
+
u(v, {
|
|
241
241
|
type: "info",
|
|
242
242
|
icon: "ele-Picture"
|
|
243
243
|
}, {
|
|
@@ -249,7 +249,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
249
249
|
})
|
|
250
250
|
]),
|
|
251
251
|
default: d(() => [
|
|
252
|
-
u(
|
|
252
|
+
u(v, {
|
|
253
253
|
onClick: C,
|
|
254
254
|
type: "danger",
|
|
255
255
|
icon: "ele-Picture",
|
|
@@ -265,8 +265,8 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
265
265
|
_: 1
|
|
266
266
|
}, 512),
|
|
267
267
|
l("div", null, [
|
|
268
|
-
u(
|
|
269
|
-
onClick:
|
|
268
|
+
u(v, {
|
|
269
|
+
onClick: _,
|
|
270
270
|
id: "themeBorderButton"
|
|
271
271
|
}, {
|
|
272
272
|
default: d(() => o[6] || (o[6] = [
|
|
@@ -275,7 +275,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
275
275
|
_: 1,
|
|
276
276
|
__: [6]
|
|
277
277
|
}),
|
|
278
|
-
u(
|
|
278
|
+
u(v, {
|
|
279
279
|
onClick: f,
|
|
280
280
|
id: "themeButton"
|
|
281
281
|
}, {
|
|
@@ -355,7 +355,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
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
|
+
}, _ = async () => {
|
|
359
359
|
e("deleteImage");
|
|
360
360
|
};
|
|
361
361
|
return (f, C) => {
|
|
@@ -380,7 +380,7 @@ const te = () => Date.now() + ee++, re = x({
|
|
|
380
380
|
title: "更改头像",
|
|
381
381
|
avatarUrl: r.avatarUrl,
|
|
382
382
|
onSubmitImage: y,
|
|
383
|
-
onDeleteImage:
|
|
383
|
+
onDeleteImage: _
|
|
384
384
|
}, null, 8, ["avatarUrl"]), [
|
|
385
385
|
[z, r.showCropper]
|
|
386
386
|
])
|
|
@@ -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-BfNWM92-.cjs"),a=require("./menu-CcabvNj6.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;
|