@qxs-bns/components 0.0.65 → 0.0.67

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 (30) hide show
  1. package/es/package.json.mjs +1 -1
  2. package/es/src/data-chart/src/components/area.vue3.mjs +1 -1
  3. package/es/src/data-chart/src/components/bar.vue3.mjs +1 -1
  4. package/es/src/data-chart/src/components/card.vue3.mjs +1 -1
  5. package/es/src/data-chart/src/components/funnel.vue3.mjs +1 -1
  6. package/es/src/data-chart/src/components/line.vue3.mjs +1 -1
  7. package/es/src/data-chart/src/components/pie.vue3.mjs +1 -1
  8. package/es/src/data-chart/src/components/radar.vue3.mjs +1 -1
  9. package/es/src/data-chart/src/components/scatter-simple.vue3.mjs +1 -1
  10. package/es/src/data-chart/src/components/scatter.vue3.mjs +1 -1
  11. package/es/src/image-upload/src/image-upload.vue.mjs +1 -1
  12. package/es/src/image-upload/src/image-upload.vue.mjs.map +1 -1
  13. package/lib/package.json.cjs +1 -1
  14. package/lib/src/data-chart/src/components/area.vue3.cjs +1 -1
  15. package/lib/src/data-chart/src/components/bar.vue3.cjs +1 -1
  16. package/lib/src/data-chart/src/components/card.vue3.cjs +1 -1
  17. package/lib/src/data-chart/src/components/funnel.vue3.cjs +1 -1
  18. package/lib/src/data-chart/src/components/line.vue3.cjs +1 -1
  19. package/lib/src/data-chart/src/components/pie.vue3.cjs +1 -1
  20. package/lib/src/data-chart/src/components/radar.vue3.cjs +1 -1
  21. package/lib/src/data-chart/src/components/scatter-simple.vue3.cjs +1 -1
  22. package/lib/src/data-chart/src/components/scatter.vue3.cjs +1 -1
  23. package/lib/src/image-upload/src/image-upload.vue.cjs +1 -1
  24. package/lib/src/image-upload/src/image-upload.vue.cjs.map +1 -1
  25. package/package.json +2 -2
  26. package/theme-chalk/index.css +1 -1
  27. package/theme-chalk/src/image-upload.css +1 -1
  28. package/theme-chalk/src/image-upload.scss +4 -2
  29. package/types/src/image-upload/src/image-upload.vue.d.ts.map +1 -1
  30. package/types/tsconfig.tsbuildinfo +1 -1
@@ -1,2 +1,2 @@
1
- var r="0.0.65";export{r as version};
1
+ var r="0.0.67";export{r as version};
2
2
  //# sourceMappingURL=package.json.mjs.map
@@ -1,2 +1,2 @@
1
- import a from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t="/* unplugin-vue-components disabled */\n.data-chart-area-wrap[data-v-51660d7b] {\n position: relative;\n}\n.data-chart-area-wrap .city-select[data-v-51660d7b] {\n position: absolute;\n top: 10px;\n right: 100px;\n z-index: 1;\n width: 120px;\n}\n.data-chart-area-wrap .data-chart-area[data-v-51660d7b] {\n width: 100%;\n height: 100%;\n min-height: 300px;\n}";a(t);export{t as default};
1
+ import a from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=".data-chart-area-wrap[data-v-51660d7b]{position:relative}.data-chart-area-wrap .city-select[data-v-51660d7b]{position:absolute;right:100px;top:10px;width:120px;z-index:1}.data-chart-area-wrap .data-chart-area[data-v-51660d7b]{height:100%;min-height:300px;width:100%}";a(t);export{t as default};
2
2
  //# sourceMappingURL=area.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t="/* unplugin-vue-components disabled */\n.data-chart-bar[data-v-c325b6e7] {\n width: 100%;\n height: 100%;\n}";e(t);export{t as default};
1
+ import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=".data-chart-bar[data-v-c325b6e7]{height:100%;width:100%}";e(t);export{t as default};
2
2
  //# sourceMappingURL=bar.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import n from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var a="/* unplugin-vue-components disabled */\n.data-chart-card[data-v-1c14c088] {\n display: flex;\n flex-direction: column;\n}\n.data-chart-card .title[data-v-1c14c088] {\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 5.5px;\n line-height: 26px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n color: #464646;\n}\n.data-chart-card .data-chart-card-grid-layout[data-v-1c14c088] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 10px;\n width: calc(100% - 3px);\n}\n.data-chart-card .data-chart-card-wrap[data-v-1c14c088] {\n height: 100% !important;\n}\n.data-chart-card .data-chart-card-wrap .card-item[data-v-1c14c088] {\n width: 100% !important;\n}\n.data-chart-card .card-item[data-v-1c14c088] {\n position: relative;\n background-repeat: no-repeat;\n background-position: left top, right top;\n background-size: contain, contain;\n border: 2px solid #2196f3;\n border-radius: 6px;\n}\n.data-chart-card .card-item .suffix-icon[data-v-1c14c088] {\n position: absolute;\n right: 1px;\n bottom: calc(25% - 14px);\n width: 20px;\n font-size: 20px;\n font-weight: bold;\n color: #fff;\n text-align: center;\n}\n.data-chart-card .card-item .card-title[data-v-1c14c088] {\n padding-left: 15px;\n margin-top: 10px;\n margin-bottom: 5px;\n overflow: hidden;\n font-size: 16px;\n font-weight: bold;\n color: #2196f3;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.data-chart-card .card-item .context[data-v-1c14c088] {\n padding: 0 30px 10px 20px;\n font-size: 14px;\n color: #464646;\n}";n(a);export{a as default};
1
+ import a from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=".data-chart-card[data-v-1c14c088]{display:flex;flex-direction:column}.data-chart-card .title[data-v-1c14c088]{align-items:center;color:#464646;display:flex;font-family:sans-serif;font-size:14px;font-weight:600;justify-content:space-between;line-height:26px;margin:0;padding:0 5.5px}.data-chart-card .data-chart-card-grid-layout[data-v-1c14c088]{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));width:calc(100% - 3px)}.data-chart-card .data-chart-card-wrap[data-v-1c14c088]{height:100%!important}.data-chart-card .data-chart-card-wrap .card-item[data-v-1c14c088]{width:100%!important}.data-chart-card .card-item[data-v-1c14c088]{background-position:0 0,100% 0;background-repeat:no-repeat;background-size:contain,contain;border:2px solid #2196f3;border-radius:6px;position:relative}.data-chart-card .card-item .suffix-icon[data-v-1c14c088]{bottom:calc(25% - 14px);color:#fff;font-size:20px;font-weight:700;position:absolute;right:1px;text-align:center;width:20px}.data-chart-card .card-item .card-title[data-v-1c14c088]{color:#2196f3;font-size:16px;font-weight:700;margin-bottom:5px;margin-top:10px;overflow:hidden;padding-left:15px;text-overflow:ellipsis;white-space:nowrap}.data-chart-card .card-item .context[data-v-1c14c088]{color:#464646;font-size:14px;padding:0 30px 10px 20px}";a(t);export{t as default};
2
2
  //# sourceMappingURL=card.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var n="/* unplugin-vue-components disabled */\n.data-chart-funnel[data-v-c580cbe3] {\n width: 100%;\n height: 100%;\n}";e(n);export{n as default};
1
+ import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=".data-chart-funnel[data-v-c580cbe3]{height:100%;width:100%}";e(t);export{t as default};
2
2
  //# sourceMappingURL=funnel.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t="/* unplugin-vue-components disabled */\n.data-chart-line[data-v-397864aa] {\n width: 100%;\n height: 100%;\n}";e(t);export{t as default};
1
+ import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=".data-chart-line[data-v-397864aa]{height:100%;width:100%}";e(t);export{t as default};
2
2
  //# sourceMappingURL=line.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t="/* unplugin-vue-components disabled */\n.data-chart-pie[data-v-b5a98608] {\n width: 100%;\n height: 100%;\n}";e(t);export{t as default};
1
+ import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=".data-chart-pie[data-v-b5a98608]{height:100%;width:100%}";e(t);export{t as default};
2
2
  //# sourceMappingURL=pie.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t="/* unplugin-vue-components disabled */\n.data-chart-radar[data-v-dcb2eae6] {\n width: 100%;\n height: 100%;\n}";e(t);export{t as default};
1
+ import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t=".data-chart-radar[data-v-dcb2eae6]{height:100%;width:100%}";e(t);export{t as default};
2
2
  //# sourceMappingURL=radar.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t="/* unplugin-vue-components disabled */\n.data-chart-scatter-simple[data-v-8129b8a5] {\n width: 100%;\n height: 100%;\n}";e(t);export{t as default};
1
+ import t from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var e=".data-chart-scatter-simple[data-v-8129b8a5]{height:100%;width:100%}";t(e);export{e as default};
2
2
  //# sourceMappingURL=scatter-simple.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var t="/* unplugin-vue-components disabled */\n.data-chart-scatter[data-v-b52b34fd] {\n width: 100%;\n height: 100%;\n}";e(t);export{t as default};
1
+ import t from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs";var e=".data-chart-scatter[data-v-b52b34fd]{height:100%;width:100%}";t(e);export{e as default};
2
2
  //# sourceMappingURL=scatter.vue3.mjs.map
