@cimom/ci-web-plugins-commom 1.0.23 → 1.1.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e,reactive as t,useAttrs as o,computed as l,onMounted as n,nextTick as r,resolveComponent as s,createElementBlock as u,openBlock as c,
|
|
1
|
+
import{ref as e,reactive as t,useAttrs as o,computed as l,onMounted as n,nextTick as r,resolveComponent as s,createElementBlock as u,openBlock as c,createTextVNode as a,createCommentVNode as i,createBlock as m,createVNode as v,mergeProps as f,toHandlers as d,createSlots as g,renderList as p,withCtx as b,renderSlot as x,normalizeProps as h,guardReactiveProps as E}from"vue";const F={id:"VxeTablePro"};var k={__name:"index",props:{},setup(k,{expose:y}){const _={};e("");const w=e(!0),R=e(null),S=t({storage:w.value,mode:"default"}),I=o(),T=e(!1),q=e(!0),z=e("mini"),O=l((()=>{const e={..._};return Object.keys(I).forEach((t=>{t.startsWith("on")||(e[t]=I[t])})),e})),P=l((()=>{const e={};return Object.keys(I).forEach((t=>{t.startsWith("on")&&(e[t]=I[t])})),e})),B=l((()=>!1!==I.toolbar)),L=l((()=>({custom:!1,print:!1,export:!1,import:!1,zoom:!1,refresh:!1,...I["toolbar-config"]}))),V=l((()=>!1!==B.value)),C=l((()=>I["refresh-options"]||null)),J=e(null),N=e(null);n((async()=>{await r();const e=J.value,t=N.value?.getInstance?.()||N.value;e&&t&&(e.connect?.(t),console.log("[VxeTablePro] 已连接工具栏"))}));const j=()=>{const e=!!(document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement);console.log("全屏状态:",e?"是":"否")};return document.addEventListener("fullscreenchange",j),document.addEventListener("webkitfullscreenchange",j),document.addEventListener("msfullscreenchange",j),y({Instance:function(){return J.value},vxeTableProRef:J,toolbarRef:N,toggleFullscreen:()=>{const e=document.getElementById(J.value.id);if(console.log(e),!e)return void console.warn("未找到 id 为 VxeTablePro 的元素");document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},scriptBool:e=>{T.value=e},sizeBool:e=>{z.value=e},borderBool:e=>{q.value=e},changelineHeight:e=>{R.value=e},saveToLocalStorage:(e,t)=>{try{const o="VXE_CUSTOM_STORE",l=localStorage.getItem(o);let n={};if(l)try{n=JSON.parse(l);n._v}catch(e){n={_v:1}}else n={_v:1};n[e]=t,localStorage.setItem(o,JSON.stringify(n)),t.basicConfig&&localStorage.setItem(e,JSON.stringify(t.basicConfig)),location.reload()}catch(e){console.error("保存失败:",e)}},exportData(e){J.value?.exportData?.(e)},openImport(e){J.value?.openImport?.(e)}}),(e,t)=>{const o=s("vxe-toolbar"),l=s("vxe-table");return c(),u("div",F,[t[0]||(t[0]=a(" ceshi ")),i(" 内置工具栏:原样透传所有配置 "),V.value?(c(),m(o,{key:0,ref_key:"toolbarRef",ref:N,custom:!!L.value.custom,print:!!L.value.print,export:!!L.value.export,import:!!L.value.import,zoom:!!L.value.zoom,refresh:!!L.value.refresh&&{query:C.value}},null,8,["custom","print","export","import","zoom","refresh"])):i("v-if",!0),i(" 主表格 "),v(l,f({stripe:T.value,size:z.value,border:q.value,storage:w.value},O.value,d(P.value),{ref_key:"vxeTableProRef",ref:J,"cell-config":{height:R.value},"custom-config":S}),g({_:2},[p(e.$slots,((t,o)=>({name:o,fn:b((t=>[x(e.$slots,o,h(E(t)))]))})))]),1040,["stripe","size","border","storage","cell-config","custom-config"])])}}};export{k as default};
|