ss-component-new 1.1.620 → 1.1.623
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-Bq7cMxbK.cjs → array-B_wsE8_t.cjs} +1 -1
- package/dist/{array-D4dLF1xj.js → array-VzXJcPjW.js} +1 -1
- package/dist/icons/svg/editTable.svg +1 -0
- package/dist/icons/svg/readTable.svg +1 -0
- package/dist/icons/svg/rowCreate.svg +1 -0
- package/dist/{index-DhvQs7gl.js → index-B5t2-ZF6.js} +1 -1
- package/dist/{index-BqZfdFEg.js → index-BCMeBOjv.js} +5 -5
- package/dist/{index-BeXlcI9i.cjs → index-BD6RuAif.cjs} +1 -1
- package/dist/{index-DaOakrcL.js → index-BHxSsIXo.js} +1 -1
- package/dist/{index-BpsIiZ7S.cjs → index-BdEXRw33.cjs} +1 -1
- package/dist/index-Bf6gYS22.cjs +4207 -0
- package/dist/{index-BjJGt5n9.js → index-BkdY6cw6.js} +1 -1
- package/dist/{index-DmRE2cVC.cjs → index-BmcZxive.cjs} +1 -1
- package/dist/{index-CrPT5Hoz.cjs → index-BoSad116.cjs} +1 -1
- package/dist/{index-BpKdQbsx.js → index-Br-w0WJD.js} +5 -5
- package/dist/{index-BhLxpb5q.js → index-BrKRAOn4.js} +6 -6
- package/dist/{index-DXkSDTRj.cjs → index-BwU7Nmc_.cjs} +1 -1
- package/dist/{index-CfcFMIgE.js → index-C2T-nUxf.js} +3 -3
- package/dist/{index-bHS30Ndo.js → index-C9WrVGHF.js} +5 -5
- package/dist/{index-CZ89rQnr.cjs → index-CTmwu9TK.cjs} +1 -1
- package/dist/{index-CsCDreKP.cjs → index-CeD_uFzd.cjs} +1 -1
- package/dist/{index-DnNBgaDj.js → index-ClfctUMo.js} +4 -4
- package/dist/{index-FXMPSbp7.cjs → index-Cn6GByoU.cjs} +1 -1
- package/dist/{index-BFuX2G8I.js → index-CnWb9Gz8.js} +4 -4
- package/dist/{index-DaBCF0Nd.js → index-Crd7Dg0j.js} +1 -1
- package/dist/{index-DC74TF_q.cjs → index-CzX-ygFB.cjs} +1 -1
- package/dist/{index-DxrHtk8v.cjs → index-D8su61We.cjs} +1 -1
- package/dist/{index-CM7xxfrM.cjs → index-DJRurgY2.cjs} +1 -1
- package/dist/{index-CWhy_Io_.cjs → index-DJSmgjQk.cjs} +1 -1
- package/dist/{index-D3AT3gF-.js → index-DKoGXjoD.js} +4 -4
- package/dist/index-DN5pkkVv.cjs +1 -0
- package/dist/{index-DDcGWP6y.js → index-DOoBCwOE.js} +5322 -5266
- package/dist/{index-f8bHzA1N.js → index-DTtCq9R6.js} +3 -3
- package/dist/{index-CpLqSPMr.cjs → index-DWdWY1BZ.cjs} +1 -1
- package/dist/{index-Dtez5g70.cjs → index-DXCMSB90.cjs} +1 -1
- package/dist/{index-BpUTBz77.cjs → index-De1UH5m5.cjs} +1 -1
- package/dist/{index-C_0I-i8V.cjs → index-DecdMM1v.cjs} +1 -1
- package/dist/{index-DTCQ-wFV.cjs → index-Df_pm0Y-.cjs} +1 -1
- package/dist/{index-DAKLvVXN.js → index-Df_wLpcP.js} +3 -3
- package/dist/{index-BFELXxoC.js → index-DivndMew.js} +1 -1
- package/dist/{index-pyP2yPmF.js → index-DqZD4y9T.js} +8 -8
- package/dist/{index-gdgEp7uV.js → index-J9CTbDdp.js} +14 -14
- package/dist/{index-Cbht3RG4.cjs → index-MSj62TUk.cjs} +1 -1
- package/dist/{index-BbW8EtPG.js → index-NoRGArvy.js} +334 -332
- package/dist/{index-BHPyp0hU.js → index-QkD67YhY.js} +4 -4
- package/dist/{index-BNX_RWaL.js → index-Qyw2gFZu.js} +4 -4
- package/dist/{index-CEHOj8ds.js → index-S285mI0p.js} +3 -3
- package/dist/index-Viq8WtM7.cjs +15 -0
- package/dist/{index-FLKaEf78.cjs → index-_kKZEgxm.cjs} +1 -1
- package/dist/{index-CfpRAxJB.js → index-boQYixno.js} +2 -2
- package/dist/{index-WwP4JICq.cjs → index-kLzEx5xq.cjs} +1 -1
- package/dist/{index-BoNr-Sd6.js → index-koQady1K.js} +5352 -5204
- package/dist/{index-BNkI-J2e.cjs → index-meJ6fhCn.cjs} +1 -1
- package/dist/{index-CupbZVTS.js → index-r5L5PJP9.js} +4 -4
- package/dist/{index-C-AfxANM.cjs → index-ugVCM2_1.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-6ThktX0W.js → index.vue_vue_type_script_setup_true_lang-BhbHPZ34.js} +23 -23
- package/dist/{index.vue_vue_type_script_setup_true_lang-D2XdpbX2.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-DUnmQvPK.cjs → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-DIgKXB3H.cjs} +7 -7
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-D5Bmiomk.js → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-DkeTpBJu.js} +235 -235
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-BxWFTucV.js → index.vue_vue_type_style_index_0_scoped_57a7854d_lang-D7pmcVtE.js} +8 -8
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-BHrALHze.cjs → index.vue_vue_type_style_index_0_scoped_57a7854d_lang-DG6bewEh.cjs} +1 -1
- package/dist/{login--G67Cn_f.cjs → login-C7jVTvUQ.cjs} +1 -1
- package/dist/{login-C8DAyy2e.js → login-wUTWXQ7u.js} +1 -1
- package/dist/{main-D6VhEWlV.js → main-CJ_KB_5P.js} +5 -5
- package/dist/{main-BvVe_CBg.cjs → main-thQ5jkR7.cjs} +1 -1
- package/dist/{menu-B98fDP-p.cjs → menu-CcabvNj6.cjs} +10 -10
- package/dist/{menu-DArqZlON.js → menu-wif0xsml.js} +4878 -4878
- package/dist/modelComp-B8kjqlTY.cjs +1 -0
- package/dist/{modelComp-6AqovLWA.js → modelComp-bhPfLPDx.js} +6 -2
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-BXCCNMoU.cjs → threeModel-CGGVqbwo.cjs} +1 -1
- package/dist/{threeModel-D1NbQhLh.js → threeModel-CkKiopXp.js} +2 -2
- package/package.json +3 -1
- package/public/icons/svg/editTable.svg +1 -0
- package/public/icons/svg/readTable.svg +1 -0
- package/public/icons/svg/rowCreate.svg +1 -0
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-BjueKTcK.cjs +0 -1
- package/dist/index-CewlNEjY.cjs +0 -15
- package/dist/index-DY-oa5G1.cjs +0 -4207
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CCe3D1Fi.cjs +0 -1286
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Ce-Qmyx6.js +0 -52928
- package/dist/modelComp-RmvEs7pM.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index.vue_vue_type_style_index_0_scoped_57a7854d_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index.vue_vue_type_style_index_0_scoped_57a7854d_lang-DG6bewEh.cjs"),e=require("vue"),u=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_=["title"],C={key:0,class:"menu-operate-icon"},f={class:"menu-config-wrap"},k=["onClick"],h={class:"module-dialog-content"};function v(o,l,B,V,N,M){const i=e.resolveComponent("svg-icon"),d=e.resolveComponent("el-popover"),c=e.resolveComponent("ssMenu"),r=e.resolveComponent("el-button"),g=e.resolveComponent("ssDialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{class:"vertical-menu",mode:o.mode,menuList:o.renderMenuList,onClickMenu:o.clickMenu,onOpenMenu:o.openMenu,onCloseMenu:o.closeMenu},{title:e.withCtx(({menu:t})=>{var s,a;return[e.createVNode(i,{name:t.icon??"",class:"menu-icon"},null,8,["name"]),e.createElementVNode("span",{title:t.title,class:"menu-title",style:e.normalizeStyle({marginRight:t!=null&&t.config&&((s=t==null?void 0:t.config)==null?void 0:s.length)>0?"25px":"1px"})},e.toDisplayString(t.title??""),13,_),t!=null&&t.config&&((a=t==null?void 0:t.config)==null?void 0:a.length)>0?(e.openBlock(),e.createElementBlock("span",C,[e.createVNode(d,{title:"",placement:"bottom-start",trigger:"click","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(i,{name:"config"})]),default:e.withCtx(()=>[e.createElementVNode("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t==null?void 0:t.config,n=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:n.id,onClick:D=>o.clickMenuIcon(t,n)},[e.createVNode(i,{name:n==null?void 0:n.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(n==null?void 0:n.operateType),1)],8,k))),128))])]),_:2},1024)])):e.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"]),e.createVNode(g,{class:"module-dialog",title:o.dialogInfo.title,visible:o.dialogInfo.show,width:o.dialogInfo.width,onBeforeDestroy:o.beforeDialogDestroy},{default:e.withCtx(()=>[e.createElementVNode("div",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dialogRenderComps,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.getComponents((t==null?void 0:t.comp)??"Input")),{itemData:t==null?void 0:t.compData,key:t==null?void 0:t.id,content:(t==null?void 0:t.contents)??[],config:t==null?void 0:t.config,onContentChange:o.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(r,{id:"themeBorderButton",onClick:o.beforeDialogDestroy},{default:e.withCtx(()=>l[0]||(l[0]=[e.createTextVNode("取消")])),_:1,__:[0]},8,["onClick"]),e.createVNode(r,{id:"themeButton",onClick:o.clickSubmitForm},{default:e.withCtx(()=>l[1]||(l[1]=[e.createTextVNode(" 确认 ")])),_:1,__:[1]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const y=u._export_sfc(p._sfc_main,[["render",v],["__scopeId","data-v-57a7854d"]]);exports.default=y;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as u, computed as R, reactive as J, nextTick as H, watch as X } from "vue";
|
|
2
|
-
import { bR as we, g as j, s as C, E as f, c as N, bO as Y, bM as Z, bP as m, p as A, u as ee } from "./menu-
|
|
3
|
-
import { u as te } from "./login-
|
|
4
|
-
import { u as De } from "./modelComp-
|
|
2
|
+
import { bR as we, g as j, s as C, E as f, c as N, bO as Y, bM as Z, bP as m, p as A, u as ee } from "./menu-wif0xsml.js";
|
|
3
|
+
import { u as te } from "./login-wUTWXQ7u.js";
|
|
4
|
+
import { u as De } from "./modelComp-bhPfLPDx.js";
|
|
5
5
|
import { d as se, i as Ie, e as V } from "./crypto-BRyGpjGR.js";
|
|
6
|
-
import { E as Ee } from "./index-
|
|
6
|
+
import { E as Ee } from "./index-BHxSsIXo.js";
|
|
7
7
|
const re = we("authorityState", {
|
|
8
8
|
state: () => ({
|
|
9
9
|
routerPageStructures: []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./menu-
|
|
1
|
+
"use strict";const n=require("./menu-CcabvNj6.cjs"),o=require("vue"),i=e=>{const t={};for(let a in e)a!=="id"&&(t[a]=e[a]);const s=t==null?void 0:t.主菜单名称;n.createInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:s},value:{tableData:t}})},l=e=>{n.deleteInsofDataApi({id:e==null?void 0:e.id})},p=e=>{const t={};for(let a in e)a!=="id"&&(t[a]=e[a]);const s=t==null?void 0:t.主菜单名称;n.updateInsofDataApi({id:e==null?void 0:e.id,key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:s},value:{tableData:t}})};o.ref([]);const u={comp:"Group",name:"/平台管理/主菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:[],prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}],name:""}]}]};exports.addMenuContent=i;exports.deleteMenuContent=l;exports.fixMenuContent=p;exports.tempMainMenuPageData=u;
|
|
@@ -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 {
|
|
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-
|
|
2
|
+
import { _ as H } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-EGVEMSWV.js";
|
|
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;
|