@chewel611/naive-ui-plus 0.0.39 → 0.0.41
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/index.js +581 -574
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/es/layout/content/PTabs.css +1 -1
- package/es/layout/content/PTabs.vue.js +2 -2
- package/es/layout/content/PTabs.vue2.js +104 -97
- package/es/layout/sider/PMenus.vue.js +22 -22
- package/es/layout/store.d.ts +18 -18
- package/es/layout/store.js +24 -24
- package/es/layout/typing.d.ts +0 -6
- package/es/modal/PModal.vue.js +7 -7
- package/lib/layout/content/PTabs.css +1 -1
- package/lib/layout/content/PTabs.vue.cjs +1 -1
- package/lib/layout/content/PTabs.vue2.cjs +1 -1
- package/lib/layout/sider/PMenus.vue.cjs +1 -1
- package/lib/layout/store.cjs +1 -1
- package/lib/layout/store.d.ts +18 -18
- package/lib/layout/typing.d.ts +0 -6
- package/lib/modal/PModal.vue.cjs +1 -1
- package/package.json +3 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(C,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("naive-ui"),require("vue"),require("@vicons/antd"),require("pinia"),require("vue-router"),require("element-resize-detector"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","naive-ui","vue","@vicons/antd","pinia","vue-router","element-resize-detector","vuedraggable"],o):(C=typeof globalThis<"u"?globalThis:C||self,o(C.naiveplus={},C.naiveUi,C.Vue,C.antd,C.pinia,C.vueRouter,C.elementResizeDetectorMaker,C.Draggable))})(this,(function(C,o,e,L,Z,R,ue,_e){"use strict";const ye={class:"text-lg font-medium"},ke={id:"data-content"},we={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},be=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(t,{expose:a}){const c=e.ref(null),m=o.useDialog(),d=o.useMessage(),s=e.ref(!1),w=e.ref([]),g=e.ref([]),P=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async k=>{P.value.page=k,await E()},onUpdatePageSize:async k=>{P.value.pageSize=k,await E()}}),N=t,l=k=>{const b=x=>{const V=[];return k&&k.forEach(O=>{O.key!=="edit"&&O.key!=="delete"&&V.push({label:O.name,key:O.key,icon:O.icon&&(()=>e.h(o.NIcon,null,{default:()=>e.h(O.icon)})),props:{onClick:()=>O.action(x)}})}),V};return{title:"操作",key:"actions",width:100,fixed:"right",render:x=>{let V=[];if(N.onEdit&&V.push({label:"编辑",key:"edit",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.EditOutlined)}),props:{onClick:async()=>await N.onEdit(x)}}),N.onDelete&&V.push({label:"删除",key:"delete",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.DeleteOutlined)}),props:{onClick:()=>B(x)}}),V=[...V,...b(x)],!(V.length<=0))return e.h(o.NDropdown,{options:V,placement:"bottom-start"},{default:()=>e.h(o.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(o.NIcon,()=>e.h(L.MoreOutlined))]})})}}},_=e.computed(()=>{const k=N.columns.filter(x=>x.key!="action").map(x=>({title:x.title,key:x.key,width:x.width,fixed:x.fixed??!1,render:x.render,ellipsis:x.ellipsis?{tooltip:!0}:!1})),b=N.columns.reduce((x,V)=>V.key==="action"?V:x,void 0)?.action;return b&&b?.length>0||N.onEdit||N.onDelete?[{type:"selection",fixed:"left"},...k,l(b)]:[{type:"selection",fixed:"left"},...k]}),i=async()=>await E(),B=k=>r([k]),T=()=>{const k=h();r(k)},r=k=>{k&&k.length>0&&m.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(N.onDelete)try{await N.onDelete(k)?(E(),d.success("删除成功")):d.error("删除失败")}catch(b){d.error(b.message)}}})},h=()=>w.value?g.value.filter(b=>w.value.includes(b.id)).map(b=>e.toRaw(b)):[],y=()=>h()[0],$=()=>e.toRaw(g.value),E=async()=>{if(!s.value){s.value=!0;try{if(N.onLoad){var{data:k,total:b}=await N.onLoad(P.value.page,P.value.pageSize);g.value=k,P.value.itemCount=b}}catch(x){d.error(x.message)}finally{s.value=!1}}},u=e.computed(()=>{const k=e.unref(c);if(!k)return;const b=k?.$el,x=b.querySelector(".n-data-table-thead "),{bottomIncludeBody:V}=F(x),O=48;let I=12,W=25;const z=b.querySelector(".n-data-table__pagination");if(z){const q=z.offsetHeight;I+=q||0}else I+=28;return V-(O+I+W)}),H=k=>!k||!k.getBoundingClientRect?0:k.getBoundingClientRect(),F=k=>{const b=document.documentElement,x=b.scrollLeft,V=b.scrollTop,O=b.clientLeft,I=b.clientTop,W=window.pageXOffset,z=window.pageYOffset,K=H(k),{left:q,top:G,width:Q,height:n}=K,f=(W||x)-(O||0),p=(z||V)-(I||0),S=q+W,A=G+z,Y=S-f,X=A-p,J=window.document.documentElement.clientWidth,he=window.document.documentElement.clientHeight;return{left:Y,top:X,right:J-Q-Y,bottom:he-n-X,rightIncludeBody:J-Y,bottomIncludeBody:he-X}};return e.onMounted(async()=>await E()),a({getData:$,getSelectedRow:y,getSelectedRows:h,refreshData:E,resetPage:()=>{P.value.page=1}}),(k,b)=>{const x=o.NTooltip,V=o.NSpace,O=o.NDataTable;return e.openBlock(),e.createBlock(e.unref(o.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(V,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",ye,e.toDisplayString(t.title),1),e.createVNode(V,null,{default:e.withCtx(()=>[N.onAdd?(e.openBlock(),e.createBlock(x,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:N.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(L.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[b[1]||(b[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),N.onDelete?(e.openBlock(),e.createBlock(x,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:T},{default:e.withCtx(()=>[e.createVNode(e.unref(L.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[b[2]||(b[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[b[3]||(b[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",ke,[k.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(k.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(O,{remote:"",ref_key:"$table",ref:c,"checked-row-keys":w.value,"onUpdate:checkedRowKeys":b[0]||(b[0]=I=>w.value=I),"max-height":u.value,loading:s.value,bordered:!1,"single-line":!1,columns:_.value,data:g.value,pagination:P.value,"row-key":I=>I[t.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}}),D=t=>{const a=t;return a.install=function(c){c.component(a.__name,t)},t},U=D(be),Ce=["Redirect","RedirectSon","login"],j=Z.defineStore("p-layout",()=>{const t=e.reactive({collapsed:!1,title:"输入项目名称",logo:"https://picsum.photos/id/1/100/100",avatar:"",uid:"",uname:"",tabs:[],cacheTabs:!1,enableLanguage:!1});return{state:t,initTabs:r=>{r.sort((h,y)=>(y.meta.affix?1:0)-(h.meta.affix?1:0)),t.tabs=r},addTab:r=>Ce.includes(r.name)?!1:(t.tabs?.some(y=>y.fullPath==r.fullPath)||t.tabs?.push(r),!0),closeCurrentTab:r=>{const h=t.tabs.findIndex(y=>y.fullPath==r.fullPath);t.tabs.splice(h,1)},closeAllTabs:()=>{t.tabs=t.tabs.filter(r=>r?.meta?.affix??!1)},closeOtherTabs:r=>{t.tabs=t.tabs.filter(h=>h.fullPath==r.fullPath||(h?.meta?.affix??!1))},closeLeftTabs:r=>{const h=t.tabs.findIndex(y=>y.fullPath==r.fullPath);t.tabs=t.tabs.filter((y,$)=>$>=h||(y?.meta?.affix??!1))},closeRightTabs:r=>{const h=t.tabs.findIndex(y=>y.fullPath==r.fullPath);t.tabs=t.tabs.filter((y,$)=>$<=h||(y?.meta?.affix??!1))},collapse:()=>{t.collapsed=!t.collapsed},setTitle:r=>{t.title=r},setLogo:r=>{t.logo=r},setUser:(r,h)=>{t.uid=r,t.uname=h},setSettingPages:r=>{t.settingPages=r},setLogout:r=>{t.logout=r},enableLanguage:r=>{t.enableLanguage=r}}}),Ne={class:"logo"},xe=e.defineComponent({__name:"PLogo",setup(t){const a=j();return(c,m)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(o.NAvatar),{color:"var(--color-logo)",size:32,src:e.unref(a).state.logo,class:e.normalizeClass({"mr-2":!e.unref(a).state.collapsed})},null,8,["src","class"]),e.withDirectives(e.createElementVNode("h1",{class:"font-bold ease-in-out ml-2 logo-size"},e.toDisplayString(e.unref(a).state.title),513),[[e.vShow,!e.unref(a).state.collapsed]])]))}}),M=(t,a)=>{const c=t.__vccOpts||t;for(const[m,d]of a)c[m]=d;return c},Pe=M(xe,[["__scopeId","data-v-e48aeefa"]]),Be={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],initLanguages:async()=>[],selectLanguage:async t=>{}},v=Z.defineStore("language",()=>{const t=e.ref(Be),a=async()=>(t.value.options.length===0&&(t.value.options=await t.value.initLanguages()),t.value.options);return{select:async l=>{if(t.value.currentLanguage===l)return;const _=(await a()).find(i=>i.key===l);_&&(t.value.currentLanguage=_.key,t.value.selectLanguage(_))},selectLanguageCallback:async l=>{t.value.selectLanguage=l},initLanguagesCallback:async l=>{t.value.initLanguages=l},getLanguages:a,getCurrentLanguage:async()=>{if(t.value.currentLanguage)return(await a()).find(l=>l.key===t.value.currentLanguage)},setTranslationApiUrl:l=>{t.value.translationApiUrl=l},getTranslationApiUrl:()=>t.value.translationApiUrl,getDefaultLanguage:()=>t.value.defaultLanguage?t.value.defaultLanguage:"chinese_simplified",setDefaultLanguage:l=>{(l==="Chinese"||l==="chinese")&&(l="chinese_simplified"),t.value.defaultLanguage=l}}}),Ve={key:1},ee=e.defineComponent({__name:"PLanguage",setup(t){const{select:a,getLanguages:c,getCurrentLanguage:m,getDefaultLanguage:d,getTranslationApiUrl:s}=v(),w=e.ref(),g=e.ref([]),P=async l=>await a(l),N=async()=>{const l=window.translate;l&&(l.selectLanguageTag.show=!1,l.selectLanguageTag.languages=(await c()).map(_=>_.key).join(","),l.ignore.class.push("ignore-translate-flag"),l.ignore.id.push("ignore-translation"),l.language.setLocal(d()),l.request.api.translate="api/v1/translation",l.request.api.connectTest="api/v1/translation/connect-test",l.request.api.init="api/v1/translation/init",l.request.api.language="api/v1/translation/language",l.request.setHost(s()),l.request.listener.start(),l.listener.start(),l.whole.enableAll(),l.execute())};return e.onMounted(async()=>{await e.nextTick(),await N(),w.value=await m(),g.value=await c()}),(l,_)=>{const i=o.NIcon,B=o.NButton;return g.value.length>0?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:P,options:g.value},{default:e.withCtx(()=>[e.createVNode(B,{quaternary:"",type:"info"},{default:e.withCtx(()=>[w.value?(e.openBlock(),e.createElementBlock("label",Ve,e.toDisplayString(w.value?.label),1)):(e.openBlock(),e.createBlock(i,{key:0,size:"18"},{default:e.withCtx(()=>[..._[0]||(_[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{d:"M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z",fill:"currentColor"}),e.createElementVNode("path",{d:"M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}}),Se={class:"layout-header"},Le={class:"layout-header-left"},Ee={class:"link-text"},Te={key:1,class:"link-text"},$e={class:"layout-header-right"},Oe={key:0,class:"layout-header-trigger-min"},De={class:"layout-header-trigger layout-header-trigger-min"},Ie={class:"layout-header-trigger layout-header-trigger-min"},Re={class:"avatar"},Me=M(e.defineComponent({__name:"PHeader",setup(t){const a=o.useMessage(),c=o.useDialog(),m=j(),d=R.useRouter(),s=R.useRoute(),w=e.inject("reloadPage"),g=r=>d.push({name:r}),P=e.computed(()=>N(s.matched)),N=r=>r.map(h=>{const y={key:h.name,label:h.meta.title,icon:h.meta.icon,meta:h.meta,disabled:h.path==="/",children:void 0};return h.children&&h.children.length>0&&(y.children=N(h.children)),y}),l=e.ref(!1),_=()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),l.value=!1):(document.documentElement.requestFullscreen(),l.value=!0)},i=e.computed(()=>{const r=[];return r.push({label:"退出登录",key:"logout"}),m.state.settingPages&&m.state.settingPages.length>0&&m.state.settingPages.forEach(h=>{r.push({label:h.title,key:h.route})}),r}),B=r=>{r==="logout"?T():d.push({name:r})},T=()=>{c.info({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(m.state.logout)try{await m.state.logout(),localStorage.removeItem("TABS-ROUTES"),a.error("退出成功")}catch(r){console.error(r),a.error("退出登录失败")}finally{location.reload()}else a.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法")},onNegativeClick:()=>{}})};return(r,h)=>{const y=o.NTooltip,$=o.NDivider,E=o.NAvatar;return e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Le,[e.createElementVNode("div",{class:"ml-1 layout-header-trigger layout-header-trigger-min",onClick:h[0]||(h[0]=(...u)=>e.unref(m).collapse&&e.unref(m).collapse(...u))},[e.unref(m).state.collapsed?(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:0,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.MenuUnfoldOutlined))]),_:1})):(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:1,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.MenuFoldOutlined))]),_:1}))]),e.createElementVNode("div",{class:"mr-1 layout-header-trigger layout-header-trigger-min",onClick:h[1]||(h[1]=(...u)=>e.unref(w)&&e.unref(w)(...u))},[e.createVNode(e.unref(o.NIcon),{size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ReloadOutlined))]),_:1})]),e.createVNode(e.unref(o.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.label},[u.label?(e.openBlock(),e.createBlock(e.unref(o.NBreadcrumbItem),{key:0},{default:e.withCtx(()=>[u.children&&u.children.length?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,options:u.children,onSelect:g},{default:e.withCtx(()=>[e.createElementVNode("span",Ee,[u.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(u.label),1)])]),_:2},1032,["options"])):(e.openBlock(),e.createElementBlock("span",Te,[u.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(u.label),1)]))]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1})]),e.createElementVNode("div",$e,[e.unref(m).state.enableLanguage?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(ee)])):e.createCommentVNode("",!0),e.createElementVNode("div",De,[e.createVNode(y,{placement:"bottom"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",onClick:e.withModifiers(_,["stop"])},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createBlock(e.unref(L.FullscreenExitOutlined),{key:1})):(e.openBlock(),e.createBlock(e.unref(L.FullscreenOutlined),{key:0}))]),_:1})]),default:e.withCtx(()=>[h[2]||(h[2]=e.createElementVNode("span",null,"全屏",-1))]),_:1})]),e.createElementVNode("div",Ie,[e.createVNode(e.unref(o.NDropdown),{trigger:"hover",onSelect:B,options:i.value},{default:e.withCtx(()=>[e.createElementVNode("div",Re,[e.createElementVNode("span",null,e.toDisplayString(e.unref(m).state.uname),1),e.createVNode($,{vertical:""}),e.createVNode(E,{round:"",src:e.unref(m).state.avatar},null,8,["src"])])]),_:1},8,["options"])])])])}}}),[["__scopeId","data-v-563e4e55"]]),Ae={class:"mt-1"},ze=e.defineComponent({__name:"PContent",props:{loading:{type:Boolean,default:!1}},setup(t){return(a,c)=>{const m=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ae,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0},{default:e.withCtx(({Component:d,route:s})=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d),{key:s.fullPath}))],1024))]),_:1}))])}}}),qe={class:"tabs-view-main"},je=["id","onClick","onContextmenu"],He={class:"tabs-close"},We={class:"tabs-close-btn"},Fe=M(e.defineComponent({__name:"PTabs",setup(t){e.useCssVars(n=>({v4a1a98ea:c.value,v271d846e:m.value}));const a=o.useThemeVars(),c=e.computed(()=>a.value.cardColor),m=e.computed(()=>a.value.textColor1),d=o.useMessage(),s=R.useRoute(),w=R.useRouter(),g=e.ref(null),P=e.ref(null),N=e.ref(!1),l=j(),_=e.computed(()=>l.state.tabs),i=e.reactive({activeKey:s.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),B=["Login","Redirect","ErrorPage"],T=n=>{const{fullPath:f,hash:p,meta:S,name:A,params:Y,path:X,query:J}=n;return{fullPath:f,hash:p,meta:S,name:A,params:Y,path:X,query:J}},r=e.computed(()=>{const p=l.state.collapsed?"64px":"272px";return{left:p,width:`calc(100% - ${p})`}}),h=e.computed(()=>{const n=_.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:N.value||n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.MinusOutlined)})}]}),y=()=>{let n=[];const f=T(s);try{if(l.state.cacheTabs){const p=localStorage.getItem("TABS_ROUTES");n=p?JSON.parse(p):[f]}else n=[f]}catch{n=[f]}finally{return n}},$=n=>{const f=w.getRoutes();n.forEach(p=>{const S=f.find(A=>A.path===p.path);S&&(p.meta=S.meta||p.meta,p.name=S.name||p.name)}),l.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(n))},E=()=>{const n=y();$(n),l.initTabs(n)},u=async n=>{if(await e.nextTick(),!g.value)return;const f=g.value.offsetWidth,p=g.value.scrollWidth;f<p?(i.scrollable=!0,n&&[...g.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(A=>{A.id===`tag${i.activeKey.split("/").join("/")}`&&A.scrollIntoView&&A.scrollIntoView()})):i.scrollable=!1},H=n=>!(n.draggedContext.element.meta.affix||n.relatedContext.element.meta.affix),F=()=>{let n;n=ue(),n.listenTo(P.value,()=>u(!0))},k=n=>{const{fullPath:f}=n;if(f===s.fullPath||(i.activeKey=f,!n))return;const{replace:p}=w;toString.call(n),p(n).catch(console.error)},b=(n,f)=>{n.preventDefault(),N.value=f.path==="/home",i.showDropdown=!1,e.nextTick().then(()=>{i.showDropdown=!0,i.dropdownX=n.clientX,i.dropdownY=n.clientY})},x=()=>{if(s.meta.keepAlive){var n=w.currentRoute.value.matched.find(f=>f.name==s.name);n&&n.components?.default?.name}},V=n=>{if(_.value.length===1)return d.warning("这已经是最后一页,不能再关闭了!");if(x(),l.closeCurrentTab(n),i.activeKey===n.fullPath){const f=_.value[Math.max(0,_.value.length-1)];i.activeKey=f.fullPath,w.push(f)}u()},O=n=>{const{fullPath:f}=n,p=_.value.find(S=>S.fullPath==f);V(p)},I=n=>{l.closeOtherTabs(n),i.activeKey=n.fullPath,w.replace(n.fullPath),u()},W=()=>{l.closeAllTabs(),u()},z=e.inject("reloadPage"),K=n=>{switch(n){case"1":z();break;case"2":V(s);break;case"3":I(s);break;case"4":W();break}u(),i.showDropdown=!1},q=(n,f)=>{const p=g.value.scrollLeft,S=f>0&&p+f>=n||f<0&&p+f<=n?n:p+f;if(g.value&&g.value.scrollTo(S,0),S!==n)return window.requestAnimationFrame(()=>q(n,f))},G=()=>{const n=g.value.offsetWidth,f=g.value.scrollLeft;if(!f)return;const p=f>n?f-n:0;q(p,(p-f)/20)},Q=()=>{const n=g.value.offsetWidth,f=g.value.scrollWidth,p=g.value.scrollLeft;if(f-p<=n)return;const S=f-p>n*2?p+n:f-n;q(S,(S-p)/20)};return window.addEventListener("beforeunload",()=>{localStorage.setItem("TABS_ROUTES",JSON.stringify(_.value))}),window.addEventListener("scroll",n=>{let f=n.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;i.isMultiHeaderFixed=f>=64},!0),e.watch(()=>s.fullPath,n=>{B.includes(s.name)||(i.activeKey=n,l.addTab(T(s)),u(!0))},{immediate:!0}),E(),e.onMounted(()=>F()),(n,f)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",qe,[e.createElementVNode("div",{ref_key:"navWrap",ref:P,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":i.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!i.scrollable}]),onClick:G},[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!i.scrollable}]),onClick:Q},[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:g,class:"tabs-card-scroll"},[e.createVNode(e.unref(_e),{list:_.value,animation:"300","item-key":"fullPath",class:"flex",move:H},{item:e.withCtx(({element:p})=>[e.createElementVNode("div",{id:`tag${p.fullPath.split("/").join("/")}`,class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":i.activeKey===p.fullPath}]),onClick:e.withModifiers(S=>k(p),["stop"]),onContextmenu:S=>b(S,p)},[e.createElementVNode("span",null,e.toDisplayString(p.meta.title),1),p.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:0,size:"14",onClick:e.withModifiers(S=>O(p),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(L.CloseOutlined))]),_:1},8,["onClick"]))],42,je)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",He,[e.createVNode(e.unref(o.NDropdown),{trigger:"hover",onSelect:K,placement:"bottom-end",options:h.value},{default:e.withCtx(()=>[e.createElementVNode("div",We,[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(o.NDropdown),{show:i.showDropdown,x:i.dropdownX,y:i.dropdownY,onClickoutside:f[0]||(f[0]=p=>i.showDropdown=!1),placement:"bottom-start",onSelect:K,options:h.value},null,8,["show","x","y","options"])])],4))}}),[["__scopeId","data-v-e37d2460"]]),Ke=e.defineComponent({__name:"PMenus",setup(t){const a=R.useRoute(),c=R.useRouter(),m=j(),d=e.ref(a.name),s=e.ref(a.matched&&a.matched.length?a.matched.map(i=>i.name):[]),w=e.ref([]),g=i=>{/http(s)?:/.test(i)?window.open(i):c.push({name:i})},P=i=>{if(!i)return;const B=i.find(T=>s.value.indexOf(T)===-1);s.value=B?[B]:[]},N=()=>{const i=a.matched;s.value=i.map(T=>T.name);const B=a.meta?.activeMenu||"";d.value=B||a.name},l=(i,B=[],T=!1)=>{const r=[],h=["/:path(.*)*","/redirect","/redirect/:path(.*)","/login","/oidc-callback"];if(!i||i.length===0)return r;i=i.sort((y,$)=>{let E=($.children?.length?1:0)-(y.children?.length?1:0);return E===0&&(E=(y.meta?.sort??0)-($.meta?.sort??0)),E});for(const y of i){if(T||y.meta?.hidden||h.includes(y.path.toLowerCase())){B.push(y.name),l(y.children||[],B,!0);continue}const $=y.children?.filter(F=>!F.meta?.hidden)||[],E=y.meta?.alwaysShow!=!0&&$.length===1,u=E?$[0]:y,H={key:u.name,label:u.meta?.title,affix:u.meta?.affix,sort:E?y.meta?.sort??0:u.meta?.sort??0,path:u.path,redirect:u.redirect,icon:E?y.meta?.icon:u.meta?.icon,permissions:u.meta?.permissions,meta:u.meta,children:void 0};B.includes(u.name)||(r.push(H),B.push(u.name)),u.children?.length>0&&(H.children=l(u.children,B,T))}return r},_=()=>{const i=c.getRoutes();w.value=l(i)};return e.watch(()=>a.fullPath,()=>{N()}),e.onMounted(()=>{_(),N()}),(i,B)=>(e.openBlock(),e.createBlock(e.unref(o.NMenu),{class:"h-full",inverted:"",mode:"vertical",options:w.value,collapsed:e.unref(m).state.collapsed,"collapsed-width":64,"collapsed-icon-size":20,indent:24,"expanded-keys":s.value,value:d.value,"onUpdate:value":g,"onUpdate:expandedKeys":P},null,8,["options","collapsed","expanded-keys","value"]))}}),Ye={class:"layout-content-main layout-content-main-fix"},Xe={class:"main-view main-view-fix"},Je=M(e.defineComponent({__name:"PLayout",setup(t){const a=j(),c=e.ref(!1),m=()=>{c.value=!0,e.nextTick(()=>c.value=!1)};return e.provide("reloadPage",m),(d,s)=>{const w=o.NBackTop;return e.openBlock(),e.createBlock(e.unref(o.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width","trigger-class":"!-right-5","collapsed-trigger-class":"!-right-5",collapsed:e.unref(a).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(a).collapse,onExpand:e.unref(a).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(Pe),e.createVNode(Ke)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(o.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(Me)]),_:1}),e.createVNode(e.unref(o.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(Fe),e.createElementVNode("div",Xe,[e.createVNode(ze,{loading:c.value},null,8,["loading"])])])]),_:1}),e.createVNode(w,{right:20,class:"z-50"})]),_:1})]),_:1})}}}),[["__scopeId","data-v-0bac2e7d"]]),Ze={};function Ge(t,a){const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(c)}const te=D(M(Ze,[["render",Ge]])),oe=D(Je),ne=D(e.defineComponent({__name:"PApplication",props:{theme:{},themeOverrides:{default:{common:{primaryColor:"#2d8cf0",primaryColorHover:"#3c9bff",primaryColorPressed:"#3c9bff",primaryColorSuppl:"#2d8cf0"},LoadingBar:{colorLoading:"#2d8cf0"}}}},setup(t){return(a,c)=>{const m=o.NConfigProvider;return e.openBlock(),e.createBlock(m,{locale:e.unref(o.zhCN),theme:t.theme,"theme-overrides":t.themeOverrides,"date-locale":e.unref(o.dateZhCN)},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NDialogProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NNotificationProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NMessageProvider),null,{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})]),_:3})]),_:3})]),_:3},8,["locale","theme","theme-overrides","date-locale"])}}})),ae=D(e.defineComponent({__name:"PModal",props:{saveBtnText:{default:"保存"},cancelBtnText:{default:"取消"},hideCancelBtn:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},title:{},width:{default:800},height:{default:500},visible:{type:Boolean},loading:{type:Boolean},onSave:{},onClose:{},onAfterEnter:{},onAfterLeave:{},onUpdateShow:{}},emits:["update:visible","update:loading"],setup(t,{expose:a,emit:c}){const m=o.useMessage(),d=t,s=c,w=async()=>{s("update:loading",!0);try{d.onSave&&await d.onSave()&&g()}catch(_){m.error(_.message)}finally{s("update:loading",!1)}},g=()=>{s("update:visible",!1),s("update:loading",!1)},P=async()=>{try{d.onClose?await d.onClose()&&g():g()}catch(_){m.error(_.message),s("update:loading",!1)}};return a({open:()=>{s("update:visible",!0),s("update:loading",!1)},close:()=>{s("update:visible",!1),s("update:loading",!1)}}),(_,i)=>{const B=o.NText,T=o.NButton,r=o.NSpace;return e.openBlock(),e.createBlock(e.unref(o.NModal),e.mergeProps({ref:"$modal",preset:"card"},_.$attrs,{"header-class":"bg-gray-50",show:d.visible,draggable:!0,closable:!1,"close-on-esc":!1,"mask-closable":!1,bordered:!1,style:{width:`${d.width}px`,height:`${d.height}px`},onClose:g,onAfterEnter:d.onAfterEnter,onAfterLeave:d.onAfterLeave,onUpdateShow:d.onUpdateShow}),{header:e.withCtx(()=>[_.$slots.header?e.renderSlot(_.$slots,"header",{key:0}):d.title?(e.openBlock(),e.createBlock(B,{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})):e.createCommentVNode("",!0)]),"header-extra":e.withCtx(()=>[e.renderSlot(_.$slots,"header-extra")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"overflow-y-auto overflow-hidden mt-5",style:e.normalizeStyle({maxHeight:`${d.height}px`})},[e.renderSlot(_.$slots,"default")],4)]),footer:e.withCtx(()=>[e.renderSlot(_.$slots,"footer")]),action:e.withCtx(()=>[e.createVNode(r,{justify:"end"},{default:e.withCtx(()=>[d.hideSaveBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:0,type:"primary",loading:t.loading,onClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.saveBtnText),1)]),_:1},8,["loading"])),e.renderSlot(_.$slots,"action-extra",{loading:t.loading}),d.hideCancelBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:1,onClick:P,loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["loading"]))]),_:3})]),_:3},16,["show","style","onAfterEnter","onAfterLeave","onUpdateShow"])}}})),le=D(ee),Qe=e.defineComponent({name:"Redirect",setup(){const t=R.useRoute(),a=R.useRouter();return e.onBeforeMount(()=>{const{params:c,query:m}=t,{path:d}=c;a.replace({path:"/"+(Array.isArray(d)?d.join("/"):d),query:m})}),()=>React.createElement(o.NEmpty,null)}}),se=D(Qe),Ue={class:"frame"},ve=["src"],ce=D(M(e.defineComponent({__name:"PIframe",setup(t){const a=R.useRoute(),c=e.ref(!1),m=e.ref(null),d=e.ref("");e.unref(a.meta)?.frameSrc&&(d.value=e.unref(a.meta)?.frameSrc);function s(){c.value=!1}function w(){e.nextTick(()=>{const g=e.unref(m);if(!g)return;const P=g;P.attachEvent?P.attachEvent("onload",()=>{s()}):g.onload=()=>{s()}})}return e.onMounted(()=>{c.value=!0,w()}),(g,P)=>{const N=o.NSpin;return e.openBlock(),e.createBlock(N,{show:c.value},{default:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createElementVNode("iframe",{src:d.value,class:"frame-iframe",ref_key:"frameRef",ref:m},null,8,ve)])]),_:1},8,["show"])}}}),[["__scopeId","data-v-161a378e"]])),et={class:"border border-gray-100 rounded-lg"},tt={class:"text-xl font-semibold text-gray-800"},ot={class:"text-sm text-gray-500 mt-1"},re=D(e.defineComponent({__name:"PPage",props:{icon:{type:Object,required:!1,default:()=>L.AlertOutlined},title:{type:String,required:!0},subtitle:{type:String,required:!1}},setup(t){const a=t;return(c,m)=>{const d=o.NIcon,s=o.NAvatar,w=o.NSpace,g=o.NCard;return e.openBlock(),e.createElementBlock("div",et,[a.title?(e.openBlock(),e.createBlock(g,{key:0,class:"mb-4",bordered:!1,"content-class":"py-4"},{default:e.withCtx(()=>[e.createVNode(w,{align:"center",justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(w,{align:"center",size:16},{default:e.withCtx(()=>[a.icon?(e.openBlock(),e.createBlock(s,{key:0,size:48,class:"bg-linear-to-br from-blue-500 to-indigo-600"},{default:e.withCtx(()=>[e.createVNode(d,{size:24,component:a.icon,color:"#fff"},null,8,["component"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",tt,e.toDisplayString(a.title),1),e.createElementVNode("div",ot,e.toDisplayString(a.subtitle??a.title+"主页"),1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),c.$slots.search?(e.openBlock(),e.createBlock(g,{key:1,class:"mb-4","content-class":"flex flex-row gap-2",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"search")]),_:3})):e.createCommentVNode("",!0),c.$slots.default?(e.openBlock(),e.createBlock(g,{key:2,"content-class":"flex flex-row gap-2 p-0!",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])}}})),nt={},at={class:"flex flex-col justify-center page-container"};function lt(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(c,{status:"500",title:"服务器错误",description:"抱歉,服务器出错了"})])}const st=M(nt,[["render",lt],["__scopeId","data-v-89cb65c7"]]),ct={},rt={class:"flex flex-col justify-center page-container"};function it(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(c,{status:"404",title:"资源不存在",description:"抱歉,你访问的页面不存在"})])}const dt=M(ct,[["render",it],["__scopeId","data-v-99232671"]]),ft={},pt={class:"flex flex-col justify-center page-container"};function mt(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(c,{status:"403",title:"禁止访问",description:"抱歉,你无权访问该页面"})])}const gt=M(ft,[["render",mt],["__scopeId","data-v-3baa9c16"]]),ie=D(st),de=D(dt),fe=D(gt),pe=Z.defineStore("app-oidc",()=>{const t=e.reactive({});return{setCallback:s=>t.callback=s,callCallback:async s=>await t.callback?.(s),setError:s=>t.error=s,callError:async(s,w)=>await t.error?.(s,w)}}),ht={class:"view-auth-callback"},me=D(M(e.defineComponent({__name:"POidc",setup(t){const a=R.useRouter(),{callCallback:c,callError:m}=pe();return e.onMounted(async()=>{try{await c(a)}catch(d){await m(a,d)}}),(d,s)=>(e.openBlock(),e.createElementBlock("div",ht,[...s[0]||(s[0]=[e.createElementVNode("div",{class:"view-auth-callback-content"},[e.createElementVNode("div",{class:"view-auth-callback-spinner"},[e.createElementVNode("span",null,"正在处理登录回调...")])],-1)])]))}}),[["__scopeId","data-v-167395ae"]])),ut=Object.freeze(Object.defineProperty({__proto__:null,P403:fe,P404:de,P500:ie,PApplication:ne,PEmptyLayout:te,PIframe:ce,PLanguage:le,PLayout:oe,PModal:ae,POidc:me,PPage:re,PRedirect:se,PTable:U},Symbol.toStringTag,{value:"Module"})),ge=(t,a)=>(Object.values(ut).forEach(c=>{c.install&&t.use(c)}),a?.(),t),_t={install:ge};C.P403=fe,C.P404=de,C.P500=ie,C.PApplication=ne,C.PEmptyLayout=te,C.PIframe=ce,C.PLanguage=le,C.PLayout=oe,C.PModal=ae,C.POidc=me,C.PPage=re,C.PRedirect=se,C.PTable=U,C.default=_t,C.install=ge,C.useLanguageStore=v,C.useLayoutStore=j,C.useOidcStore=pe,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(C,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("naive-ui"),require("vue"),require("@vicons/antd"),require("pinia"),require("vue-router"),require("element-resize-detector"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","naive-ui","vue","@vicons/antd","pinia","vue-router","element-resize-detector","vuedraggable"],n):(C=typeof globalThis<"u"?globalThis:C||self,n(C.naiveplus={},C.naiveUi,C.Vue,C.antd,C.pinia,C.vueRouter,C.elementResizeDetectorMaker,C.Draggable))})(this,(function(C,n,e,S,Y,R,he,_e){"use strict";const ye={class:"text-lg font-medium"},we={id:"data-content"},be={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},ke=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(t,{expose:l}){const a=e.ref(null),p=n.useDialog(),d=n.useMessage(),r=e.ref(!1),w=e.ref([]),g=e.ref([]),P=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async b=>{P.value.page=b,await L()},onUpdatePageSize:async b=>{P.value.pageSize=b,await L()}}),N=t,s=b=>{const k=x=>{const V=[];return b&&b.forEach(O=>{O.key!=="edit"&&O.key!=="delete"&&V.push({label:O.name,key:O.key,icon:O.icon&&(()=>e.h(n.NIcon,null,{default:()=>e.h(O.icon)})),props:{onClick:()=>O.action(x)}})}),V};return{title:"操作",key:"actions",width:100,fixed:"right",render:x=>{let V=[];if(N.onEdit&&V.push({label:"编辑",key:"edit",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(S.EditOutlined)}),props:{onClick:async()=>await N.onEdit(x)}}),N.onDelete&&V.push({label:"删除",key:"delete",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(S.DeleteOutlined)}),props:{onClick:()=>B(x)}}),V=[...V,...k(x)],!(V.length<=0))return e.h(n.NDropdown,{options:V,placement:"bottom-start"},{default:()=>e.h(n.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(n.NIcon,()=>e.h(S.MoreOutlined))]})})}}},_=e.computed(()=>{const b=N.columns.filter(x=>x.key!="action").map(x=>({title:x.title,key:x.key,width:x.width,fixed:x.fixed??!1,render:x.render,ellipsis:x.ellipsis?{tooltip:!0}:!1})),k=N.columns.reduce((x,V)=>V.key==="action"?V:x,void 0)?.action;return k&&k?.length>0||N.onEdit||N.onDelete?[{type:"selection",fixed:"left"},...b,s(k)]:[{type:"selection",fixed:"left"},...b]}),c=async()=>await L(),B=b=>i([b]),E=()=>{const b=m();i(b)},i=b=>{b&&b.length>0&&p.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(N.onDelete)try{await N.onDelete(b)?(L(),d.success("删除成功")):d.error("删除失败")}catch(k){d.error(k.message)}}})},m=()=>w.value?g.value.filter(k=>w.value.includes(k.id)).map(k=>e.toRaw(k)):[],y=()=>m()[0],$=()=>e.toRaw(g.value),L=async()=>{if(!r.value){r.value=!0;try{if(N.onLoad){var{data:b,total:k}=await N.onLoad(P.value.page,P.value.pageSize);g.value=b,P.value.itemCount=k}}catch(x){d.error(x.message)}finally{r.value=!1}}},u=e.computed(()=>{const b=e.unref(a);if(!b)return;const k=b?.$el,x=k.querySelector(".n-data-table-thead "),{bottomIncludeBody:V}=F(x),O=48;let I=12,W=25;const A=k.querySelector(".n-data-table__pagination");if(A){const z=A.offsetHeight;I+=z||0}else I+=28;return V-(O+I+W)}),H=b=>!b||!b.getBoundingClientRect?0:b.getBoundingClientRect(),F=b=>{const k=document.documentElement,x=k.scrollLeft,V=k.scrollTop,O=k.clientLeft,I=k.clientTop,W=window.pageXOffset,A=window.pageYOffset,K=H(b),{left:z,top:X,width:J,height:o}=K,f=(W||x)-(O||0),h=(A||V)-(I||0),T=z+W,q=X+A,Z=T-f,G=q-h,ge=window.document.documentElement.clientWidth,ue=window.document.documentElement.clientHeight;return{left:Z,top:G,right:ge-J-Z,bottom:ue-o-G,rightIncludeBody:ge-Z,bottomIncludeBody:ue-G}};return e.onMounted(async()=>await L()),l({getData:$,getSelectedRow:y,getSelectedRows:m,refreshData:L,resetPage:()=>{P.value.page=1}}),(b,k)=>{const x=n.NTooltip,V=n.NSpace,O=n.NDataTable;return e.openBlock(),e.createBlock(e.unref(n.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(V,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",ye,e.toDisplayString(t.title),1),e.createVNode(V,null,{default:e.withCtx(()=>[N.onAdd?(e.openBlock(),e.createBlock(x,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:N.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(S.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[k[1]||(k[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),N.onDelete?(e.openBlock(),e.createBlock(x,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(S.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[k[2]||(k[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:c},{default:e.withCtx(()=>[e.createVNode(e.unref(S.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[k[3]||(k[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",we,[b.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",be,[e.renderSlot(b.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(O,{remote:"",ref_key:"$table",ref:a,"checked-row-keys":w.value,"onUpdate:checkedRowKeys":k[0]||(k[0]=I=>w.value=I),"max-height":u.value,loading:r.value,bordered:!1,"single-line":!1,columns:_.value,data:g.value,pagination:P.value,"row-key":I=>I[t.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}}),D=t=>{const l=t;return l.install=function(a){a.component(l.__name,t)},t},Q=D(ke),Ce=["Redirect","RedirectSon","login"],j=Y.defineStore("p-layout",()=>{const t=e.reactive({collapsed:!1,title:"输入项目名称",logo:"https://picsum.photos/id/1/100/100",avatar:"",uid:"",uname:"",tabs:[],cacheTabs:!1,enableLanguage:!1});return{state:t,initTabs:i=>{i.sort((m,y)=>m.meta.affix&&!y.meta.affix?-1:!m.meta.affix&&y.meta.affix?1:Number(y.meta.sort??0)-Number(m.meta.sort??0)),t.tabs=i},addTab:i=>Ce.includes(i.name)?!1:(t.tabs?.some(y=>y.fullPath==i.fullPath)||t.tabs?.push(i),!0),closeCurrentTab:i=>{const m=t.tabs.findIndex(y=>y.fullPath==i.fullPath);t.tabs.splice(m,1)},closeAllTabs:()=>{t.tabs=t.tabs.filter(i=>i?.meta?.affix??!1)},closeOtherTabs:i=>{t.tabs=t.tabs.filter(m=>m.fullPath==i.fullPath||(m?.meta?.affix??!1))},closeLeftTabs:i=>{const m=t.tabs.findIndex(y=>y.fullPath==i.fullPath);t.tabs=t.tabs.filter((y,$)=>$>=m||(y?.meta?.affix??!1))},closeRightTabs:i=>{const m=t.tabs.findIndex(y=>y.fullPath==i.fullPath);t.tabs=t.tabs.filter((y,$)=>$<=m||(y?.meta?.affix??!1))},collapse:()=>{t.collapsed=!t.collapsed},setTitle:i=>{t.title=i},setLogo:i=>{t.logo=i},setUser:(i,m)=>{t.uid=i,t.uname=m},setSettingPages:i=>{t.settingPages=i},setLogout:i=>{t.logout=i},enableLanguage:i=>{t.enableLanguage=i}}}),Ne={class:"logo"},xe=e.defineComponent({__name:"PLogo",setup(t){const l=j();return(a,p)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(n.NAvatar),{color:"var(--color-logo)",size:32,src:e.unref(l).state.logo,class:e.normalizeClass({"mr-2":!e.unref(l).state.collapsed})},null,8,["src","class"]),e.withDirectives(e.createElementVNode("h1",{class:"font-bold ease-in-out ml-2 logo-size"},e.toDisplayString(e.unref(l).state.title),513),[[e.vShow,!e.unref(l).state.collapsed]])]))}}),M=(t,l)=>{const a=t.__vccOpts||t;for(const[p,d]of l)a[p]=d;return a},Pe=M(xe,[["__scopeId","data-v-e48aeefa"]]),Be={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],initLanguages:async()=>[],selectLanguage:async t=>{}},U=Y.defineStore("language",()=>{const t=e.ref(Be),l=async()=>(t.value.options.length===0&&(t.value.options=await t.value.initLanguages()),t.value.options);return{select:async s=>{if(t.value.currentLanguage===s)return;const _=(await l()).find(c=>c.key===s);_&&(t.value.currentLanguage=_.key,t.value.selectLanguage(_))},selectLanguageCallback:async s=>{t.value.selectLanguage=s},initLanguagesCallback:async s=>{t.value.initLanguages=s},getLanguages:l,getCurrentLanguage:async()=>{if(t.value.currentLanguage)return(await l()).find(s=>s.key===t.value.currentLanguage)},setTranslationApiUrl:s=>{t.value.translationApiUrl=s},getTranslationApiUrl:()=>t.value.translationApiUrl,getDefaultLanguage:()=>t.value.defaultLanguage?t.value.defaultLanguage:"chinese_simplified",setDefaultLanguage:s=>{(s==="Chinese"||s==="chinese")&&(s="chinese_simplified"),t.value.defaultLanguage=s}}}),Ve={key:1},v=e.defineComponent({__name:"PLanguage",setup(t){const{select:l,getLanguages:a,getCurrentLanguage:p,getDefaultLanguage:d,getTranslationApiUrl:r}=U(),w=e.ref(),g=e.ref([]),P=async s=>await l(s),N=async()=>{const s=window.translate;s&&(s.selectLanguageTag.show=!1,s.selectLanguageTag.languages=(await a()).map(_=>_.key).join(","),s.ignore.class.push("ignore-translate-flag"),s.ignore.id.push("ignore-translation"),s.language.setLocal(d()),s.request.api.translate="api/v1/translation",s.request.api.connectTest="api/v1/translation/connect-test",s.request.api.init="api/v1/translation/init",s.request.api.language="api/v1/translation/language",s.request.setHost(r()),s.request.listener.start(),s.listener.start(),s.whole.enableAll(),s.execute())};return e.onMounted(async()=>{await e.nextTick(),await N(),w.value=await p(),g.value=await a()}),(s,_)=>{const c=n.NIcon,B=n.NButton;return g.value.length>0?(e.openBlock(),e.createBlock(e.unref(n.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:P,options:g.value},{default:e.withCtx(()=>[e.createVNode(B,{quaternary:"",type:"info"},{default:e.withCtx(()=>[w.value?(e.openBlock(),e.createElementBlock("label",Ve,e.toDisplayString(w.value?.label),1)):(e.openBlock(),e.createBlock(c,{key:0,size:"18"},{default:e.withCtx(()=>[..._[0]||(_[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{d:"M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z",fill:"currentColor"}),e.createElementVNode("path",{d:"M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}}),Se={class:"layout-header"},Ee={class:"layout-header-left"},Le={class:"link-text"},Te={key:1,class:"link-text"},$e={class:"layout-header-right"},Oe={key:0,class:"layout-header-trigger-min"},De={class:"layout-header-trigger layout-header-trigger-min"},Ie={class:"layout-header-trigger layout-header-trigger-min"},Re={class:"avatar"},Me=M(e.defineComponent({__name:"PHeader",setup(t){const l=n.useMessage(),a=n.useDialog(),p=j(),d=R.useRouter(),r=R.useRoute(),w=e.inject("reloadPage"),g=i=>d.push({name:i}),P=e.computed(()=>N(r.matched)),N=i=>i.map(m=>{const y={key:m.name,label:m.meta.title,icon:m.meta.icon,meta:m.meta,disabled:m.path==="/",children:void 0};return m.children&&m.children.length>0&&(y.children=N(m.children)),y}),s=e.ref(!1),_=()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),s.value=!1):(document.documentElement.requestFullscreen(),s.value=!0)},c=e.computed(()=>{const i=[];return i.push({label:"退出登录",key:"logout"}),p.state.settingPages&&p.state.settingPages.length>0&&p.state.settingPages.forEach(m=>{i.push({label:m.title,key:m.route})}),i}),B=i=>{i==="logout"?E():d.push({name:i})},E=()=>{a.info({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(p.state.logout)try{await p.state.logout(),localStorage.removeItem("TABS-ROUTES"),l.error("退出成功")}catch(i){console.error(i),l.error("退出登录失败")}finally{location.reload()}else l.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法")},onNegativeClick:()=>{}})};return(i,m)=>{const y=n.NTooltip,$=n.NDivider,L=n.NAvatar;return e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Ee,[e.createElementVNode("div",{class:"ml-1 layout-header-trigger layout-header-trigger-min",onClick:m[0]||(m[0]=(...u)=>e.unref(p).collapse&&e.unref(p).collapse(...u))},[e.unref(p).state.collapsed?(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:0,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.MenuUnfoldOutlined))]),_:1})):(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:1,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.MenuFoldOutlined))]),_:1}))]),e.createElementVNode("div",{class:"mr-1 layout-header-trigger layout-header-trigger-min",onClick:m[1]||(m[1]=(...u)=>e.unref(w)&&e.unref(w)(...u))},[e.createVNode(e.unref(n.NIcon),{size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.ReloadOutlined))]),_:1})]),e.createVNode(e.unref(n.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.label},[u.label?(e.openBlock(),e.createBlock(e.unref(n.NBreadcrumbItem),{key:0},{default:e.withCtx(()=>[u.children&&u.children.length?(e.openBlock(),e.createBlock(e.unref(n.NDropdown),{key:0,options:u.children,onSelect:g},{default:e.withCtx(()=>[e.createElementVNode("span",Le,[u.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(u.label),1)])]),_:2},1032,["options"])):(e.openBlock(),e.createElementBlock("span",Te,[u.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(u.label),1)]))]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1})]),e.createElementVNode("div",$e,[e.unref(p).state.enableLanguage?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(v)])):e.createCommentVNode("",!0),e.createElementVNode("div",De,[e.createVNode(y,{placement:"bottom"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(n.NIcon),{size:"18",onClick:e.withModifiers(_,["stop"])},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(e.unref(S.FullscreenExitOutlined),{key:1})):(e.openBlock(),e.createBlock(e.unref(S.FullscreenOutlined),{key:0}))]),_:1})]),default:e.withCtx(()=>[m[2]||(m[2]=e.createElementVNode("span",null,"全屏",-1))]),_:1})]),e.createElementVNode("div",Ie,[e.createVNode(e.unref(n.NDropdown),{trigger:"hover",onSelect:B,options:c.value},{default:e.withCtx(()=>[e.createElementVNode("div",Re,[e.createElementVNode("span",null,e.toDisplayString(e.unref(p).state.uname),1),e.createVNode($,{vertical:""}),e.createVNode(L,{round:"",src:e.unref(p).state.avatar},null,8,["src"])])]),_:1},8,["options"])])])])}}}),[["__scopeId","data-v-563e4e55"]]),Ae={class:"mt-1"},ze=e.defineComponent({__name:"PContent",props:{loading:{type:Boolean,default:!1}},setup(t){return(l,a)=>{const p=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",Ae,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(p,{key:0},{default:e.withCtx(({Component:d,route:r})=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d),{key:r.fullPath}))],1024))]),_:1}))])}}}),qe={class:"tabs-view-main"},je=["id","onClick","onContextmenu"],He={class:"tabs-close"},We={class:"tabs-close-btn"},Fe=M(e.defineComponent({__name:"PTabs",setup(t){e.useCssVars(o=>({d48fbd46:a.value,v380ec63c:p.value}));const l=n.useThemeVars(),a=e.computed(()=>l.value.cardColor),p=e.computed(()=>l.value.textColor1),d=n.useMessage(),r=R.useRoute(),w=R.useRouter(),g=e.ref(null),P=e.ref(null),N=e.ref(!1),s=j(),_=e.computed(()=>s.state.tabs),c=e.reactive({activeKey:r.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),B=["Login","Redirect","ErrorPage"],E=o=>({meta:o.meta,name:o.name,fullPath:o.fullPath??o.path,path:o.path,hash:o.hash??"",query:o.query??{},params:o.params??{}}),i=e.computed(()=>{const h=s.state.collapsed?"64px":"272px";return{left:h,width:`calc(100% - ${h})`}}),m=e.computed(()=>{const o=_.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(n.NIcon,null,{default:()=>e.h(S.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:N.value||o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(S.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(S.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:o,icon:()=>e.h(n.NIcon,null,{default:()=>e.h(S.MinusOutlined)})}]}),y=()=>{let o=[E(r)];w.getRoutes().filter(f=>f.meta.affix).forEach(f=>{const h=E(f);o.every(T=>T.name!==h.name)&&o.push(h)});try{if(s.state.cacheTabs){const f=localStorage.getItem("TABS_ROUTES");o=f?JSON.parse(f):o}}finally{return o}},$=o=>{const f=w.getRoutes();o.forEach(h=>{const T=f.find(q=>q.path===h.path);T&&(h.meta=T.meta||h.meta,h.name=T.name||h.name)}),s.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(o))},L=()=>{const o=y();$(o),s.initTabs(o)},u=async o=>{if(await e.nextTick(),!g.value)return;const f=g.value.offsetWidth,h=g.value.scrollWidth;f<h?(c.scrollable=!0,o&&[...g.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(q=>{q.id===`tag${c.activeKey.split("/").join("/")}`&&q.scrollIntoView&&q.scrollIntoView()})):c.scrollable=!1},H=o=>!(o.draggedContext.element.meta.affix||o.relatedContext.element.meta.affix),F=()=>{let o;o=he(),o.listenTo(P.value,()=>u(!0))},b=o=>{if(!o||o.fullPath===r.fullPath)return;if(c.activeKey=o.fullPath,toString.call(o)==="[object String]"){w.replace(o).catch(console.error);return}const f=o;w.replace(f).catch(console.error)},k=(o,f)=>{o.preventDefault(),N.value=f.path==="/home",c.showDropdown=!1,e.nextTick().then(()=>{c.showDropdown=!0,c.dropdownX=o.clientX,c.dropdownY=o.clientY})},x=()=>{if(r.meta.keepAlive){var o=w.currentRoute.value.matched.find(f=>f.name==r.name);o&&o.components?.default?.name}},V=o=>{if(_.value.length===1)return d.warning("这已经是最后一页,不能再关闭了!");if(x(),s.closeCurrentTab(o),c.activeKey===o.fullPath){const f=_.value[Math.max(0,_.value.length-1)];c.activeKey=f.fullPath,w.push(f)}u()},O=o=>{const f=_.value.find(h=>h.fullPath==o.fullPath);f&&V(f)},I=o=>{s.closeOtherTabs(o),c.activeKey=o.fullPath,u()},W=()=>{s.closeAllTabs(),u()},A=e.inject("reloadPage"),K=o=>{switch(o){case"1":A();break;case"2":V(r);break;case"3":I(r);break;case"4":W();break}u(),c.showDropdown=!1},z=(o,f)=>{const h=g.value.scrollLeft,T=f>0&&h+f>=o||f<0&&h+f<=o?o:h+f;if(g.value&&g.value.scrollTo(T,0),T!==o)return window.requestAnimationFrame(()=>z(o,f))},X=()=>{const o=g.value.offsetWidth,f=g.value.scrollLeft;if(!f)return;const h=f>o?f-o:0;z(h,(h-f)/20)},J=()=>{const o=g.value.offsetWidth,f=g.value.scrollWidth,h=g.value.scrollLeft;if(f-h<=o)return;const T=f-h>o*2?h+o:f-o;z(T,(T-h)/20)};return window.addEventListener("beforeunload",()=>{s.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(_.value))}),window.addEventListener("scroll",o=>{let f=o.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;c.isMultiHeaderFixed=f>=64},!0),e.watch(()=>r.fullPath,o=>{B.includes(r.name)||(c.activeKey=o,s.addTab(E(r)),u(!0))},{immediate:!0}),L(),e.onMounted(()=>F()),(o,f)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",qe,[e.createElementVNode("div",{ref_key:"navWrap",ref:P,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":c.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!c.scrollable}]),onClick:X},[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!c.scrollable}]),onClick:J},[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:g,class:"tabs-card-scroll"},[e.createVNode(e.unref(_e),{animation:"300","item-key":"fullPath",class:"flex",list:_.value,move:H},{item:e.withCtx(({element:h})=>[e.createElementVNode("div",{class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":c.activeKey===h.fullPath}]),id:`tag${h.fullPath.split("/").join("/")}`,onClick:e.withModifiers(T=>b(h),["stop"]),onContextmenu:T=>k(T,h)},[e.createElementVNode("span",null,e.toDisplayString(h.meta.title),1),h.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.NIcon),{key:0,size:"14",onClick:e.withModifiers(T=>O(h),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(S.CloseOutlined))]),_:1},8,["onClick"]))],42,je)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",He,[e.createVNode(e.unref(n.NDropdown),{trigger:"hover",placement:"bottom-end",options:m.value,onSelect:K},{default:e.withCtx(()=>[e.createElementVNode("div",We,[e.createVNode(e.unref(n.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(n.NDropdown),{placement:"bottom-start",show:c.showDropdown,x:c.dropdownX,y:c.dropdownY,options:m.value,onClickoutside:f[0]||(f[0]=h=>c.showDropdown=!1),onSelect:K},null,8,["show","x","y","options"])])],4))}}),[["__scopeId","data-v-428fe23d"]]),Ke=e.defineComponent({__name:"PMenus",setup(t){const l=e.ref([]),a=R.useRoute(),p=R.useRouter(),d=j(),r=e.ref(a.name),w=e.ref(a.matched&&a.matched.length?a.matched.map(c=>c.name):[]),g=c=>{a.name!==c&&(/http(s)?:/.test(c)?window.open(c):p.push({name:c}))},P=c=>{if(!c)return;const B=c.find(E=>w.value.indexOf(E)===-1);w.value=B?[B]:[]},N=()=>{const c=a.matched;w.value=c.map(E=>E.name);const B=a.meta?.activeMenu||"";r.value=B||a.name},s=(c,B=[],E=!1)=>{const i=[],m=["/:path(.*)*","/redirect","/redirect/:path(.*)","/login","/oidc-callback"];if(!c||c.length===0)return i;c=c.sort((y,$)=>{let L=($.children?.length?1:0)-(y.children?.length?1:0);return L===0&&(L=(y.meta?.sort??0)-($.meta?.sort??0)),L});for(const y of c){if(E||y.meta?.hidden||m.includes(y.path.toLowerCase())){B.push(y.name),s(y.children||[],B,!0);continue}const $=y.children?.filter(F=>!F.meta?.hidden)||[],L=y.meta?.alwaysShow!=!0&&$.length===1,u=L?$[0]:y,H={key:u.name,label:u.meta?.title,affix:u.meta?.affix,sort:L?y.meta?.sort??0:u.meta?.sort??0,path:u.path,redirect:u.redirect,icon:L?y.meta?.icon:u.meta?.icon,permissions:u.meta?.permissions,meta:u.meta,children:void 0};B.includes(u.name)||(i.push(H),B.push(u.name)),u.children?.length>0&&(H.children=s(u.children,B,E))}return i},_=()=>{const c=p.getRoutes();l.value=s(c)};return e.watch(()=>a.fullPath,()=>{N()}),e.onMounted(()=>{_(),N()}),(c,B)=>(e.openBlock(),e.createBlock(e.unref(n.NMenu),{class:"h-full",inverted:"",mode:"vertical",options:l.value,collapsed:e.unref(d).state.collapsed,"collapsed-width":64,"collapsed-icon-size":20,indent:24,"expanded-keys":w.value,value:r.value,"onUpdate:value":g,"onUpdate:expandedKeys":P},null,8,["options","collapsed","expanded-keys","value"]))}}),Ye={class:"layout-content-main layout-content-main-fix"},Xe={class:"main-view main-view-fix"},Je=M(e.defineComponent({__name:"PLayout",setup(t){const l=j(),a=e.ref(!1),p=()=>{a.value=!0,e.nextTick(()=>a.value=!1)};return e.provide("reloadPage",p),(d,r)=>{const w=n.NBackTop;return e.openBlock(),e.createBlock(e.unref(n.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width","trigger-class":"!-right-5","collapsed-trigger-class":"!-right-5",collapsed:e.unref(l).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(l).collapse,onExpand:e.unref(l).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(Pe),e.createVNode(Ke)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(n.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(Me)]),_:1}),e.createVNode(e.unref(n.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(Fe),e.createElementVNode("div",Xe,[e.createVNode(ze,{loading:a.value},null,8,["loading"])])])]),_:1}),e.createVNode(w,{right:20,class:"z-50"})]),_:1})]),_:1})}}}),[["__scopeId","data-v-0bac2e7d"]]),Ze={};function Ge(t,l){const a=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(a)}const ee=D(M(Ze,[["render",Ge]])),te=D(Je),oe=D(e.defineComponent({__name:"PApplication",props:{theme:{},themeOverrides:{default:{common:{primaryColor:"#2d8cf0",primaryColorHover:"#3c9bff",primaryColorPressed:"#3c9bff",primaryColorSuppl:"#2d8cf0"},LoadingBar:{colorLoading:"#2d8cf0"}}}},setup(t){return(l,a)=>{const p=n.NConfigProvider;return e.openBlock(),e.createBlock(p,{locale:e.unref(n.zhCN),theme:t.theme,"theme-overrides":t.themeOverrides,"date-locale":e.unref(n.dateZhCN)},{default:e.withCtx(()=>[e.createVNode(e.unref(n.NDialogProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NNotificationProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.NMessageProvider),null,{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3})]),_:3})]),_:3})]),_:3},8,["locale","theme","theme-overrides","date-locale"])}}})),ne=D(e.defineComponent({__name:"PModal",props:{saveBtnText:{default:"保存"},cancelBtnText:{default:"取消"},hideCancelBtn:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},title:{},width:{default:800},height:{default:500},visible:{type:Boolean},loading:{type:Boolean},onSave:{},onClose:{},onAfterEnter:{},onAfterLeave:{},onUpdateShow:{}},emits:["update:visible","update:loading"],setup(t,{expose:l,emit:a}){const p=n.useMessage(),d=t,r=a,w=async()=>{r("update:loading",!0);try{d.onSave&&await d.onSave()&&g()}catch(_){p.error(_.message)}finally{r("update:loading",!1)}},g=()=>{r("update:visible",!1),r("update:loading",!1)},P=async()=>{try{d.onClose?await d.onClose()&&g():g()}catch(_){p.error(_.message),r("update:loading",!1)}};return l({open:()=>{r("update:visible",!0),r("update:loading",!1)},close:()=>{r("update:visible",!1),r("update:loading",!1)}}),(_,c)=>{const B=n.NText,E=n.NButton,i=n.NSpace;return e.openBlock(),e.createBlock(e.unref(n.NModal),e.mergeProps({ref:"$modal",preset:"card"},_.$attrs,{"header-class":"bg-gray-50",show:d.visible,draggable:!0,closable:!1,"close-on-esc":!1,"mask-closable":!1,bordered:!1,style:{width:`${d.width}px`},onClose:g,onAfterEnter:d.onAfterEnter,onAfterLeave:d.onAfterLeave,onUpdateShow:d.onUpdateShow}),{header:e.withCtx(()=>[_.$slots.header?e.renderSlot(_.$slots,"header",{key:0}):d.title?(e.openBlock(),e.createBlock(B,{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})):e.createCommentVNode("",!0)]),"header-extra":e.withCtx(()=>[e.renderSlot(_.$slots,"header-extra")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"overflow-y-auto overflow-hidden mt-5",style:e.normalizeStyle({maxHeight:`${d.height}px`})},[e.renderSlot(_.$slots,"default")],4)]),footer:e.withCtx(()=>[e.renderSlot(_.$slots,"footer")]),action:e.withCtx(()=>[e.createVNode(i,{justify:"end"},{default:e.withCtx(()=>[d.hideSaveBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E,{key:0,type:"primary",loading:t.loading,onClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.saveBtnText),1)]),_:1},8,["loading"])),e.renderSlot(_.$slots,"action-extra",{loading:t.loading}),d.hideCancelBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E,{key:1,onClick:P,loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["loading"]))]),_:3})]),_:3},16,["show","style","onAfterEnter","onAfterLeave","onUpdateShow"])}}})),ae=D(v),Qe=e.defineComponent({name:"Redirect",setup(){const t=R.useRoute(),l=R.useRouter();return e.onBeforeMount(()=>{const{params:a,query:p}=t,{path:d}=a;l.replace({path:"/"+(Array.isArray(d)?d.join("/"):d),query:p})}),()=>React.createElement(n.NEmpty,null)}}),le=D(Qe),Ue={class:"frame"},ve=["src"],se=D(M(e.defineComponent({__name:"PIframe",setup(t){const l=R.useRoute(),a=e.ref(!1),p=e.ref(null),d=e.ref("");e.unref(l.meta)?.frameSrc&&(d.value=e.unref(l.meta)?.frameSrc);function r(){a.value=!1}function w(){e.nextTick(()=>{const g=e.unref(p);if(!g)return;const P=g;P.attachEvent?P.attachEvent("onload",()=>{r()}):g.onload=()=>{r()}})}return e.onMounted(()=>{a.value=!0,w()}),(g,P)=>{const N=n.NSpin;return e.openBlock(),e.createBlock(N,{show:a.value},{default:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createElementVNode("iframe",{src:d.value,class:"frame-iframe",ref_key:"frameRef",ref:p},null,8,ve)])]),_:1},8,["show"])}}}),[["__scopeId","data-v-161a378e"]])),et={class:"border border-gray-100 rounded-lg"},tt={class:"text-xl font-semibold text-gray-800"},ot={class:"text-sm text-gray-500 mt-1"},re=D(e.defineComponent({__name:"PPage",props:{icon:{type:Object,required:!1,default:()=>S.AlertOutlined},title:{type:String,required:!0},subtitle:{type:String,required:!1}},setup(t){const l=t;return(a,p)=>{const d=n.NIcon,r=n.NAvatar,w=n.NSpace,g=n.NCard;return e.openBlock(),e.createElementBlock("div",et,[l.title?(e.openBlock(),e.createBlock(g,{key:0,class:"mb-4",bordered:!1,"content-class":"py-4"},{default:e.withCtx(()=>[e.createVNode(w,{align:"center",justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(w,{align:"center",size:16},{default:e.withCtx(()=>[l.icon?(e.openBlock(),e.createBlock(r,{key:0,size:48,class:"bg-linear-to-br from-blue-500 to-indigo-600"},{default:e.withCtx(()=>[e.createVNode(d,{size:24,component:l.icon,color:"#fff"},null,8,["component"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",tt,e.toDisplayString(l.title),1),e.createElementVNode("div",ot,e.toDisplayString(l.subtitle??l.title+"主页"),1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),a.$slots.search?(e.openBlock(),e.createBlock(g,{key:1,class:"mb-4","content-class":"flex flex-row gap-2",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"search")]),_:3})):e.createCommentVNode("",!0),a.$slots.default?(e.openBlock(),e.createBlock(g,{key:2,"content-class":"flex flex-row gap-2 p-0!",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])}}})),nt={},at={class:"flex flex-col justify-center page-container"};function lt(t,l){const a=n.NResult;return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(a,{status:"500",title:"服务器错误",description:"抱歉,服务器出错了"})])}const st=M(nt,[["render",lt],["__scopeId","data-v-89cb65c7"]]),rt={},ct={class:"flex flex-col justify-center page-container"};function it(t,l){const a=n.NResult;return e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(a,{status:"404",title:"资源不存在",description:"抱歉,你访问的页面不存在"})])}const dt=M(rt,[["render",it],["__scopeId","data-v-99232671"]]),ft={},pt={class:"flex flex-col justify-center page-container"};function mt(t,l){const a=n.NResult;return e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(a,{status:"403",title:"禁止访问",description:"抱歉,你无权访问该页面"})])}const gt=M(ft,[["render",mt],["__scopeId","data-v-3baa9c16"]]),ce=D(st),ie=D(dt),de=D(gt),fe=Y.defineStore("app-oidc",()=>{const t=e.reactive({});return{setCallback:r=>t.callback=r,callCallback:async r=>await t.callback?.(r),setError:r=>t.error=r,callError:async(r,w)=>await t.error?.(r,w)}}),ut={class:"view-auth-callback"},pe=D(M(e.defineComponent({__name:"POidc",setup(t){const l=R.useRouter(),{callCallback:a,callError:p}=fe();return e.onMounted(async()=>{try{await a(l)}catch(d){await p(l,d)}}),(d,r)=>(e.openBlock(),e.createElementBlock("div",ut,[...r[0]||(r[0]=[e.createElementVNode("div",{class:"view-auth-callback-content"},[e.createElementVNode("div",{class:"view-auth-callback-spinner"},[e.createElementVNode("span",null,"正在处理登录回调...")])],-1)])]))}}),[["__scopeId","data-v-167395ae"]])),ht=Object.freeze(Object.defineProperty({__proto__:null,P403:de,P404:ie,P500:ce,PApplication:oe,PEmptyLayout:ee,PIframe:se,PLanguage:ae,PLayout:te,PModal:ne,POidc:pe,PPage:re,PRedirect:le,PTable:Q},Symbol.toStringTag,{value:"Module"})),me=(t,l)=>(Object.values(ht).forEach(a=>{a.install&&t.use(a)}),l?.(),t),_t={install:me};C.P403=de,C.P404=ie,C.P500=ce,C.PApplication=oe,C.PEmptyLayout=ee,C.PIframe=se,C.PLanguage=ae,C.PLayout=te,C.PModal=ne,C.POidc=pe,C.PPage=re,C.PRedirect=le,C.PTable=Q,C.default=_t,C.install=me,C.useLanguageStore=U,C.useLayoutStore=j,C.useOidcStore=fe,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.logo[data-v-e48aeefa]{display:flex;align-items:center;justify-content:start;padding-left:16px;height:64px;line-height:64px;overflow:hidden;white-space:nowrap}.logo-size[data-v-e48aeefa]{font-size:20px}.layout-header[data-v-563e4e55]{display:flex;justify-content:space-between;align-items:center;padding:0;height:64px;box-shadow:0 1px 4px #00152914;transition:all .2s ease-in-out;width:100%;z-index:11}.layout-header-left[data-v-563e4e55]{display:flex;align-items:center}.layout-header-left .logo[data-v-563e4e55]{display:flex;align-items:center;justify-content:center;height:64px;line-height:64px;overflow:hidden;white-space:nowrap;padding-left:10px}.layout-header-left .logo img[data-v-563e4e55]{width:auto;height:32px;margin-right:10px}.layout-header-left .logo .title[data-v-563e4e55]{margin-bottom:0}.layout-header-left[data-v-563e4e55] .ant-breadcrumb span:last-child .link-text{color:#515a6e}.layout-header-left .n-breadcrumb[data-v-563e4e55]{display:inline-block}.layout-header-left-menu[data-v-563e4e55]{color:var(--text-color)}.layout-header-right[data-v-563e4e55]{display:flex;align-items:center;margin-right:5px}.layout-header-right .avatar[data-v-563e4e55]{display:flex;align-items:center;height:64px}.layout-header-right[data-v-563e4e55]>*{cursor:pointer}.layout-header-trigger[data-v-563e4e55]{display:inline-block;width:64px;height:64px;text-align:center;cursor:pointer;transition:all .2s ease-in-out}.layout-header-trigger .n-icon[data-v-563e4e55]{display:flex;align-items:center;height:64px;line-height:64px}.layout-header-trigger[data-v-563e4e55]:hover{background:#ffffff14}.layout-header-trigger .anticon[data-v-563e4e55]{font-size:16px;color:#515a6e}.layout-header-trigger-min[data-v-563e4e55]{width:auto;padding:0 10px}.layout-header-light[data-v-563e4e55]{background:#fff;color:#515a6e}.layout-header-light .n-icon[data-v-563e4e55]{color:#515a6e}.layout-header-light .layout-header-left[data-v-563e4e55] .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#515a6e}.layout-header-light .layout-header-trigger[data-v-563e4e55]:hover{background:#f8f8f9}.layout-header-fix[data-v-563e4e55]{position:fixed;top:0;right:0;left:200px;z-index:11}[data-v-563e4e55] .menu-router-link{color:#515a6e}[data-v-563e4e55] .menu-router-link:hover{color:#1890ff}.tabs-view[data-v-
|
|
1
|
+
.logo[data-v-e48aeefa]{display:flex;align-items:center;justify-content:start;padding-left:16px;height:64px;line-height:64px;overflow:hidden;white-space:nowrap}.logo-size[data-v-e48aeefa]{font-size:20px}.layout-header[data-v-563e4e55]{display:flex;justify-content:space-between;align-items:center;padding:0;height:64px;box-shadow:0 1px 4px #00152914;transition:all .2s ease-in-out;width:100%;z-index:11}.layout-header-left[data-v-563e4e55]{display:flex;align-items:center}.layout-header-left .logo[data-v-563e4e55]{display:flex;align-items:center;justify-content:center;height:64px;line-height:64px;overflow:hidden;white-space:nowrap;padding-left:10px}.layout-header-left .logo img[data-v-563e4e55]{width:auto;height:32px;margin-right:10px}.layout-header-left .logo .title[data-v-563e4e55]{margin-bottom:0}.layout-header-left[data-v-563e4e55] .ant-breadcrumb span:last-child .link-text{color:#515a6e}.layout-header-left .n-breadcrumb[data-v-563e4e55]{display:inline-block}.layout-header-left-menu[data-v-563e4e55]{color:var(--text-color)}.layout-header-right[data-v-563e4e55]{display:flex;align-items:center;margin-right:5px}.layout-header-right .avatar[data-v-563e4e55]{display:flex;align-items:center;height:64px}.layout-header-right[data-v-563e4e55]>*{cursor:pointer}.layout-header-trigger[data-v-563e4e55]{display:inline-block;width:64px;height:64px;text-align:center;cursor:pointer;transition:all .2s ease-in-out}.layout-header-trigger .n-icon[data-v-563e4e55]{display:flex;align-items:center;height:64px;line-height:64px}.layout-header-trigger[data-v-563e4e55]:hover{background:#ffffff14}.layout-header-trigger .anticon[data-v-563e4e55]{font-size:16px;color:#515a6e}.layout-header-trigger-min[data-v-563e4e55]{width:auto;padding:0 10px}.layout-header-light[data-v-563e4e55]{background:#fff;color:#515a6e}.layout-header-light .n-icon[data-v-563e4e55]{color:#515a6e}.layout-header-light .layout-header-left[data-v-563e4e55] .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#515a6e}.layout-header-light .layout-header-trigger[data-v-563e4e55]:hover{background:#f8f8f9}.layout-header-fix[data-v-563e4e55]{position:fixed;top:0;right:0;left:200px;z-index:11}[data-v-563e4e55] .menu-router-link{color:#515a6e}[data-v-563e4e55] .menu-router-link:hover{color:#1890ff}.tabs-view[data-v-428fe23d]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-428fe23d]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-428fe23d]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-428fe23d],.tabs-view-main .tabs-card .tabs-card-next[data-v-428fe23d]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-428fe23d],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-428fe23d]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-428fe23d]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-428fe23d]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-428fe23d],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-428fe23d]{display:none}.tabs-view-main .tabs-card-scroll[data-v-428fe23d]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-428fe23d]{background:var(--d48fbd46);color:var(--v380ec63c);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-428fe23d]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-428fe23d]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-428fe23d]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-428fe23d]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-428fe23d]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-428fe23d]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-428fe23d]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-428fe23d]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-428fe23d]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-428fe23d]{background:#f5f7f9}.tabs-view-dark-background[data-v-428fe23d]{background:#101014}.tabs-view-fix[data-v-428fe23d]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-428fe23d]{top:0}.layout[data-v-0bac2e7d]{display:flex;flex-direction:row;flex:auto}.layout-default-background[data-v-0bac2e7d]{background:#f5f7f9}.layout .layout-sider[data-v-0bac2e7d]{min-height:100vh;box-shadow:2px 0 8px #1d23290d;position:relative;z-index:13;transition:all .2s ease-in-out}.layout .layout-sider-fix[data-v-0bac2e7d]{position:fixed;top:0;left:0}.layout .ant-layout[data-v-0bac2e7d]{overflow:hidden}.layout .layout-right-fix[data-v-0bac2e7d]{overflow-x:hidden;padding-left:200px;min-height:100vh;transition:all .2s ease-in-out}.layout .layout-content[data-v-0bac2e7d]{flex:auto;min-height:100vh}.layout .n-layout-header.n-layout-header--absolute-positioned[data-v-0bac2e7d]{z-index:11}.layout-content-main[data-v-0bac2e7d]{margin:0 5px 5px;position:relative;padding-top:64px}.layout-content-main-fix[data-v-0bac2e7d]{padding-top:64px}.main-view-fix[data-v-0bac2e7d]{padding-top:45px}.frame[data-v-161a378e]{width:100%;height:100vh}.frame-iframe[data-v-161a378e]{width:100%;height:100%;overflow:hidden;border:0;box-sizing:border-box}.page-container[data-v-89cb65c7],.page-container[data-v-99232671],.page-container[data-v-3baa9c16]{width:100%;border-radius:4px;padding:50px 0;height:100vh;margin-top:-128px}.view-auth-callback[data-v-167395ae]{display:flex;flex-direction:column;height:100vh;overflow:auto}.view-auth-callback-content[data-v-167395ae]{flex:1;padding:32px 12px;display:flex;justify-content:center;align-items:center}.view-auth-callback-spinner[data-v-167395ae]{display:flex;justify-content:center;align-items:center;height:100px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tabs-view[data-v-
|
|
1
|
+
.tabs-view[data-v-428fe23d]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-428fe23d]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-428fe23d]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-428fe23d],.tabs-view-main .tabs-card .tabs-card-next[data-v-428fe23d]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-428fe23d],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-428fe23d]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-428fe23d]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-428fe23d]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-428fe23d],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-428fe23d]{display:none}.tabs-view-main .tabs-card-scroll[data-v-428fe23d]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-428fe23d]{background:var(--d48fbd46);color:var(--v380ec63c);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-428fe23d]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-428fe23d]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-428fe23d]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-428fe23d]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-428fe23d]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-428fe23d]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-428fe23d]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-428fe23d]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-428fe23d]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-428fe23d]{background:#f5f7f9}.tabs-view-dark-background[data-v-428fe23d]{background:#101014}.tabs-view-fix[data-v-428fe23d]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-428fe23d]{top:0}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PTabs.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-428fe23d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ReloadOutlined as
|
|
5
|
-
import { useRoute as
|
|
6
|
-
import { useThemeVars as
|
|
7
|
-
import { useLayoutStore as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as Z, useCssVars as ee, computed as g, ref as T, reactive as te, h as d, inject as oe, watch as le, onMounted as ae, openBlock as O, createElementBlock as se, normalizeStyle as ne, createElementVNode as u, normalizeClass as w, createVNode as i, unref as n, withCtx as p, withModifiers as L, toDisplayString as re, createBlock as ce, createCommentVNode as ie, nextTick as R } from "vue";
|
|
2
|
+
import ue from "element-resize-detector";
|
|
3
|
+
import de from "vuedraggable";
|
|
4
|
+
import { ReloadOutlined as fe, CloseOutlined as D, ColumnWidthOutlined as he, MinusOutlined as me, LeftOutlined as ve, RightOutlined as pe, DownOutlined as be } from "@vicons/antd";
|
|
5
|
+
import { useRoute as ge, useRouter as we } from "vue-router";
|
|
6
|
+
import { useThemeVars as ye, useMessage as Se, NIcon as f, NDropdown as E } from "naive-ui";
|
|
7
|
+
import { useLayoutStore as Te } from "../store.js";
|
|
8
|
+
const Ce = { class: "tabs-view-main" }, xe = ["id", "onClick", "onContextmenu"], ke = { class: "tabs-close" }, _e = { class: "tabs-close-btn" }, Ne = /* @__PURE__ */ Z({
|
|
9
9
|
__name: "PTabs",
|
|
10
|
-
setup(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
setup(Pe) {
|
|
11
|
+
ee((e) => ({
|
|
12
|
+
d48fbd46: M.value,
|
|
13
|
+
v380ec63c: N.value
|
|
14
14
|
}));
|
|
15
|
-
const C =
|
|
15
|
+
const C = ye(), M = g(() => C.value.cardColor), N = g(() => C.value.textColor1), A = Se(), r = ge(), m = we(), s = T(null), x = T(null), k = T(!1), c = Te(), h = g(() => c.state.tabs), l = te({
|
|
16
16
|
activeKey: r.fullPath,
|
|
17
17
|
scrollable: !0,
|
|
18
18
|
dropdownX: 0,
|
|
@@ -20,22 +20,27 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
20
20
|
showDropdown: !1,
|
|
21
21
|
isMultiHeaderFixed: !0,
|
|
22
22
|
multiTabsSetting: !0
|
|
23
|
-
}), K = ["Login", "Redirect", "ErrorPage"],
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
}), K = ["Login", "Redirect", "ErrorPage"], y = (e) => ({
|
|
24
|
+
meta: e.meta,
|
|
25
|
+
name: e.name,
|
|
26
|
+
fullPath: e.fullPath ?? e.path,
|
|
27
|
+
path: e.path,
|
|
28
|
+
hash: e.hash ?? "",
|
|
29
|
+
query: e.query ?? {},
|
|
30
|
+
params: e.params ?? {}
|
|
31
|
+
}), z = g(() => {
|
|
32
|
+
const o = c.state.collapsed ? "64px" : "272px";
|
|
28
33
|
return {
|
|
29
34
|
left: o,
|
|
30
35
|
width: `calc(100% - ${o})`
|
|
31
36
|
};
|
|
32
|
-
}), _ =
|
|
33
|
-
const e =
|
|
37
|
+
}), _ = g(() => {
|
|
38
|
+
const e = h.value.length <= 1;
|
|
34
39
|
return [
|
|
35
40
|
{
|
|
36
41
|
label: "刷新当前",
|
|
37
42
|
key: "1",
|
|
38
|
-
icon: () => d(f, null, { default: () => d(
|
|
43
|
+
icon: () => d(f, null, { default: () => d(fe) })
|
|
39
44
|
},
|
|
40
45
|
{
|
|
41
46
|
label: "关闭当前",
|
|
@@ -47,80 +52,82 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
47
52
|
label: "关闭其他",
|
|
48
53
|
key: "3",
|
|
49
54
|
disabled: e,
|
|
50
|
-
icon: () => d(f, null, { default: () => d(
|
|
55
|
+
icon: () => d(f, null, { default: () => d(he) })
|
|
51
56
|
},
|
|
52
57
|
{
|
|
53
58
|
label: "关闭全部",
|
|
54
59
|
key: "4",
|
|
55
60
|
disabled: e,
|
|
56
|
-
icon: () => d(f, null, { default: () => d(
|
|
61
|
+
icon: () => d(f, null, { default: () => d(me) })
|
|
57
62
|
}
|
|
58
63
|
];
|
|
59
|
-
}),
|
|
60
|
-
let e = [];
|
|
61
|
-
|
|
64
|
+
}), V = () => {
|
|
65
|
+
let e = [y(r)];
|
|
66
|
+
m.getRoutes().filter((t) => t.meta.affix).forEach((t) => {
|
|
67
|
+
const o = y(t);
|
|
68
|
+
e.every((a) => a.name !== o.name) && e.push(o);
|
|
69
|
+
});
|
|
62
70
|
try {
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
e =
|
|
66
|
-
}
|
|
67
|
-
e = [t];
|
|
68
|
-
} catch {
|
|
69
|
-
e = [t];
|
|
71
|
+
if (c.state.cacheTabs) {
|
|
72
|
+
const t = localStorage.getItem("TABS_ROUTES");
|
|
73
|
+
e = t ? JSON.parse(t) : e;
|
|
74
|
+
}
|
|
70
75
|
} finally {
|
|
71
76
|
return e;
|
|
72
77
|
}
|
|
73
|
-
},
|
|
74
|
-
const t =
|
|
78
|
+
}, $ = (e) => {
|
|
79
|
+
const t = m.getRoutes();
|
|
75
80
|
e.forEach((o) => {
|
|
76
|
-
const a = t.find((
|
|
81
|
+
const a = t.find((b) => b.path === o.path);
|
|
77
82
|
a && (o.meta = a.meta || o.meta, o.name = a.name || o.name);
|
|
78
|
-
}),
|
|
79
|
-
},
|
|
80
|
-
const e =
|
|
81
|
-
|
|
83
|
+
}), c.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(e));
|
|
84
|
+
}, B = () => {
|
|
85
|
+
const e = V();
|
|
86
|
+
$(e), c.initTabs(e);
|
|
82
87
|
}, v = async (e) => {
|
|
83
88
|
if (await R(), !s.value) return;
|
|
84
89
|
const t = s.value.offsetWidth, o = s.value.scrollWidth;
|
|
85
|
-
t < o ? (l.scrollable = !0, e && [...s.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((
|
|
86
|
-
|
|
90
|
+
t < o ? (l.scrollable = !0, e && [...s.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((b) => {
|
|
91
|
+
b.id === `tag${l.activeKey.split("/").join("/")}` && b.scrollIntoView && b.scrollIntoView();
|
|
87
92
|
})) : l.scrollable = !1;
|
|
88
|
-
},
|
|
93
|
+
}, I = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), Y = () => {
|
|
89
94
|
let e;
|
|
90
|
-
e =
|
|
95
|
+
e = ue(), e.listenTo(x.value, () => v(!0));
|
|
91
96
|
}, j = (e) => {
|
|
92
|
-
|
|
93
|
-
if (
|
|
97
|
+
if (!e || e.fullPath === r.fullPath) return;
|
|
98
|
+
if (l.activeKey = e.fullPath, toString.call(e) === "[object String]") {
|
|
99
|
+
m.replace(e).catch(console.error);
|
|
94
100
|
return;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
101
|
+
}
|
|
102
|
+
const t = e;
|
|
103
|
+
m.replace(t).catch(console.error);
|
|
104
|
+
}, q = (e, t) => {
|
|
98
105
|
e.preventDefault(), k.value = t.path === "/home", l.showDropdown = !1, R().then(() => {
|
|
99
106
|
l.showDropdown = !0, l.dropdownX = e.clientX, l.dropdownY = e.clientY;
|
|
100
107
|
});
|
|
101
|
-
},
|
|
108
|
+
}, F = () => {
|
|
102
109
|
if (r.meta.keepAlive) {
|
|
103
|
-
var e =
|
|
110
|
+
var e = m.currentRoute.value.matched.find(
|
|
104
111
|
(t) => t.name == r.name
|
|
105
112
|
);
|
|
106
113
|
e && e.components?.default?.name;
|
|
107
114
|
}
|
|
108
115
|
}, P = (e) => {
|
|
109
|
-
if (
|
|
116
|
+
if (h.value.length === 1)
|
|
110
117
|
return A.warning("这已经是最后一页,不能再关闭了!");
|
|
111
|
-
if (
|
|
112
|
-
const t =
|
|
113
|
-
l.activeKey = t.fullPath,
|
|
118
|
+
if (F(), c.closeCurrentTab(e), l.activeKey === e.fullPath) {
|
|
119
|
+
const t = h.value[Math.max(0, h.value.length - 1)];
|
|
120
|
+
l.activeKey = t.fullPath, m.push(t);
|
|
114
121
|
}
|
|
115
122
|
v();
|
|
116
|
-
},
|
|
117
|
-
const
|
|
118
|
-
P(
|
|
123
|
+
}, X = (e) => {
|
|
124
|
+
const t = h.value.find((o) => o.fullPath == e.fullPath);
|
|
125
|
+
t && P(t);
|
|
119
126
|
}, H = (e) => {
|
|
120
|
-
|
|
127
|
+
c.closeOtherTabs(e), l.activeKey = e.fullPath, v();
|
|
121
128
|
}, J = () => {
|
|
122
|
-
|
|
123
|
-
}, U =
|
|
129
|
+
c.closeAllTabs(), v();
|
|
130
|
+
}, U = oe("reloadPage"), W = (e) => {
|
|
124
131
|
switch (e) {
|
|
125
132
|
//刷新
|
|
126
133
|
case "1":
|
|
@@ -156,7 +163,7 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
156
163
|
S(a, (a - o) / 20);
|
|
157
164
|
};
|
|
158
165
|
return window.addEventListener("beforeunload", () => {
|
|
159
|
-
localStorage.setItem("TABS_ROUTES", JSON.stringify(
|
|
166
|
+
c.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(h.value));
|
|
160
167
|
}), window.addEventListener(
|
|
161
168
|
"scroll",
|
|
162
169
|
(e) => {
|
|
@@ -164,46 +171,46 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
164
171
|
l.isMultiHeaderFixed = t >= 64;
|
|
165
172
|
},
|
|
166
173
|
!0
|
|
167
|
-
),
|
|
174
|
+
), le(
|
|
168
175
|
() => r.fullPath,
|
|
169
176
|
(e) => {
|
|
170
|
-
K.includes(r.name) || (l.activeKey = e,
|
|
177
|
+
K.includes(r.name) || (l.activeKey = e, c.addTab(y(r)), v(!0));
|
|
171
178
|
},
|
|
172
179
|
{ immediate: !0 }
|
|
173
|
-
),
|
|
180
|
+
), B(), ae(() => Y()), (e, t) => (O(), se("div", {
|
|
174
181
|
class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
|
|
175
|
-
style:
|
|
182
|
+
style: ne(z.value)
|
|
176
183
|
}, [
|
|
177
|
-
u("div",
|
|
184
|
+
u("div", Ce, [
|
|
178
185
|
u("div", {
|
|
179
186
|
ref_key: "navWrap",
|
|
180
|
-
ref:
|
|
181
|
-
class:
|
|
187
|
+
ref: x,
|
|
188
|
+
class: w(["tabs-card", { "tabs-card-scrollable": l.scrollable }])
|
|
182
189
|
}, [
|
|
183
190
|
u("span", {
|
|
184
|
-
class:
|
|
191
|
+
class: w(["tabs-card-prev", { "tabs-card-prev-hide": !l.scrollable }]),
|
|
185
192
|
onClick: G
|
|
186
193
|
}, [
|
|
187
|
-
|
|
194
|
+
i(n(f), {
|
|
188
195
|
size: "16",
|
|
189
196
|
color: "#515a6e"
|
|
190
197
|
}, {
|
|
191
198
|
default: p(() => [
|
|
192
|
-
|
|
199
|
+
i(n(ve))
|
|
193
200
|
]),
|
|
194
201
|
_: 1
|
|
195
202
|
})
|
|
196
203
|
], 2),
|
|
197
204
|
u("span", {
|
|
198
|
-
class:
|
|
205
|
+
class: w(["tabs-card-next", { "tabs-card-next-hide": !l.scrollable }]),
|
|
199
206
|
onClick: Q
|
|
200
207
|
}, [
|
|
201
|
-
|
|
208
|
+
i(n(f), {
|
|
202
209
|
size: "16",
|
|
203
210
|
color: "#515a6e"
|
|
204
211
|
}, {
|
|
205
212
|
default: p(() => [
|
|
206
|
-
|
|
213
|
+
i(n(pe))
|
|
207
214
|
]),
|
|
208
215
|
_: 1
|
|
209
216
|
})
|
|
@@ -213,52 +220,52 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
213
220
|
ref: s,
|
|
214
221
|
class: "tabs-card-scroll"
|
|
215
222
|
}, [
|
|
216
|
-
|
|
217
|
-
list: m.value,
|
|
223
|
+
i(n(de), {
|
|
218
224
|
animation: "300",
|
|
219
225
|
"item-key": "fullPath",
|
|
220
226
|
class: "flex",
|
|
221
|
-
|
|
227
|
+
list: h.value,
|
|
228
|
+
move: I
|
|
222
229
|
}, {
|
|
223
230
|
item: p(({ element: o }) => [
|
|
224
231
|
u("div", {
|
|
232
|
+
class: w(["tabs-card-scroll-item", { "active-item": l.activeKey === o.fullPath }]),
|
|
225
233
|
id: `tag${o.fullPath.split("/").join("/")}`,
|
|
226
|
-
class: g(["tabs-card-scroll-item", { "active-item": l.activeKey === o.fullPath }]),
|
|
227
234
|
onClick: L((a) => j(o), ["stop"]),
|
|
228
|
-
onContextmenu: (a) =>
|
|
235
|
+
onContextmenu: (a) => q(a, o)
|
|
229
236
|
}, [
|
|
230
|
-
u("span", null,
|
|
231
|
-
o.meta.affix ?
|
|
237
|
+
u("span", null, re(o.meta.title), 1),
|
|
238
|
+
o.meta.affix ? ie("", !0) : (O(), ce(n(f), {
|
|
232
239
|
key: 0,
|
|
233
240
|
size: "14",
|
|
234
|
-
onClick: L((a) =>
|
|
241
|
+
onClick: L((a) => X(o), ["stop"])
|
|
235
242
|
}, {
|
|
236
243
|
default: p(() => [
|
|
237
|
-
|
|
244
|
+
i(n(D))
|
|
238
245
|
]),
|
|
239
246
|
_: 1
|
|
240
247
|
}, 8, ["onClick"]))
|
|
241
|
-
], 42,
|
|
248
|
+
], 42, xe)
|
|
242
249
|
]),
|
|
243
250
|
_: 1
|
|
244
251
|
}, 8, ["list"])
|
|
245
252
|
], 512)
|
|
246
253
|
], 2),
|
|
247
|
-
u("div",
|
|
248
|
-
|
|
254
|
+
u("div", ke, [
|
|
255
|
+
i(n(E), {
|
|
249
256
|
trigger: "hover",
|
|
250
|
-
onSelect: W,
|
|
251
257
|
placement: "bottom-end",
|
|
252
|
-
options: _.value
|
|
258
|
+
options: _.value,
|
|
259
|
+
onSelect: W
|
|
253
260
|
}, {
|
|
254
261
|
default: p(() => [
|
|
255
|
-
u("div",
|
|
256
|
-
|
|
262
|
+
u("div", _e, [
|
|
263
|
+
i(n(f), {
|
|
257
264
|
size: "16",
|
|
258
265
|
color: "#515a6e"
|
|
259
266
|
}, {
|
|
260
267
|
default: p(() => [
|
|
261
|
-
|
|
268
|
+
i(n(be))
|
|
262
269
|
]),
|
|
263
270
|
_: 1
|
|
264
271
|
})
|
|
@@ -267,19 +274,19 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
267
274
|
_: 1
|
|
268
275
|
}, 8, ["options"])
|
|
269
276
|
]),
|
|
270
|
-
|
|
277
|
+
i(n(E), {
|
|
278
|
+
placement: "bottom-start",
|
|
271
279
|
show: l.showDropdown,
|
|
272
280
|
x: l.dropdownX,
|
|
273
281
|
y: l.dropdownY,
|
|
282
|
+
options: _.value,
|
|
274
283
|
onClickoutside: t[0] || (t[0] = (o) => l.showDropdown = !1),
|
|
275
|
-
|
|
276
|
-
onSelect: W,
|
|
277
|
-
options: _.value
|
|
284
|
+
onSelect: W
|
|
278
285
|
}, null, 8, ["show", "x", "y", "options"])
|
|
279
286
|
])
|
|
280
287
|
], 4));
|
|
281
288
|
}
|
|
282
289
|
});
|
|
283
290
|
export {
|
|
284
|
-
|
|
291
|
+
Ne as default
|
|
285
292
|
};
|