@qxs-bns/components 0.0.1

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.
Files changed (50) hide show
  1. package/index.cjs +1 -0
  2. package/index.js +15 -0
  3. package/package.json +44 -0
  4. package/package.json.cjs +1 -0
  5. package/package.json.js +4 -0
  6. package/packages/hooks/src/use-namespace/index.cjs +1 -0
  7. package/packages/hooks/src/use-namespace/index.js +49 -0
  8. package/src/components.cjs +1 -0
  9. package/src/components.js +10 -0
  10. package/src/defaults.cjs +1 -0
  11. package/src/defaults.js +6 -0
  12. package/src/file-upload/index.cjs +1 -0
  13. package/src/file-upload/index.js +7 -0
  14. package/src/file-upload/src/file-upload.vue.cjs +1 -0
  15. package/src/file-upload/src/file-upload.vue.js +82 -0
  16. package/src/file-upload/src/file-upload.vue2.cjs +1 -0
  17. package/src/file-upload/src/file-upload.vue2.js +4 -0
  18. package/src/fixed-action-bar/index.cjs +1 -0
  19. package/src/fixed-action-bar/index.js +7 -0
  20. package/src/fixed-action-bar/src/fixed-action-bar.vue.cjs +1 -0
  21. package/src/fixed-action-bar/src/fixed-action-bar.vue.js +63 -0
  22. package/src/fixed-action-bar/src/fixed-action-bar.vue2.cjs +1 -0
  23. package/src/fixed-action-bar/src/fixed-action-bar.vue2.js +4 -0
  24. package/src/image-upload/index.cjs +1 -0
  25. package/src/image-upload/index.js +7 -0
  26. package/src/image-upload/src/image-upload.vue.cjs +1 -0
  27. package/src/image-upload/src/image-upload.vue.js +164 -0
  28. package/src/image-upload/src/image-upload.vue2.cjs +1 -0
  29. package/src/image-upload/src/image-upload.vue2.js +4 -0
  30. package/src/make-installer.cjs +1 -0
  31. package/src/make-installer.js +13 -0
  32. package/src/photo-crop-tool/index.cjs +1 -0
  33. package/src/photo-crop-tool/index.js +7 -0
  34. package/src/photo-crop-tool/src/composables.cjs +1 -0
  35. package/src/photo-crop-tool/src/composables.js +33 -0
  36. package/src/photo-crop-tool/src/photo-crop-tool.vue.cjs +1 -0
  37. package/src/photo-crop-tool/src/photo-crop-tool.vue.js +224 -0
  38. package/src/photo-crop-tool/src/photo-crop-tool.vue2.cjs +1 -0
  39. package/src/photo-crop-tool/src/photo-crop-tool.vue2.js +4 -0
  40. package/src/withInstall.cjs +1 -0
  41. package/src/withInstall.js +9 -0
  42. package/theme-chalk/base.css +256 -0
  43. package/theme-chalk/file-upload.css +23 -0
  44. package/theme-chalk/fixed-action-bar.css +13 -0
  45. package/theme-chalk/image-upload.css +117 -0
  46. package/theme-chalk/index.css +499 -0
  47. package/theme-chalk/photo-crop-tool.css +76 -0
  48. package/theme-chalk/rich-editor.css +15 -0
  49. package/theme-chalk/var.css +129 -0
  50. package/types/index.d.ts +1 -0
