iking-web-ui-pro 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IKDetailPreviewFiles/ik.index.es.js +24 -24
- package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IKDetailPreviewFiles/style.css +1 -1
- package/dist/IKExpandCollapse/ik.index.es.js +6 -6
- package/dist/IKExpandCollapse/ik.index.umd.js +1 -1
- package/dist/IKExpandCollapse/style.css +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +3 -3
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/style.css +1 -1
- package/dist/IKVerticalStepBar/ik.index.es.js +15 -15
- package/dist/IKVerticalStepBar/ik.index.umd.js +1 -1
- package/dist/IKVerticalStepBar/style.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +3 -3
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkBaseDialog/ik.index.es.js +12 -12
- package/dist/IkBaseDialog/ik.index.umd.js +1 -1
- package/dist/IkBaseDialog/style.css +1 -1
- package/dist/IkBtnSetting/ik.index.es.js +3 -3
- package/dist/IkBtnSetting/ik.index.umd.js +1 -1
- package/dist/IkBtnSetting/style.css +1 -1
- package/dist/IkCollapseCard/ik.index.es.js +14 -14
- package/dist/IkCollapseCard/ik.index.umd.js +1 -1
- package/dist/IkCollapseCard/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +14 -14
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkDescription/style.css +1 -1
- package/dist/IkIconPicker/ik.index.es.js +3 -3
- package/dist/IkIconPicker/ik.index.umd.js +1 -1
- package/dist/IkIconPicker/style.css +1 -1
- package/dist/IkMonacoEditor/ik.index.es.js +3 -3
- package/dist/IkMonacoEditor/ik.index.umd.js +1 -1
- package/dist/IkMonacoEditor/style.css +1 -1
- package/dist/IkPageFull/ik.index.es.js +3 -3
- package/dist/IkPageFull/ik.index.umd.js +1 -1
- package/dist/IkPageFull/style.css +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +3 -3
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/style.css +1 -1
- package/dist/IkSchedule/ik.index.es.js +3 -3
- package/dist/IkSchedule/ik.index.umd.js +1 -1
- package/dist/IkSchedule/style.css +1 -1
- package/dist/IkSideText/ik.index.es.js +18 -18
- package/dist/IkSideText/ik.index.umd.js +1 -1
- package/dist/IkSideText/style.css +1 -1
- package/dist/IkSvgIcon/ik.index.es.js +7 -7
- package/dist/IkSvgIcon/ik.index.umd.js +1 -1
- package/dist/IkSvgIcon/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +3 -3
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +22 -22
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +25 -25
- package/dist/src/components/IkSvgIcon/index.d.ts +0 -3
- package/dist/src/components/IkSvgIcon/src/index.vue.d.ts +0 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,b){"use strict";const v=(o,n)=>{if(o.install=i=>{for(const t of[o,...Object.values(n??{})])i.component(t.name,t)},n)for(const[i,t]of Object.entries(n))o[i]=t;return o},C=(o,n)=>n?n.startsWith("http")?n:`${o||location.origin}${n}`:"",w=(o,n)=>{const i=o.__vccOpts||o;for(const[t,r]of n)i[t]=r;return i},D=(o,n)=>{var l,s,c,u;const i=(l=o==null?void 0:o.response)!=null&&l.data?S((c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.suffix):((u=o.raw)==null?void 0:u.type)||S(o[n.suffix]),t=i==null?void 0:i.toLowerCase(),r={sheet:"excel",excel:"excel",zip:"zip","application/x-compressed":"zip",image:"image",video:"video",audio:"audio",pdf:"pdf",text:"txt",txt:"txt",word:"word",ppt:"ppt",exe:"exe",json:"json"};for(let a in r)if(typeof t=="string"&&(t.includes(a)||t===a))return r[a];return"unknown"},q={".doc":"word",".docx":"word",".docxf":"word",".docm":"word",".dot":"word",".dotm":"word",".dotx":"word",".epub":"word",".fodt":"word",".htm":"word",".html":"word",".mht":"word",".odt":"word",".ott":"word",".rtf":"word",".djvu":"word",".oxps":"word",".oform":"word",".fb2":"word",".xml":"word",".xps":"word",".csv":"excel",".xls":"excel",".xlsx":"excel",".fods":"excel",".ods":"excel",".ots":"excel",".xlsb":"excel",".xlsm":"excel",".xlt":"excel",".xltm":"excel",".xltx":"excel",".fodp":"ppt",".odp":"ppt",".otp":"ppt",".pot":"ppt",".potm":"ppt",".potx":"ppt",".pps":"ppt",".ppsm":"ppt",".ppsx":"ppt",".ppt":"ppt",".pptm":"ppt",".pptx":"ppt",".zip":"zip",".rar":"zip",".7z":"zip",".apz":"zip",".ar":"zip",".bz":"zip",".car":"zip",".dar":"zip",".cpgz":"zip",".f":"zip",".ha":"zip",".hbc":"zip",".hbc2":"zip",".hbe":"zip",".hpk":"zip",".hyp":"zip",".png":"image",".jpg":"image",".jpeg":"image",".bmp":"image",".gif":"image",".webp":"image",".psd":"image",".svg":"image",".tiff":"image",".avi":"video",".wmv":"video",".mpeg":"video",".mp4":"video",".mpm4v":"video",".mov":"video",".asf":"video",".flv":"video",".f4v":"video",".rmvb":"video",".rm":"video",".3gp":"video",".vob":"video",".txt":"txt",".pdf":"pdf"},S=o=>{const n=o==null?void 0:o.toLocaleLowerCase(),i=n!=null&&n.startsWith(".")?n:`.${n}`;return i&&q[i]||"unknow"},V=o=>{let n="",i=["doc","docx"],t=["xls","xlsx"],r=["ppt","pptx"],l=["pdf"];return i.includes(o)&&(n="word"),t.includes(o)&&(n="cell"),r.includes(o)&&(n="slide"),l.includes(o)&&(n="text-pdf"),n},F={key:0,class:"ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"},O={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},$=["xlink:href"],T=["src"],A={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},M=["xlink:href"],j=["src"],P=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{default:"icon"}},setup(o){const n=o,i=e.inject("iconConfig"),t=e.computed(()=>({...(i==null?void 0:i.value)||{},...n})),r=e.computed(()=>{const{name:s}=t.value;return/^http?:\/\//.test(s)?"img":/i-[^:]+:[^:]+/.test(s)?"unocss":s!=null&&s.startsWith("iksig")?"iksig":s!=null&&s.includes(":")?"iconify":s!=null&&s.startsWith("iksvg")?"svg":"i"}),l=e.computed(()=>{const s=[];if(t.value.flip)switch(t.value.flip){case"horizontal":s.push("rotateY(180deg)");break;case"vertical":s.push("rotateX(180deg)");break;case"both":s.push("rotateX(180deg)"),s.push("rotateY(180deg)");break}t.value.rotate&&s.push(`rotate(${t.value.rotate%360}deg)`);const c={...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...s.length&&{transform:s.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&r.value!=="iksig"?{"--ik-color-icon-dark":t.value.color,"--ik-color-icon-light":t.value.colorLight||b.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(c.width=c.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),c});return(s,c)=>{const u=e.resolveComponent("el-tooltip"),a=e.resolveComponent("el-button");return t.value.tableIconType==="icon"?(e.openBlock(),e.createElementBlock("span",F,[t.value.notip||!t.value.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:e.normalizeStyle(l.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(l.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",O,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,$)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,T)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(l.value)},null,6))],6)):(e.openBlock(),e.createBlock(u,{key:1,content:t.value.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:s.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),style:e.normalizeStyle(l.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(l.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",A,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,M)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,j)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(l.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(a,{key:1,type:["warning","error"].includes(t.value.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),oe="",_=v(w(P,[["__scopeId","data-v-1be337e4"]])),N={key:0,class:"exit-main-page-maximize"},L=e.defineComponent({__name:"CloseIcon",props:{showBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},setup(o){return(n,i)=>(e.openBlock(),e.createElementBlock("div",null,[o.showBg&&o.fullscreen?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(_),{name:"iksvg_guanbidanchuang",title:"关闭",size:20,error:""})])):(e.openBlock(),e.createBlock(e.unref(_),{key:1,error:"",name:"iksvg_guanbidanchuang",title:"关闭",size:20}))]))}}),le="",U=w(L,[["__scopeId","data-v-79f49df8"]]),H={class:"base-header"},W=e.defineComponent({__name:"IkBaseDialog",props:e.mergeModels({title:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},noHeader:{type:Boolean},noFooter:{type:Boolean},showCloseBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1,noHeader:!1,noFooter:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,i=e.useModel(o,"modelValue"),t=e.ref(n.fullscreen),r=()=>{t.value=!t.value},l=e.defineComponent({setup(){return()=>e.h(U,{showBg:n.showCloseBg,fullscreen:n.fullscreen})}});return(s,c)=>{const u=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(u,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=a=>i.value=a)},s.$attrs,{"close-icon":e.unref(l),class:`ik-base-dialog ${s.noHeader?"no-header":""} ${s.noFooter?"no-footer":""}`,fullscreen:t.value,"modal-class":"baseDialog"}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])]),header:e.withCtx(()=>[e.createElementVNode("div",H,[e.renderSlot(s.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])]),s.$attrs.showClose?(e.openBlock(),e.createBlock(e.unref(_),{key:0,onClick:r,name:t.value?"iksvg_tuichuquanping":"iksvg_quanping-daohang",class:"absolute! top-[18px] right-[50px] icon-dialog-full",title:t.value?"退出全屏":"全屏"},null,8,["name","title"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","close-icon","class","fullscreen"])}}}),se="",K=v(W);function X(o,n,i,t){function r(l){return l instanceof i?l:new i(function(s){s(l)})}return new(i||(i=Promise))(function(l,s){function c(d){try{a(t.next(d))}catch(m){s(m)}}function u(d){try{a(t.throw(d))}catch(m){s(m)}}function a(d){d.done?l(d.value):r(d.value).then(c,u)}a((t=t.apply(o,n||[])).next())})}function Y(o,n){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},t,r,l,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(a){return function(d){return u([a,d])}}function u(a){if(t)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(t=1,r&&(l=a[0]&2?r.return:a[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,a[1])).done)return l;switch(r=0,l&&(a=[a[0]&2,l.value]),a[0]){case 0:case 1:l=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!l||a[1]>l[0]&&a[1]<l[3])){i.label=a[1];break}if(a[0]===6&&i.label<l[1]){i.label=l[1],l=a;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(a);break}l[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(o,i)}catch(d){a=[6,d],r=0}finally{t=l=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var G=function(o,n){return X(void 0,void 0,void 0,function(){return Y(this,function(i){return[2,new Promise(function(t,r){try{if(window.DocsAPI)return t(null);var l=document.getElementById(n);if(l)var s=setInterval(function(){var u=l.getAttribute("loading");if(!u){if(clearInterval(s),window.DocsAPI)return t(null);var a=B(n,o,t,r);l.remove(),document.body.appendChild(a)}},500);else{var c=B(n,o,t,r);document.body.appendChild(c)}}catch(u){console.error(u)}})]})})},B=function(o,n,i,t){var r=document.createElement("script");return r.id=o,r.type="text/javascript",r.src=n,r.async=!0,r.onload=function(){r.removeAttribute("loading"),i(null)},r.onerror=function(l){r.removeAttribute("loading"),t(l)},r.setAttribute("loading",""),r},k=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var o=this,n=this.documentServerUrl;n.endsWith("/")||(n+="/");var i="".concat(n,"web-apps/apps/api/documents/api.js");G(i,"onlyoffice-api-script").then(function(){return o.onLoad()}).catch(function(){o.onError(-2)})},unmounted:function(){var o,n=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0)},watch:{config:{handler:function(o,n){this.onChangeProps()},deep:!0},document_fileType:function(o,n){this.onChangeProps()},document_title:function(o,n){this.onChangeProps()},documentType:function(o,n){this.onChangeProps()},editorConfig_lang:function(o,n){this.onChangeProps()},height:function(o,n){this.onChangeProps()},type:function(o,n){this.onChangeProps()},width:function(o,n){this.onChangeProps()}},methods:{onLoad:function(){var o,n;try{var i=this.id||"";if(window.DocsAPI||this.onError(-3),!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[i]){console.log("Skip loading. Instance already exists",i);return}!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.instances||(window.DocEditor={instances:{}});var t=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),r=window.DocsAPI.DocEditor(i,t);window.DocEditor.instances[i]=r}catch(l){console.error(l),this.onError(-1)}},onError:function(o){var n;switch(o){case-2:n="Error load DocsAPI from "+this.documentServerUrl;break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error loading component",o=-1}typeof this.onLoadComponentError>"u"?console.error(n):this.onLoadComponentError(o,n)},onAppReady:function(){var o=this.id||"";this.events_onAppReady(window.DocEditor.instances[o])},onChangeProps:function(){var o,n=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const J=["id"];function Q(o,n,i,t,r,l){return e.openBlock(),e.createElementBlock("div",{id:o.id},null,8,J)}k.render=Q,k.__file="src/components/DocumentEditor.vue";const Z=e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(o){const n=o,i=e.ref({width:"100%",height:"100%",...n.configOptions||{},...n.configOptions}),t=()=>{console.info("文档加载完成",n.configOptions)};return(r,l)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:n.officeHeight})},[e.createVNode(e.unref(k),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":o.documentServerUrl,config:i.value,events_onDocumentReady:t},null,8,["id","document-server-url","config"])],4))}}),ae="",ee=v(w(Z,[["__scopeId","data-v-98d51ef9"]])),te=e.defineComponent({__name:"IkPreviewFileDialog",props:e.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(o){const n=o,i=e.useModel(o,"show"),t=e.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...n.field})),r=e.ref(null),l=e.ref(null),s=e.reactive({image:!1,office:!1,video:!1}),c=a=>{var d,m,h,y,g,z,E;try{const p=((d=a==null?void 0:a.response)==null?void 0:d.data)||a,I=p[t.value.url]||(p==null?void 0:p.id)||p.attachmentId,x=(m=p[t.value.suffix]||p.attachmentSuffix)==null?void 0:m.toLowerCase(),ne=p[t.value.name]||(p==null?void 0:p.attachmentName)||(p==null?void 0:p.originName);if(l.value={...a,name:a[t.value.name],url:C(n.loadUrl,I)},a&&D(a,t.value)==="image"){s.image=!0;return}else if((((h=n.onlyOfficeConfig)==null?void 0:h.accept)||n.onlyOfficeAccept).includes(x)){s.office=!0,r.value={...n.onlyOfficeConfig,editorConfig:{...((y=n.onlyOfficeConfig)==null?void 0:y.editorConfig)||{},customization:{...((z=(g=n.onlyOfficeConfig)==null?void 0:g.editorConfig)==null?void 0:z.customization)||{},review:{reviewDisplay:"final"}}},document:{key:b.buildUUID(),title:ne,url:C(n.loadUrl,I),fileType:x,...((E=n.onlyOfficeConfig)==null?void 0:E.document)||{}},documentType:V(x)};return}}catch(p){console.info("预览错误: ",p)}};e.watch([i,n.file],([a,d])=>{a&&e.nextTick(()=>{c(n.file)})});const u=()=>{i.value=!1,s.office=!1,s.image=!1,s.video=!1};return(a,d)=>{var h,y;const m=e.resolveComponent("el-image-viewer");return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(h=l.value)!=null&&h.url&&s.image?(e.openBlock(),e.createBlock(m,{key:0,onClose:d[0]||(d[0]=g=>{l.value=null,s.image=!1}),ref:"previewImgRef","url-list":[(y=l.value)==null?void 0:y.url]},null,8,["url-list"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 文档类 "),e.createVNode(e.unref(K),{modelValue:s.office,"onUpdate:modelValue":d[1]||(d[1]=g=>s.office=g),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:u,"modal-class":"ik-only-preview-dialog"},{default:e.withCtx(()=>{var g;return[e.createVNode(e.unref(ee),{"config-options":r.value,"document-server-url":((g=o.onlyOfficeConfig)==null?void 0:g.serverUrl)||o.onlyofficeServer},null,8,["config-options","document-server-url"])]}),_:1},8,["modelValue"])],64)):e.createCommentVNode("v-if",!0)}}}),ce="",R=v(te);f.IkPreviewFileDialog=R,f.default=R,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,b){"use strict";const v=(o,n)=>{if(o.install=i=>{for(const t of[o,...Object.values(n??{})])i.component(t.name,t)},n)for(const[i,t]of Object.entries(n))o[i]=t;return o},C=(o,n)=>n?n.startsWith("http")?n:`${o||location.origin}${n}`:"",w=(o,n)=>{const i=o.__vccOpts||o;for(const[t,r]of n)i[t]=r;return i},D=(o,n)=>{var l,s,c,u;const i=(l=o==null?void 0:o.response)!=null&&l.data?S((c=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:c.suffix):((u=o.raw)==null?void 0:u.type)||S(o[n.suffix]),t=i==null?void 0:i.toLowerCase(),r={sheet:"excel",excel:"excel",zip:"zip","application/x-compressed":"zip",image:"image",video:"video",audio:"audio",pdf:"pdf",text:"txt",txt:"txt",word:"word",ppt:"ppt",exe:"exe",json:"json"};for(let a in r)if(typeof t=="string"&&(t.includes(a)||t===a))return r[a];return"unknown"},q={".doc":"word",".docx":"word",".docxf":"word",".docm":"word",".dot":"word",".dotm":"word",".dotx":"word",".epub":"word",".fodt":"word",".htm":"word",".html":"word",".mht":"word",".odt":"word",".ott":"word",".rtf":"word",".djvu":"word",".oxps":"word",".oform":"word",".fb2":"word",".xml":"word",".xps":"word",".csv":"excel",".xls":"excel",".xlsx":"excel",".fods":"excel",".ods":"excel",".ots":"excel",".xlsb":"excel",".xlsm":"excel",".xlt":"excel",".xltm":"excel",".xltx":"excel",".fodp":"ppt",".odp":"ppt",".otp":"ppt",".pot":"ppt",".potm":"ppt",".potx":"ppt",".pps":"ppt",".ppsm":"ppt",".ppsx":"ppt",".ppt":"ppt",".pptm":"ppt",".pptx":"ppt",".zip":"zip",".rar":"zip",".7z":"zip",".apz":"zip",".ar":"zip",".bz":"zip",".car":"zip",".dar":"zip",".cpgz":"zip",".f":"zip",".ha":"zip",".hbc":"zip",".hbc2":"zip",".hbe":"zip",".hpk":"zip",".hyp":"zip",".png":"image",".jpg":"image",".jpeg":"image",".bmp":"image",".gif":"image",".webp":"image",".psd":"image",".svg":"image",".tiff":"image",".avi":"video",".wmv":"video",".mpeg":"video",".mp4":"video",".mpm4v":"video",".mov":"video",".asf":"video",".flv":"video",".f4v":"video",".rmvb":"video",".rm":"video",".3gp":"video",".vob":"video",".txt":"txt",".pdf":"pdf"},S=o=>{const n=o==null?void 0:o.toLocaleLowerCase(),i=n!=null&&n.startsWith(".")?n:`.${n}`;return i&&q[i]||"unknow"},V=o=>{let n="",i=["doc","docx"],t=["xls","xlsx"],r=["ppt","pptx"],l=["pdf"];return i.includes(o)&&(n="word"),t.includes(o)&&(n="cell"),r.includes(o)&&(n="slide"),l.includes(o)&&(n="text-pdf"),n},F={key:0,class:"ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"},O={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},T=["xlink:href"],$=["src"],A={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},M=["xlink:href"],j=["src"],P=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{}},setup(o){const n=o,i=e.inject("iconConfig"),t=e.computed(()=>({...(i==null?void 0:i.value)||{},...n})),r=e.computed(()=>{const{name:s}=t.value;return/^http?:\/\//.test(s)?"img":/i-[^:]+:[^:]+/.test(s)?"unocss":s!=null&&s.startsWith("iksig")?"iksig":s!=null&&s.includes(":")?"iconify":s!=null&&s.startsWith("iksvg")?"svg":"i"}),l=e.computed(()=>{const s=[];if(t.value.flip)switch(t.value.flip){case"horizontal":s.push("rotateY(180deg)");break;case"vertical":s.push("rotateX(180deg)");break;case"both":s.push("rotateX(180deg)"),s.push("rotateY(180deg)");break}t.value.rotate&&s.push(`rotate(${t.value.rotate%360}deg)`);const c={...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...s.length&&{transform:s.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&r.value!=="iksig"?{"--ik-color-icon-dark":t.value.color,"--ik-color-icon-light":t.value.colorLight||b.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(c.width=c.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),c});return(s,c)=>{const u=e.resolveComponent("el-tooltip"),a=e.resolveComponent("el-button");return t.value.tableIconType==="icon"||!t.value.tableIconType?(e.openBlock(),e.createElementBlock("span",F,[t.value.notip||!t.value.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:e.normalizeStyle(l.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(l.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",O,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,T)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,$)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(l.value)},null,6))],6)):(e.openBlock(),e.createBlock(u,{key:1,content:t.value.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:s.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),style:e.normalizeStyle(l.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(l.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",A,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,M)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,j)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(l.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(a,{key:1,type:["warning","error"].includes(t.value.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),oe="",_=v(w(P,[["__scopeId","data-v-7729b79a"]])),N={key:0,class:"exit-main-page-maximize"},L=e.defineComponent({__name:"CloseIcon",props:{showBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},setup(o){return(n,i)=>(e.openBlock(),e.createElementBlock("div",null,[o.showBg&&o.fullscreen?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(_),{name:"iksvg_guanbidanchuang",title:"关闭",size:20,error:""})])):(e.openBlock(),e.createBlock(e.unref(_),{key:1,error:"",name:"iksvg_guanbidanchuang",title:"关闭",size:20}))]))}}),le="",U=w(L,[["__scopeId","data-v-79f49df8"]]),H={class:"base-header"},W=e.defineComponent({__name:"IkBaseDialog",props:e.mergeModels({title:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},noHeader:{type:Boolean},noFooter:{type:Boolean},showCloseBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1,noHeader:!1,noFooter:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,i=e.useModel(o,"modelValue"),t=e.ref(n.fullscreen),r=()=>{t.value=!t.value},l=e.defineComponent({setup(){return()=>e.h(U,{showBg:n.showCloseBg,fullscreen:n.fullscreen})}});return(s,c)=>{const u=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(u,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=a=>i.value=a)},s.$attrs,{"close-icon":e.unref(l),class:`ik-base-dialog ${s.noHeader?"no-header":""} ${s.noFooter?"no-footer":""}`,fullscreen:t.value,"modal-class":"baseDialog"}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])]),header:e.withCtx(()=>[e.createElementVNode("div",H,[e.renderSlot(s.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])]),s.$attrs.showClose?(e.openBlock(),e.createBlock(e.unref(_),{key:0,onClick:r,name:t.value?"iksvg_tuichuquanping":"iksvg_quanping-daohang",class:"absolute! top-[18px] right-[50px] icon-dialog-full",title:t.value?"退出全屏":"全屏"},null,8,["name","title"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","close-icon","class","fullscreen"])}}}),se="",K=v(W);function X(o,n,i,t){function r(l){return l instanceof i?l:new i(function(s){s(l)})}return new(i||(i=Promise))(function(l,s){function c(d){try{a(t.next(d))}catch(m){s(m)}}function u(d){try{a(t.throw(d))}catch(m){s(m)}}function a(d){d.done?l(d.value):r(d.value).then(c,u)}a((t=t.apply(o,n||[])).next())})}function Y(o,n){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},t,r,l,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(a){return function(d){return u([a,d])}}function u(a){if(t)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(t=1,r&&(l=a[0]&2?r.return:a[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,a[1])).done)return l;switch(r=0,l&&(a=[a[0]&2,l.value]),a[0]){case 0:case 1:l=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!l||a[1]>l[0]&&a[1]<l[3])){i.label=a[1];break}if(a[0]===6&&i.label<l[1]){i.label=l[1],l=a;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(a);break}l[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(o,i)}catch(d){a=[6,d],r=0}finally{t=l=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var G=function(o,n){return X(void 0,void 0,void 0,function(){return Y(this,function(i){return[2,new Promise(function(t,r){try{if(window.DocsAPI)return t(null);var l=document.getElementById(n);if(l)var s=setInterval(function(){var u=l.getAttribute("loading");if(!u){if(clearInterval(s),window.DocsAPI)return t(null);var a=B(n,o,t,r);l.remove(),document.body.appendChild(a)}},500);else{var c=B(n,o,t,r);document.body.appendChild(c)}}catch(u){console.error(u)}})]})})},B=function(o,n,i,t){var r=document.createElement("script");return r.id=o,r.type="text/javascript",r.src=n,r.async=!0,r.onload=function(){r.removeAttribute("loading"),i(null)},r.onerror=function(l){r.removeAttribute("loading"),t(l)},r.setAttribute("loading",""),r},k=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var o=this,n=this.documentServerUrl;n.endsWith("/")||(n+="/");var i="".concat(n,"web-apps/apps/api/documents/api.js");G(i,"onlyoffice-api-script").then(function(){return o.onLoad()}).catch(function(){o.onError(-2)})},unmounted:function(){var o,n=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0)},watch:{config:{handler:function(o,n){this.onChangeProps()},deep:!0},document_fileType:function(o,n){this.onChangeProps()},document_title:function(o,n){this.onChangeProps()},documentType:function(o,n){this.onChangeProps()},editorConfig_lang:function(o,n){this.onChangeProps()},height:function(o,n){this.onChangeProps()},type:function(o,n){this.onChangeProps()},width:function(o,n){this.onChangeProps()}},methods:{onLoad:function(){var o,n;try{var i=this.id||"";if(window.DocsAPI||this.onError(-3),!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[i]){console.log("Skip loading. Instance already exists",i);return}!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.instances||(window.DocEditor={instances:{}});var t=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),r=window.DocsAPI.DocEditor(i,t);window.DocEditor.instances[i]=r}catch(l){console.error(l),this.onError(-1)}},onError:function(o){var n;switch(o){case-2:n="Error load DocsAPI from "+this.documentServerUrl;break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error loading component",o=-1}typeof this.onLoadComponentError>"u"?console.error(n):this.onLoadComponentError(o,n)},onAppReady:function(){var o=this.id||"";this.events_onAppReady(window.DocEditor.instances[o])},onChangeProps:function(){var o,n=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const J=["id"];function Q(o,n,i,t,r,l){return e.openBlock(),e.createElementBlock("div",{id:o.id},null,8,J)}k.render=Q,k.__file="src/components/DocumentEditor.vue";const Z=e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(o){const n=o,i=e.ref({width:"100%",height:"100%",...n.configOptions||{},...n.configOptions}),t=()=>{console.info("文档加载完成",n.configOptions)};return(r,l)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:n.officeHeight})},[e.createVNode(e.unref(k),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":o.documentServerUrl,config:i.value,events_onDocumentReady:t},null,8,["id","document-server-url","config"])],4))}}),ae="",ee=v(w(Z,[["__scopeId","data-v-98d51ef9"]])),te=e.defineComponent({__name:"IkPreviewFileDialog",props:e.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(o){const n=o,i=e.useModel(o,"show"),t=e.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...n.field})),r=e.ref(null),l=e.ref(null),s=e.reactive({image:!1,office:!1,video:!1}),c=a=>{var d,m,h,y,g,z,E;try{const p=((d=a==null?void 0:a.response)==null?void 0:d.data)||a,I=p[t.value.url]||(p==null?void 0:p.id)||p.attachmentId,x=(m=p[t.value.suffix]||p.attachmentSuffix)==null?void 0:m.toLowerCase(),ne=p[t.value.name]||(p==null?void 0:p.attachmentName)||(p==null?void 0:p.originName);if(l.value={...a,name:a[t.value.name],url:C(n.loadUrl,I)},a&&D(a,t.value)==="image"){s.image=!0;return}else if((((h=n.onlyOfficeConfig)==null?void 0:h.accept)||n.onlyOfficeAccept).includes(x)){s.office=!0,r.value={...n.onlyOfficeConfig,editorConfig:{...((y=n.onlyOfficeConfig)==null?void 0:y.editorConfig)||{},customization:{...((z=(g=n.onlyOfficeConfig)==null?void 0:g.editorConfig)==null?void 0:z.customization)||{},review:{reviewDisplay:"final"}}},document:{key:b.buildUUID(),title:ne,url:C(n.loadUrl,I),fileType:x,...((E=n.onlyOfficeConfig)==null?void 0:E.document)||{}},documentType:V(x)};return}}catch(p){console.info("预览错误: ",p)}};e.watch([i,n.file],([a,d])=>{a&&e.nextTick(()=>{c(n.file)})});const u=()=>{i.value=!1,s.office=!1,s.image=!1,s.video=!1};return(a,d)=>{var h,y;const m=e.resolveComponent("el-image-viewer");return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(h=l.value)!=null&&h.url&&s.image?(e.openBlock(),e.createBlock(m,{key:0,onClose:d[0]||(d[0]=g=>{l.value=null,s.image=!1}),ref:"previewImgRef","url-list":[(y=l.value)==null?void 0:y.url]},null,8,["url-list"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 文档类 "),e.createVNode(e.unref(K),{modelValue:s.office,"onUpdate:modelValue":d[1]||(d[1]=g=>s.office=g),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:u,"modal-class":"ik-only-preview-dialog"},{default:e.withCtx(()=>{var g;return[e.createVNode(e.unref(ee),{"config-options":r.value,"document-server-url":((g=o.onlyOfficeConfig)==null?void 0:g.serverUrl)||o.onlyofficeServer},null,8,["config-options","document-server-url"])]}),_:1},8,["modelValue"])],64)):e.createCommentVNode("v-if",!0)}}}),ce="",R=v(te);f.IkPreviewFileDialog=R,f.default=R,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.row-title[data-v-
|
|
1
|
+
.row-title[data-v-7729b79a]{display:flex}.exit-main-page-maximize[data-v-79f49df8]{position:fixed;top:-40px;right:-40px;z-index:1000;width:80px;height:80px;cursor:pointer;background-color:var(--ik-color-bg-icon);border-radius:50%}.exit-main-page-maximize span[data-v-79f49df8]{position:absolute;top:47px;right:47px}.ik-svg-icon.ik-icon[data-v-79f49df8]{--ik-color-icon-dark: var(--ik-color-bgicon-dark);--ik-color-icon-light: var(--ik-color-bgicon-light)}.el-dialog.ik-base-dialog.no-header .el-dialog__header{height:0}.el-dialog.ik-base-dialog.no-header .el-dialog__header .base-header{overflow:hidden;display:none}.el-dialog.ik-base-dialog.no-header .el-dialog__header:after{display:none}.el-dialog.ik-base-dialog.no-footer .el-dialog__footer{height:0;overflow:hidden}.ik-only-preview-dialog .el-dialog.is-fullscreen{padding:0}.ik-only-preview-dialog .el-dialog.is-fullscreen .el-dialog__body{max-height:100vh!important;padding:0}
|
|
@@ -9521,7 +9521,7 @@ const lr = (t, e) => {
|
|
|
9521
9521
|
type: {},
|
|
9522
9522
|
active: { type: Boolean, default: !1 },
|
|
9523
9523
|
disabled: { type: Boolean, default: !1 },
|
|
9524
|
-
tableIconType: {
|
|
9524
|
+
tableIconType: {}
|
|
9525
9525
|
},
|
|
9526
9526
|
setup(t) {
|
|
9527
9527
|
const e = t, n = bl("iconConfig"), r = we(() => ({
|
|
@@ -9559,7 +9559,7 @@ const lr = (t, e) => {
|
|
|
9559
9559
|
});
|
|
9560
9560
|
return (l, o) => {
|
|
9561
9561
|
const a = G("el-tooltip"), d = G("el-button");
|
|
9562
|
-
return r.value.tableIconType === "icon" ? (N(), L("span", jh, [
|
|
9562
|
+
return r.value.tableIconType === "icon" || !r.value.tableIconType ? (N(), L("span", jh, [
|
|
9563
9563
|
r.value.notip || !r.value.title ? (N(), L(
|
|
9564
9564
|
"i",
|
|
9565
9565
|
{
|
|
@@ -9691,7 +9691,7 @@ const lr = (t, e) => {
|
|
|
9691
9691
|
};
|
|
9692
9692
|
}
|
|
9693
9693
|
});
|
|
9694
|
-
const $h = /* @__PURE__ */ lr(Qh, [["__scopeId", "data-v-
|
|
9694
|
+
const $h = /* @__PURE__ */ lr(Qh, [["__scopeId", "data-v-7729b79a"]]), Zh = Cn($h), mi = Zh, or = (t) => (Al("data-v-e308f501"), t = t(), _l(), t), Xh = { class: "ik-schedule" }, Jh = { class: "ik-schedule__left" }, Kh = { class: "ik-schedule__header" }, eg = { class: "ik-schedule__title" }, tg = /* @__PURE__ */ or(() => /* @__PURE__ */ O(
|
|
9695
9695
|
"div",
|
|
9696
9696
|
{ class: "ik-schedule__header-right" },
|
|
9697
9697
|
null,
|