@@ -1,2 +1,2 @@
1
- import{ElUpload as e,ElImageViewer as i,ElMessage as t}from"element-plus/es";import"element-plus/es/components/base/style/index";import"element-plus/es/components/image-viewer/style/index";import"element-plus/es/components/upload/style/index";import{defineComponent as l,mergeModels as a,useAttrs as s,useModel as r,ref as p,computed as n,createElementBlock as o,openBlock as u,normalizeStyle as d,normalizeClass as m,unref as c,createVNode as f,createBlock as v,createCommentVNode as g,mergeProps as y,withCtx as h,renderSlot as b,createElementVNode as q,toDisplayString as x}from"vue";import{Plus as $}from"@element-plus/icons-vue";import{ZoomIn as w,Delete as _}from"@qxs-bns/icons";import{useNamespace as V}from"element-plus";import"element-plus/es/components/message/style/index";const k={class:"image-slot"},S=["src"],L=["onClick"],U=["onClick"],j={class:"tip-content"};var z=l({name:"QxsImageUpload",__name:"image-upload",props:a({action:{type:String,required:!0},headers:{type:null,required:!1},data:{type:null,required:!1},name:{type:String,required:!1,default:"file"},url:{type:String,required:!1},size:{type:Number,required:!1,default:20},width:{type:Number,required:!1,default:160},accept:{type:String,required:!1,default:"image/jpeg,image/jpg,image/png,image/gif"},height:{type:Number,required:!1,default:90},placeholder:{type:String,required:!1,default:"上传图片"},notip:{type:Boolean,required:!1,default:!1},tipText:{type:String,required:!1,default:""},beforeUpload:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:1}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:a(["onSuccess","remove"],["update:fileList"]),setup(l,{emit:a}){const z=a,B=s(),C=r(l,"fileList"),M=V("image-upload"),N=p(0),O=p({imageViewerVisible:!1,progress:{preview:"",percent:0}}),R=n(()=>M.cssVarBlock({ns:M.namespace.value,width:`${l.width||160}px`,height:`${l.height||90}px`})),T=n(()=>l.accept.split(",").map(e=>e.split("/").pop())),A=n(()=>l.tipText||`上传图片支持 ${T.value.join(" / ")} 格式,且图片大小不超过 ${l.size}MB${l.width&&l.height?`,建议图片尺寸为 ${l.width}*${l.height}`:""}`);function I(e){N.value=C.value.indexOf(e),O.value.imageViewerVisible=!0}function Q(e){C.value.splice(C.value.indexOf(e),1)}function D(){O.value.imageViewerVisible=!1}const E=e=>{const i=e.name.split(".").pop()??"",a=T.value.includes(i),s=e.size/1024/1024<l.size;return a?s?(O.value.progress.preview=URL.createObjectURL(e),!l.beforeUpload||l.beforeUpload(e)):(t.error(`上传图片大小不能超过 ${l.size}MB!`),!1):(t.error(`上传图片只支持${T.value.join(" / ")}格式!`),!1)},F=e=>{O.value.progress.percent=Math.floor(e.percent)},G=(...e)=>{O.value.progress={preview:"",percent:0},z("onSuccess",...e)};return(t,l)=>{const a=e,s=i;return u(),o("div",{class:m(c(M).e("container")),style:d(c(R))},[f(a,y(c(B),{"file-list":C.value,"onUpdate:fileList":l[0]||(l[0]=e=>C.value=e),drag:"",limit:t.limit,"list-type":"picture-card",headers:t.headers,action:t.action,data:t.data,name:t.name,accept:t.accept,"before-upload":E,"on-progress":F,"on-preview":I,"on-success":G,class:[c(M).e("control"),t.limit<=C.value.length?c(M).e("more-than-limit"):""],"on-remove":Q}),{file:h(({file:e})=>[q("img",{class:m(`${c(M).namespace.value}-upload-list__item-thumbnail`),src:e.url,alt:""},null,10,S),q("span",{class:m(`${c(M).namespace.value}-upload-list__item-actions`)},[q("span",{class:m(`${c(M).namespace.value}-upload-list__item-preview`),onClick:i=>I(e)},[f(c(w))],10,L),t.disabled?g("v-if",!0):(u(),o("span",{key:0,class:m(`${c(M).namespace.value}-upload-list__item-delete`),onClick:i=>Q(e)},[f(c(_))],10,U))],2)]),tip:h(()=>[b(t.$slots,"tip",{},()=>[t.notip?g("v-if",!0):(u(),o("div",{key:0,class:m(`${c(M).namespace.value}-upload__tip-text`)},[q("div",j,x(c(A)),1)],2))])]),default:h(()=>[b(t.$slots,"default",{},()=>[q("div",k,[f(c($)),q("p",null,x(t.placeholder),1)])])]),_:3},16,["file-list","limit","headers","action","data","name","accept","class"]),c(O).imageViewerVisible?(u(),v(s,{key:0,"url-list":C.value.map(e=>e.url).filter(e=>void 0!==e),"initial-index":c(N),teleported:"",onClose:D},null,8,["url-list","initial-index"])):g("v-if",!0)],6)}}});export{z as default};
1
+ import{ElUpload as e,ElImageViewer as i,ElMessage as t}from"element-plus/es";import"element-plus/es/components/base/style/index";import"element-plus/es/components/image-viewer/style/index";import"element-plus/es/components/upload/style/index";import{defineComponent as l,mergeModels as a,useAttrs as s,useModel as r,ref as p,computed as n,resolveComponent as o,createElementBlock as u,openBlock as d,normalizeStyle as c,normalizeClass as m,unref as f,createVNode as g,createBlock as v,createCommentVNode as h,mergeProps as y,withCtx as x,renderSlot as b,createElementVNode as q,toDisplayString as w}from"vue";import{Image as $,ZoomIn as _,Delete as k}from"@qxs-bns/icons";import{useNamespace as V}from"element-plus";import"element-plus/es/components/message/style/index";const z={class:"image-slot"},S=["src"],L=["onClick"],U=["onClick"],j={class:"tip-content"};var B=l({name:"QxsImageUpload",__name:"image-upload",props:a({action:{type:String,required:!0},headers:{type:null,required:!1},data:{type:null,required:!1},name:{type:String,required:!1,default:"file"},url:{type:String,required:!1},size:{type:Number,required:!1,default:20},width:{type:Number,required:!1,default:160},accept:{type:String,required:!1,default:"image/jpeg,image/jpg,image/png,image/gif"},height:{type:Number,required:!1,default:90},placeholder:{type:String,required:!1,default:"上传图片"},notip:{type:Boolean,required:!1,default:!1},tipText:{type:String,required:!1,default:""},beforeUpload:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:1}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:a(["onSuccess","remove"],["update:fileList"]),setup(l,{emit:a}){const B=a,C=s(),M=r(l,"fileList"),N=V("image-upload"),O=p(0),I=p({imageViewerVisible:!1,progress:{preview:"",percent:0}}),Q=n(()=>N.cssVarBlock({ns:N.namespace.value,width:`${l.width||160}px`,height:`${l.height||90}px`})),R=n(()=>l.accept.split(",").map(e=>e.split("/").pop())),T=n(()=>l.tipText||`上传图片支持 ${R.value.join(" / ")} 格式,且图片大小不超过 ${l.size}MB${l.width&&l.height?`,建议图片尺寸为 ${l.width}*${l.height}`:""}`);function A(e){O.value=M.value.indexOf(e),I.value.imageViewerVisible=!0}function D(e){M.value.splice(M.value.indexOf(e),1)}function E(){I.value.imageViewerVisible=!1}const F=e=>{const i=e.name.split(".").pop()??"",a=R.value.includes(i),s=e.size/1024/1024<l.size;return a?s?(I.value.progress.preview=URL.createObjectURL(e),!l.beforeUpload||l.beforeUpload(e)):(t.error(`上传图片大小不能超过 ${l.size}MB!`),!1):(t.error(`上传图片只支持${R.value.join(" / ")}格式!`),!1)},G=e=>{I.value.progress.percent=Math.floor(e.percent)},H=(...e)=>{I.value.progress={preview:"",percent:0},B("onSuccess",...e)};return(t,l)=>{const a=o("QxsIcon"),s=e,r=i;return d(),u("div",{class:m(f(N).e("container")),style:c(f(Q))},[g(s,y(f(C),{"file-list":M.value,"onUpdate:fileList":l[0]||(l[0]=e=>M.value=e),drag:"",limit:t.limit,"list-type":"picture-card",headers:t.headers,action:t.action,data:t.data,name:t.name,accept:t.accept,"before-upload":F,"on-progress":G,"on-preview":A,"on-success":H,class:[f(N).e("control"),t.limit<=M.value.length?f(N).e("more-than-limit"):""],"on-remove":D}),{file:x(({file:e})=>[q("img",{class:m(`${f(N).namespace.value}-upload-list__item-thumbnail`),src:e.url},null,10,S),q("span",{class:m(`${f(N).namespace.value}-upload-list__item-actions`)},[q("span",{class:m(`${f(N).namespace.value}-upload-list__item-preview`),onClick:i=>A(e)},[g(f(_),{size:"14px"})],10,L),l[1]||(l[1]=q("span",{style:{width:"1px",height:"14px","background-color":"rgba(255, 255, 255, 0.5)"}},null,-1)),t.disabled?h("v-if",!0):(d(),u("span",{key:0,class:m(`${f(N).namespace.value}-upload-list__item-delete`),onClick:i=>D(e)},[g(f(k),{size:"14px"})],10,U))],2)]),tip:x(()=>[b(t.$slots,"tip",{},()=>[t.notip?h("v-if",!0):(d(),u("div",{key:0,class:m(`${f(N).namespace.value}-upload__tip-text`)},[q("div",j,w(f(T)),1)],2))])]),default:x(()=>[b(t.$slots,"default",{},()=>[q("div",z,[g(a,{size:"32px",icon:f($)},null,8,["icon"]),q("p",null,w(t.placeholder),1)])])]),_:3},16,["file-list","limit","headers","action","data","name","accept","class"]),f(I).imageViewerVisible?(d(),v(r,{key:0,"url-list":M.value.map(e=>e.url).filter(e=>void 0!==e),"initial-index":f(O),teleported:"",onClose:E},null,8,["url-list","initial-index"])):h("v-if",!0)],6)}}});export{B as default};
2
2
  //# sourceMappingURL=image-upload.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-upload.vue.mjs","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { UploadFile, UploadFiles, UploadProps } from 'element-plus'\nimport { Plus } from '@element-plus/icons-vue'\nimport { ZoomIn, Delete } from '@qxs-bns/icons'\nimport { useNamespace } from 'element-plus'\n\n// 组件名称\ndefineOptions({\n name: 'QxsImageUpload',\n})\n\n// Props 定义\nconst {\n name = 'file',\n size = 20,\n width = 160,\n height = 90,\n limit = 1,\n placeholder = '上传图片',\n notip = false,\n accept = 'image/jpeg,image/jpg,image/png,image/gif',\n beforeUpload,\n tipText = '',\n disabled = false,\n} = defineProps<ImageUploadProps>()\n\n// Emits 定义\nconst emits = defineEmits<{\n onSuccess: [res: any, uploadFile: UploadFile, uploadFiles: UploadFiles]\n remove: [file: UploadFile]\n}>()\n\n// 类型定义\nexport interface ImageUploadProps {\n action: UploadProps['action']\n headers?: UploadProps['headers']\n data?: UploadProps['data']\n name?: UploadProps['name']\n url?: string\n size?: number\n width?: number\n accept?: string\n height?: number\n placeholder?: string\n notip?: boolean\n tipText?: string\n beforeUpload?: UploadProps['beforeUpload']\n disabled?: boolean\n limit?: number\n}\n\ninterface UploadProgress {\n preview: string\n percent: number\n}\n\nconst attrs = useAttrs()\n\nconst fileList = defineModel('fileList', {\n type: Array as () => UploadFile[],\n default: () => [],\n})\n\n// 命名空间\nconst nsEl = useNamespace('image-upload')\n\nconst initialIndex = ref(0)\n// 响应式数据\nconst uploadData = ref<{\n imageViewerVisible: boolean\n progress: UploadProgress\n}>({\n imageViewerVisible: false,\n progress: {\n preview: '',\n percent: 0,\n },\n})\n\nconst cssVar = computed(() => {\n return nsEl.cssVarBlock({\n ns: nsEl.namespace.value,\n width: `${width || 160}px`,\n height: `${height || 90}px`,\n })\n})\n\n// 计算属性\nconst exts = computed(() =>\n accept.split(',').map(ext => ext.split('/').pop()),\n)\n\nconst tipMessage = computed(\n () =>\n tipText\n || `上传图片支持 ${exts.value.join(\n ' / ',\n )} 格式,且图片大小不超过 ${size}MB${width && height ? `,建议图片尺寸为 ${width}*${height}` : ''}`,\n)\n\n// 方法\nfunction onPreview(file: UploadFile) {\n initialIndex.value = fileList.value.indexOf(file)\n uploadData.value.imageViewerVisible = true\n}\nfunction onRemove(file: UploadFile) {\n fileList.value.splice(fileList.value.indexOf(file), 1)\n}\n\nfunction previewClose() {\n uploadData.value.imageViewerVisible = false\n}\n\nconst handleBeforeUpload: UploadProps['beforeUpload'] = (file) => {\n const fileExt = file.name.split('.').pop() ?? ''\n const isTypeOk = exts.value.includes(fileExt)\n const isSizeOk = file.size / 1024 / 1024 < size\n\n if (!isTypeOk) {\n ElMessage.error(`上传图片只支持${exts.value.join(' / ')}格式!`)\n return false\n }\n\n if (!isSizeOk) {\n ElMessage.error(`上传图片大小不能超过 ${size}MB!`)\n return false\n }\n\n uploadData.value.progress.preview = URL.createObjectURL(file)\n\n return beforeUpload ? beforeUpload(file) : true\n}\n\nconst onProgress: UploadProps['onProgress'] = (evt) => {\n uploadData.value.progress.percent = Math.floor(evt.percent)\n}\n\nconst onSuccess: UploadProps['onSuccess'] = (...args) => {\n uploadData.value.progress = {\n preview: '',\n percent: 0,\n }\n emits('onSuccess', ...args)\n}\n</script>\n\n<template>\n <div\n :class=\"nsEl.e('container')\"\n :style=\"cssVar\"\n >\n <el-upload\n v-bind=\"attrs\"\n v-model:file-list=\"fileList\"\n drag\n :limit=\"limit\"\n list-type=\"picture-card\"\n :headers=\"headers\"\n :action=\"action\"\n :data=\"data\"\n :name=\"name\"\n :accept=\"accept\"\n :before-upload=\"handleBeforeUpload\"\n :on-progress=\"onProgress\"\n :on-preview=\"onPreview\"\n :on-success=\"onSuccess\"\n :class=\"[nsEl.e('control'), limit <= fileList.length ? nsEl.e('more-than-limit') : '']\"\n :on-remove=\"onRemove\"\n >\n <slot>\n <div class=\"image-slot\">\n <Plus />\n <p>{{ placeholder }}</p>\n </div>\n </slot>\n <template #file=\"{ file }\">\n <img\n :class=\"`${nsEl.namespace.value}-upload-list__item-thumbnail`\"\n :src=\"file.url\"\n alt=\"\"\n >\n <span :class=\"`${nsEl.namespace.value}-upload-list__item-actions`\">\n <span\n :class=\"`${nsEl.namespace.value}-upload-list__item-preview`\"\n @click=\"onPreview(file)\"\n >\n <ZoomIn />\n </span>\n <span\n v-if=\"!disabled\"\n :class=\"`${nsEl.namespace.value}-upload-list__item-delete`\"\n @click=\"onRemove(file)\"\n >\n <Delete />\n </span>\n </span>\n </template>\n <template #tip>\n <slot name=\"tip\">\n <div\n v-if=\"!notip\"\n :class=\"`${nsEl.namespace.value}-upload__tip-text`\"\n >\n <div class=\"tip-content\">\n {{ tipMessage }}\n </div>\n </div>\n </slot>\n </template>\n </el-upload>\n\n <el-image-viewer\n v-if=\"uploadData.imageViewerVisible\"\n :url-list=\"fileList.map((item: UploadFile) => item.url).filter((v: string | undefined) => v !== undefined)\"\n :initial-index=\"initialIndex\"\n teleported\n @close=\"previewClose\"\n />\n </div>\n</template>\n"],"names":["emits","__emit","attrs","useAttrs","fileList","_useModel","__props","nsEl","useNamespace","initialIndex","ref","uploadData","imageViewerVisible","progress","preview","percent","cssVar","computed","cssVarBlock","ns","namespace","value","width","height","exts","split","map","ext","pop","tipMessage","tipText","join","size","onPreview","file","indexOf","onRemove","splice","previewClose","handleBeforeUpload","fileExt","name","isTypeOk","includes","isSizeOk","URL","createObjectURL","beforeUpload","ElMessage","error","onProgress","evt","Math","floor","onSuccess","args","_createElementBlock","class","_normalizeClass","_unref","e","style","_createVNode","_component_el_upload","_mergeProps","$event","drag","limit","headers","action","data","accept","length","_withCtx","_createElementVNode","src","url","alt","onClick","ZoomIn","disabled","Delete","tip","_renderSlot","_ctx","notip","_hoisted_5","_toDisplayString","_hoisted_1","Plus","placeholder","_createBlock","_component_el_image_viewer","item","filter","v","teleported","onClose"],"mappings":"0rDA2BA,MAAMA,EAAQC,EA6BRC,EAAQC,IAERC,EAAWC,EAAWC,EAAC,YAMvBC,EAAOC,EAAa,gBAEpBC,EAAeC,EAAI,GAEnBC,EAAaD,EAGhB,CACDE,oBAAoB,EACpBC,SAAU,CACRC,QAAS,GACTC,QAAS,KAIPC,EAASC,EAAS,IACfV,EAAKW,YAAY,CACtBC,GAAIZ,EAAKa,UAAUC,MACnBC,MAAO,GAAGhB,EAAAgB,OAAS,QACnBC,OAAQ,GAAGjB,EAAAiB,QAAU,UAKnBC,EAAOP,EAAS,IACpBX,SAAOmB,MAAM,KAAKC,IAAIC,GAAOA,EAAIF,MAAM,KAAKG,QAGxCC,EAAaZ,EACjB,IACEX,EAAAwB,SACG,UAAUN,EAAKH,MAAMU,KACtB,sBACezB,EAAA0B,SAAS1B,EAAAgB,OAAShB,EAAAiB,OAAS,YAAYjB,EAAAgB,SAAShB,EAAAiB,SAAW,MAIhF,SAASU,EAAUC,GACjBzB,EAAaY,MAAQjB,EAASiB,MAAMc,QAAQD,GAC5CvB,EAAWU,MAAMT,oBAAqB,CACxC,CACA,SAASwB,EAASF,GAChB9B,EAASiB,MAAMgB,OAAOjC,EAASiB,MAAMc,QAAQD,GAAO,EACtD,CAEA,SAASI,IACP3B,EAAWU,MAAMT,oBAAqB,CACxC,CAEA,MAAM2B,EAAmDL,IACvD,MAAMM,EAAUN,EAAKO,KAAKhB,MAAM,KA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AKO,OAAA,CAJJjB,MAAKC,EAAA,GAAKC,EAAApD,GAAKa,UAAUC,mCACzByD,QAAKb,GAAEhC,EAAUC,KAElB4B,EAAUH,EAAAoB,WAGHC,EAAAA,2BADTxB,EAMO,OAAA,OAJJC,MAAKC,EAAA,GAAKC,EAAApD,GAAKa,UAAUC,kCACzByD,QAAKb,GAAE7B,EAASF,KAEjB4B,EAAUH,EAAAsB,kBAILC,MACT,IASO,CATPC,EASOC,kBATP,IASO,CAPIC,EAAAA,wBADT7B,EAOM,MAAA,OALHC,MAAKC,EAAA,GAAKC,EAAApD,GAAKa,UAAUC,4BAE1BqD,EAEM,MAFNY,EAEMC,EADD5B,EAAA9B,IAAU,sBAnCrB,IAKO,CALPsD,EAKOC,sBALP,IAKO,CAJLV,EAGM,MAHNc,EAGM,CAFJ1B,EAAQH,EAAA8B,IACRf,EAAwB,WAAlBgB,EAAAA,aAAW,0FAwCf/B,EAAAhD,GAAWC,wBADnB+E,EAMEC,EAAA,OAJC,WAAUxF,EAAAiB,MAASK,IAAKmE,GAAqBA,EAAKjB,KAAKkB,OAAQC,QAAgC,IAANA,GACzF,gBAAepC,EAAAlD,GAChBuF,WAAA,GACCC,QAAO3D"}
1
+ {"version":3,"file":"image-upload.vue.mjs","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { UploadFile, UploadFiles, UploadProps } from 'element-plus'\nimport { ZoomIn, Delete, Image as ImageIcon } from '@qxs-bns/icons'\nimport { useNamespace } from 'element-plus'\n\n// 组件名称\ndefineOptions({\n name: 'QxsImageUpload',\n})\n\n// Props 定义\nconst {\n name = 'file',\n size = 20,\n width = 160,\n height = 90,\n limit = 1,\n placeholder = '上传图片',\n notip = false,\n accept = 'image/jpeg,image/jpg,image/png,image/gif',\n beforeUpload,\n tipText = '',\n disabled = false,\n} = defineProps<ImageUploadProps>()\n\n// Emits 定义\nconst emits = defineEmits<{\n onSuccess: [res: any, uploadFile: UploadFile, uploadFiles: UploadFiles]\n remove: [file: UploadFile]\n}>()\n\n// 类型定义\nexport interface ImageUploadProps {\n action: UploadProps['action']\n headers?: UploadProps['headers']\n data?: UploadProps['data']\n name?: UploadProps['name']\n url?: string\n size?: number\n width?: number\n accept?: string\n height?: number\n placeholder?: string\n notip?: boolean\n tipText?: string\n beforeUpload?: UploadProps['beforeUpload']\n disabled?: boolean\n limit?: number\n}\n\ninterface UploadProgress {\n preview: string\n percent: number\n}\n\nconst attrs = useAttrs()\n\nconst fileList = defineModel('fileList', {\n type: Array as () => UploadFile[],\n default: () => [],\n})\n\n// 命名空间\nconst nsEl = useNamespace('image-upload')\n\nconst initialIndex = ref(0)\n// 响应式数据\nconst uploadData = ref<{\n imageViewerVisible: boolean\n progress: UploadProgress\n}>({\n imageViewerVisible: false,\n progress: {\n preview: '',\n percent: 0,\n },\n})\n\nconst cssVar = computed(() => {\n return nsEl.cssVarBlock({\n ns: nsEl.namespace.value,\n width: `${width || 160}px`,\n height: `${height || 90}px`,\n })\n})\n\n// 计算属性\nconst exts = computed(() =>\n accept.split(',').map(ext => ext.split('/').pop()),\n)\n\nconst tipMessage = computed(\n () =>\n tipText\n || `上传图片支持 ${exts.value.join(\n ' / ',\n )} 格式,且图片大小不超过 ${size}MB${width && height ? `,建议图片尺寸为 ${width}*${height}` : ''}`,\n)\n\n// 方法\nfunction onPreview(file: UploadFile) {\n initialIndex.value = fileList.value.indexOf(file)\n uploadData.value.imageViewerVisible = true\n}\nfunction onRemove(file: UploadFile) {\n fileList.value.splice(fileList.value.indexOf(file), 1)\n}\n\nfunction previewClose() {\n uploadData.value.imageViewerVisible = false\n}\n\nconst handleBeforeUpload: UploadProps['beforeUpload'] = (file) => {\n const fileExt = file.name.split('.').pop() ?? ''\n const isTypeOk = exts.value.includes(fileExt)\n const isSizeOk = file.size / 1024 / 1024 < size\n\n if (!isTypeOk) {\n ElMessage.error(`上传图片只支持${exts.value.join(' / ')}格式!`)\n return false\n }\n\n if (!isSizeOk) {\n ElMessage.error(`上传图片大小不能超过 ${size}MB!`)\n return false\n }\n\n uploadData.value.progress.preview = URL.createObjectURL(file)\n\n return beforeUpload ? beforeUpload(file) : true\n}\n\nconst onProgress: UploadProps['onProgress'] = (evt) => {\n uploadData.value.progress.percent = Math.floor(evt.percent)\n}\n\nconst onSuccess: UploadProps['onSuccess'] = (...args) => {\n uploadData.value.progress = {\n preview: '',\n percent: 0,\n }\n emits('onSuccess', ...args)\n}\n</script>\n\n<template>\n <div\n :class=\"nsEl.e('container')\"\n :style=\"cssVar\"\n >\n <el-upload\n v-bind=\"attrs\"\n v-model:file-list=\"fileList\"\n drag\n :limit=\"limit\"\n list-type=\"picture-card\"\n :headers=\"headers\"\n :action=\"action\"\n :data=\"data\"\n :name=\"name\"\n :accept=\"accept\"\n :before-upload=\"handleBeforeUpload\"\n :on-progress=\"onProgress\"\n :on-preview=\"onPreview\"\n :on-success=\"onSuccess\"\n :class=\"[nsEl.e('control'), limit <= fileList.length ? nsEl.e('more-than-limit') : '']\"\n :on-remove=\"onRemove\"\n >\n <slot>\n <div class=\"image-slot\">\n <QxsIcon size=\"32px\" :icon=\"ImageIcon\"></QxsIcon>\n <p>{{ placeholder }}</p>\n </div>\n </slot>\n <template #file=\"{ file }\">\n <img\n :class=\"`${nsEl.namespace.value}-upload-list__item-thumbnail`\"\n :src=\"file.url\"\n >\n <span :class=\"`${nsEl.namespace.value}-upload-list__item-actions`\">\n <span\n :class=\"`${nsEl.namespace.value}-upload-list__item-preview`\"\n @click=\"onPreview(file)\"\n >\n <ZoomIn size=\"14px\"/>\n </span>\n <span style=\"width: 1px; height: 14px; background-color: rgba(255, 255, 255, 0.5);\"></span>\n <span\n v-if=\"!disabled\"\n :class=\"`${nsEl.namespace.value}-upload-list__item-delete`\"\n @click=\"onRemove(file)\"\n >\n <Delete size=\"14px\"/>\n </span>\n </span>\n </template>\n <template #tip>\n <slot name=\"tip\">\n <div\n v-if=\"!notip\"\n :class=\"`${nsEl.namespace.value}-upload__tip-text`\"\n >\n <div class=\"tip-content\">\n {{ tipMessage }}\n </div>\n </div>\n </slot>\n </template>\n </el-upload>\n\n <el-image-viewer\n v-if=\"uploadData.imageViewerVisible\"\n :url-list=\"fileList.map((item: UploadFile) => item.url).filter((v: string | undefined) => v !== undefined)\"\n :initial-index=\"initialIndex\"\n teleported\n @close=\"previewClose\"\n />\n </div>\n</template>\n"],"names":["emits","__emit","attrs","useAttrs","fileList","_useModel","__props","nsEl","useNamespace","initialIndex","ref","uploadData","imageViewerVisible","progress","preview","percent","cssVar","computed","cssVarBlock","ns","namespace","value","width","height","exts","split","map","ext","pop","tipMessage","tipText","join","size","onPreview","file","indexOf","onRemove","splice","previewClose","handleBeforeUpload","fileExt","name","isTypeOk","includes","isSizeOk","URL","createObjectURL","beforeUpload","ElMessage","error","onProgress","evt","Math","floor","onSuccess","args","_createElementBlock","class","_normalizeClass","_unref","e","style","_createVNode","_component_el_upload","_mergeProps","$event","drag","limit","headers","action","data","accept","length","_withCtx","_createElementVNode","src","url","onClick","ZoomIn","disabled","Delete","tip","_renderSlot","_ctx","notip","_hoisted_5","_toDisplayString","_hoisted_1","_component_QxsIcon","icon","ImageIcon","placeholder","_createBlock","_component_el_image_viewer","item","filter","v","teleported","onClose"],"mappings":"4qDA0BA,MAAMA,EAAQC,EA6BRC,EAAQC,IAERC,EAAWC,EAAWC,EAAC,YAMvBC,EAAOC,EAAa,gBAEpBC,EAAeC,EAAI,GAEnBC,EAAaD,EAGhB,CACDE,oBAAoB,EACpBC,SAAU,CACRC,QAAS,GACTC,QAAS,KAIPC,EAASC,EAAS,IACfV,EAAKW,YAAY,CACtBC,GAAIZ,EAAKa,UAAUC,MACnBC,MAAO,GAAGhB,EAAAgB,OAAS,QACnBC,OAAQ,GAAGjB,EAAAiB,QAAU,UAKnBC,EAAOP,EAAS,IACpBX,SAAOmB,MAAM,KAAKC,IAAIC,GAAOA,EAAIF,MAAM,KAAKG,QAGxCC,EAAaZ,EACjB,IACEX,EAAAw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UzF,EAAAiB,MAASK,IAAKoE,GAAqBA,EAAKlB,KAAKmB,OAAQC,QAAgC,IAANA,GACzF,gBAAerC,EAAAlD,GAChBwF,WAAA,GACCC,QAAO5D"}
@@ -1,2 +1,2 @@
1
- "use strict";exports.version="0.0.65";
1
+ "use strict";exports.version="0.0.67";
2
2
  //# sourceMappingURL=package.json.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-area-wrap[data-v-51660d7b] {\n position: relative;\n}\n.data-chart-area-wrap .city-select[data-v-51660d7b] {\n position: absolute;\n top: 10px;\n right: 100px;\n z-index: 1;\n width: 120px;\n}\n.data-chart-area-wrap .data-chart-area[data-v-51660d7b] {\n width: 100%;\n height: 100%;\n min-height: 300px;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=".data-chart-area-wrap[data-v-51660d7b]{position:relative}.data-chart-area-wrap .city-select[data-v-51660d7b]{position:absolute;right:100px;top:10px;width:120px;z-index:1}.data-chart-area-wrap .data-chart-area[data-v-51660d7b]{height:100%;min-height:300px;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(t),exports.default=t;
2
2
  //# sourceMappingURL=area.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-bar[data-v-c325b6e7] {\n width: 100%;\n height: 100%;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=".data-chart-bar[data-v-c325b6e7]{height:100%;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
2
2
  //# sourceMappingURL=bar.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="/* unplugin-vue-components disabled */\n.data-chart-card[data-v-1c14c088] {\n display: flex;\n flex-direction: column;\n}\n.data-chart-card .title[data-v-1c14c088] {\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 5.5px;\n line-height: 26px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n color: #464646;\n}\n.data-chart-card .data-chart-card-grid-layout[data-v-1c14c088] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 10px;\n width: calc(100% - 3px);\n}\n.data-chart-card .data-chart-card-wrap[data-v-1c14c088] {\n height: 100% !important;\n}\n.data-chart-card .data-chart-card-wrap .card-item[data-v-1c14c088] {\n width: 100% !important;\n}\n.data-chart-card .card-item[data-v-1c14c088] {\n position: relative;\n background-repeat: no-repeat;\n background-position: left top, right top;\n background-size: contain, contain;\n border: 2px solid #2196f3;\n border-radius: 6px;\n}\n.data-chart-card .card-item .suffix-icon[data-v-1c14c088] {\n position: absolute;\n right: 1px;\n bottom: calc(25% - 14px);\n width: 20px;\n font-size: 20px;\n font-weight: bold;\n color: #fff;\n text-align: center;\n}\n.data-chart-card .card-item .card-title[data-v-1c14c088] {\n padding-left: 15px;\n margin-top: 10px;\n margin-bottom: 5px;\n overflow: hidden;\n font-size: 16px;\n font-weight: bold;\n color: #2196f3;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.data-chart-card .card-item .context[data-v-1c14c088] {\n padding: 0 30px 10px 20px;\n font-size: 14px;\n color: #464646;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(t),exports.default=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a=".data-chart-card[data-v-1c14c088]{display:flex;flex-direction:column}.data-chart-card .title[data-v-1c14c088]{align-items:center;color:#464646;display:flex;font-family:sans-serif;font-size:14px;font-weight:600;justify-content:space-between;line-height:26px;margin:0;padding:0 5.5px}.data-chart-card .data-chart-card-grid-layout[data-v-1c14c088]{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));width:calc(100% - 3px)}.data-chart-card .data-chart-card-wrap[data-v-1c14c088]{height:100%!important}.data-chart-card .data-chart-card-wrap .card-item[data-v-1c14c088]{width:100%!important}.data-chart-card .card-item[data-v-1c14c088]{background-position:0 0,100% 0;background-repeat:no-repeat;background-size:contain,contain;border:2px solid #2196f3;border-radius:6px;position:relative}.data-chart-card .card-item .suffix-icon[data-v-1c14c088]{bottom:calc(25% - 14px);color:#fff;font-size:20px;font-weight:700;position:absolute;right:1px;text-align:center;width:20px}.data-chart-card .card-item .card-title[data-v-1c14c088]{color:#2196f3;font-size:16px;font-weight:700;margin-bottom:5px;margin-top:10px;overflow:hidden;padding-left:15px;text-overflow:ellipsis;white-space:nowrap}.data-chart-card .card-item .context[data-v-1c14c088]{color:#464646;font-size:14px;padding:0 30px 10px 20px}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(a),exports.default=a;
2
2
  //# sourceMappingURL=card.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-funnel[data-v-c580cbe3] {\n width: 100%;\n height: 100%;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=".data-chart-funnel[data-v-c580cbe3]{height:100%;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
2
2
  //# sourceMappingURL=funnel.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-line[data-v-397864aa] {\n width: 100%;\n height: 100%;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=".data-chart-line[data-v-397864aa]{height:100%;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
2
2
  //# sourceMappingURL=line.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-pie[data-v-b5a98608] {\n width: 100%;\n height: 100%;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=".data-chart-pie[data-v-b5a98608]{height:100%;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
2
2
  //# sourceMappingURL=pie.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-radar[data-v-dcb2eae6] {\n width: 100%;\n height: 100%;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=".data-chart-radar[data-v-dcb2eae6]{height:100%;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
2
2
  //# sourceMappingURL=radar.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-scatter-simple[data-v-8129b8a5] {\n width: 100%;\n height: 100%;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=".data-chart-scatter-simple[data-v-8129b8a5]{height:100%;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
2
2
  //# sourceMappingURL=scatter-simple.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="/* unplugin-vue-components disabled */\n.data-chart-scatter[data-v-b52b34fd] {\n width: 100%;\n height: 100%;\n}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=".data-chart-scatter[data-v-b52b34fd]{height:100%;width:100%}";require("../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs").default(e),exports.default=e;
2
2
  //# sourceMappingURL=scatter.vue3.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("element-plus/es");require("element-plus/es/components/base/style/index"),require("element-plus/es/components/image-viewer/style/index"),require("element-plus/es/components/upload/style/index");var t=require("vue"),l=require("@element-plus/icons-vue"),i=require("@qxs-bns/icons"),r=require("element-plus");require("element-plus/es/components/message/style/index");const a={class:"image-slot"},s=["src"],n=["onClick"],o=["onClick"],u={class:"tip-content"};var p=t.defineComponent({name:"QxsImageUpload",__name:"image-upload",props:t.mergeModels({action:{type:String,required:!0},headers:{type:null,required:!1},data:{type:null,required:!1},name:{type:String,required:!1,default:"file"},url:{type:String,required:!1},size:{type:Number,required:!1,default:20},width:{type:Number,required:!1,default:160},accept:{type:String,required:!1,default:"image/jpeg,image/jpg,image/png,image/gif"},height:{type:Number,required:!1,default:90},placeholder:{type:String,required:!1,default:"上传图片"},notip:{type:Boolean,required:!1,default:!1},tipText:{type:String,required:!1,default:""},beforeUpload:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:1}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:t.mergeModels(["onSuccess","remove"],["update:fileList"]),setup(p,{emit:d}){const c=d,m=t.useAttrs(),f=t.useModel(p,"fileList"),g=r.useNamespace("image-upload"),v=t.ref(0),y=t.ref({imageViewerVisible:!1,progress:{preview:"",percent:0}}),h=t.computed(()=>g.cssVarBlock({ns:g.namespace.value,width:`${p.width||160}px`,height:`${p.height||90}px`})),q=t.computed(()=>p.accept.split(",").map(e=>e.split("/").pop())),V=t.computed(()=>p.tipText||`上传图片支持 ${q.value.join(" / ")} 格式,且图片大小不超过 ${p.size}MB${p.width&&p.height?`,建议图片尺寸为 ${p.width}*${p.height}`:""}`);function x(e){v.value=f.value.indexOf(e),y.value.imageViewerVisible=!0}function b(e){f.value.splice(f.value.indexOf(e),1)}function w(){y.value.imageViewerVisible=!1}const C=t=>{const l=t.name.split(".").pop()??"",i=q.value.includes(l),r=t.size/1024/1024<p.size;return i?r?(y.value.progress.preview=URL.createObjectURL(t),!p.beforeUpload||p.beforeUpload(t)):(e.ElMessage.error(`上传图片大小不能超过 ${p.size}MB!`),!1):(e.ElMessage.error(`上传图片只支持${q.value.join(" / ")}格式!`),!1)},N=e=>{y.value.progress.percent=Math.floor(e.percent)},k=(...e)=>{y.value.progress={preview:"",percent:0},c("onSuccess",...e)};return(r,p)=>{const d=e.ElUpload,c=e.ElImageViewer;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(g).e("container")),style:t.normalizeStyle(t.unref(h))},[t.createVNode(d,t.mergeProps(t.unref(m),{"file-list":f.value,"onUpdate:fileList":p[0]||(p[0]=e=>f.value=e),drag:"",limit:r.limit,"list-type":"picture-card",headers:r.headers,action:r.action,data:r.data,name:r.name,accept:r.accept,"before-upload":C,"on-progress":N,"on-preview":x,"on-success":k,class:[t.unref(g).e("control"),r.limit<=f.value.length?t.unref(g).e("more-than-limit"):""],"on-remove":b}),{file:t.withCtx(({file:e})=>[t.createElementVNode("img",{class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-thumbnail`),src:e.url,alt:""},null,10,s),t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-actions`)},[t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-preview`),onClick:t=>x(e)},[t.createVNode(t.unref(i.ZoomIn))],10,n),r.disabled?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-delete`),onClick:t=>b(e)},[t.createVNode(t.unref(i.Delete))],10,o))],2)]),tip:t.withCtx(()=>[t.renderSlot(r.$slots,"tip",{},()=>[r.notip?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(`${t.unref(g).namespace.value}-upload__tip-text`)},[t.createElementVNode("div",u,t.toDisplayString(t.unref(V)),1)],2))])]),default:t.withCtx(()=>[t.renderSlot(r.$slots,"default",{},()=>[t.createElementVNode("div",a,[t.createVNode(t.unref(l.Plus)),t.createElementVNode("p",null,t.toDisplayString(r.placeholder),1)])])]),_:3},16,["file-list","limit","headers","action","data","name","accept","class"]),t.unref(y).imageViewerVisible?(t.openBlock(),t.createBlock(c,{key:0,"url-list":f.value.map(e=>e.url).filter(e=>void 0!==e),"initial-index":t.unref(v),teleported:"",onClose:w},null,8,["url-list","initial-index"])):t.createCommentVNode("v-if",!0)],6)}}});exports.default=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("element-plus/es");require("element-plus/es/components/base/style/index"),require("element-plus/es/components/image-viewer/style/index"),require("element-plus/es/components/upload/style/index");var t=require("vue"),l=require("@qxs-bns/icons"),i=require("element-plus");require("element-plus/es/components/message/style/index");const r={class:"image-slot"},a=["src"],s=["onClick"],n=["onClick"],o={class:"tip-content"};var u=t.defineComponent({name:"QxsImageUpload",__name:"image-upload",props:t.mergeModels({action:{type:String,required:!0},headers:{type:null,required:!1},data:{type:null,required:!1},name:{type:String,required:!1,default:"file"},url:{type:String,required:!1},size:{type:Number,required:!1,default:20},width:{type:Number,required:!1,default:160},accept:{type:String,required:!1,default:"image/jpeg,image/jpg,image/png,image/gif"},height:{type:Number,required:!1,default:90},placeholder:{type:String,required:!1,default:"上传图片"},notip:{type:Boolean,required:!1,default:!1},tipText:{type:String,required:!1,default:""},beforeUpload:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:1}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:t.mergeModels(["onSuccess","remove"],["update:fileList"]),setup(u,{emit:p}){const c=p,d=t.useAttrs(),m=t.useModel(u,"fileList"),f=i.useNamespace("image-upload"),g=t.ref(0),v=t.ref({imageViewerVisible:!1,progress:{preview:"",percent:0}}),h=t.computed(()=>f.cssVarBlock({ns:f.namespace.value,width:`${u.width||160}px`,height:`${u.height||90}px`})),y=t.computed(()=>u.accept.split(",").map(e=>e.split("/").pop())),x=t.computed(()=>u.tipText||`上传图片支持 ${y.value.join(" / ")} 格式,且图片大小不超过 ${u.size}MB${u.width&&u.height?`,建议图片尺寸为 ${u.width}*${u.height}`:""}`);function q(e){g.value=m.value.indexOf(e),v.value.imageViewerVisible=!0}function V(e){m.value.splice(m.value.indexOf(e),1)}function b(){v.value.imageViewerVisible=!1}const w=t=>{const l=t.name.split(".").pop()??"",i=y.value.includes(l),r=t.size/1024/1024<u.size;return i?r?(v.value.progress.preview=URL.createObjectURL(t),!u.beforeUpload||u.beforeUpload(t)):(e.ElMessage.error(`上传图片大小不能超过 ${u.size}MB!`),!1):(e.ElMessage.error(`上传图片只支持${y.value.join(" / ")}格式!`),!1)},C=e=>{v.value.progress.percent=Math.floor(e.percent)},N=(...e)=>{v.value.progress={preview:"",percent:0},c("onSuccess",...e)};return(i,u)=>{const p=t.resolveComponent("QxsIcon"),c=e.ElUpload,y=e.ElImageViewer;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(f).e("container")),style:t.normalizeStyle(t.unref(h))},[t.createVNode(c,t.mergeProps(t.unref(d),{"file-list":m.value,"onUpdate:fileList":u[0]||(u[0]=e=>m.value=e),drag:"",limit:i.limit,"list-type":"picture-card",headers:i.headers,action:i.action,data:i.data,name:i.name,accept:i.accept,"before-upload":w,"on-progress":C,"on-preview":q,"on-success":N,class:[t.unref(f).e("control"),i.limit<=m.value.length?t.unref(f).e("more-than-limit"):""],"on-remove":V}),{file:t.withCtx(({file:e})=>[t.createElementVNode("img",{class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-thumbnail`),src:e.url},null,10,a),t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-actions`)},[t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-preview`),onClick:t=>q(e)},[t.createVNode(t.unref(l.ZoomIn),{size:"14px"})],10,s),u[1]||(u[1]=t.createElementVNode("span",{style:{width:"1px",height:"14px","background-color":"rgba(255, 255, 255, 0.5)"}},null,-1)),i.disabled?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-delete`),onClick:t=>V(e)},[t.createVNode(t.unref(l.Delete),{size:"14px"})],10,n))],2)]),tip:t.withCtx(()=>[t.renderSlot(i.$slots,"tip",{},()=>[i.notip?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(`${t.unref(f).namespace.value}-upload__tip-text`)},[t.createElementVNode("div",o,t.toDisplayString(t.unref(x)),1)],2))])]),default:t.withCtx(()=>[t.renderSlot(i.$slots,"default",{},()=>[t.createElementVNode("div",r,[t.createVNode(p,{size:"32px",icon:t.unref(l.Image)},null,8,["icon"]),t.createElementVNode("p",null,t.toDisplayString(i.placeholder),1)])])]),_:3},16,["file-list","limit","headers","action","data","name","accept","class"]),t.unref(v).imageViewerVisible?(t.openBlock(),t.createBlock(y,{key:0,"url-list":m.value.map(e=>e.url).filter(e=>void 0!==e),"initial-index":t.unref(g),teleported:"",onClose:b},null,8,["url-list","initial-index"])):t.createCommentVNode("v-if",!0)],6)}}});exports.default=u;
2
2
  //# sourceMappingURL=image-upload.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-upload.vue.cjs","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { UploadFile, UploadFiles, UploadProps } from 'element-plus'\nimport { Plus } from '@element-plus/icons-vue'\nimport { ZoomIn, Delete } from '@qxs-bns/icons'\nimport { useNamespace } from 'element-plus'\n\n// 组件名称\ndefineOptions({\n name: 'QxsImageUpload',\n})\n\n// Props 定义\nconst {\n name = 'file',\n size = 20,\n width = 160,\n height = 90,\n limit = 1,\n placeholder = '上传图片',\n notip = false,\n accept = 'image/jpeg,image/jpg,image/png,image/gif',\n beforeUpload,\n tipText = '',\n disabled = false,\n} = defineProps<ImageUploadProps>()\n\n// Emits 定义\nconst emits = defineEmits<{\n onSuccess: [res: any, uploadFile: UploadFile, uploadFiles: UploadFiles]\n remove: [file: UploadFile]\n}>()\n\n// 类型定义\nexport interface ImageUploadProps {\n action: UploadProps['action']\n headers?: UploadProps['headers']\n data?: UploadProps['data']\n name?: UploadProps['name']\n url?: string\n size?: number\n width?: number\n accept?: string\n height?: number\n placeholder?: string\n notip?: boolean\n tipText?: string\n beforeUpload?: UploadProps['beforeUpload']\n disabled?: boolean\n limit?: number\n}\n\ninterface UploadProgress {\n preview: string\n percent: number\n}\n\nconst attrs = useAttrs()\n\nconst fileList = defineModel('fileList', {\n type: Array as () => UploadFile[],\n default: () => [],\n})\n\n// 命名空间\nconst nsEl = useNamespace('image-upload')\n\nconst initialIndex = ref(0)\n// 响应式数据\nconst uploadData = ref<{\n imageViewerVisible: boolean\n progress: UploadProgress\n}>({\n imageViewerVisible: false,\n progress: {\n preview: '',\n percent: 0,\n },\n})\n\nconst cssVar = computed(() => {\n return nsEl.cssVarBlock({\n ns: nsEl.namespace.value,\n width: `${width || 160}px`,\n height: `${height || 90}px`,\n })\n})\n\n// 计算属性\nconst exts = computed(() =>\n accept.split(',').map(ext => ext.split('/').pop()),\n)\n\nconst tipMessage = computed(\n () =>\n tipText\n || `上传图片支持 ${exts.value.join(\n ' / ',\n )} 格式,且图片大小不超过 ${size}MB${width && height ? `,建议图片尺寸为 ${width}*${height}` : ''}`,\n)\n\n// 方法\nfunction onPreview(file: UploadFile) {\n initialIndex.value = fileList.value.indexOf(file)\n uploadData.value.imageViewerVisible = true\n}\nfunction onRemove(file: UploadFile) {\n fileList.value.splice(fileList.value.indexOf(file), 1)\n}\n\nfunction previewClose() {\n uploadData.value.imageViewerVisible = false\n}\n\nconst handleBeforeUpload: UploadProps['beforeUpload'] = (file) => {\n const fileExt = file.name.split('.').pop() ?? ''\n const isTypeOk = exts.value.includes(fileExt)\n const isSizeOk = file.size / 1024 / 1024 < size\n\n if (!isTypeOk) {\n ElMessage.error(`上传图片只支持${exts.value.join(' / ')}格式!`)\n return false\n }\n\n if (!isSizeOk) {\n ElMessage.error(`上传图片大小不能超过 ${size}MB!`)\n return false\n }\n\n uploadData.value.progress.preview = URL.createObjectURL(file)\n\n return beforeUpload ? beforeUpload(file) : true\n}\n\nconst onProgress: UploadProps['onProgress'] = (evt) => {\n uploadData.value.progress.percent = Math.floor(evt.percent)\n}\n\nconst onSuccess: UploadProps['onSuccess'] = (...args) => {\n uploadData.value.progress = {\n preview: '',\n percent: 0,\n }\n emits('onSuccess', ...args)\n}\n</script>\n\n<template>\n <div\n :class=\"nsEl.e('container')\"\n :style=\"cssVar\"\n >\n <el-upload\n v-bind=\"attrs\"\n v-model:file-list=\"fileList\"\n drag\n :limit=\"limit\"\n list-type=\"picture-card\"\n :headers=\"headers\"\n :action=\"action\"\n :data=\"data\"\n :name=\"name\"\n :accept=\"accept\"\n :before-upload=\"handleBeforeUpload\"\n :on-progress=\"onProgress\"\n :on-preview=\"onPreview\"\n :on-success=\"onSuccess\"\n :class=\"[nsEl.e('control'), limit <= fileList.length ? nsEl.e('more-than-limit') : '']\"\n :on-remove=\"onRemove\"\n >\n <slot>\n <div class=\"image-slot\">\n <Plus />\n <p>{{ placeholder }}</p>\n </div>\n </slot>\n <template #file=\"{ file }\">\n <img\n :class=\"`${nsEl.namespace.value}-upload-list__item-thumbnail`\"\n :src=\"file.url\"\n alt=\"\"\n >\n <span :class=\"`${nsEl.namespace.value}-upload-list__item-actions`\">\n <span\n :class=\"`${nsEl.namespace.value}-upload-list__item-preview`\"\n @click=\"onPreview(file)\"\n >\n <ZoomIn />\n </span>\n <span\n v-if=\"!disabled\"\n :class=\"`${nsEl.namespace.value}-upload-list__item-delete`\"\n @click=\"onRemove(file)\"\n >\n <Delete />\n </span>\n </span>\n </template>\n <template #tip>\n <slot name=\"tip\">\n <div\n v-if=\"!notip\"\n :class=\"`${nsEl.namespace.value}-upload__tip-text`\"\n >\n <div class=\"tip-content\">\n {{ tipMessage }}\n </div>\n </div>\n </slot>\n </template>\n </el-upload>\n\n <el-image-viewer\n v-if=\"uploadData.imageViewerVisible\"\n :url-list=\"fileList.map((item: UploadFile) => item.url).filter((v: string | undefined) => v !== undefined)\"\n :initial-index=\"initialIndex\"\n teleported\n @close=\"previewClose\"\n />\n </div>\n</template>\n"],"names":["emits","__emit","attrs","useAttrs","fileList","_useModel","__props","nsEl","useNamespace","initialIndex","ref","uploadData","imageViewerVisible","progress","preview","percent","cssVar","computed","cssVarBlock","ns","namespace","value","width","height","exts","split","map","ext","pop","tipMessage","tipText","join","size","onPreview","file","indexOf","onRemove","splice","previewClose","handleBeforeUpload","fileExt","name","isTypeOk","includes","isSizeOk","URL","createObjectURL","beforeUpload","ElMessage","error","onProgress","evt","Math","floor","onSuccess","args","_createElementBlock","class","_normalizeClass","_unref","e","style","_createVNode","_component_el_upload","_mergeProps","$event","drag","limit","headers","action","data","accept","length","_withCtx","_createElementVNode","src","url","alt","onClick","ZoomIn","disabled","Delete","tip","_renderSlot","_ctx","notip","_hoisted_5","_toDisplayString","_hoisted_1","Plus","placeholder","_createBlock","_component_el_image_viewer","item","filter","v","teleported","onClose"],"mappings":"+4CA2BA,MAAMA,EAAQC,EA6BRC,EAAQC,EAAAA,WAERC,EAAWC,EAAAA,SAAWC,EAAC,YAMvBC,EAAOC,EAAAA,aAAa,gBAEpBC,EAAeC,EAAAA,IAAI,GAEnBC,EAAaD,EAAAA,IAGhB,CACDE,oBAAoB,EACpBC,SAAU,CACRC,QAAS,GACTC,QAAS,KAIPC,EAASC,EAAAA,SAAS,IACfV,EAAKW,YAAY,CACtBC,GAAIZ,EAAKa,UAAUC,MACnBC,MAAO,GAAGhB,EAAAgB,OAAS,QACnBC,OAAQ,GAAGjB,EAAAiB,QAAU,UAKnBC,EAAOP,EAAAA,SAAS,IACpBX,SAAOmB,MAAM,KAAKC,IAAIC,GAAOA,EAAIF,MAAM,KAAKG,QAGxCC,EAAaZ,EAAAA,SACjB,IACEX,EAAAwB,SACG,UAAUN,EAAKH,MAAMU,KACtB,sBACezB,EAAA0B,SAAS1B,EAAAgB,OAAShB,EAAAiB,OAAS,YAAYjB,EAAAgB,SAAShB,EAAAiB,SAAW,MAIhF,SAASU,EAAUC,GACjBzB,EAAaY,MAAQjB,EAASiB,MAAMc,QAAQD,GAC5CvB,EAAWU,MAAMT,oBAAqB,CACxC,CACA,SAASwB,EAASF,GAChB9B,EAASiB,MAAMgB,OAAOjC,EAASiB,MAAMc,QAAQD,GAAO,EACtD,CAEA,SAASI,IACP3B,EAAWU,MAAMT,oBAAqB,CACxC,CAEA,MAAM2B,EAAmDL,IACvD,MAAMM,EAAUN,EAAKO,KAAKhB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AKzC,EAAK0C,IACXC,IAAI,eAENH,EAAAA,mBAcO,OAAA,CAdAjB,MAAKC,EAAAA,eAAA,GAAKC,EAAAA,MAAApD,GAAKa,UAAUC,qCAC9BqD,EAAAA,mBAKO,OAAA,CAJJjB,MAAKC,EAAAA,eAAA,GAAKC,EAAAA,MAAApD,GAAKa,UAAUC,mCACzByD,QAAKb,GAAEhC,EAAUC,KAElB4B,EAAAA,YAAUH,EAAAA,MAAAoB,kBAGHC,EAAAA,wDADTxB,EAAAA,mBAMO,OAAA,OAJJC,MAAKC,EAAAA,eAAA,GAAKC,EAAAA,MAAApD,GAAKa,UAAUC,kCACzByD,QAAKb,GAAE7B,EAASF,KAEjB4B,EAAAA,YAAUH,EAAAA,MAAAsB,yBAILC,cACT,IASO,CATPC,EAAAA,WASOC,kBATP,IASO,CAPIC,EAAAA,qDADT7B,EAAAA,mBAOM,MAAA,OALHC,MAAKC,EAAAA,eAAA,GAAKC,EAAAA,MAAApD,GAAKa,UAAUC,4BAE1BqD,EAAAA,mBAEM,MAFNY,EAEMC,kBADD5B,EAAAA,MAAA9B,IAAU,8BAnCrB,IAKO,CALPsD,EAAAA,WAKOC,sBALP,IAKO,CAJLV,EAAAA,mBAGM,MAHNc,EAGM,CAFJ1B,cAAQH,EAAAA,MAAA8B,EAAAA,OACRf,EAAAA,mBAAwB,2BAAlBgB,EAAAA,aAAW,0FAwCf/B,EAAAA,MAAAhD,GAAWC,kCADnB+E,EAAAA,YAMEC,EAAA,OAJC,WAAUxF,EAAAiB,MAASK,IAAKmE,GAAqBA,EAAKjB,KAAKkB,OAAQC,QAAgC,IAANA,GACzF,gBAAepC,EAAAA,MAAAlD,GAChBuF,WAAA,GACCC,QAAO3D"}
1
+ {"version":3,"file":"image-upload.vue.cjs","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { UploadFile, UploadFiles, UploadProps } from 'element-plus'\nimport { ZoomIn, Delete, Image as ImageIcon } from '@qxs-bns/icons'\nimport { useNamespace } from 'element-plus'\n\n// 组件名称\ndefineOptions({\n name: 'QxsImageUpload',\n})\n\n// Props 定义\nconst {\n name = 'file',\n size = 20,\n width = 160,\n height = 90,\n limit = 1,\n placeholder = '上传图片',\n notip = false,\n accept = 'image/jpeg,image/jpg,image/png,image/gif',\n beforeUpload,\n tipText = '',\n disabled = false,\n} = defineProps<ImageUploadProps>()\n\n// Emits 定义\nconst emits = defineEmits<{\n onSuccess: [res: any, uploadFile: UploadFile, uploadFiles: UploadFiles]\n remove: [file: UploadFile]\n}>()\n\n// 类型定义\nexport interface ImageUploadProps {\n action: UploadProps['action']\n headers?: UploadProps['headers']\n data?: UploadProps['data']\n name?: UploadProps['name']\n url?: string\n size?: number\n width?: number\n accept?: string\n height?: number\n placeholder?: string\n notip?: boolean\n tipText?: string\n beforeUpload?: UploadProps['beforeUpload']\n disabled?: boolean\n limit?: number\n}\n\ninterface UploadProgress {\n preview: string\n percent: number\n}\n\nconst attrs = useAttrs()\n\nconst fileList = defineModel('fileList', {\n type: Array as () => UploadFile[],\n default: () => [],\n})\n\n// 命名空间\nconst nsEl = useNamespace('image-upload')\n\nconst initialIndex = ref(0)\n// 响应式数据\nconst uploadData = ref<{\n imageViewerVisible: boolean\n progress: UploadProgress\n}>({\n imageViewerVisible: false,\n progress: {\n preview: '',\n percent: 0,\n },\n})\n\nconst cssVar = computed(() => {\n return nsEl.cssVarBlock({\n ns: nsEl.namespace.value,\n width: `${width || 160}px`,\n height: `${height || 90}px`,\n })\n})\n\n// 计算属性\nconst exts = computed(() =>\n accept.split(',').map(ext => ext.split('/').pop()),\n)\n\nconst tipMessage = computed(\n () =>\n tipText\n || `上传图片支持 ${exts.value.join(\n ' / ',\n )} 格式,且图片大小不超过 ${size}MB${width && height ? `,建议图片尺寸为 ${width}*${height}` : ''}`,\n)\n\n// 方法\nfunction onPreview(file: UploadFile) {\n initialIndex.value = fileList.value.indexOf(file)\n uploadData.value.imageViewerVisible = true\n}\nfunction onRemove(file: UploadFile) {\n fileList.value.splice(fileList.value.indexOf(file), 1)\n}\n\nfunction previewClose() {\n uploadData.value.imageViewerVisible = false\n}\n\nconst handleBeforeUpload: UploadProps['beforeUpload'] = (file) => {\n const fileExt = file.name.split('.').pop() ?? ''\n const isTypeOk = exts.value.includes(fileExt)\n const isSizeOk = file.size / 1024 / 1024 < size\n\n if (!isTypeOk) {\n ElMessage.error(`上传图片只支持${exts.value.join(' / ')}格式!`)\n return false\n }\n\n if (!isSizeOk) {\n ElMessage.error(`上传图片大小不能超过 ${size}MB!`)\n return false\n }\n\n uploadData.value.progress.preview = URL.createObjectURL(file)\n\n return beforeUpload ? beforeUpload(file) : true\n}\n\nconst onProgress: UploadProps['onProgress'] = (evt) => {\n uploadData.value.progress.percent = Math.floor(evt.percent)\n}\n\nconst onSuccess: UploadProps['onSuccess'] = (...args) => {\n uploadData.value.progress = {\n preview: '',\n percent: 0,\n }\n emits('onSuccess', ...args)\n}\n</script>\n\n<template>\n <div\n :class=\"nsEl.e('container')\"\n :style=\"cssVar\"\n >\n <el-upload\n v-bind=\"attrs\"\n v-model:file-list=\"fileList\"\n drag\n :limit=\"limit\"\n list-type=\"picture-card\"\n :headers=\"headers\"\n :action=\"action\"\n :data=\"data\"\n :name=\"name\"\n :accept=\"accept\"\n :before-upload=\"handleBeforeUpload\"\n :on-progress=\"onProgress\"\n :on-preview=\"onPreview\"\n :on-success=\"onSuccess\"\n :class=\"[nsEl.e('control'), limit <= fileList.length ? nsEl.e('more-than-limit') : '']\"\n :on-remove=\"onRemove\"\n >\n <slot>\n <div class=\"image-slot\">\n <QxsIcon size=\"32px\" :icon=\"ImageIcon\"></QxsIcon>\n <p>{{ placeholder }}</p>\n </div>\n </slot>\n <template #file=\"{ file }\">\n <img\n :class=\"`${nsEl.namespace.value}-upload-list__item-thumbnail`\"\n :src=\"file.url\"\n >\n <span :class=\"`${nsEl.namespace.value}-upload-list__item-actions`\">\n <span\n :class=\"`${nsEl.namespace.value}-upload-list__item-preview`\"\n @click=\"onPreview(file)\"\n >\n <ZoomIn size=\"14px\"/>\n </span>\n <span style=\"width: 1px; height: 14px; background-color: rgba(255, 255, 255, 0.5);\"></span>\n <span\n v-if=\"!disabled\"\n :class=\"`${nsEl.namespace.value}-upload-list__item-delete`\"\n @click=\"onRemove(file)\"\n >\n <Delete size=\"14px\"/>\n </span>\n </span>\n </template>\n <template #tip>\n <slot name=\"tip\">\n <div\n v-if=\"!notip\"\n :class=\"`${nsEl.namespace.value}-upload__tip-text`\"\n >\n <div class=\"tip-content\">\n {{ tipMessage }}\n </div>\n </div>\n </slot>\n </template>\n </el-upload>\n\n <el-image-viewer\n v-if=\"uploadData.imageViewerVisible\"\n :url-list=\"fileList.map((item: UploadFile) => item.url).filter((v: string | undefined) => v !== undefined)\"\n :initial-index=\"initialIndex\"\n teleported\n @close=\"previewClose\"\n />\n </div>\n</template>\n"],"names":["emits","__emit","attrs","useAttrs","fileList","_useModel","__props","nsEl","useNamespace","initialIndex","ref","uploadData","imageViewerVisible","progress","preview","percent","cssVar","computed","cssVarBlock","ns","namespace","value","width","height","exts","split","map","ext","pop","tipMessage","tipText","join","size","onPreview","file","indexOf","onRemove","splice","previewClose","handleBeforeUpload","fileExt","name","isTypeOk","includes","isSizeOk","URL","createObjectURL","beforeUpload","ElMessage","error","onProgress","evt","Math","floor","onSuccess","args","_createElementBlock","class","_normalizeClass","_unref","e","style","_createVNode","_component_el_upload","_mergeProps","$event","drag","limit","headers","action","data","accept","length","_withCtx","_createElementVNode","src","url","onClick","ZoomIn","disabled","Delete","tip","_renderSlot","_ctx","notip","_hoisted_5","_toDisplayString","_hoisted_1","_component_QxsIcon","icon","ImageIcon","placeholder","_createBlock","_component_el_image_viewer","item","filter","v","teleported","onClose"],"mappings":"02CA0BA,MAAMA,EAAQC,EA6BRC,EAAQC,EAAAA,WAERC,EAAWC,EAAAA,SAAWC,EAAC,YAMvBC,EAAOC,EAAAA,aAAa,gBAEpBC,EAAeC,EAAAA,I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BAMO,OAAA,OAJJC,MAAKC,EAAAA,eAAA,GAAKC,EAAAA,MAAApD,GAAKa,UAAUC,kCACzBwD,QAAKZ,GAAE7B,EAASF,KAEjB4B,EAAAA,YAAqBH,EAAAA,MAAAqB,EAAAA,QAAA,CAAbhD,KAAK,uBAIRiD,cACT,IASO,CATPC,EAAAA,WASOC,kBATP,IASO,CAPIC,EAAAA,qDADT5B,EAAAA,mBAOM,MAAA,OALHC,MAAKC,EAAAA,eAAA,GAAKC,EAAAA,MAAApD,GAAKa,UAAUC,4BAE1BqD,EAAAA,mBAEM,MAFNW,EAEMC,kBADD3B,EAAAA,MAAA9B,IAAU,8BAnCrB,IAKO,CALPqD,EAAAA,WAKOC,sBALP,IAKO,CAJLT,EAAAA,mBAGM,MAHNa,EAGM,CAFJzB,EAAAA,YAAiD0B,EAAA,CAAxCxD,KAAK,OAAQyD,KAAM9B,EAAAA,MAAA+B,EAAAA,yBAC5BhB,EAAAA,mBAAwB,2BAAlBiB,EAAAA,aAAW,0FAwCfhC,EAAAA,MAAAhD,GAAWC,kCADnBgF,EAAAA,YAMEC,EAAA,OAJC,WAAUzF,EAAAiB,MAASK,IAAKoE,GAAqBA,EAAKlB,KAAKmB,OAAQC,QAAgC,IAANA,GACzF,gBAAerC,EAAAA,MAAAlD,GAChBwF,WAAA,GACCC,QAAO5D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qxs-bns/components",
3
3
  "type": "module",
4
- "version": "0.0.65",
4
+ "version": "0.0.67",
5
5
  "description": "Vue 3 Component Library",
6
6
  "license": "MIT",
7
7
  "homepage": "https://trry-hub.github.io/qxs-bns/",
@@ -45,7 +45,7 @@
45
45
  "@iconify/vue": "^5.0.0",
46
46
  "@qxs-bns/directives": "0.0.19",
47
47
  "@qxs-bns/hooks": "0.0.5",
48
- "@qxs-bns/icons": "0.0.5",
48
+ "@qxs-bns/icons": "0.0.6",
49
49
  "@qxs-bns/utils": "0.0.26",
50
50
  "@vueuse/core": "^11.3.0",
51
51
  "echarts": "^5.5.1",
@@ -1 +1 @@
1
- :root [data-fixed-calc-width]{position:fixed;right:0;left:0%}:root [data-mode=mobile] [data-fixed-calc-width]{width:100% !important}.qxs-data-chart__table{box-sizing:border-box;display:flex;flex-direction:column}.qxs-data-chart__table .title{display:flex;align-items:center;justify-content:space-between;padding:0 5px;margin-top:2px;margin-bottom:7px;font-family:sans-serif;font-size:14px;font-weight:bolder;color:#464646}.qxs-data-chart__table>div[class*=-table]{position:relative;display:flex;flex:1;flex-direction:column;overflow:hidden;background-color:rgba(0,0,0,0);border-top-left-radius:4px;border-top-right-radius:4px}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class*=-table__cell]{border-right:0}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class$=table__empty-text]{line-height:unset}.qxs-data-chart__empty{display:flex;align-items:center;justify-content:center;height:100%}.qxs-data-chart__empty-content{display:flex;flex-direction:column;align-items:center;pointer-events:none;margin-top:-2px}.qxs-data-chart__empty-description{font-size:14px;color:#74767e;margin-left:1px}.qxs-data-chart__wrapper{height:100%}.qxs-fixed-action-bar__actionbar{bottom:0;z-index:10;padding:var(--qxs-fixed-action-bar-actionbar-padding);padding-bottom:calc(env(safe-area-inset-bottom) + var(--qxs-fixed-action-bar-actionbar-padding-bottom));text-align:center;background-color:var(--qxs-bg-color, #fff);box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2);transition:box-shadow .3s,var(--qxs-transition-box-shadow, #f3f3f2)}.qxs-fixed-action-bar__actionbar.is-shadow{box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2)}.qxs-photo-crop-tool__img-box{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background-color:#fafafa}.qxs-photo-crop-tool__error-message{color:red}.qxs-photo-crop-tool__image{max-width:100%;max-height:100%;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:contain;object-fit:contain;-webkit-user-drag:none}.qxs-photo-crop-tool__crop-tool-box{position:absolute;width:calc(var(--qxs-photo-crop-tool-width)*1px);max-width:100%;height:calc(var(--qxs-photo-crop-tool-height)*1px);max-height:100%;aspect-ratio:var(--qxs-photo-crop-tool-aspect-ratio);overflow:hidden;cursor:move;border:1px dashed #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.4)}.qxs-photo-crop-tool__crop-tool-box>div{position:absolute;z-index:3;width:30%;aspect-ratio:1/1;background-color:rgba(2,2,2,.01);border-radius:50%;transition:all .3s}.qxs-photo-crop-tool__crop-tool-box>div:after{content:"";position:absolute;width:10px;height:10px;top:50%;left:50%;transform:translate3d(-50%, -50%, 0);border-radius:50%;background-color:var(--qxs-color-primary, #3d61e3)}.qxs-photo-crop-tool__crop-tool-box>div:hover,.qxs-photo-crop-tool__crop-tool-box>div:active{background-color:rgba(2,2,2,.5)}.qxs-photo-crop-tool__top-left{top:0;left:0;cursor:nwse-resize;transform:translate3d(-50%, -50%, 0)}.qxs-photo-crop-tool__top-right{top:0;right:0;cursor:nesw-resize;transform:translate3d(50%, -50%, 0)}.qxs-photo-crop-tool__bottom-right{right:0;bottom:0;cursor:nwse-resize;transform:translate3d(50%, 50%, 0)}.qxs-photo-crop-tool__bottom-left{bottom:0;left:0;cursor:nesw-resize;transform:translate3d(-50%, 50%, 0)}.el-image-upload__container{line-height:initial}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar]{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar] .el-progress-circle{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important;height:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .is-drag{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger{border:unset;background-color:unset;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot [class$=-icon]{font-size:28px;margin-bottom:10px}.el-image-upload__more-than-limit .is-drag{display:none}.el-image-upload__container .el-upload__tip-text{font-size:14px;line-height:32px;color:#c8c8c8}.qxs-file-upload__control .is-drag{display:inline-block !important}.qxs-file-upload__control .is-drag [class$=-upload-dragger]{padding:0}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-icon--upload]{margin-bottom:0;font-size:40px}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-upload__text]{padding:0 6px;font-size:14px;line-height:1.5}.qxs-file-upload__control .is-drag.is-dragover{border-width:1px}.qxs-file-upload__control .is-drag .slot{width:160px;height:90px}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce{border-width:1px;border-radius:var(--qxs-border-radius-base, 4px)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 4px 4px -4px rgba(34,47,62,.07)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap{overflow-y:auto}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap .tox-edit-area::before{border-width:1px;border-radius:0}.qxs-tiny-mce-editor .tox-tinymce-aux{z-index:2500 !important}.qxs-subject-list__list-exam .flex{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-items-center{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-justify-between{display:flex;justify-content:space-between}.qxs-subject-list__list-exam .flex-justify-center{display:flex;justify-content:center}.qxs-subject-list__list-exam .flex-justify-end{display:flex;justify-content:flex-end}.qxs-subject-list__list-exam .margin-left-10{margin-left:10px}.qxs-subject-list__list-exam .label{min-width:50px}.qxs-subject-list__list-exam .flex-1{flex:1}.qxs-subject-list__list-exam .subject-list-wrapper{width:100%;margin-bottom:20px}.qxs-subject-list__list-exam .margin-bottom{margin-bottom:20px}.qxs-subject-list__list-exam .auto-line{flex:1;height:1px;margin:0 15px;background-color:#c8c8c8}.qxs-subject-list__list-exam .title{font-size:14px;font-weight:500}.qxs-subject-list__list-exam .rich-text img{max-width:100%}.qxs-subject-single__single-exam .preview-answer{display:flex;flex-direction:column;margin-bottom:10px}.qxs-subject-single__single-exam .flex{display:flex;align-items:center}.qxs-subject-single__single-exam .margin-bottom{margin-bottom:20px}.qxs-subject-single__single-exam .answer-list .answer-item{margin-top:15px}.qxs-subject-single__single-exam .answer-list .answer-item .input{width:300px}.qxs-subject-single__single-exam .answer-list .answer-item .input [class$=-input]{font-weight:bold}.qxs-subject-single__single-exam .answer-list .answer-item .correct{margin:0 10px}.qxs-subject-single__single-exam .answer-list .answer-item .correct:hover{color:#3d61e3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .is-correct{color:#67c23a}.qxs-subject-single__single-exam .answer-list .answer-item .icon{margin-left:10px;font-size:18px;color:#a3a3a3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-single__single-exam .preview .answer-radio{padding-left:10px}.qxs-subject-single__single-exam .preview .answer-radio .radio{margin-top:10px}.qxs-subject-blank-fill__blank-fill-exam .flex{display:flex;align-items:center}.qxs-subject-blank-fill__blank-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags [class$=-tag]{margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .preview .content{min-height:100px;padding-top:10px;background-color:#fff}.qxs-subject-text-fill__text-fill-exam .flex{display:flex;align-items:center}.qxs-subject-text-fill__text-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-text-fill__text-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-text-fill__text-fill-exam .preview .content{min-height:100px;margin-top:10px}.qxs-subject-scale__scale-exam .flex{display:flex;align-items:center}.qxs-subject-scale__scale-exam .label{min-width:50px}.qxs-subject-scale__scale-exam .margin-bottom{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer{margin:20px 0}.qxs-subject-scale__scale-exam .answer .answer-list{margin-left:40px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .order{width:16px;margin-right:10px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-scale__scale-exam .preview .answer-radio .radio-item .qxs-radio-wrapper{margin-inline-end:0}.qxs-subject-layout__layout-exam{padding:10px;font-size:12px;color:#5a5a5a}.qxs-subject-layout__layout-exam .edit{position:relative;padding:20px 10px;padding-bottom:10px;margin-top:20px;background-color:#f6f7fb}.qxs-subject-layout__layout-exam .edit .triangle-up{position:absolute;top:-20px;left:100px;width:0;height:0;border-right:20px solid rgba(0,0,0,0);border-bottom:20px solid #f6f7fb;border-left:20px solid rgba(0,0,0,0)}.qxs-subject-action__action-exam .action{padding:20px 0}.qxs-subject-action__action-exam .active{padding-right:10px;padding-left:10px;background-color:#f6f7fb}.qxs-subject-action__action-exam .btn-margin{margin-right:10px}.qxs-subject-action__action-exam .has-set{display:flex;align-items:center;font-size:12px;color:#bbb}.qxs-subject-action__action-exam .vertical-radio-group{display:flex;flex-direction:column;align-items:flex-start;margin-left:20px}.qxs-subject-action__action-exam .vertical-radio-group ::v-deep(.qxs-radio){display:block;margin-right:0}.qxs-subject-type__type-list .type-item{margin-bottom:20px}.qxs-subject-type__type-list .base-subject{display:flex;flex-wrap:wrap;align-items:center}.qxs-subject-type__type-list .base-subject .item{width:50px;height:22px;margin-top:10px;margin-right:10px;font-size:14px;color:#5a5a5a;text-align:center;cursor:pointer;background:#fafafa}.qxs-subject-type__type-list .base-subject .item:hover{color:#3d61e3;background:rgba(61,97,227,.12)}.qxs-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;line-height:1em;vertical-align:-2px;color:currentColor;fill:currentColor}.qxs-icon__icon-wrap svg{width:1em !important;height:1em !important;display:block}.qxs-icon__icon-wrap svg *{fill:currentColor !important}.qxs-icon__icon-wrap svg [fill=none]{fill:none !important}
1
+ :root [data-fixed-calc-width]{position:fixed;right:0;left:0%}:root [data-mode=mobile] [data-fixed-calc-width]{width:100% !important}.qxs-data-chart__table{box-sizing:border-box;display:flex;flex-direction:column}.qxs-data-chart__table .title{display:flex;align-items:center;justify-content:space-between;padding:0 5px;margin-top:2px;margin-bottom:7px;font-family:sans-serif;font-size:14px;font-weight:bolder;color:#464646}.qxs-data-chart__table>div[class*=-table]{position:relative;display:flex;flex:1;flex-direction:column;overflow:hidden;background-color:rgba(0,0,0,0);border-top-left-radius:4px;border-top-right-radius:4px}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class*=-table__cell]{border-right:0}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class$=table__empty-text]{line-height:unset}.qxs-data-chart__empty{display:flex;align-items:center;justify-content:center;height:100%}.qxs-data-chart__empty-content{display:flex;flex-direction:column;align-items:center;pointer-events:none;margin-top:-2px}.qxs-data-chart__empty-description{font-size:14px;color:#74767e;margin-left:1px}.qxs-data-chart__wrapper{height:100%}.qxs-fixed-action-bar__actionbar{bottom:0;z-index:10;padding:var(--qxs-fixed-action-bar-actionbar-padding);padding-bottom:calc(env(safe-area-inset-bottom) + var(--qxs-fixed-action-bar-actionbar-padding-bottom));text-align:center;background-color:var(--qxs-bg-color, #fff);box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2);transition:box-shadow .3s,var(--qxs-transition-box-shadow, #f3f3f2)}.qxs-fixed-action-bar__actionbar.is-shadow{box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2)}.qxs-photo-crop-tool__img-box{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background-color:#fafafa}.qxs-photo-crop-tool__error-message{color:red}.qxs-photo-crop-tool__image{max-width:100%;max-height:100%;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:contain;object-fit:contain;-webkit-user-drag:none}.qxs-photo-crop-tool__crop-tool-box{position:absolute;width:calc(var(--qxs-photo-crop-tool-width)*1px);max-width:100%;height:calc(var(--qxs-photo-crop-tool-height)*1px);max-height:100%;aspect-ratio:var(--qxs-photo-crop-tool-aspect-ratio);overflow:hidden;cursor:move;border:1px dashed #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.4)}.qxs-photo-crop-tool__crop-tool-box>div{position:absolute;z-index:3;width:30%;aspect-ratio:1/1;background-color:rgba(2,2,2,.01);border-radius:50%;transition:all .3s}.qxs-photo-crop-tool__crop-tool-box>div:after{content:"";position:absolute;width:10px;height:10px;top:50%;left:50%;transform:translate3d(-50%, -50%, 0);border-radius:50%;background-color:var(--qxs-color-primary, #3d61e3)}.qxs-photo-crop-tool__crop-tool-box>div:hover,.qxs-photo-crop-tool__crop-tool-box>div:active{background-color:rgba(2,2,2,.5)}.qxs-photo-crop-tool__top-left{top:0;left:0;cursor:nwse-resize;transform:translate3d(-50%, -50%, 0)}.qxs-photo-crop-tool__top-right{top:0;right:0;cursor:nesw-resize;transform:translate3d(50%, -50%, 0)}.qxs-photo-crop-tool__bottom-right{right:0;bottom:0;cursor:nwse-resize;transform:translate3d(50%, 50%, 0)}.qxs-photo-crop-tool__bottom-left{bottom:0;left:0;cursor:nesw-resize;transform:translate3d(-50%, 50%, 0)}.el-image-upload__container{line-height:initial}.el-image-upload__control>.el-upload-list--picture-card{color:#969696}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar]{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar] .el-progress-circle{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important;height:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .is-drag{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger{border:unset;background-color:unset;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot{font-weight:400;font-size:16px}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot i:nth-child(1){margin-bottom:10px}.el-image-upload__more-than-limit .is-drag{display:none}.el-image-upload__container .el-upload__tip-text{font-size:14px;line-height:32px;color:#c8c8c8}.qxs-file-upload__control .is-drag{display:inline-block !important}.qxs-file-upload__control .is-drag [class$=-upload-dragger]{padding:0}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-icon--upload]{margin-bottom:0;font-size:40px}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-upload__text]{padding:0 6px;font-size:14px;line-height:1.5}.qxs-file-upload__control .is-drag.is-dragover{border-width:1px}.qxs-file-upload__control .is-drag .slot{width:160px;height:90px}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce{border-width:1px;border-radius:var(--qxs-border-radius-base, 4px)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 4px 4px -4px rgba(34,47,62,.07)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap{overflow-y:auto}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap .tox-edit-area::before{border-width:1px;border-radius:0}.qxs-tiny-mce-editor .tox-tinymce-aux{z-index:2500 !important}.qxs-subject-list__list-exam .flex{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-items-center{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-justify-between{display:flex;justify-content:space-between}.qxs-subject-list__list-exam .flex-justify-center{display:flex;justify-content:center}.qxs-subject-list__list-exam .flex-justify-end{display:flex;justify-content:flex-end}.qxs-subject-list__list-exam .margin-left-10{margin-left:10px}.qxs-subject-list__list-exam .label{min-width:50px}.qxs-subject-list__list-exam .flex-1{flex:1}.qxs-subject-list__list-exam .subject-list-wrapper{width:100%;margin-bottom:20px}.qxs-subject-list__list-exam .margin-bottom{margin-bottom:20px}.qxs-subject-list__list-exam .auto-line{flex:1;height:1px;margin:0 15px;background-color:#c8c8c8}.qxs-subject-list__list-exam .title{font-size:14px;font-weight:500}.qxs-subject-list__list-exam .rich-text img{max-width:100%}.qxs-subject-single__single-exam .preview-answer{display:flex;flex-direction:column;margin-bottom:10px}.qxs-subject-single__single-exam .flex{display:flex;align-items:center}.qxs-subject-single__single-exam .margin-bottom{margin-bottom:20px}.qxs-subject-single__single-exam .answer-list .answer-item{margin-top:15px}.qxs-subject-single__single-exam .answer-list .answer-item .input{width:300px}.qxs-subject-single__single-exam .answer-list .answer-item .input [class$=-input]{font-weight:bold}.qxs-subject-single__single-exam .answer-list .answer-item .correct{margin:0 10px}.qxs-subject-single__single-exam .answer-list .answer-item .correct:hover{color:#3d61e3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .is-correct{color:#67c23a}.qxs-subject-single__single-exam .answer-list .answer-item .icon{margin-left:10px;font-size:18px;color:#a3a3a3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-single__single-exam .preview .answer-radio{padding-left:10px}.qxs-subject-single__single-exam .preview .answer-radio .radio{margin-top:10px}.qxs-subject-blank-fill__blank-fill-exam .flex{display:flex;align-items:center}.qxs-subject-blank-fill__blank-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags [class$=-tag]{margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .preview .content{min-height:100px;padding-top:10px;background-color:#fff}.qxs-subject-text-fill__text-fill-exam .flex{display:flex;align-items:center}.qxs-subject-text-fill__text-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-text-fill__text-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-text-fill__text-fill-exam .preview .content{min-height:100px;margin-top:10px}.qxs-subject-scale__scale-exam .flex{display:flex;align-items:center}.qxs-subject-scale__scale-exam .label{min-width:50px}.qxs-subject-scale__scale-exam .margin-bottom{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer{margin:20px 0}.qxs-subject-scale__scale-exam .answer .answer-list{margin-left:40px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .order{width:16px;margin-right:10px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-scale__scale-exam .preview .answer-radio .radio-item .qxs-radio-wrapper{margin-inline-end:0}.qxs-subject-layout__layout-exam{padding:10px;font-size:12px;color:#5a5a5a}.qxs-subject-layout__layout-exam .edit{position:relative;padding:20px 10px;padding-bottom:10px;margin-top:20px;background-color:#f6f7fb}.qxs-subject-layout__layout-exam .edit .triangle-up{position:absolute;top:-20px;left:100px;width:0;height:0;border-right:20px solid rgba(0,0,0,0);border-bottom:20px solid #f6f7fb;border-left:20px solid rgba(0,0,0,0)}.qxs-subject-action__action-exam .action{padding:20px 0}.qxs-subject-action__action-exam .active{padding-right:10px;padding-left:10px;background-color:#f6f7fb}.qxs-subject-action__action-exam .btn-margin{margin-right:10px}.qxs-subject-action__action-exam .has-set{display:flex;align-items:center;font-size:12px;color:#bbb}.qxs-subject-action__action-exam .vertical-radio-group{display:flex;flex-direction:column;align-items:flex-start;margin-left:20px}.qxs-subject-action__action-exam .vertical-radio-group ::v-deep(.qxs-radio){display:block;margin-right:0}.qxs-subject-type__type-list .type-item{margin-bottom:20px}.qxs-subject-type__type-list .base-subject{display:flex;flex-wrap:wrap;align-items:center}.qxs-subject-type__type-list .base-subject .item{width:50px;height:22px;margin-top:10px;margin-right:10px;font-size:14px;color:#5a5a5a;text-align:center;cursor:pointer;background:#fafafa}.qxs-subject-type__type-list .base-subject .item:hover{color:#3d61e3;background:rgba(61,97,227,.12)}.qxs-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;line-height:1em;vertical-align:-2px;color:currentColor;fill:currentColor}.qxs-icon__icon-wrap svg{width:1em !important;height:1em !important;display:block}.qxs-icon__icon-wrap svg *{fill:currentColor !important}.qxs-icon__icon-wrap svg [fill=none]{fill:none !important}
@@ -1 +1 @@
1
- .el-image-upload__container{line-height:initial}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar]{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar] .el-progress-circle{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important;height:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .is-drag{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger{border:unset;background-color:unset;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot [class$=-icon]{font-size:28px;margin-bottom:10px}.el-image-upload__more-than-limit .is-drag{display:none}.el-image-upload__container .el-upload__tip-text{font-size:14px;line-height:32px;color:#c8c8c8}
1
+ .el-image-upload__container{line-height:initial}.el-image-upload__control>.el-upload-list--picture-card{color:#969696}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar]{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar] .el-progress-circle{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important;height:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .is-drag{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger{border:unset;background-color:unset;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot{font-weight:400;font-size:16px}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot i:nth-child(1){margin-bottom:10px}.el-image-upload__more-than-limit .is-drag{display:none}.el-image-upload__container .el-upload__tip-text{font-size:14px;line-height:32px;color:#c8c8c8}
@@ -8,6 +8,7 @@
8
8
 
9
9
  @include e(control) {
10
10
  >.#{$namespace}-upload-list--picture-card {
11
+ color: #969696;
11
12
 
12
13
  .#{$namespace}-upload-list__item {
13
14
  width: getCssVar('image-upload', 'width');
@@ -35,8 +36,9 @@
35
36
  justify-content: center;
36
37
  align-items: center;
37
38
  .image-slot {
38
- [class$="-icon"] {
39
- font-size: 28px;
39
+ font-weight: 400;
40
+ font-size: 16px;
41
+ i:nth-child(1) {
40
42
  margin-bottom: 10px;
41
43
  }
42
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"image-upload.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"names":[],"mappings":"AAAA,OA8NO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAWxE,KAAK,WAAW,GAAG,gBAAgB,CAAC;AAuBpC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,IAAI,CAA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