hs-admin-ui 16.0.4 → 16.0.6
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/_plugin-vue_export-helper-CZTmULB5.mjs +8643 -0
- package/dist/_plugin-vue_export-helper-Dk80_hr9.js +17 -0
- package/dist/bcIcon-Baqfk5_w.mjs +4 -0
- package/dist/{bcIcon-CZUZezdx.js → bcIcon-iCzoHRXh.js} +1 -1
- package/dist/h5.js +1 -1
- package/dist/h5.mjs +116 -14
- package/dist/index-B49HhTKd.js +333 -0
- package/dist/{index-CplSZvck.mjs → index-VZF696wu.mjs} +51854 -59279
- package/dist/index.js +1 -1
- package/dist/index.mjs +215 -215
- package/dist/style.css +1 -1
- package/dist/types/src/components/h5/Upload/Upload.vue.d.ts +37 -0
- package/dist/types/src/components/h5/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/bcIcon-D304atT1.mjs +0 -4
- package/dist/index-BaQvfZil.js +0 -344
- package/dist/index-CGiPlr0X.js +0 -6
- package/dist/index-DxplPmnP.mjs +0 -1131
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B49HhTKd.js");exports.default=e._sfc_main;
|
package/dist/h5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./_plugin-vue_export-helper-Dk80_hr9.js"),e=require("vue"),m={class:"upload-wrapper"},g={class:"upload-wrapper-inner"},h=e.defineComponent({__name:"Upload",props:{action:{type:String,default:""},headers:{type:Object,default:()=>({})},limit:{type:Number,default:100}},emits:["success"],setup(i,{emit:a}){const s=i,d=a,c=e.shallowRef(),o=e.reactive({loading:!1,headers:s.headers,fileList:[{name:"food.jpeg",url:"https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"}]});e.watch(()=>o.fileList.length,n=>{setTimeout(()=>{const t=document.querySelector(".upload-wrapper .el-upload--picture-card");t&&(t.style.display=n>=s.limit&&n>0?"none":"inline-flex")},100)},{immediate:!0});async function u(){c.value.submit()}function f(n,t,r){d("success",{result:n,file:t,files:r})}return(n,t)=>{const r=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",g,[e.createVNode(e.unref(l.ElUpload),{ref_key:"uploadRef",ref:c,"file-list":o.fileList,"onUpdate:fileList":t[0]||(t[0]=p=>o.fileList=p),"list-type":"picture-card",accept:"image/*",name:"file",action:i.action,headers:o.headers,limit:i.limit,"auto-upload":!1,"on-success":f},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createElementVNode("svg",{width:"34",height:"34",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{x:"45",y:"20",width:"10",height:"60",rx:"2",fill:"#1677ff"}),e.createElementVNode("rect",{x:"20",y:"45",width:"60",height:"10",rx:"2",fill:"#1677ff"})],-1)])]),_:1},8,["file-list","action","headers","limit"])]),e.createVNode(e.unref(l.ElButton),{size:"large",type:"primary",onClick:u},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode("上传",-1)])]),_:1})])),[[r,o.loading]])}}}),w=l._export_sfc$1(h,[["__scopeId","data-v-b7ef01a9"]]),y={Upload:w};function v(i){for(const[a,s]of Object.entries(y))i.component(`H${a}`,s)}function x(i){i.directive("loading",l.ElLoading.directive),i.use(v)}exports.useHsAdminUi=x;
|
package/dist/h5.mjs
CHANGED
|
@@ -1,20 +1,122 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
4
|
-
__name: "
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { bT as h, a$ as w, bS as y, bY as b } from "./_plugin-vue_export-helper-CZTmULB5.mjs";
|
|
2
|
+
import { defineComponent as v, shallowRef as x, reactive as _, watch as L, resolveDirective as U, withDirectives as j, createElementBlock as k, openBlock as B, createElementVNode as a, createVNode as c, unref as d, withCtx as f, createTextVNode as E } from "vue";
|
|
3
|
+
const C = { class: "upload-wrapper" }, N = { class: "upload-wrapper-inner" }, S = /* @__PURE__ */ v({
|
|
4
|
+
__name: "Upload",
|
|
5
|
+
props: {
|
|
6
|
+
action: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
headers: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
},
|
|
14
|
+
limit: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 100
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
emits: ["success"],
|
|
20
|
+
setup(t, { emit: l }) {
|
|
21
|
+
const s = t, u = l, r = x(), i = _({
|
|
22
|
+
loading: !1,
|
|
23
|
+
headers: s.headers,
|
|
24
|
+
fileList: [
|
|
25
|
+
{
|
|
26
|
+
name: "food.jpeg",
|
|
27
|
+
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
L(
|
|
32
|
+
() => i.fileList.length,
|
|
33
|
+
(o) => {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
const e = document.querySelector(".upload-wrapper .el-upload--picture-card");
|
|
36
|
+
e && (e.style.display = o >= s.limit && o > 0 ? "none" : "inline-flex");
|
|
37
|
+
}, 100);
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
immediate: !0
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
async function p() {
|
|
44
|
+
r.value.submit();
|
|
45
|
+
}
|
|
46
|
+
function m(o, e, n) {
|
|
47
|
+
u("success", { result: o, file: e, files: n });
|
|
48
|
+
}
|
|
49
|
+
return (o, e) => {
|
|
50
|
+
const n = U("loading");
|
|
51
|
+
return j((B(), k("div", C, [
|
|
52
|
+
a("div", N, [
|
|
53
|
+
c(d(h), {
|
|
54
|
+
ref_key: "uploadRef",
|
|
55
|
+
ref: r,
|
|
56
|
+
"file-list": i.fileList,
|
|
57
|
+
"onUpdate:fileList": e[0] || (e[0] = (g) => i.fileList = g),
|
|
58
|
+
"list-type": "picture-card",
|
|
59
|
+
accept: "image/*",
|
|
60
|
+
name: "file",
|
|
61
|
+
action: t.action,
|
|
62
|
+
headers: i.headers,
|
|
63
|
+
limit: t.limit,
|
|
64
|
+
"auto-upload": !1,
|
|
65
|
+
"on-success": m
|
|
66
|
+
}, {
|
|
67
|
+
default: f(() => [...e[1] || (e[1] = [
|
|
68
|
+
a("svg", {
|
|
69
|
+
width: "34",
|
|
70
|
+
height: "34",
|
|
71
|
+
viewBox: "0 0 100 100",
|
|
72
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
73
|
+
}, [
|
|
74
|
+
a("rect", {
|
|
75
|
+
x: "45",
|
|
76
|
+
y: "20",
|
|
77
|
+
width: "10",
|
|
78
|
+
height: "60",
|
|
79
|
+
rx: "2",
|
|
80
|
+
fill: "#1677ff"
|
|
81
|
+
}),
|
|
82
|
+
a("rect", {
|
|
83
|
+
x: "20",
|
|
84
|
+
y: "45",
|
|
85
|
+
width: "60",
|
|
86
|
+
height: "10",
|
|
87
|
+
rx: "2",
|
|
88
|
+
fill: "#1677ff"
|
|
89
|
+
})
|
|
90
|
+
], -1)
|
|
91
|
+
])]),
|
|
92
|
+
_: 1
|
|
93
|
+
}, 8, ["file-list", "action", "headers", "limit"])
|
|
94
|
+
]),
|
|
95
|
+
c(d(w), {
|
|
96
|
+
size: "large",
|
|
97
|
+
type: "primary",
|
|
98
|
+
onClick: p
|
|
99
|
+
}, {
|
|
100
|
+
default: f(() => [...e[2] || (e[2] = [
|
|
101
|
+
E("上传", -1)
|
|
102
|
+
])]),
|
|
103
|
+
_: 1
|
|
104
|
+
})
|
|
105
|
+
])), [
|
|
106
|
+
[n, i.loading]
|
|
107
|
+
]);
|
|
108
|
+
};
|
|
7
109
|
}
|
|
8
|
-
}),
|
|
9
|
-
|
|
110
|
+
}), H = /* @__PURE__ */ y(S, [["__scopeId", "data-v-b7ef01a9"]]), R = {
|
|
111
|
+
Upload: H
|
|
10
112
|
};
|
|
11
|
-
function
|
|
12
|
-
for (const [
|
|
13
|
-
|
|
113
|
+
function T(t) {
|
|
114
|
+
for (const [l, s] of Object.entries(R))
|
|
115
|
+
t.component(`H${l}`, s);
|
|
14
116
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
117
|
+
function D(t) {
|
|
118
|
+
t.directive("loading", b.directive), t.use(T);
|
|
17
119
|
}
|
|
18
120
|
export {
|
|
19
|
-
|
|
121
|
+
D as useHsAdminUi
|
|
20
122
|
};
|