@@ -0,0 +1 @@
1
+ "use strict";var P=(M,S,a)=>new Promise((T,E)=>{var f=v=>{try{h(a.next(v))}catch(u){E(u)}},x=v=>{try{h(a.throw(v))}catch(u){E(u)}},h=v=>v.done?T(v.value):Promise.resolve(v.value).then(f,x);h((a=a.apply(M,S)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),J=require("../../../packages/hooks/src/use-namespace/index.cjs"),$=require("../../../node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.12_typescript@5.6.3_/node_modules/@vueuse/core/index.cjs"),K=require("./composables.cjs"),Z=["src"],ee=e.defineComponent({name:"QxsPhotoCropTool",__name:"photo-crop-tool",props:{imgFile:{type:Object,default:()=>null},aspectRatio:{type:String,default:()=>"16 / 9"},defaultWidth:{type:Number,default:()=>320},defaultHeight:{type:Number,default:()=>180},zoomType:{type:String,default:()=>"fixed"}},setup(M,{expose:S}){const a=M;let T=0,E=0,f=0,x=0;const h=J.useNamespace("photo-crop-tool"),v=e.ref(null),u=e.ref(null),B=e.ref(null),F=e.ref(""),c=e.ref(""),L=e.ref({x:0,y:0}),t=e.ref({width:a.defaultWidth,height:a.defaultHeight,x:0,y:0}),{width:k,height:N}=$.useElementSize(v),{width:X}=$.useElementSize(B),{x:m,y:g,style:Y}=$.useDraggable(v,{containerElement:u,draggingElement:v,disabled:e.computed(()=>!!c.value),exact:!0,initialValue:L}),V=e.computed(()=>a.imgFile?URL.createObjectURL(a.imgFile):"");e.watch(()=>a.imgFile,l=>{l&&!l.type.startsWith("image/")?F.value="文件类型错误":F.value=""});const D=e.computed(()=>{var l;return(((l=B.value)==null?void 0:l.naturalWidth)||0)/X.value}),p=e.computed(()=>{const l={left:0,top:0};return c.value==="bottom-right"?(l.left=t.value.x,l.top=t.value.y):c.value==="top-left"?(l.left=t.value.x-k.value,l.top=t.value.y-N.value):c.value==="top-right"?(l.top=t.value.y-N.value,l.left=t.value.x):c.value==="bottom-left"&&(l.left=t.value.x-k.value,l.top=t.value.y),l}),Q=e.computed(()=>{const{aspectRatio:l}=a,i={width:`${t.value.width||a.defaultWidth}`,height:`${t.value.height||a.defaultHeight}`,"aspect-ratio":l,top:`${p.value.top}px`,left:`${p.value.left}px`};return a.zoomType==="free"?delete i["aspect-ratio"]:a.zoomType==="fixed"&&delete i.height,h.cssVarBlock(i)});function y(l){return l*D.value}function A(){return P(this,arguments,function*(l=B.value){var W,C;let i="transparent";u.value&&(i=window.getComputedStyle(u.value).backgroundColor);const n=document.createElement("canvas");n.width=y(((W=u.value)==null?void 0:W.clientWidth)||0),n.height=y(((C=u.value)==null?void 0:C.clientHeight)||0);const{drawImage:H,cropCanvas:b,drawColor:z}=K.useCanvas(n);return z(0,0,n.width,n.height,i),H(l,y(l.offsetLeft),y(l.offsetTop),l.naturalWidth,l.naturalHeight),yield b(y(m.value),y(g.value),y(k.value),y(N.value))})}function w(l,i){var b,z;const n=((b=u.value)==null?void 0:b.clientWidth)||1/0,H=((z=u.value)==null?void 0:z.clientHeight)||1/0;return{width:Math.min(Math.max(l,0),n),height:Math.min(Math.max(i,0),H)}}function U(l){var H,b,z,W,C,j,q,O;const i=l.clientX-T,n=l.clientY-E;if(c.value==="bottom-right"){if(a.zoomType==="free"){const{width:s,height:o}=w(f+i,x+n);t.value.width=s,t.value.height=o}else if(a.zoomType==="fixed"){const s=Number.parseFloat(a.aspectRatio.split(" / ")[0])/Number.parseFloat(a.aspectRatio.split(" / ")[1]);let o=f+i,r=o/s;const{width:R,height:d}=w(o,r);d>(((H=u.value)==null?void 0:H.clientHeight)||1/0)&&(r=((b=u.value)==null?void 0:b.clientHeight)||1/0,o=r*s),t.value.width=R,t.value.height=d}}else if(c.value==="top-left"){if(a.zoomType==="free"){const{width:s,height:o}=w(f-i,x-n);t.value.width=s,t.value.height=o}else if(a.zoomType==="fixed"){const s=Number.parseFloat(a.aspectRatio.split(" / ")[0])/Number.parseFloat(a.aspectRatio.split(" / ")[1]);let o=f-i,r=o/s;const{width:R,height:d}=w(o,r);d>(((z=u.value)==null?void 0:z.clientHeight)||1/0)&&(r=((W=u.value)==null?void 0:W.clientHeight)||1/0,o=r*s),t.value.width=R,t.value.height=d}m.value=p.value.left,g.value=p.value.top}else if(c.value==="top-right"){if(a.zoomType==="free"){const{width:s,height:o}=w(f+i,x-n);t.value.width=s,t.value.height=o}else if(a.zoomType==="fixed"){const s=Number.parseFloat(a.aspectRatio.split(" / ")[0])/Number.parseFloat(a.aspectRatio.split(" / ")[1]);let o=f+i,r=o/s;const{width:R,height:d}=w(o,r);d>(((C=u.value)==null?void 0:C.clientHeight)||1/0)&&(r=((j=u.value)==null?void 0:j.clientHeight)||1/0,o=r*s),t.value.width=R,t.value.height=d}m.value=p.value.left,g.value=p.value.top}else if(c.value==="bottom-left"){if(a.zoomType==="free"){const{width:s,height:o}=w(f-i,x+n);t.value.width=s,t.value.height=o}else if(a.zoomType==="fixed"){const s=Number.parseFloat(a.aspectRatio.split(" / ")[0])/Number.parseFloat(a.aspectRatio.split(" / ")[1]);let o=f-i,r=o/s;const{width:R,height:d}=w(o,r);d>(((q=u.value)==null?void 0:q.clientHeight)||1/0)&&(r=((O=u.value)==null?void 0:O.clientHeight)||1/0,o=r*s),t.value.width=R,t.value.height=d}m.value=p.value.left,g.value=p.value.top}l.preventDefault(),l.stopPropagation()}function I(l,i){c.value=i,T=l.clientX,E=l.clientY,f=t.value.width,x=t.value.height,i==="bottom-right"?(t.value.x=m.value,t.value.y=g.value):i==="top-left"?(t.value.x=m.value+k.value,t.value.y=g.value+N.value):i==="top-right"?(t.value.x=m.value,t.value.y=g.value+N.value):i==="bottom-left"&&(t.value.x=m.value+k.value,t.value.y=g.value)}function _(){c.value=""}function G(){t.value.width=a.defaultWidth,t.value.height=a.defaultHeight,m.value=0,g.value=0}return document.addEventListener("mouseup",_),document.addEventListener("mousemove",U),e.onMounted(()=>{e.nextTick(()=>{var l,i;L.value.x=(((l=u.value)==null?void 0:l.offsetWidth)||0)/2-t.value.width/2,L.value.y=(((i=u.value)==null?void 0:i.offsetHeight)||0)/2-t.value.height/2})}),e.onUnmounted(()=>{V.value&&URL.revokeObjectURL(V.value),document.removeEventListener("mouseup",_),document.removeEventListener("mousemove",U)}),S({crop:A,resize:G}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerBoxRef",ref:u,class:e.normalizeClass([e.unref(h).e("img-box")])},[F.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(h).e("error-message")])},e.toDisplayString(F.value),3)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("img",{ref_key:"imgRef",ref:B,class:e.normalizeClass([e.unref(h).e("image")]),src:V.value},null,10,Z),e.createElementVNode("div",{ref_key:"cropBoxRef",ref:v,class:e.normalizeClass([e.unref(h).e("crop-tool-box")]),style:e.normalizeStyle([Q.value,c.value?`left: ${p.value.left}px;top: ${p.value.top}px`:e.unref(Y)])},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(h).e("top-left")]),onMousedown:i[0]||(i[0]=n=>I(n,"top-left"))},null,34),e.createElementVNode("div",{class:e.normalizeClass([e.unref(h).e("top-right")]),onMousedown:i[1]||(i[1]=n=>I(n,"top-right"))},null,34),e.createElementVNode("div",{class:e.normalizeClass([e.unref(h).e("bottom-right")]),onMousedown:i[2]||(i[2]=n=>I(n,"bottom-right"))},null,34),e.createElementVNode("div",{class:e.normalizeClass([e.unref(h).e("bottom-left")]),onMousedown:i[3]||(i[3]=n=>I(n,"bottom-left"))},null,34)],6)],64))],2))}});exports.default=ee;
@@ -0,0 +1,224 @@
1
+ var A = ($, X, i) => new Promise((L, F) => {
2
+ var f = (v) => {
3
+ try {
4
+ h(i.next(v));
5
+ } catch (o) {
6
+ F(o);
7
+ }
8
+ }, b = (v) => {
9
+ try {
10
+ h(i.throw(v));
11
+ } catch (o) {
12
+ F(o);
13
+ }
14
+ }, h = (v) => v.done ? L(v.value) : Promise.resolve(v.value).then(f, b);
15
+ h((i = i.apply($, X)).next());
16
+ });
17
+ import { defineComponent as ie, ref as W, computed as C, watch as ae, onMounted as oe, nextTick as ue, onUnmounted as ne, openBlock as D, createElementBlock as O, normalizeClass as x, unref as m, toDisplayString as se, Fragment as he, createElementVNode as k, normalizeStyle as ve } from "vue";
18
+ import { useNamespace as re } from "../../../packages/hooks/src/use-namespace/index.js";
19
+ import { useElementSize as G, useDraggable as fe } from "../../../node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.12_typescript@5.6.3_/node_modules/@vueuse/core/index.js";
20
+ import { useCanvas as ce } from "./composables.js";
21
+ const de = ["src"], xe = /* @__PURE__ */ ie({
22
+ name: "QxsPhotoCropTool",
23
+ __name: "photo-crop-tool",
24
+ props: {
25
+ imgFile: {
26
+ type: Object,
27
+ default: () => null
28
+ },
29
+ aspectRatio: {
30
+ type: String,
31
+ default: () => "16 / 9"
32
+ },
33
+ defaultWidth: {
34
+ type: Number,
35
+ default: () => 320
36
+ },
37
+ defaultHeight: {
38
+ type: Number,
39
+ default: () => 180
40
+ },
41
+ /**
42
+ * free 自由缩放
43
+ * fixed 固定比例缩放
44
+ */
45
+ zoomType: {
46
+ type: String,
47
+ default: () => "fixed"
48
+ }
49
+ },
50
+ setup($, { expose: X }) {
51
+ const i = $;
52
+ let L = 0, F = 0, f = 0, b = 0;
53
+ const h = re("photo-crop-tool"), v = W(null), o = W(null), B = W(null), S = W(""), r = W(""), Y = W({
54
+ x: 0,
55
+ y: 0
56
+ }), e = W({
57
+ width: i.defaultWidth,
58
+ height: i.defaultHeight,
59
+ x: 0,
60
+ y: 0
61
+ }), { width: I, height: N } = G(v), { width: J } = G(B), { x: p, y: g, style: K } = fe(v, {
62
+ containerElement: o,
63
+ draggingElement: v,
64
+ disabled: C(() => !!r.value),
65
+ exact: !0,
66
+ initialValue: Y
67
+ }), j = C(() => i.imgFile ? URL.createObjectURL(i.imgFile) : "");
68
+ ae(() => i.imgFile, (t) => {
69
+ t && !t.type.startsWith("image/") ? S.value = "文件类型错误" : S.value = "";
70
+ });
71
+ const Z = C(() => {
72
+ var t;
73
+ return (((t = B.value) == null ? void 0 : t.naturalWidth) || 0) / J.value;
74
+ }), d = C(() => {
75
+ const t = {
76
+ left: 0,
77
+ top: 0
78
+ };
79
+ return r.value === "bottom-right" ? (t.left = e.value.x, t.top = e.value.y) : r.value === "top-left" ? (t.left = e.value.x - I.value, t.top = e.value.y - N.value) : r.value === "top-right" ? (t.top = e.value.y - N.value, t.left = e.value.x) : r.value === "bottom-left" && (t.left = e.value.x - I.value, t.top = e.value.y), t;
80
+ }), ee = C(() => {
81
+ const { aspectRatio: t } = i, l = {
82
+ width: `${e.value.width || i.defaultWidth}`,
83
+ height: `${e.value.height || i.defaultHeight}`,
84
+ "aspect-ratio": t,
85
+ top: `${d.value.top}px`,
86
+ left: `${d.value.left}px`
87
+ };
88
+ return i.zoomType === "free" ? delete l["aspect-ratio"] : i.zoomType === "fixed" && delete l.height, h.cssVarBlock(l);
89
+ });
90
+ function w(t) {
91
+ return t * Z.value;
92
+ }
93
+ function te() {
94
+ return A(this, arguments, function* (t = B.value) {
95
+ var E, M;
96
+ let l = "transparent";
97
+ o.value && (l = window.getComputedStyle(o.value).backgroundColor);
98
+ const u = document.createElement("canvas");
99
+ u.width = w(((E = o.value) == null ? void 0 : E.clientWidth) || 0), u.height = w(((M = o.value) == null ? void 0 : M.clientHeight) || 0);
100
+ const { drawImage: T, cropCanvas: R, drawColor: H } = ce(u);
101
+ return H(0, 0, u.width, u.height, l), T(t, w(t.offsetLeft), w(t.offsetTop), t.naturalWidth, t.naturalHeight), yield R(w(p.value), w(g.value), w(I.value), w(N.value));
102
+ });
103
+ }
104
+ function y(t, l) {
105
+ var R, H;
106
+ const u = ((R = o.value) == null ? void 0 : R.clientWidth) || 1 / 0, T = ((H = o.value) == null ? void 0 : H.clientHeight) || 1 / 0;
107
+ return {
108
+ width: Math.min(Math.max(t, 0), u),
109
+ height: Math.min(Math.max(l, 0), T)
110
+ };
111
+ }
112
+ function P(t) {
113
+ var T, R, H, E, M, _, Q, q;
114
+ const l = t.clientX - L, u = t.clientY - F;
115
+ if (r.value === "bottom-right") {
116
+ if (i.zoomType === "free") {
117
+ const { width: n, height: a } = y(f + l, b + u);
118
+ e.value.width = n, e.value.height = a;
119
+ } else if (i.zoomType === "fixed") {
120
+ const n = Number.parseFloat(i.aspectRatio.split(" / ")[0]) / Number.parseFloat(i.aspectRatio.split(" / ")[1]);
121
+ let a = f + l, s = a / n;
122
+ const { width: z, height: c } = y(a, s);
123
+ c > (((T = o.value) == null ? void 0 : T.clientHeight) || 1 / 0) && (s = ((R = o.value) == null ? void 0 : R.clientHeight) || 1 / 0, a = s * n), e.value.width = z, e.value.height = c;
124
+ }
125
+ } else if (r.value === "top-left") {
126
+ if (i.zoomType === "free") {
127
+ const { width: n, height: a } = y(f - l, b - u);
128
+ e.value.width = n, e.value.height = a;
129
+ } else if (i.zoomType === "fixed") {
130
+ const n = Number.parseFloat(i.aspectRatio.split(" / ")[0]) / Number.parseFloat(i.aspectRatio.split(" / ")[1]);
131
+ let a = f - l, s = a / n;
132
+ const { width: z, height: c } = y(a, s);
133
+ c > (((H = o.value) == null ? void 0 : H.clientHeight) || 1 / 0) && (s = ((E = o.value) == null ? void 0 : E.clientHeight) || 1 / 0, a = s * n), e.value.width = z, e.value.height = c;
134
+ }
135
+ p.value = d.value.left, g.value = d.value.top;
136
+ } else if (r.value === "top-right") {
137
+ if (i.zoomType === "free") {
138
+ const { width: n, height: a } = y(f + l, b - u);
139
+ e.value.width = n, e.value.height = a;
140
+ } else if (i.zoomType === "fixed") {
141
+ const n = Number.parseFloat(i.aspectRatio.split(" / ")[0]) / Number.parseFloat(i.aspectRatio.split(" / ")[1]);
142
+ let a = f + l, s = a / n;
143
+ const { width: z, height: c } = y(a, s);
144
+ c > (((M = o.value) == null ? void 0 : M.clientHeight) || 1 / 0) && (s = ((_ = o.value) == null ? void 0 : _.clientHeight) || 1 / 0, a = s * n), e.value.width = z, e.value.height = c;
145
+ }
146
+ p.value = d.value.left, g.value = d.value.top;
147
+ } else if (r.value === "bottom-left") {
148
+ if (i.zoomType === "free") {
149
+ const { width: n, height: a } = y(f - l, b + u);
150
+ e.value.width = n, e.value.height = a;
151
+ } else if (i.zoomType === "fixed") {
152
+ const n = Number.parseFloat(i.aspectRatio.split(" / ")[0]) / Number.parseFloat(i.aspectRatio.split(" / ")[1]);
153
+ let a = f - l, s = a / n;
154
+ const { width: z, height: c } = y(a, s);
155
+ c > (((Q = o.value) == null ? void 0 : Q.clientHeight) || 1 / 0) && (s = ((q = o.value) == null ? void 0 : q.clientHeight) || 1 / 0, a = s * n), e.value.width = z, e.value.height = c;
156
+ }
157
+ p.value = d.value.left, g.value = d.value.top;
158
+ }
159
+ t.preventDefault(), t.stopPropagation();
160
+ }
161
+ function U(t, l) {
162
+ r.value = l, L = t.clientX, F = t.clientY, f = e.value.width, b = e.value.height, l === "bottom-right" ? (e.value.x = p.value, e.value.y = g.value) : l === "top-left" ? (e.value.x = p.value + I.value, e.value.y = g.value + N.value) : l === "top-right" ? (e.value.x = p.value, e.value.y = g.value + N.value) : l === "bottom-left" && (e.value.x = p.value + I.value, e.value.y = g.value);
163
+ }
164
+ function V() {
165
+ r.value = "";
166
+ }
167
+ function le() {
168
+ e.value.width = i.defaultWidth, e.value.height = i.defaultHeight, p.value = 0, g.value = 0;
169
+ }
170
+ return document.addEventListener("mouseup", V), document.addEventListener("mousemove", P), oe(() => {
171
+ ue(() => {
172
+ var t, l;
173
+ Y.value.x = (((t = o.value) == null ? void 0 : t.offsetWidth) || 0) / 2 - e.value.width / 2, Y.value.y = (((l = o.value) == null ? void 0 : l.offsetHeight) || 0) / 2 - e.value.height / 2;
174
+ });
175
+ }), ne(() => {
176
+ j.value && URL.revokeObjectURL(j.value), document.removeEventListener("mouseup", V), document.removeEventListener("mousemove", P);
177
+ }), X({
178
+ crop: te,
179
+ resize: le
180
+ }), (t, l) => (D(), O("div", {
181
+ ref_key: "containerBoxRef",
182
+ ref: o,
183
+ class: x([m(h).e("img-box")])
184
+ }, [
185
+ S.value ? (D(), O("div", {
186
+ key: 0,
187
+ class: x([m(h).e("error-message")])
188
+ }, se(S.value), 3)) : (D(), O(he, { key: 1 }, [
189
+ k("img", {
190
+ ref_key: "imgRef",
191
+ ref: B,
192
+ class: x([m(h).e("image")]),
193
+ src: j.value
194
+ }, null, 10, de),
195
+ k("div", {
196
+ ref_key: "cropBoxRef",
197
+ ref: v,
198
+ class: x([m(h).e("crop-tool-box")]),
199
+ style: ve([ee.value, r.value ? `left: ${d.value.left}px;top: ${d.value.top}px` : m(K)])
200
+ }, [
201
+ k("div", {
202
+ class: x([m(h).e("top-left")]),
203
+ onMousedown: l[0] || (l[0] = (u) => U(u, "top-left"))
204
+ }, null, 34),
205
+ k("div", {
206
+ class: x([m(h).e("top-right")]),
207
+ onMousedown: l[1] || (l[1] = (u) => U(u, "top-right"))
208
+ }, null, 34),
209
+ k("div", {
210
+ class: x([m(h).e("bottom-right")]),
211
+ onMousedown: l[2] || (l[2] = (u) => U(u, "bottom-right"))
212
+ }, null, 34),
213
+ k("div", {
214
+ class: x([m(h).e("bottom-left")]),
215
+ onMousedown: l[3] || (l[3] = (u) => U(u, "bottom-left"))
216
+ }, null, 34)
217
+ ], 6)
218
+ ], 64))
219
+ ], 2));
220
+ }
221
+ });
222
+ export {
223
+ xe as default
224
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./photo-crop-tool.vue.cjs");exports.default=e.default;
@@ -0,0 +1,4 @@
1
+ import f from "./photo-crop-tool.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(t,n){return t.install=o=>{for(const e of[t,...Object.values({})])o.component(e.name,e)},t}exports.withInstall=l;
@@ -0,0 +1,9 @@
1
+ function c(t, n) {
2
+ return t.install = (e) => {
3
+ for (const o of [t, ...Object.values({})])
4
+ e.component(o.name, o);
5
+ }, t;
6
+ }
7
+ export {
8
+ c as withInstall
9
+ };
@@ -0,0 +1,256 @@
1
+ @charset "UTF-8";
2
+ /* Element Chalk Variables */
3
+ /* stylelint-disable no-duplicate-selectors */
4
+ :root {
5
+ --qxs-color-white: #fff;
6
+ --qxs-color-black: #000;
7
+ --qxs-color-primary-rgb: 255;
8
+ --qxs-color-success-rgb: 58;
9
+ --qxs-color-warning-rgb: 60;
10
+ --qxs-color-danger-rgb: 108;
11
+ --qxs-color-error-rgb: 108;
12
+ --qxs-color-info-rgb: 153;
13
+ --qxs-font-size-extra-large: 20px;
14
+ --qxs-font-size-large: 18px;
15
+ --qxs-font-size-medium: 16px;
16
+ --qxs-font-size-base: 14px;
17
+ --qxs-font-size-small: 13px;
18
+ --qxs-font-size-extra-small: 12px;
19
+ --qxs-font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
20
+ --qxs-font-weight-primary: 500;
21
+ --qxs-font-line-height-primary: 24px;
22
+ --qxs-index-normal: 1;
23
+ --qxs-index-top: 1000;
24
+ --qxs-index-popper: 2000;
25
+ --qxs-border-radius-base: 4px;
26
+ --qxs-border-radius-small: 2px;
27
+ --qxs-border-radius-round: 20px;
28
+ --qxs-border-radius-circle: 100%;
29
+ --qxs-transition-duration: 0.3s;
30
+ --qxs-transition-duration-fast: 0.2s;
31
+ --qxs-transition-function-ease-in-out-bezier: cubic-bezier(0.645, 0.045, 0.355, 1);
32
+ --qxs-transition-function-fast-bezier: cubic-bezier(0.23, 1, 0.32, 1);
33
+ --qxs-transition-all: all var(--qxs-transition-duration) var(--qxs-transition-function-ease-in-out-bezier);
34
+ --qxs-transition-fade: opacity var(--qxs-transition-duration) var(--qxs-transition-function-fast-bezier);
35
+ --qxs-transition-md-fade: transform var(--qxs-transition-duration) var(--qxs-transition-function-fast-bezier), opacity var(--qxs-transition-duration) var(--qxs-transition-function-fast-bezier);
36
+ --qxs-transition-fade-linear: opacity var(--qxs-transition-duration-fast) linear;
37
+ --qxs-transition-border: border-color var(--qxs-transition-duration-fast) var(--qxs-transition-function-ease-in-out-bezier);
38
+ --qxs-transition-box-shadow: box-shadow var(--qxs-transition-duration-fast) var(--qxs-transition-function-ease-in-out-bezier);
39
+ --qxs-transition-color: color var(--qxs-transition-duration-fast) var(--qxs-transition-function-ease-in-out-bezier);
40
+ --qxs-component-size-large: 40px;
41
+ --qxs-component-size: 32px;
42
+ --qxs-component-size-small: 24px;
43
+ }
44
+
45
+ :root {
46
+ color-scheme: light;
47
+ --qxs-color-primary: #409eff;
48
+ --qxs-color-primary-light-3: rgb(121.3, 187.1, 255);
49
+ --qxs-color-primary-light-5: rgb(159.5, 206.5, 255);
50
+ --qxs-color-primary-light-7: rgb(197.7, 225.9, 255);
51
+ --qxs-color-primary-light-8: rgb(216.8, 235.6, 255);
52
+ --qxs-color-primary-light-9: rgb(235.9, 245.3, 255);
53
+ --qxs-color-primary-dark-2: rgb(51.2, 126.4, 204);
54
+ --qxs-color-success: #67c23a;
55
+ --qxs-color-success-light-3: rgb(148.6, 212.3, 117.1);
56
+ --qxs-color-success-light-5: rgb(179, 224.5, 156.5);
57
+ --qxs-color-success-light-7: rgb(209.4, 236.7, 195.9);
58
+ --qxs-color-success-light-8: rgb(224.6, 242.8, 215.6);
59
+ --qxs-color-success-light-9: rgb(239.8, 248.9, 235.3);
60
+ --qxs-color-success-dark-2: rgb(82.4, 155.2, 46.4);
61
+ --qxs-color-warning: #e6a23c;
62
+ --qxs-color-warning-light-3: rgb(237.5, 189.9, 118.5);
63
+ --qxs-color-warning-light-5: rgb(242.5, 208.5, 157.5);
64
+ --qxs-color-warning-light-7: rgb(247.5, 227.1, 196.5);
65
+ --qxs-color-warning-light-8: rgb(250, 236.4, 216);
66
+ --qxs-color-warning-light-9: rgb(252.5, 245.7, 235.5);
67
+ --qxs-color-warning-dark-2: rgb(184, 129.6, 48);
68
+ --qxs-color-danger: #f56c6c;
69
+ --qxs-color-danger-light-3: rgb(248, 152.1, 152.1);
70
+ --qxs-color-danger-light-5: rgb(250, 181.5, 181.5);
71
+ --qxs-color-danger-light-7: rgb(252, 210.9, 210.9);
72
+ --qxs-color-danger-light-8: rgb(253, 225.6, 225.6);
73
+ --qxs-color-danger-light-9: rgb(254, 240.3, 240.3);
74
+ --qxs-color-danger-dark-2: rgb(196, 86.4, 86.4);
75
+ --qxs-color-error: #f56c6c;
76
+ --qxs-color-error-light-3: rgb(248, 152.1, 152.1);
77
+ --qxs-color-error-light-5: rgb(250, 181.5, 181.5);
78
+ --qxs-color-error-light-7: rgb(252, 210.9, 210.9);
79
+ --qxs-color-error-light-8: rgb(253, 225.6, 225.6);
80
+ --qxs-color-error-light-9: rgb(254, 240.3, 240.3);
81
+ --qxs-color-error-dark-2: rgb(196, 86.4, 86.4);
82
+ --qxs-color-info: #909399;
83
+ --qxs-color-info-light-3: rgb(177.3, 179.4, 183.6);
84
+ --qxs-color-info-light-5: rgb(199.5, 201, 204);
85
+ --qxs-color-info-light-7: rgb(221.7, 222.6, 224.4);
86
+ --qxs-color-info-light-8: rgb(232.8, 233.4, 234.6);
87
+ --qxs-color-info-light-9: rgb(243.9, 244.2, 244.8);
88
+ --qxs-color-info-dark-2: rgb(115.2, 117.6, 122.4);
89
+ --qxs-bg-color: #fff;
90
+ --qxs-bg-color-page: #f2f3f5;
91
+ --qxs-bg-color-overlay: #fff;
92
+ --qxs-text-color-primary: #303133;
93
+ --qxs-text-color-regular: #606266;
94
+ --qxs-text-color-secondary: #909399;
95
+ --qxs-text-color-placeholder: #a8abb2;
96
+ --qxs-text-color-disabled: #c0c4cc;
97
+ --qxs-border-color: #dcdfe6;
98
+ --qxs-border-color-light: #e4e7ed;
99
+ --qxs-border-color-lighter: #ebeef5;
100
+ --qxs-border-color-extra-light: #f2f6fc;
101
+ --qxs-border-color-dark: #d4d7de;
102
+ --qxs-border-color-darker: #cdd0d6;
103
+ --qxs-fill-color: #f0f2f5;
104
+ --qxs-fill-color-light: #f5f7fa;
105
+ --qxs-fill-color-lighter: #fafafa;
106
+ --qxs-fill-color-extra-light: #fafcff;
107
+ --qxs-fill-color-dark: #ebedf0;
108
+ --qxs-fill-color-darker: #e6e8eb;
109
+ --qxs-fill-color-blank: #fff;
110
+ --qxs-box-shadow: 0 12px 32px 4px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.08);
111
+ --qxs-box-shadow-light: 0 0 12px rgba(0, 0, 0, 0.12);
112
+ --qxs-box-shadow-lighter: 0 0 6px rgba(0, 0, 0, 0.12);
113
+ --qxs-box-shadow-dark: 0 16px 48px 16px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.12), 0 8px 16px -8px rgba(0, 0, 0, 0.16);
114
+ --qxs-disabled-bg-color: var(--qxs-fill-color-light);
115
+ --qxs-disabled-text-color: var(--qxs-text-color-placeholder);
116
+ --qxs-disabled-border-color: var(--qxs-border-color-light);
117
+ --qxs-overlay-color: rgba(0, 0, 0, 0.8);
118
+ --qxs-overlay-color-light: rgba(0, 0, 0, 0.7);
119
+ --qxs-overlay-color-lighter: rgba(0, 0, 0, 0.5);
120
+ --qxs-mask-color: rgba(255, 255, 255, 0.9);
121
+ --qxs-mask-color-extra-light: rgba(255, 255, 255, 0.3);
122
+ --qxs-border-width: 1px;
123
+ --qxs-border-style: solid;
124
+ --qxs-border-color-hover: var(--qxs-text-color-disabled);
125
+ --qxs-border: var(--qxs-border-width) var(--qxs-border-style) var(--qxs-border-color);
126
+ --qxs-svg-monochrome-grey: var(--qxs-border-color);
127
+ }
128
+
129
+ /* stylelint-enable no-duplicate-selectors */
130
+ .fade-in-linear-enter-active,
131
+ .fade-in-linear-leave-active {
132
+ transition: var(--qxs-transition-fade-linear);
133
+ }
134
+
135
+ .fade-in-linear-enter-from,
136
+ .fade-in-linear-leave-to {
137
+ opacity: 0;
138
+ }
139
+
140
+ .qxs-fade-in-linear-enter-active,
141
+ .qxs-fade-in-linear-leave-active {
142
+ transition: var(--qxs-transition-fade-linear);
143
+ }
144
+
145
+ .qxs-fade-in-linear-enter-from,
146
+ .qxs-fade-in-linear-leave-to {
147
+ opacity: 0;
148
+ }
149
+
150
+ .qxs-fade-in-enter-active,
151
+ .qxs-fade-in-leave-active {
152
+ transition: all var(--qxs-transition-duration) cubic-bezier(0.55, 0, 0.1, 1);
153
+ }
154
+
155
+ .qxs-fade-in-enter-from,
156
+ .qxs-fade-in-leave-active {
157
+ opacity: 0;
158
+ }
159
+
160
+ .qxs-zoom-in-center-enter-active,
161
+ .qxs-zoom-in-center-leave-active {
162
+ transition: all var(--qxs-transition-duration) cubic-bezier(0.55, 0, 0.1, 1);
163
+ }
164
+
165
+ .qxs-zoom-in-center-enter-from,
166
+ .qxs-zoom-in-center-leave-active {
167
+ opacity: 0;
168
+ transform: scaleX(0);
169
+ }
170
+
171
+ .qxs-zoom-in-top-enter-active,
172
+ .qxs-zoom-in-top-leave-active {
173
+ opacity: 1;
174
+ transition: var(--qxs-transition-md-fade);
175
+ transform: scaleY(1);
176
+ transform-origin: center top;
177
+ }
178
+ .qxs-zoom-in-top-enter-active[data-popper-placement^=top],
179
+ .qxs-zoom-in-top-leave-active[data-popper-placement^=top] {
180
+ transform-origin: center bottom;
181
+ }
182
+
183
+ .qxs-zoom-in-top-enter-from,
184
+ .qxs-zoom-in-top-leave-active {
185
+ opacity: 0;
186
+ transform: scaleY(0);
187
+ }
188
+
189
+ .qxs-zoom-in-bottom-enter-active,
190
+ .qxs-zoom-in-bottom-leave-active {
191
+ opacity: 1;
192
+ transition: var(--qxs-transition-md-fade);
193
+ transform: scaleY(1);
194
+ transform-origin: center bottom;
195
+ }
196
+
197
+ .qxs-zoom-in-bottom-enter-from,
198
+ .qxs-zoom-in-bottom-leave-active {
199
+ opacity: 0;
200
+ transform: scaleY(0);
201
+ }
202
+
203
+ .qxs-zoom-in-left-enter-active,
204
+ .qxs-zoom-in-left-leave-active {
205
+ opacity: 1;
206
+ transition: var(--qxs-transition-md-fade);
207
+ transform: scale(1, 1);
208
+ transform-origin: top left;
209
+ }
210
+
211
+ .qxs-zoom-in-left-enter-from,
212
+ .qxs-zoom-in-left-leave-active {
213
+ opacity: 0;
214
+ transform: scale(0.45, 0.45);
215
+ }
216
+
217
+ .collapse-transition {
218
+ transition: var(--qxs-transition-duration) height ease-in-out, var(--qxs-transition-duration) padding-top ease-in-out, var(--qxs-transition-duration) padding-bottom ease-in-out;
219
+ }
220
+
221
+ .qxs-collapse-transition-leave-active,
222
+ .qxs-collapse-transition-enter-active {
223
+ transition: var(--qxs-transition-duration) max-height ease-in-out, var(--qxs-transition-duration) padding-top ease-in-out, var(--qxs-transition-duration) padding-bottom ease-in-out;
224
+ }
225
+
226
+ .horizontal-collapse-transition {
227
+ transition: var(--qxs-transition-duration) width ease-in-out, var(--qxs-transition-duration) padding-left ease-in-out, var(--qxs-transition-duration) padding-right ease-in-out;
228
+ }
229
+
230
+ .qxs-list-enter-active,
231
+ .qxs-list-leave-active {
232
+ transition: all 1s;
233
+ }
234
+
235
+ .qxs-list-enter-from,
236
+ .qxs-list-leave-to {
237
+ opacity: 0;
238
+ transform: translateY(-30px);
239
+ }
240
+
241
+ .qxs-list-leave-active {
242
+ position: absolute !important;
243
+ }
244
+
245
+ .qxs-opacity-transition {
246
+ transition: opacity var(--qxs-transition-duration) cubic-bezier(0.55, 0, 0.1, 1);
247
+ }
248
+
249
+ :root [data-fixed-calc-width] {
250
+ position: fixed;
251
+ right: 0;
252
+ left: 0%;
253
+ }
254
+ :root [data-mode=mobile] [data-fixed-calc-width] {
255
+ width: 100% !important;
256
+ }
@@ -0,0 +1,23 @@
1
+ /* Element Chalk Variables */
2
+ .qxs-file-upload__control .el-upload.is-drag {
3
+ display: inline-block;
4
+ }
5
+ .qxs-file-upload__control .el-upload.is-drag .el-upload-dragger {
6
+ padding: 0;
7
+ }
8
+ .qxs-file-upload__control .el-upload.is-drag .el-upload-dragger .el-icon--upload {
9
+ margin-bottom: 0;
10
+ font-size: 40px;
11
+ }
12
+ .qxs-file-upload__control .el-upload.is-drag .el-upload-dragger .el-upload__text {
13
+ padding: 0 6px;
14
+ font-size: 14px;
15
+ line-height: 1.5;
16
+ }
17
+ .qxs-file-upload__control .el-upload.is-drag.is-dragover {
18
+ border-width: 1px;
19
+ }
20
+ .qxs-file-upload__control .el-upload.is-drag .slot {
21
+ width: 160px;
22
+ height: 90px;
23
+ }
@@ -0,0 +1,13 @@
1
+ /* Element Chalk Variables */
2
+ .qxs-fixed-action-bar__actionbar {
3
+ bottom: 0;
4
+ z-index: 10;
5
+ padding: var(--qxs-fixed-action-bar-actionbar-padding);
6
+ text-align: center;
7
+ background-color: var(--qxs-bg-color, #fff);
8
+ box-shadow: 0 0 1px 0 var(--qxs-border-color, #f3f3f2);
9
+ transition: box-shadow 0.3s, var(--qxs-transition-box-shadow, #f3f3f2);
10
+ }
11
+ .qxs-fixed-action-bar__actionbar.is-shadow {
12
+ box-shadow: 0 -10px 10px -10px var(--qxs-border-color, #fff);
13
+ }
@@ -0,0 +1,117 @@
1
+ /* Element Chalk Variables */
2
+ .qxs-image-upload__upload-container {
3
+ line-height: initial;
4
+ }
5
+ .qxs-image-upload__upload-container .el-upload__tip-text {
6
+ font-size: 14px;
7
+ line-height: 32px;
8
+ color: #c8c8c8;
9
+ }
10
+ .qxs-image-upload__upload-container .el-image {
11
+ display: block;
12
+ }
13
+ .qxs-image-upload__upload-container .image {
14
+ position: relative;
15
+ overflow: hidden;
16
+ border-radius: 6px;
17
+ }
18
+ .qxs-image-upload__upload-container .image .mask {
19
+ position: absolute;
20
+ top: 0;
21
+ width: 100%;
22
+ height: 100%;
23
+ background-color: var(--el-overlay-color-lighter);
24
+ opacity: 0;
25
+ transition: opacity 0.3s;
26
+ }
27
+ .qxs-image-upload__upload-container .image .mask .actions {
28
+ display: flex;
29
+ flex-wrap: wrap;
30
+ align-items: center;
31
+ justify-content: center;
32
+ width: 100px;
33
+ height: 100px;
34
+ position: absolute;
35
+ top: 50%;
36
+ left: 50%;
37
+ transform: translateX(-50%) translateY(-50%);
38
+ }
39
+ .qxs-image-upload__upload-container .image .mask .actions span {
40
+ width: 50%;
41
+ color: var(--el-color-white);
42
+ text-align: center;
43
+ cursor: pointer;
44
+ transition: color 0.1s, transform 0.1s;
45
+ }
46
+ .qxs-image-upload__upload-container .image .mask .actions span:hover {
47
+ transform: scale(1.5);
48
+ }
49
+ .qxs-image-upload__upload-container .image .mask .actions span .el-icon {
50
+ font-size: 24px;
51
+ }
52
+ .qxs-image-upload__upload-container .image:hover .mask {
53
+ opacity: 1;
54
+ }
55
+ .qxs-image-upload__image-upload {
56
+ display: inline-block;
57
+ vertical-align: top;
58
+ }
59
+
60
+ .qxs-image-upload__upload-container .el-upload {
61
+ font-size: 0;
62
+ }
63
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger {
64
+ display: inline-block;
65
+ padding: 0;
66
+ font-size: 0;
67
+ }
68
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger.is-dragover {
69
+ border-width: 1px;
70
+ }
71
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .image-slot {
72
+ display: flex;
73
+ flex-direction: column;
74
+ align-items: center;
75
+ justify-content: center;
76
+ width: 100%;
77
+ height: 100%;
78
+ font-size: 14px;
79
+ color: var(--el-text-color-placeholder);
80
+ background-color: #f5f5f5;
81
+ transition: all 0.3s;
82
+ }
83
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .image-slot:hover {
84
+ background-color: #eee;
85
+ }
86
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .image-slot .el-icon {
87
+ font-size: 28px;
88
+ }
89
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .image-slot p {
90
+ margin-top: 10px;
91
+ margin-bottom: 0;
92
+ line-height: 1em;
93
+ color: #5a5a5a;
94
+ }
95
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .progress {
96
+ position: absolute;
97
+ top: 0;
98
+ }
99
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .progress::after {
100
+ position: absolute;
101
+ top: 0;
102
+ left: 0;
103
+ width: 100%;
104
+ height: 100%;
105
+ content: "";
106
+ background-color: var(--el-overlay-color-lighter);
107
+ }
108
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .progress .el-progress {
109
+ z-index: 1;
110
+ position: absolute;
111
+ top: 50%;
112
+ left: 50%;
113
+ transform: translateX(-50%) translateY(-50%);
114
+ }
115
+ .qxs-image-upload__upload-container .el-upload .el-upload-dragger .progress .el-progress .el-progress__text {
116
+ color: var(--el-text-color-placeholder);
117
+ }