xto-fronted 0.4.67 → 0.4.68
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/assets/404-BS12ujqV.js +1 -0
- package/dist/assets/404-CH5_LdtS.css +1 -0
- package/dist/assets/index-BCVrIpUE.css +1 -0
- package/dist/assets/index-CW3T5R7h.js +1 -0
- package/dist/assets/{index-DiHSZ6SJ.js → index-CivgOS-Y.js} +2 -2
- package/dist/assets/{index-D0OnMilp.js → index-Cxf-jRPo.js} +1 -1
- package/dist/assets/{index-DPkO-STg.js → index-D4u7Gmf9.js} +1 -1
- package/dist/assets/index-DB6TpRDX.js +1 -0
- package/dist/assets/index-DFi-u9k3.js +1 -0
- package/dist/assets/{xto-base-C6eqMPdO.css → xto-base-CojW9IFO.css} +1 -1
- package/dist/assets/{xto-base-C-IBqjVs.js → xto-base-_Rb31vAT.js} +1 -1
- package/dist/assets/xto-feedback-C-ESp-Y1.css +1 -0
- package/dist/assets/xto-feedback-xD2AV0I4.js +1 -0
- package/dist/assets/xto-form-CGbFA4jG.js +1 -0
- package/dist/assets/xto-navigation-BRzSCpAw.css +1 -0
- package/dist/index.html +8 -8
- package/package.json +1 -1
- package/src/components/Layout/Sidebar.vue +40 -1
- package/dist/App.vue.d.ts +0 -2
- package/dist/api/auth.d.ts +0 -8
- package/dist/api/system.d.ts +0 -16
- package/dist/api/user.d.ts +0 -13
- package/dist/assets/404-ByYjFnhI.js +0 -1
- package/dist/assets/404-sqW80Hc-.css +0 -1
- package/dist/assets/index-BBhC8PX4.js +0 -1
- package/dist/assets/index-BihVoviB.js +0 -1
- package/dist/assets/index-BrvR0Fn_.css +0 -1
- package/dist/assets/index-C4ZCZoPp.js +0 -1
- package/dist/assets/xto-feedback-B2M02fn3.js +0 -1
- package/dist/assets/xto-feedback-ByaS-C7_.css +0 -1
- package/dist/assets/xto-form-NRjKKNcY.js +0 -1
- package/dist/assets/xto-navigation-BuRQVoD8.css +0 -1
- package/dist/components/Layout/Footer.vue.d.ts +0 -2
- package/dist/components/Layout/Header.vue.d.ts +0 -5
- package/dist/components/Layout/MixTopMenu.vue.d.ts +0 -5
- package/dist/components/Layout/Sidebar.vue.d.ts +0 -11
- package/dist/components/Layout/SidebarMenuItem.vue.d.ts +0 -5
- package/dist/components/Layout/Tabs.vue.d.ts +0 -2
- package/dist/components/Layout/TopMenu.vue.d.ts +0 -5
- package/dist/components/Layout/index.vue.d.ts +0 -2
- package/dist/composables/useApp.d.ts +0 -29
- package/dist/composables/useAuth.d.ts +0 -6
- package/dist/composables/useForm.d.ts +0 -20
- package/dist/composables/useTable.d.ts +0 -29
- package/dist/directives/permission.d.ts +0 -4
- package/dist/enums/index.d.ts +0 -32
- package/dist/index-0h_oG71z.js +0 -345
- package/dist/index-1EEezXR3.js +0 -142
- package/dist/index-1EkaJDoD.js +0 -142
- package/dist/index-1VN-SSaj.js +0 -2873
- package/dist/index-23nX2t9j.js +0 -142
- package/dist/index-2RwL0s53.js +0 -142
- package/dist/index-2tvOdd6w.js +0 -372
- package/dist/index-3zeoNaqT.js +0 -345
- package/dist/index-8oCLh51t.js +0 -475
- package/dist/index-AF5JN8Up.js +0 -142
- package/dist/index-B02xiP9g.js +0 -372
- package/dist/index-B05xso4D.js +0 -345
- package/dist/index-B1VS4tRU.js +0 -475
- package/dist/index-B3_VQZ-d.js +0 -372
- package/dist/index-B3kL6i_g.js +0 -345
- package/dist/index-B4Wny0vt.js +0 -345
- package/dist/index-B5RdBQ-f.js +0 -475
- package/dist/index-B5rbuoWS.js +0 -2835
- package/dist/index-BAFpPlnI.js +0 -475
- package/dist/index-BAJakzRz.js +0 -142
- package/dist/index-BAOHlfVd.js +0 -142
- package/dist/index-BAzJWzWG.js +0 -2852
- package/dist/index-BEIxh_R3.js +0 -2982
- package/dist/index-BEWrRNps.js +0 -475
- package/dist/index-BFtKVmzo.js +0 -142
- package/dist/index-BHPrW1wN.js +0 -142
- package/dist/index-BHQIqN1E.js +0 -372
- package/dist/index-BHZ_y8lp.js +0 -2067
- package/dist/index-BHvnTk5Z.js +0 -475
- package/dist/index-BIf7CYCW.js +0 -475
- package/dist/index-BK1Y1z9_.js +0 -142
- package/dist/index-BK8qDl14.js +0 -372
- package/dist/index-BKnta6nv.js +0 -372
- package/dist/index-BLIem13z.js +0 -345
- package/dist/index-BNBv_FCu.js +0 -142
- package/dist/index-BNwtCm83.js +0 -345
- package/dist/index-BOEMA7WH.js +0 -345
- package/dist/index-BOwDukt-.js +0 -2346
- package/dist/index-BR9WVjrV.js +0 -2851
- package/dist/index-BRMkw154.js +0 -475
- package/dist/index-BRQBannD.js +0 -345
- package/dist/index-BShKtLTm.js +0 -475
- package/dist/index-BVpqTdd2.js +0 -3132
- package/dist/index-BWGQANAN.js +0 -2851
- package/dist/index-BZKw7U60.js +0 -475
- package/dist/index-BadGWG4q.js +0 -475
- package/dist/index-BbeWpCd3.js +0 -345
- package/dist/index-BeUYNx5P.js +0 -475
- package/dist/index-BgiGtxRr.js +0 -142
- package/dist/index-BhKJLk9M.js +0 -2824
- package/dist/index-BijsKQ3r.js +0 -475
- package/dist/index-BjEfspqP.js +0 -475
- package/dist/index-BjEnT8WQ.js +0 -372
- package/dist/index-BpOcz1m4.js +0 -142
- package/dist/index-BrRdLbLB.js +0 -142
- package/dist/index-BsHOXfCq.js +0 -372
- package/dist/index-Bt5ocakb.js +0 -475
- package/dist/index-BtE24Mt4.js +0 -142
- package/dist/index-BvcBQjw6.js +0 -2836
- package/dist/index-C0krZRWf.js +0 -2859
- package/dist/index-C1cKUqmA.js +0 -372
- package/dist/index-C3ANmIDM.js +0 -475
- package/dist/index-C5JrEkwD.js +0 -345
- package/dist/index-C5m4qNMQ.js +0 -2851
- package/dist/index-C69vu_ot.js +0 -3147
- package/dist/index-C6Um6eFy.js +0 -475
- package/dist/index-C75ePQYC.js +0 -372
- package/dist/index-C7wKLGhC.js +0 -142
- package/dist/index-C8DBDnxx.js +0 -2836
- package/dist/index-CAnqlIjX.js +0 -475
- package/dist/index-CB36fztK.js +0 -345
- package/dist/index-CBKo6Enz.js +0 -345
- package/dist/index-CBcuyFIa.js +0 -2326
- package/dist/index-CCxIu4ex.js +0 -372
- package/dist/index-CD1ZEMzL.js +0 -2836
- package/dist/index-CDx-6tvY.js +0 -345
- package/dist/index-CGrvOpdb.js +0 -372
- package/dist/index-CHJWNf3f.js +0 -475
- package/dist/index-CIb06BxE.js +0 -372
- package/dist/index-CLiJcB9v.js +0 -142
- package/dist/index-CNS6Ohfw.js +0 -2853
- package/dist/index-COkjB5Jm.js +0 -142
- package/dist/index-CS5h1O5W.js +0 -345
- package/dist/index-CT0deRSL.js +0 -372
- package/dist/index-CTQQBaf4.js +0 -345
- package/dist/index-CUAC0ZFB.js +0 -475
- package/dist/index-CVMV9Tfg.js +0 -142
- package/dist/index-CWOx59Vc.js +0 -142
- package/dist/index-CWdSR99B.js +0 -372
- package/dist/index-CWvOcS8Y.js +0 -345
- package/dist/index-C_8yJlf1.js +0 -475
- package/dist/index-C_MzXmh2.js +0 -2830
- package/dist/index-Cb7HXiBR.js +0 -372
- package/dist/index-CbA8oUvZ.js +0 -142
- package/dist/index-CbEIzXG9.js +0 -475
- package/dist/index-Cb_m0zz1.js +0 -475
- package/dist/index-Cc6HgGzc.js +0 -142
- package/dist/index-CcWdW9Mj.js +0 -372
- package/dist/index-CdAqkP8L.js +0 -345
- package/dist/index-CeVUHSt9.js +0 -2847
- package/dist/index-CejRpy0a.js +0 -475
- package/dist/index-Cg5wO_jJ.js +0 -372
- package/dist/index-CgZM1vHq.js +0 -372
- package/dist/index-CgofFg1D.js +0 -372
- package/dist/index-ChheXGDK.js +0 -372
- package/dist/index-ChuFHoI0.js +0 -372
- package/dist/index-CiOJZ6_b.js +0 -372
- package/dist/index-ClCWmz_7.js +0 -2844
- package/dist/index-CmajGrKA.js +0 -142
- package/dist/index-Cn_4o3fi.js +0 -345
- package/dist/index-CoJBI1vE.js +0 -345
- package/dist/index-CqLLaQ-P.js +0 -372
- package/dist/index-CsRhLwmR.js +0 -475
- package/dist/index-CttJvDTG.js +0 -475
- package/dist/index-Cu3m9UeX.js +0 -345
- package/dist/index-CyQbOMHa.js +0 -2859
- package/dist/index-D-NcbLKL.js +0 -345
- package/dist/index-D0gstkiI.js +0 -2836
- package/dist/index-D0krzDtx.js +0 -475
- package/dist/index-D1moFd4V.js +0 -372
- package/dist/index-D2Hs4bZj.js +0 -345
- package/dist/index-D4QhrTZs.js +0 -475
- package/dist/index-D6CC02F-.js +0 -372
- package/dist/index-D6s7Za5s.js +0 -142
- package/dist/index-D7i5bck2.js +0 -3132
- package/dist/index-D8YBeNfn.js +0 -345
- package/dist/index-D93bv6lU.js +0 -372
- package/dist/index-DAX_bFj5.js +0 -142
- package/dist/index-DBii9cjr.js +0 -475
- package/dist/index-DBzpSkNi.js +0 -345
- package/dist/index-DCuKNBck.js +0 -3153
- package/dist/index-DE3uKf0K.js +0 -142
- package/dist/index-DGAqp0QX.js +0 -372
- package/dist/index-DGh_w_v1.js +0 -475
- package/dist/index-DItKvJyI.js +0 -475
- package/dist/index-DKAyB0fv.js +0 -345
- package/dist/index-DKN4xsXi.js +0 -2851
- package/dist/index-DN_iIn8V.js +0 -345
- package/dist/index-DONIBpuJ.js +0 -345
- package/dist/index-DPDK8Ht4.js +0 -2851
- package/dist/index-DPr3ldST.js +0 -2354
- package/dist/index-DS1wfdxM.js +0 -142
- package/dist/index-DUW5cCh8.js +0 -372
- package/dist/index-DUv28uVd.js +0 -142
- package/dist/index-DVS-5SZn.js +0 -475
- package/dist/index-DWI51JAp.js +0 -372
- package/dist/index-DWVmEexu.js +0 -475
- package/dist/index-DXf9wUqQ.js +0 -142
- package/dist/index-DXmB-sjP.js +0 -345
- package/dist/index-DY_e_Dxv.js +0 -372
- package/dist/index-DZar-us7.js +0 -142
- package/dist/index-D_nwqVrw.js +0 -2847
- package/dist/index-DbEeir7h.js +0 -2834
- package/dist/index-Dbf5ypbh.js +0 -142
- package/dist/index-DcSK-2pt.js +0 -345
- package/dist/index-DclK-Mc7.js +0 -2864
- package/dist/index-DcnzaxVi.js +0 -142
- package/dist/index-Dd8PlF0M.js +0 -2857
- package/dist/index-DdkVT39s.js +0 -345
- package/dist/index-DeLbU1t-.js +0 -345
- package/dist/index-DfV_J8Te.js +0 -345
- package/dist/index-DgPnNd8U.js +0 -475
- package/dist/index-Dg_JLa7s.js +0 -345
- package/dist/index-Di2VPQjn.js +0 -345
- package/dist/index-DibHUbqc.js +0 -372
- package/dist/index-DjCVSrpw.js +0 -475
- package/dist/index-Djdb936p.js +0 -142
- package/dist/index-DmFL_GSt.js +0 -142
- package/dist/index-DmP4X2k0.js +0 -372
- package/dist/index-DmtmRd1r.js +0 -372
- package/dist/index-Dn8MA3kh.js +0 -475
- package/dist/index-Do7uXDSi.js +0 -2071
- package/dist/index-Dpv1M9Hu.js +0 -372
- package/dist/index-DqUuZC8f.js +0 -372
- package/dist/index-DtEXQIjn.js +0 -372
- package/dist/index-Dtw-qZ0V.js +0 -372
- package/dist/index-Dv3hIz8H.js +0 -345
- package/dist/index-Dv9jnaWp.js +0 -345
- package/dist/index-Dw8KZwGJ.js +0 -2354
- package/dist/index-DwJILh-Q.js +0 -3149
- package/dist/index-DwzGV3B9.js +0 -142
- package/dist/index-DyybaRkK.js +0 -345
- package/dist/index-DzerABZq.js +0 -372
- package/dist/index-F53NVkhc.js +0 -142
- package/dist/index-Fl0_k4XF.js +0 -475
- package/dist/index-HMYRCPrs.js +0 -2326
- package/dist/index-I49wpmT-.js +0 -372
- package/dist/index-IPv1O8Zq.js +0 -345
- package/dist/index-JLqnaery.js +0 -372
- package/dist/index-JRCQ1CYj.js +0 -142
- package/dist/index-L86-iO8O.js +0 -345
- package/dist/index-Q56EoFor.js +0 -142
- package/dist/index-QxKMr6p0.js +0 -2829
- package/dist/index-THRvW9Xm.js +0 -2856
- package/dist/index-WIUmTlfL.js +0 -345
- package/dist/index-WRrsK0pR.js +0 -475
- package/dist/index-Wq652QGf.js +0 -2836
- package/dist/index-YnSLCdjP.js +0 -475
- package/dist/index-Ynf0lvBE.js +0 -142
- package/dist/index-_OtTmb9i.js +0 -142
- package/dist/index-_oqoy_3D.js +0 -142
- package/dist/index-cl4Y-BWw.js +0 -475
- package/dist/index-d_eHJkDW.js +0 -475
- package/dist/index-dnmEyUWB.js +0 -372
- package/dist/index-dz6CwD6A.js +0 -142
- package/dist/index-g4rkaRry.js +0 -475
- package/dist/index-g9bRMdAX.js +0 -142
- package/dist/index-h4z4-a2p.js +0 -2852
- package/dist/index-h7BhcQYM.js +0 -475
- package/dist/index-hI3qofTF.js +0 -345
- package/dist/index-iyQQumAA.js +0 -372
- package/dist/index-js_OhKON.js +0 -345
- package/dist/index-kgb4MdHr.js +0 -475
- package/dist/index-logKl0VM.js +0 -3144
- package/dist/index-lrFMrOlR.js +0 -3132
- package/dist/index-mEHxtQWj.js +0 -372
- package/dist/index-mNm1BV3n.js +0 -2857
- package/dist/index-oOzAFXfr.js +0 -142
- package/dist/index-s3vGq0ro.js +0 -345
- package/dist/index-wt7AbUqc.js +0 -2342
- package/dist/index.d.ts +0 -54
- package/dist/index.es.js +0 -91
- package/dist/index.umd.js +0 -1
- package/dist/main.d.ts +0 -0
- package/dist/router/dynamicRoutes.d.ts +0 -30
- package/dist/router/guards.d.ts +0 -17
- package/dist/router/index.d.ts +0 -6
- package/dist/router/layoutRoute.d.ts +0 -18
- package/dist/router/staticRoutes.d.ts +0 -2
- package/dist/stores/app.d.ts +0 -93
- package/dist/stores/auth.d.ts +0 -41
- package/dist/stores/index.d.ts +0 -9
- package/dist/stores/menu.d.ts +0 -77
- package/dist/stores/user.d.ts +0 -92
- package/dist/style.css +0 -1
- package/dist/utils/auth.d.ts +0 -27
- package/dist/utils/config.d.ts +0 -30
- package/dist/utils/permission.d.ts +0 -18
- package/dist/utils/request.d.ts +0 -24
- package/dist/utils/storage.d.ts +0 -24
- package/dist/views/dashboard/index.vue.d.ts +0 -2
- package/dist/views/error/403.vue.d.ts +0 -2
- package/dist/views/error/404.vue.d.ts +0 -2
- package/dist/views/login/index.vue.d.ts +0 -4
- package/dist/views/system/menu/index.vue.d.ts +0 -4
- package/dist/views/system/role/index.vue.d.ts +0 -4
- package/dist/views/system/user/index.vue.d.ts +0 -4
- /package/dist/assets/{xto-navigation-qLRTxo68.js → xto-navigation-CvGQ2s27.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as z,F as p,w as v,P as O,V as $,D}from"./xto-form-NRjKKNcY.js";import{p as h,f as N}from"./xto-data-BFpiDgJi.js";import{o as Y,c as q}from"./xto-feedback-B2M02fn3.js";import{o as V,h as g}from"./xto-base-C-IBqjVs.js";import{S as r,M as u,b as F}from"./index-BRR97dc6.js";import{d as j,q as P,o as E,c as k,B as a,C as n,u as e,k as c,e as G,I as H,a as s,h as m,F as A,z as x,i,g as J}from"./vue-vendor-Br-l7wbK.js";import{_ as K}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-DZK7Cyg0.js";const Q={class:"menu-page"},W={class:"toolbar"},X={class:"menu-tree"},Z={class:"tree-table"},ee={class:"tree-row tree-row--level-0"},te=["onClick"],le=["onClick"],ae=j({__name:"index",setup(se){const R=[{id:1,parentId:null,name:"Dashboard",path:"/dashboard",component:"dashboard/index",redirect:"",icon:"dashboard",title:"仪表盘",type:u.MENU,sort:1,status:r.ENABLED,hidden:!1,keepAlive:!0},{id:2,parentId:null,name:"System",path:"/system",component:"",redirect:"/system/user",icon:"setting",title:"系统管理",type:u.DIRECTORY,sort:2,status:r.ENABLED,hidden:!1,keepAlive:!1,children:[{id:21,parentId:2,name:"SystemUser",path:"/system/user",component:"system/user/index",redirect:"",icon:"user",title:"用户管理",type:u.MENU,sort:1,status:r.ENABLED,hidden:!1,keepAlive:!0},{id:22,parentId:2,name:"SystemRole",path:"/system/role",component:"system/role/index",redirect:"",icon:"role",title:"角色管理",type:u.MENU,sort:2,status:r.ENABLED,hidden:!1,keepAlive:!0},{id:23,parentId:2,name:"SystemMenu",path:"/system/menu",component:"system/menu/index",redirect:"",icon:"menu",title:"菜单管理",type:u.MENU,sort:3,status:r.ENABLED,hidden:!1,keepAlive:!0}]}],U=c(!1),C=c([]),y=c(!1),w=G(()=>o.id?"编辑菜单":"新增菜单"),o=H({id:0,parentId:null,name:"",path:"",component:"",redirect:"",icon:"",title:"",type:u.MENU,sort:0,status:r.ENABLED,hidden:!1,keepAlive:!0}),_={name:[{required:!0,message:"请输入菜单名称",trigger:"blur"}],path:[{required:!0,message:"请输入路由路径",trigger:"blur"}],title:[{required:!0,message:"请输入菜单标题",trigger:"blur"}]},M=c(),B=()=>{U.value=!0,setTimeout(()=>{C.value=R,U.value=!1},300)},I=(f=null)=>{Object.assign(o,{id:0,parentId:f,name:"",path:"",component:"",redirect:"",icon:"",title:"",type:u.MENU,sort:0,status:r.ENABLED,hidden:!1,keepAlive:!0}),y.value=!0},b=f=>{Object.assign(o,f),y.value=!0},T=async()=>{var f;try{await((f=M.value)==null?void 0:f.validate()),q.success(o.id?"编辑成功":"新增成功"),y.value=!1,B()}catch(t){console.error(t)}},L=f=>({dashboard:"📊",system:"⚙️",user:"👤",role:"👥",menu:"📋",setting:"🔧"})[f||""]||"📄";return P(()=>{B()}),(f,t)=>(E(),k("div",Q,[a(e(h),{class:"menu-card"},{default:n(()=>[s("div",W,[a(e(V),{type:"primary",onClick:t[0]||(t[0]=l=>I())},{default:n(()=>[...t[14]||(t[14]=[m("新增菜单",-1)])]),_:1})]),s("div",X,[s("table",Z,[t[19]||(t[19]=s("thead",null,[s("tr",null,[s("th",null,"菜单名称"),s("th",null,"图标"),s("th",null,"路由路径"),s("th",null,"类型"),s("th",null,"排序"),s("th",null,"状态"),s("th",null,"操作")])],-1)),s("tbody",null,[(E(!0),k(A,null,x(C.value,l=>(E(),k(A,{key:l.id},[s("tr",ee,[s("td",null,[s("span",{class:"menu-name",onClick:d=>b(l)},i(l.title),9,te)]),s("td",null,i(L(l.icon)),1),s("td",null,i(l.path),1),s("td",null,[a(e(N),{type:l.type===e(u).DIRECTORY?"primary":l.type===e(u).MENU?"success":"warning",size:"small"},{default:n(()=>[m(i(l.type===e(u).DIRECTORY?"目录":l.type===e(u).MENU?"菜单":"按钮"),1)]),_:2},1032,["type"])]),s("td",null,i(l.sort),1),s("td",null,[a(e(N),{type:l.status===e(r).ENABLED?"success":"danger",size:"small"},{default:n(()=>[m(i(l.status===e(r).ENABLED?"启用":"禁用"),1)]),_:2},1032,["type"])]),s("td",null,[a(e(g),null,{default:n(()=>[a(e(V),{type:"primary",link:"",size:"small",onClick:d=>I(l.id)},{default:n(()=>[...t[15]||(t[15]=[m("新增",-1)])]),_:1},8,["onClick"]),a(e(V),{type:"primary",link:"",size:"small",onClick:d=>b(l)},{default:n(()=>[...t[16]||(t[16]=[m("编辑",-1)])]),_:1},8,["onClick"])]),_:2},1024)])]),l.children?(E(!0),k(A,{key:0},x(l.children,d=>(E(),k("tr",{key:d.id,class:"tree-row tree-row--level-1"},[s("td",null,[t[17]||(t[17]=s("span",{class:"tree-indent"},null,-1)),s("span",{class:"menu-name",onClick:S=>b(d)},i(d.title),9,le)]),s("td",null,i(L(d.icon)),1),s("td",null,i(d.path),1),s("td",null,[a(e(N),{type:d.type===e(u).DIRECTORY?"primary":d.type===e(u).MENU?"success":"warning",size:"small"},{default:n(()=>[m(i(d.type===e(u).DIRECTORY?"目录":d.type===e(u).MENU?"菜单":"按钮"),1)]),_:2},1032,["type"])]),s("td",null,i(d.sort),1),s("td",null,[a(e(N),{type:d.status===e(r).ENABLED?"success":"danger",size:"small"},{default:n(()=>[m(i(d.status===e(r).ENABLED?"启用":"禁用"),1)]),_:2},1032,["type"])]),s("td",null,[a(e(g),null,{default:n(()=>[a(e(V),{type:"primary",link:"",size:"small",onClick:S=>b(d)},{default:n(()=>[...t[18]||(t[18]=[m("编辑",-1)])]),_:1},8,["onClick"])]),_:2},1024)])]))),128)):J("",!0)],64))),128))])])])]),_:1}),a(e(Y),{modelValue:y.value,"onUpdate:modelValue":t[13]||(t[13]=l=>y.value=l),title:w.value,width:"600px"},{footer:n(()=>[a(e(g),null,{default:n(()=>[a(e(V),{onClick:t[12]||(t[12]=l=>y.value=!1)},{default:n(()=>[...t[20]||(t[20]=[m("取消",-1)])]),_:1}),a(e(V),{type:"primary",onClick:T},{default:n(()=>[...t[21]||(t[21]=[m("确定",-1)])]),_:1})]),_:1})]),default:n(()=>[a(e(z),{ref_key:"formRef",ref:M,model:o,rules:_,"label-width":"80px"},{default:n(()=>[a(e(p),{label:"上级菜单"},{default:n(()=>[a(e(v),{modelValue:o.parentId,"onUpdate:modelValue":t[1]||(t[1]=l=>o.parentId=l),placeholder:"上级菜单ID",disabled:""},null,8,["modelValue"])]),_:1}),a(e(p),{label:"菜单类型"},{default:n(()=>[a(e(O),{modelValue:o.type,"onUpdate:modelValue":t[2]||(t[2]=l=>o.type=l),options:e(F)},null,8,["modelValue","options"])]),_:1}),a(e(p),{label:"菜单名称",prop:"name"},{default:n(()=>[a(e(v),{modelValue:o.name,"onUpdate:modelValue":t[3]||(t[3]=l=>o.name=l),placeholder:"请输入菜单名称(路由name)"},null,8,["modelValue"])]),_:1}),a(e(p),{label:"菜单标题",prop:"title"},{default:n(()=>[a(e(v),{modelValue:o.title,"onUpdate:modelValue":t[4]||(t[4]=l=>o.title=l),placeholder:"请输入菜单标题"},null,8,["modelValue"])]),_:1}),a(e(p),{label:"路由路径",prop:"path"},{default:n(()=>[a(e(v),{modelValue:o.path,"onUpdate:modelValue":t[5]||(t[5]=l=>o.path=l),placeholder:"请输入路由路径"},null,8,["modelValue"])]),_:1}),a(e(p),{label:"组件路径"},{default:n(()=>[a(e(v),{modelValue:o.component,"onUpdate:modelValue":t[6]||(t[6]=l=>o.component=l),placeholder:"请输入组件路径"},null,8,["modelValue"])]),_:1}),a(e(p),{label:"图标"},{default:n(()=>[a(e(v),{modelValue:o.icon,"onUpdate:modelValue":t[7]||(t[7]=l=>o.icon=l),placeholder:"请输入图标名称"},null,8,["modelValue"])]),_:1}),a(e(p),{label:"排序"},{default:n(()=>[a(e($),{modelValue:o.sort,"onUpdate:modelValue":t[8]||(t[8]=l=>o.sort=l),min:0},null,8,["modelValue"])]),_:1}),a(e(p),{label:"状态"},{default:n(()=>[a(e(D),{modelValue:o.status,"onUpdate:modelValue":t[9]||(t[9]=l=>o.status=l),"active-value":e(r).ENABLED,"inactive-value":e(r).DISABLED},null,8,["modelValue","active-value","inactive-value"])]),_:1}),a(e(p),{label:"隐藏"},{default:n(()=>[a(e(D),{modelValue:o.hidden,"onUpdate:modelValue":t[10]||(t[10]=l=>o.hidden=l)},null,8,["modelValue"])]),_:1}),a(e(p),{label:"缓存"},{default:n(()=>[a(e(D),{modelValue:o.keepAlive,"onUpdate:modelValue":t[11]||(t[11]=l=>o.keepAlive=l)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])]))}}),fe=K(ae,[["__scopeId","data-v-2a272a68"]]);export{fe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as H,w as K,o as _,f as X,B as P,C as R,c as T,a as E,n as C,u as k,r as I,g as z,h as L,A as J,b as M,T as U,E as Q,e as S,k as $,j as ne,s as se,i as V,x as le,D as ae,I as ie,J as Y,K as h,G as q}from"./vue-vendor-Br-l7wbK.js";import{O as re,G as ee,f as ce}from"./xto-core-DZK7Cyg0.js";const Me=H({name:"XModal",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},title:{default:""},width:{default:"50%"},top:{default:"15vh"},modal:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},center:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","update:open","close","open","ok","cancel"],setup(e,{emit:l}){const t=e,r=l,n=ee("modal"),{next:f}=ce(),g=$(f()),m=S({get:()=>t.modelValue!==void 0?t.modelValue:t.open!==void 0?t.open:!1,set:x=>{r("update:modelValue",x),r("update:open",x)}}),c=$(),a=()=>{m.value=!1,r("cancel"),r("close")},u=()=>{r("ok")},i=()=>{t.closeOnClickModal&&t.modal&&a()};re(()=>{t.closeOnPressEscape&&m.value&&a()}),K(()=>[t.modelValue,t.open],([x,d])=>{(x!==void 0?x:d)&&(g.value=f(),r("open"))},{immediate:!0});const p=S(()=>({paddingTop:t.top})),b=S(()=>({width:typeof t.width=="number"?`${t.width}px`:t.width,zIndex:g.value}));return(x,d)=>{const v=ne("x-button");return _(),X(Q,{to:"body"},[P(U,{name:"x-modal-fade"},{default:R(()=>[m.value?(_(),T("div",{key:0,class:C(k(n).e("wrapper")),style:M(p.value),onClick:i},[E("div",{ref_key:"modalRef",ref:c,class:C(k(n).b()),style:M(b.value),onClick:d[0]||(d[0]=J(()=>{},["stop"]))},[E("div",{class:C(k(n).e("header"))},[E("span",{class:C(k(n).e("title"))},[I(x.$slots,"title",{},()=>[L(V(e.title),1)])],2),e.showClose?(_(),T("button",{key:0,class:C(k(n).e("close")),onClick:a}," ✕ ",2)):z("",!0)],2),E("div",{class:C(k(n).e("body"))},[I(x.$slots,"default")],2),x.$slots.footer?(_(),T("div",{key:0,class:C(k(n).e("footer"))},[I(x.$slots,"footer",{ok:u,cancel:a})],2)):x.$slots.footer?z("",!0):(_(),T("div",{key:1,class:C(k(n).e("footer"))},[P(v,{onClick:a},{default:R(()=>[...d[1]||(d[1]=[L("取消",-1)])]),_:1}),P(v,{type:"primary",style:{"margin-left":"8px"},onClick:u},{default:R(()=>[...d[2]||(d[2]=[L("确定",-1)])]),_:1})],2))],6)],6)):z("",!0)]),_:3})])}}}),Ve=H({name:"XDrawer",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:!1},title:{default:""},placement:{default:void 0},direction:{default:"rtl"},width:{default:void 0},size:{default:"30%"},withHeader:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},destroyOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","close","open"],setup(e,{emit:l}){const t=e,r=l,n=ee("drawer"),f=$(2e3),g=()=>{r("update:modelValue",!1),r("close")},m=()=>{t.closeOnClickModal&&g()},c=i=>{i.key==="Escape"&&t.modelValue&&g()};K(()=>t.modelValue,i=>{i?(f.value=2e3+Math.floor(Math.random()*100),r("open"),document.addEventListener("keydown",c)):document.removeEventListener("keydown",c)});const a=S(()=>({zIndex:f.value})),u=S(()=>{const i=t.direction??t.placement??"rtl",p=t.size??t.width??"30%",b=typeof p=="number"?`${p}px`:p;return{ltr:{width:b,height:"100%"},rtl:{width:b,height:"100%"},ttb:{width:"100%",height:b},btt:{width:"100%",height:b}}[i]});return(i,p)=>(_(),X(Q,{to:"body"},[P(U,{name:"x-drawer-fade"},{default:R(()=>[le(E("div",{class:C(k(n).e("overlay")),style:M(a.value),onClick:m},[E("div",{class:C([k(n).b(),k(n).m(e.direction??e.placement??"rtl")]),style:M(u.value),onClick:p[0]||(p[0]=J(()=>{},["stop"]))},[e.withHeader?(_(),T("div",{key:0,class:C(k(n).e("header"))},[E("span",{class:C(k(n).e("title"))},[I(i.$slots,"title",{},()=>[L(V(e.title),1)])],2),e.showClose?(_(),T("button",{key:0,class:C(k(n).e("close")),onClick:g}," ✕ ",2)):z("",!0)],2)):z("",!0),E("div",{class:C(k(n).e("body"))},[I(i.$slots,"default")],2),i.$slots.footer?(_(),T("div",{key:1,class:C(k(n).e("footer"))},[I(i.$slots,"footer")],2)):z("",!0)],6)],6),[[ae,e.modelValue]])]),_:3})]))}}),de={class:"x-popconfirm-wrapper"},ue={class:"x-popconfirm__main"},pe={class:"x-popconfirm__title"},fe={class:"x-popconfirm__action"},Le=H({name:"XPopconfirm",__name:"index",props:{title:{default:""},confirmButtonText:{default:"确定"},cancelButtonText:{default:"取消"},confirmButtonType:{default:"primary"},cancelButtonType:{default:"default"},icon:{default:""},iconColor:{default:"#faad14"},hideIcon:{type:Boolean,default:!1},hideCancelButton:{type:Boolean,default:!1},hideConfirmButton:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},width:{default:200},placement:{default:"top"},offset:{default:12},showArrow:{type:Boolean,default:!0}},emits:["confirm","cancel"],setup(e,{emit:l}){const t=e,r=l,n=$(!1),f=$(null),g=$(null),m=$({}),c=()=>{if(!f.value||!g.value)return;const o=f.value.getBoundingClientRect(),s=g.value.getBoundingClientRect(),j=t.placement,B=t.offset;let y=0,w=0;switch(j){case"top":y=o.top-s.height-B,w=o.left+(o.width-s.width)/2;break;case"top-start":y=o.top-s.height-B,w=o.left;break;case"top-end":y=o.top-s.height-B,w=o.right-s.width;break;case"bottom":y=o.bottom+B,w=o.left+(o.width-s.width)/2;break;case"bottom-start":y=o.bottom+B,w=o.left;break;case"bottom-end":y=o.bottom+B,w=o.right-s.width;break;case"left":y=o.top+(o.height-s.height)/2,w=o.left-s.width-B;break;case"left-start":y=o.top,w=o.left-s.width-B;break;case"left-end":y=o.bottom-s.height,w=o.left-s.width-B;break;case"right":y=o.top+(o.height-s.height)/2,w=o.right+B;break;case"right-start":y=o.top,w=o.right+B;break;case"right-end":y=o.bottom-s.height,w=o.right+B;break;default:y=o.top-s.height-B,w=o.left+(o.width-s.width)/2}const F=window.innerWidth,Z=window.innerHeight;w<0&&(w=10),w+s.width>F&&(w=F-s.width-10),y<0&&(y=10),y+s.height>Z&&(y=Z-s.height-10),m.value={position:"fixed",top:`${y}px`,left:`${w}px`,zIndex:"2000"}},a=o=>{var s,j;n.value&&((s=f.value)!=null&&s.contains(o.target)||(j=g.value)!=null&&j.contains(o.target)||(n.value=!1))},u=o=>{t.disabled||(o.stopPropagation(),n.value=!n.value,n.value&&setTimeout(c,0))},i=()=>{n.value=!1,r("confirm")},p=()=>{n.value=!1,r("cancel")},b=()=>{n.value&&c()},x=()=>{n.value&&c()};K(n,o=>{o?(setTimeout(c,0),document.addEventListener("click",a),window.addEventListener("scroll",b,!0),window.addEventListener("resize",x)):(document.removeEventListener("click",a),window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",x))}),se(()=>{document.removeEventListener("click",a),window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",x)});const d=S(()=>({width:typeof t.width=="number"?`${t.width}px`:t.width})),v=S(()=>{const o=t.placement,s={};switch(o){case"top":case"top-start":case"top-end":s.bottom="-6px",s.transform="rotate(45deg)";break;case"bottom":case"bottom-start":case"bottom-end":s.top="-6px",s.transform="rotate(225deg)";break;case"left":case"left-start":case"left-end":s.right="-6px",s.transform="rotate(315deg)";break;case"right":case"right-start":case"right-end":s.left="-6px",s.transform="rotate(135deg)";break}return s});return(o,s)=>(_(),T("span",de,[E("span",{ref_key:"triggerRef",ref:f,class:"x-popconfirm-trigger",onClick:u},[I(o.$slots,"default")],512),(_(),X(Q,{to:"body"},[P(U,{name:"x-popconfirm-fade"},{default:R(()=>[n.value?(_(),T("div",{key:0,ref_key:"popperRef",ref:g,class:"x-popconfirm",style:M({...m.value,...d.value}),onClick:s[0]||(s[0]=J(()=>{},["stop"]))},[e.showArrow?(_(),T("span",{key:0,class:"x-popconfirm__arrow",style:M(v.value)},null,4)):z("",!0),E("div",ue,[e.hideIcon?z("",!0):(_(),T("span",{key:0,class:"x-popconfirm__icon",style:M({color:e.iconColor})},[I(o.$slots,"icon",{},()=>[L(V(e.icon||"⚠"),1)])],4)),E("div",pe,[I(o.$slots,"title",{},()=>[L(V(e.title),1)])])]),E("div",fe,[e.hideCancelButton?z("",!0):(_(),T("button",{key:0,class:"x-button p-button--default p-button--small",onClick:p},V(e.cancelButtonText),1)),e.hideConfirmButton?z("",!0):(_(),T("button",{key:1,class:C(["x-button x-button--small",`x-button--${e.confirmButtonType}`]),onClick:i},V(e.confirmButtonText),3))])],4)):z("",!0)]),_:3})]))]))}}),O=[];let me=1;const he=()=>{O.slice().forEach(e=>e.close())};function te(e){const l=me++,t=document.createElement("div");document.body.appendChild(t);const r={success:{bg:"#f0f9eb",border:"#67c23a",icon:"✓"},warning:{bg:"#fdf6ec",border:"#e6a23c",icon:"⚠"},error:{bg:"#fef0f0",border:"#f56c6c",icon:"✕"},info:{bg:"#f4f4f5",border:"#909399",icon:"ℹ"}},n=e.type||"info",f=r[n]||r.info,g=ie({visible:!1,offset:e.offset??20});let m=e.offset??20;O.forEach(d=>{const v=d.container.firstElementChild;v&&v.offsetHeight&&(m+=v.offsetHeight+16)}),g.offset=m;let c=null,a=!1;const u=()=>{a||(g.visible=!1,setTimeout(()=>{if(a)return;a=!0;const d=O.findIndex(v=>v.id===l);d!==-1&&O.splice(d,1);try{b.unmount()}catch{}t.parentNode&&t.parentNode.removeChild(t)},300))},i=()=>{const d=e.duration??3e3;d>0&&(c=setTimeout(u,d))},p=()=>{c&&(clearTimeout(c),c=null)},b=Y({render(){if(!g.visible)return null;const d=[h("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginRight:"10px",fontSize:"16px",color:f.border}},f.icon),h("span",{style:{flex:"1",fontSize:"14px",color:"#606266",lineHeight:"1.4"}},e.message||"")];return e.showClose&&d.push(h("button",{style:{position:"absolute",top:"50%",right:"12px",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",fontSize:"14px",color:"#909399",padding:"0"},onClick:v=>{v.stopPropagation(),u()}},"✕")),h("div",{class:["x-message",`x-message--${n}`,e.center?"is-center":"",e.showClose?"is-closable":""],style:{position:"fixed",left:"50%",top:`${g.offset}px`,transform:"translateX(-50%)",display:"flex",alignItems:"center",padding:e.showClose?"12px 40px 12px 16px":"12px 16px",borderRadius:"4px",boxShadow:"0 2px 12px rgba(0,0,0,0.1)",minWidth:"280px",maxWidth:"480px",backgroundColor:f.bg,border:`1px solid ${f.border}`,zIndex:2e3+l,transition:"opacity 0.3s, transform 0.3s"},onMouseenter:p,onMouseleave:i},d)}});b.mount(t),q(()=>{g.visible=!0,i()});const x={id:l,app:b,container:t,close:u};return O.push(x),{close:u}}function xe(e){return te(typeof e=="string"?{message:e}:e)}const W=e=>l=>te({...typeof l=="string"?{message:l}:l,type:e}),ge=Object.assign(xe,{info:W("info"),success:W("success"),warning:W("warning"),error:W("error"),closeAll:he}),Oe=ge,N=[],be=()=>{N.slice().forEach(e=>e.close())},ve={success:{icon:"✓",color:"#67c23a"},warning:{icon:"⚠",color:"#e6a23c"},error:{icon:"✕",color:"#f56c6c"},info:{icon:"ℹ",color:"#909399"}};function G(e){return new Promise(l=>{const t=document.createElement("div");document.body.appendChild(t);let r=!1;const n=H({name:"TMessageBox",setup(){const m=$(!1),c=$(e.inputValue??""),a=$(""),u=2e3+N.length+1,i=v=>{r||(r=!0,m.value=!1,setTimeout(()=>{const o=N.findIndex(s=>s.container===t);o!==-1&&N.splice(o,1);try{f.unmount()}catch{}t.parentNode&&t.parentNode.removeChild(t),l({action:v,value:v==="confirm"?c.value:void 0})},300))},p=()=>{if(e.showInput&&e.inputPattern&&!e.inputPattern.test(c.value)){a.value=e.inputErrorMessage||"输入格式不正确";return}a.value="",i("confirm")},b=()=>{i("cancel")},x=()=>{i("close")},d=()=>{e.closeOnClickModal!==!1&&x()};return q(()=>{m.value=!0}),{visible:m,inputValue:c,inputError:a,zIndex:u,handleConfirm:p,handleCancel:b,handleClose:x,handleMaskClick:d}},render(){if(!this.visible)return null;const m=e.type,c=m?ve[m]:null,a=[];c&&a.push(h("span",{class:"x-message-box__icon",style:{color:c.color,marginRight:"10px",fontSize:"20px"}},c.icon)),a.push(h("span",{class:"x-message-box__title"},e.title||"提示")),e.showClose!==!1&&a.push(h("button",{class:"x-message-box__close",onClick:this.handleClose},"✕"));const u=[];u.push(h("div",{class:"x-message-box__content"},e.message||"")),e.showInput&&u.push(h("div",{class:"x-message-box__input",style:{marginTop:"12px"}},[h("input",{class:["x-message-box__input-inner",this.inputError?"is-error":""].filter(Boolean),type:e.inputType||"text",placeholder:e.inputPlaceholder||"请输入",value:this.inputValue,onInput:p=>{this.inputValue=p.target.value,this.inputError=""},onKeyup:p=>{p.key==="Enter"&&this.handleConfirm()}}),this.inputError?h("div",{class:"x-message-box__error",style:{color:"#f56c6c",fontSize:"12px",marginTop:"4px"}},this.inputError):null]));const i=[];return e.showCancelButton&&i.push(h("button",{class:"x-button p-button--default",onClick:this.handleCancel},e.cancelButtonText||"取消")),e.showConfirmButton!==!1&&i.push(h("button",{class:"x-button p-button--primary",onClick:this.handleConfirm,style:{marginLeft:"10px"}},e.confirmButtonText||"确定")),h("div",{class:["x-message-box-wrapper",e.center?"is-center":""],style:{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:this.zIndex},onClick:this.handleMaskClick},[h("div",{class:["x-message-box",e.customClass],style:{backgroundColor:"#fff",borderRadius:"4px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",minWidth:"300px",maxWidth:"500px"},onClick:p=>p.stopPropagation()},[h("div",{class:"x-message-box__header",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #eee"}},a),h("div",{class:"x-message-box__body",style:{padding:"20px",fontSize:"14px",color:"#606266"}},u),h("div",{class:"x-message-box__footer",style:{padding:"10px 20px 16px",textAlign:"right"}},i)])])}}),f=Y(n);f.mount(t);const g={app:f,container:t,close:()=>{var m;const c=(m=f._instance)==null?void 0:m.proxy;c!=null&&c.handleClose&&c.handleClose()}};N.push(g)})}async function ye(e,l,t){return G({message:e,title:l,...t,showConfirmButton:!0,showCancelButton:!1})}async function we(e,l,t){return G({message:e,title:l,...t,showConfirmButton:!0,showCancelButton:!0})}async function Ce(e,l,t){return G({message:e,title:l,...t,showInput:!0,showConfirmButton:!0,showCancelButton:!0})}function ke(e){return G(e)}Object.assign(ke,{alert:ye,confirm:we,prompt:Ce,closeAll:be});const A=[];let _e=1;const Be=()=>{A.slice().forEach(e=>e.close())},Te={success:{icon:"✓",color:"#67c23a"},warning:{icon:"⚠",color:"#e6a23c"},error:{icon:"✕",color:"#f56c6c"},info:{icon:"ℹ",color:"#909399"}},Ee=(e,l)=>{const t=A.filter(n=>n.position===e);let r=16;for(const n of t)if(n.id<l){const f=n.container.firstElementChild;f&&(r+=f.offsetHeight+16)}return r},ze=(e,l)=>{const t={position:"fixed",width:"330px",zIndex:"2010"};switch(e){case"top-right":t.top=`${l}px`,t.right="16px";break;case"top-left":t.top=`${l}px`,t.left="16px";break;case"bottom-right":t.bottom=`${l}px`,t.right="16px";break;case"bottom-left":t.bottom=`${l}px`,t.left="16px";break;default:t.top=`${l}px`,t.right="16px"}return t};function oe(e){const l=_e++,t=e.position||"top-right",r=document.createElement("div");document.body.appendChild(r);let n=null,f=!1;const g=H({name:"TNotification",setup(){const a=$(!1),u=()=>{f||(f=!0,a.value=!1,setTimeout(()=>{var d;const v=A.findIndex(o=>o.id===l);v!==-1&&A.splice(v,1),n&&clearTimeout(n),(d=e.onClose)==null||d.call(e);try{m.unmount()}catch{}r.parentNode&&r.parentNode.removeChild(r)},300))},i=()=>{const d=e.duration??4500;d>0&&(n=setTimeout(u,d))},p=()=>{n&&(clearTimeout(n),n=null)},b=S(()=>(e.offset??0)+Ee(t,l)),x=S(()=>ze(t,b.value));return q(()=>{a.value=!0,i()}),{visible:a,close:u,positionStyles:x,startTimer:i,clearTimer:p}},render(){if(!this.visible)return null;const a=e.type,u=a?Te[a]:null,i=[];e.title&&i.push(h("div",{class:"x-notification__title",style:{fontWeight:"600",fontSize:"16px",color:"#303133",marginBottom:e.message?"6px":"0"}},e.title)),e.message&&(e.dangerouslyUseHTMLString?i.push(h("div",{class:"x-notification__content",style:{fontSize:"14px",color:"#606266",lineHeight:"1.5"},innerHTML:e.message})):i.push(h("div",{class:"x-notification__content",style:{fontSize:"14px",color:"#606266",lineHeight:"1.5"}},e.message)));const p=[];return u&&p.push(h("div",{class:"x-notification__icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",marginRight:"12px",fontSize:"18px",color:u.color}},u.icon)),p.push(h("div",{class:"x-notification__main",style:{flex:"1"}},i)),e.showClose!==!1&&p.push(h("button",{class:"x-notification__close",style:{position:"absolute",top:"18px",right:"15px",background:"none",border:"none",cursor:"pointer",fontSize:"14px",color:"#909399",padding:"0"},onClick:b=>{b.stopPropagation(),this.close()}},"✕")),h("div",{class:["x-notification",e.customClass],style:{...this.positionStyles,display:"flex",alignItems:"flex-start",padding:"14px 26px 14px 13px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",transition:"opacity 0.3s, transform 0.3s",boxSizing:"border-box"},onMouseenter:this.clearTimer,onMouseleave:this.startTimer},p)}}),m=Y(g);m.mount(r);const c={id:l,app:m,container:r,position:t,close:()=>{var a;const u=(a=m._instance)==null?void 0:a.proxy;u!=null&&u.close&&u.close()}};return A.push(c),{close:c.close}}function $e(e){return oe(typeof e=="string"?{message:e}:e)}const D=e=>l=>oe({...typeof l=="string"?{message:l}:l,type:e});Object.assign($e,{info:D("info"),success:D("success"),warning:D("warning"),error:D("error"),closeAll:Be});export{Oe as c,Le as i,Ve as n,Me as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.x-modal{position:relative;margin:0 auto 20px;background-color:var(--bg-color, #fff);border-radius:8px;box-shadow:0 2px 12px #00000026;max-height:43vh;display:flex;flex-direction:column}.x-modal__wrapper{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:2000;display:flex;justify-content:center}.x-modal__header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--color-border-lighter, #e8e8e8);flex-shrink:0}.x-modal__title{font-size:15px;font-weight:500;color:var(--color-text-primary, #303133)}.x-modal__close{background:none;border:none;font-size:16px;color:var(--color-text-secondary, #909399);cursor:pointer}.x-modal__close:hover{color:var(--color-primary, #409eff)}.x-modal__body{padding:16px;color:var(--color-text-regular, #606266);font-size:14px;overflow-y:auto;flex:1}.x-modal__footer{padding:10px 16px 14px;text-align:right;flex-shrink:0}.x-modal-fade-enter-active,.x-modal-fade-leave-active{transition:opacity .3s ease}.x-modal-fade-enter-from,.x-modal-fade-leave-to{opacity:0}.x-drawer__overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080}.x-drawer{position:fixed;top:0;right:0;background-color:var(--bg-color, #fff);box-shadow:0 8px 10px -5px #0003;transition:transform .3s}.x-drawer--ltr{top:0;right:auto;left:0}.x-drawer--rtl{top:0;right:0;left:auto}.x-drawer--ttb{top:0;left:0;right:auto}.x-drawer--btt{bottom:0;top:auto;left:0;right:auto}.x-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--color-border-lighter, #e8e8e8)}.x-drawer__title{font-size:18px;font-weight:500;color:var(--color-text-primary, #303133)}.x-drawer__close{background:none;border:none;font-size:20px;color:var(--color-text-secondary, #909399);cursor:pointer}.x-drawer__close:hover{color:var(--color-primary, #409eff)}.x-drawer__body{padding:20px;height:calc(100% - 60px);overflow-y:auto}.x-drawer__footer{padding:16px 20px;border-top:1px solid var(--color-border-lighter, #e8e8e8);text-align:right}.x-drawer-fade-enter-active,.x-drawer-fade-leave-active{transition:opacity .3s}.x-drawer-fade-enter-active .x-drawer,.x-drawer-fade-leave-active .x-drawer{transition:transform .3s}.x-drawer-fade-enter-from,.x-drawer-fade-leave-to{opacity:0}.x-drawer-fade-enter-from .x-drawer--ltr,.x-drawer-fade-leave-to .x-drawer--ltr{transform:translate(-100%)}.x-drawer-fade-enter-from .x-drawer--rtl,.x-drawer-fade-leave-to .x-drawer--rtl{transform:translate(100%)}.x-drawer-fade-enter-from .x-drawer--ttb,.x-drawer-fade-leave-to .x-drawer--ttb{transform:translateY(-100%)}.x-drawer-fade-enter-from .x-drawer--btt,.x-drawer-fade-leave-to .x-drawer--btt{transform:translateY(100%)}.drawer-form__overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:2000}.drawer-form{position:fixed;top:0;right:0;height:100%;background-color:var(--bg-color, #fff);box-shadow:0 8px 10px -5px #0003;display:flex;flex-direction:column}.drawer-form__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--color-border-lighter, #ebeef5)}.drawer-form__title{font-size:16px;font-weight:600;color:var(--color-text-primary, #303133)}.drawer-form__close{background:none;border:none;font-size:18px;color:var(--color-text-secondary, #909399);cursor:pointer}.drawer-form__close:hover{color:var(--color-primary, #409eff)}.drawer-form__body{flex:1;padding:20px;overflow-y:auto}.drawer-form__form{display:flex;flex-direction:column;gap:16px}.drawer-form__field{display:flex;flex-direction:column;gap:8px}.drawer-form__label{font-size:14px;color:var(--color-text-regular, #606266)}.drawer-form__label .required-mark{color:var(--color-danger, #f56c6c);margin-left:4px}.drawer-form__input,.drawer-form__textarea,.drawer-form__select{padding:8px 12px;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;font-size:14px;outline:none;transition:border-color .2s}.drawer-form__input:focus,.drawer-form__textarea:focus,.drawer-form__select:focus{border-color:var(--color-primary, #409eff)}.drawer-form__input:disabled,.drawer-form__textarea:disabled,.drawer-form__select:disabled{background:var(--color-fill-light, #f5f7fa);cursor:not-allowed}.drawer-form__input.has-error,.drawer-form__textarea.has-error,.drawer-form__select.has-error{border-color:var(--color-danger, #f56c6c)}.drawer-form__textarea{resize:vertical;min-height:80px}.drawer-form__select{cursor:pointer}.drawer-form__switch .switch-btn{padding:8px 16px;border:1px solid var(--color-border, #dcdfe6);border-radius:4px;background:var(--color-fill-light, #f5f7fa);color:var(--color-text-regular, #606266);cursor:pointer}.drawer-form__switch .switch-btn.is-on{background:var(--color-primary, #409eff);color:#fff;border-color:var(--color-primary, #409eff)}.drawer-form__switch .switch-btn:disabled{opacity:.5;cursor:not-allowed}.drawer-form__error{font-size:12px;color:var(--color-danger, #f56c6c)}.drawer-form__footer{display:flex;justify-content:flex-end;gap:12px;padding:16px 20px;border-top:1px solid var(--color-border-lighter, #ebeef5)}.drawer-form__cancel{padding:8px 16px;background:var(--bg-color, #fff);border:1px solid var(--color-border, #dcdfe6);border-radius:4px;color:var(--color-text-regular, #606266);font-size:14px;cursor:pointer}.drawer-form__cancel:hover{color:var(--color-primary, #409eff);border-color:var(--color-primary, #409eff)}.drawer-form__confirm{padding:8px 16px;background:var(--color-primary, #409eff);border:none;border-radius:4px;color:#fff;font-size:14px;cursor:pointer}.drawer-form__confirm:hover{background:var(--color-primary-light, #79bbff)}.drawer-form-fade-enter-active,.drawer-form-fade-leave-active{transition:opacity .3s}.drawer-form-fade-enter-active .drawer-form,.drawer-form-fade-leave-active .drawer-form{transition:transform .3s}.drawer-form-fade-enter-from,.drawer-form-fade-leave-to{opacity:0}.drawer-form-fade-enter-from .drawer-form,.drawer-form-fade-leave-to .drawer-form{transform:translate(100%)}.x-alert{position:relative;padding:12px 16px;margin-bottom:16px;border-radius:4px;display:flex;align-items:flex-start;transition:opacity .3s}.x-alert--success{background-color:#e1f3d8;color:#67c23a}.x-alert--success .x-alert__icon{color:#67c23a}.x-alert--warning{background-color:#fdf6ec;color:#e6a23c}.x-alert--warning .x-alert__icon{color:#e6a23c}.x-alert--error{background-color:#fef0f0;color:#f56c6c}.x-alert--error .x-alert__icon{color:#f56c6c}.x-alert--info{background-color:#f4f4f5;color:#909399}.x-alert--info .x-alert__icon{color:#909399}.x-alert.is-center{justify-content:center;text-align:center}.x-alert.is-with-description{padding:14px 16px}.x-alert.is-with-description .x-alert__title{font-weight:500;font-size:16px}.x-alert__icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:10px;font-size:16px}.x-alert__content{flex:1}.x-alert__title{display:block;font-size:14px;font-weight:500}.x-alert__description{display:block;font-size:14px;margin-top:6px;opacity:.8}.x-alert__close{position:absolute;top:12px;right:12px;background:none;border:none;cursor:pointer;font-size:14px;opacity:.6}.x-alert__close:hover{opacity:1}.x-alert-fade-enter-active,.x-alert-fade-leave-active{transition:opacity .2s ease}.x-alert-fade-enter-from,.x-alert-fade-leave-to{opacity:0}.x-tooltip{padding:8px 12px;font-size:13px;line-height:1.4;border-radius:4px;max-width:300px;word-wrap:break-word;position:fixed}.x-tooltip--dark{background-color:#303133;color:#fff;box-shadow:0 2px 8px #00000026}.x-tooltip--dark .x-tooltip__arrow--top{border-top-color:#303133}.x-tooltip--dark .x-tooltip__arrow--bottom{border-bottom-color:#303133}.x-tooltip--dark .x-tooltip__arrow--left{border-left-color:#303133}.x-tooltip--dark .x-tooltip__arrow--right{border-right-color:#303133}.x-tooltip--light{background-color:#fff;color:#303133;box-shadow:0 2px 12px #0000001f}.x-tooltip--light .x-tooltip__arrow--top{border-top-color:#fff}.x-tooltip--light .x-tooltip__arrow--bottom{border-bottom-color:#fff}.x-tooltip--light .x-tooltip__arrow--left{border-left-color:#fff}.x-tooltip--light .x-tooltip__arrow--right{border-right-color:#fff}.x-tooltip__wrapper,.x-tooltip__trigger{display:inline-block}.x-tooltip__arrow{position:absolute;width:0;height:0;border:6px solid transparent}.x-tooltip__arrow--top{bottom:-12px;left:50%;transform:translate(-50%);border-bottom:none}.x-tooltip__arrow--bottom{top:-12px;left:50%;transform:translate(-50%);border-top:none}.x-tooltip__arrow--left{right:-12px;top:50%;transform:translateY(-50%);border-right:none}.x-tooltip__arrow--right{left:-12px;top:50%;transform:translateY(-50%);border-left:none}.x-tooltip-fade-enter-active,.x-tooltip-fade-leave-active{transition:opacity .2s ease,transform .2s ease}.x-tooltip-fade-enter-from,.x-tooltip-fade-leave-to{opacity:0;transform:scale(.9)}.x-popconfirm-wrapper,.x-popconfirm-trigger{display:inline-block}.x-popconfirm{background:#fff;border-radius:4px;box-shadow:0 2px 12px #0000001a;padding:12px 16px;box-sizing:border-box}.x-popconfirm__arrow{position:absolute;width:12px;height:12px;background:#fff;box-shadow:-1px -1px 2px #0000000d}.x-popconfirm__main{display:flex;align-items:flex-start;margin-bottom:12px}.x-popconfirm__icon{display:flex;align-items:center;justify-content:center;font-size:16px;margin-right:8px;flex-shrink:0}.x-popconfirm__title{font-size:14px;color:#606266;line-height:1.4}.x-popconfirm__action{display:flex;justify-content:flex-end;gap:8px}.x-popconfirm-fade-enter-active,.x-popconfirm-fade-leave-active{transition:opacity .2s,transform .2s}.x-popconfirm-fade-enter-from,.x-popconfirm-fade-leave-to{opacity:0;transform:scale(.9)}.x-backtop{position:fixed;width:40px;height:40px;border-radius:4px;background-color:#fff;box-shadow:0 2px 8px #0000001f;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s;z-index:1000}.x-backtop:hover{background-color:#f5f5f5;box-shadow:0 4px 12px #00000026}.x-backtop:active{transform:scale(.95)}.x-backtop__icon{font-size:20px;color:#606266;font-weight:700}.x-fade-enter-active,.x-fade-leave-active{transition:opacity .3s,transform .3s}.x-fade-enter-from,.x-fade-leave-to{opacity:0;transform:translateY(20px)}.x-message{position:fixed;left:50%;top:20px;transform:translate(-50%);display:flex;align-items:center;padding:12px 16px;border-radius:4px;box-shadow:0 2px 12px #0000001a;transition:opacity .3s,transform .3s,top .3s;min-width:280px;max-width:480px}.x-message--success{background-color:#f0f9eb;border:1px solid #67c23a}.x-message--success .x-message__icon{color:#67c23a}.x-message--warning{background-color:#fdf6ec;border:1px solid #e6a23c}.x-message--warning .x-message__icon{color:#e6a23c}.x-message--error{background-color:#fef0f0;border:1px solid #f56c6c}.x-message--error .x-message__icon{color:#f56c6c}.x-message--info{background-color:#f4f4f5;border:1px solid #909399}.x-message--info .x-message__icon{color:#909399}.x-message.is-center{justify-content:center;text-align:center}.x-message.is-closable{padding-right:40px}.x-message__icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:10px;font-size:16px;flex-shrink:0}.x-message__content{flex:1;font-size:14px;color:#606266;line-height:1.4;word-break:break-word}.x-message__close{position:absolute;top:50%;right:12px;transform:translateY(-50%);background:none;border:none;cursor:pointer;font-size:14px;color:#909399;padding:0}.x-message__close:hover{color:#606266}.x-message-fade-enter-active,.x-message-fade-leave-active{transition:opacity .3s,transform .3s}.x-message-fade-enter-from,.x-message-fade-leave-to{opacity:0;transform:translate(-50%) translateY(-100%)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as X,p as ne,o as h,c as b,r as j,n as r,e as f,k as L,l as re,w as ue,q as de,s as ce,b as se,u as d,i as N,g as A,a as M,v as he,x as ve,y as be,F as G,z as J,A as te,f as ye,B as ge,C as xe,D as ke,T as Ve,E as we,G as Ce,h as Ke,H as Be}from"./vue-vendor-Br-l7wbK.js";import{G as U,f as Se}from"./xto-core-DZK7Cyg0.js";const $e=["type","placeholder","disabled","readonly","maxlength","minlength"],Oe=X({name:"XInput",__name:"index",props:{modelValue:{default:void 0},value:{default:void 0},type:{default:"text"},placeholder:{default:""},size:{default:"default"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxlength:{},minlength:{},showWordLimit:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},prefixIcon:{},suffixIcon:{}},emits:["update:modelValue","update:value","input","change","focus","blur","clear"],setup(s,{expose:w,emit:l}){const e=s,a=l,t=U("input"),v=L(),y=L(!1),g=L(!1),p=he(),D=f(()=>e.type==="password"&&e.showPassword&&!e.disabled),S=f(()=>D.value?g.value?"text":"password":e.type),x=f({get:()=>e.modelValue!==void 0?e.modelValue:e.value!==void 0?e.value:"",set:i=>{a("update:modelValue",i),a("update:value",i),a("input",i)}}),B=f(()=>String(x.value).length),C=f(()=>[t.b(),e.size!=="default"?t.m(e.size):"",t.is("disabled",e.disabled),t.is("focus",y.value),t.is("has-prefix",e.prefixIcon||p.prefix),t.is("has-suffix",e.suffixIcon||p.suffix||e.clearable||D.value||e.showWordLimit)]),T=i=>{const o=i.target.value;a("change",o)},k=i=>{y.value=!0,a("focus",i)},z=i=>{y.value=!1,a("blur",i)},$=()=>{a("update:modelValue",""),a("update:value",""),a("clear")},K=()=>{g.value=!g.value};return w({focus:()=>{var i;(i=v.value)==null||i.focus()},blur:()=>{var i;(i=v.value)==null||i.blur()},inputRef:v}),(i,o)=>(h(),b("div",{class:r(C.value)},[i.$slots.prefix||s.prefixIcon?(h(),b("span",{key:0,class:r(d(t).e("prefix"))},[j(i.$slots,"prefix",{},()=>[M("span",{class:r(d(t).e("icon"))},N(s.prefixIcon),3)])],2)):A("",!0),ve(M("input",{ref_key:"inputRef",ref:v,"onUpdate:modelValue":o[0]||(o[0]=F=>x.value=F),type:S.value,placeholder:s.placeholder,disabled:s.disabled,readonly:s.readonly,maxlength:s.maxlength,minlength:s.minlength,class:r(d(t).e("inner")),onChange:T,onFocus:k,onBlur:z},null,42,$e),[[be,x.value]]),i.$slots.suffix||s.suffixIcon||s.clearable||D.value||s.showWordLimit?(h(),b("span",{key:1,class:r(d(t).e("suffix"))},[j(i.$slots,"suffix",{},()=>[s.clearable&&x.value&&!s.disabled?(h(),b("span",{key:0,class:r([d(t).e("icon"),d(t).e("clear")]),onClick:$}," ✕ ",2)):A("",!0),D.value?(h(),b("span",{key:1,class:r([d(t).e("icon"),d(t).e("password")]),onClick:K},N(g.value?"🙈":"👁️"),3)):A("",!0),s.showWordLimit&&s.maxlength?(h(),b("span",{key:2,class:r(d(t).e("count"))},N(B.value)+"/"+N(s.maxlength),3)):A("",!0)])],2)):A("",!0)],2))}}),Fe=["disabled"],Le=["value","placeholder","disabled"],Te=["disabled"],Xe=X({name:"XInputNumber",__name:"index",props:{modelValue:{default:void 0},min:{default:-1/0},max:{default:1/0},step:{default:1},stepStrictly:{type:Boolean,default:!1},precision:{default:void 0},size:{default:"default"},disabled:{type:Boolean,default:!1},controls:{type:Boolean,default:!0},controlsPosition:{default:""},placeholder:{default:""},valueOnClear:{default:null}},emits:["update:modelValue","change","focus","blur"],setup(s,{expose:w,emit:l}){const e=s,a=l,t=U("input-number"),v=L(),y=L(!1),g=L(null),p=L(e.modelValue),D=f(()=>{if(e.precision!==void 0)return e.precision;const n=S(e.step),c=e.modelValue!==void 0?S(e.modelValue):0;return Math.max(n,c)});function S(n){const c=n.toString(),_=c.indexOf(".");return _===-1?0:c.length-_-1}function x(n,c=D.value){if(c===0)return Math.round(n);let _=n.toFixed(c);return Number(_)}function B(n){return n>e.max?e.max:n<e.min?e.min:n}const C=f(()=>e.modelValue),T=f(()=>g.value!==null?g.value:C.value===void 0?"":x(C.value)),k=f(()=>e.disabled?!0:C.value===void 0?e.min!==-1/0:C.value<=e.min),z=f(()=>e.disabled?!0:C.value===void 0?e.max!==1/0:C.value>=e.max),$=f(()=>[t.b(),e.size!=="default"?t.m(e.size):"",t.is("disabled",e.disabled),t.is("focus",y.value),e.controlsPosition?t.m(e.controlsPosition):""]);function K(){if(e.disabled||z.value)return;const n=C.value??(e.min===-1/0?0:e.min),c=x(n+e.step),_=B(c);o(_)}function i(){if(e.disabled||k.value)return;const n=C.value??(e.min===-1/0?0:e.min),c=x(n-e.step),_=B(c);o(_)}function o(n){const c=p.value;if(n===void 0)a("update:modelValue",void 0),a("change",void 0,c);else{const _=x(n),R=B(_);if(e.stepStrictly){const ee=Math.round((R-e.min)/e.step),I=x(e.min+ee*e.step);a("update:modelValue",I),a("change",I,c)}else a("update:modelValue",R),a("change",R,c)}p.value=e.modelValue,g.value=null}function F(n){if(n===""||n==="-")return;let c=n.replace(/[^\d.-]/g,"");const _=c.split(".");_.length>2&&(c=_[0]+"."+_.slice(1).join("")),c.indexOf("-")>0&&(c=c.replace(/-/g,"")),c.lastIndexOf("-")>0&&(c="-"+c.replace(/-/g,""));const R=Number(c);if(!isNaN(R))return R}function W(n){const c=n.target.value;g.value=c}function E(n){if(y.value=!1,g.value!==null){const c=F(g.value);c===void 0?e.valueOnClear!==null?o(e.valueOnClear):g.value=null:o(c)}a("blur",n)}function Q(n){y.value=!0,p.value=e.modelValue,a("focus",n)}function H(n){var c;if(!e.disabled)switch(n.key){case"ArrowUp":n.preventDefault(),K();break;case"ArrowDown":n.preventDefault(),i();break;case"Enter":(c=v.value)==null||c.blur();break}}function Y(){g.value=null,e.valueOnClear!==null&&e.valueOnClear!==void 0?o(e.valueOnClear):(a("update:modelValue",void 0),a("change",void 0,p.value),p.value=void 0)}function q(){var n;(n=v.value)==null||n.focus()}function Z(){var n;(n=v.value)==null||n.blur()}return ue(()=>e.modelValue,n=>{p.value=n,g.value=null},{immediate:!0}),w({focus:q,blur:Z,clear:Y,increase:K,decrease:i}),(n,c)=>(h(),b("div",{class:r($.value)},[s.controls?(h(),b("button",{key:0,type:"button",class:r([d(t).e("decrease"),d(t).is("disabled",k.value)]),disabled:k.value,onClick:i}," − ",10,Fe)):A("",!0),M("div",{class:r(d(t).e("wrapper"))},[M("input",{ref_key:"inputRef",ref:v,value:T.value,placeholder:s.placeholder,disabled:s.disabled,class:r(d(t).e("inner")),type:"text",autocomplete:"off",onInput:W,onFocus:Q,onBlur:E,onKeydown:H},null,42,Le)],2),s.controls?(h(),b("button",{key:1,type:"button",class:r([d(t).e("increase"),d(t).is("disabled",z.value)]),disabled:z.value,onClick:K}," + ",10,Te)):A("",!0)],2))}}),Ue=X({name:"XSwitch",__name:"index",props:{modelValue:{type:[Boolean,Number,String],default:!1},disabled:{type:Boolean,default:!1},width:{default:40},activeColor:{default:"#409eff"},inactiveColor:{default:"#dcdfe6"},activeValue:{type:[Boolean,Number,String],default:!0},inactiveValue:{type:[Boolean,Number,String],default:!1}},emits:["update:modelValue","change"],setup(s,{emit:w}){const l=s,e=w,a=U("switch"),t=f(()=>l.modelValue===l.activeValue),v=f(()=>[a.b(),a.is("disabled",l.disabled),a.is("checked",t.value)]),y=f(()=>({width:typeof l.width=="number"?`${l.width}px`:l.width,height:"20px",backgroundColor:t.value?l.activeColor:l.inactiveColor})),g=()=>{if(l.disabled)return;const p=t.value?l.inactiveValue:l.activeValue;e("update:modelValue",p),e("change",p)};return(p,D)=>(h(),b("span",{class:r(v.value),onClick:g},[M("span",{class:r(d(a).e("core")),style:se(y.value)},null,6),p.$slots.default?(h(),b("span",{key:0,class:r(d(a).e("text"))},[j(p.$slots,"default")],2)):A("",!0)],2))}}),De=["checked","disabled","name","value"],qe=X({name:"XCheckbox",__name:"index",props:{modelValue:{type:[Boolean,String,Number,Array]},value:{type:[String,Number,Boolean]},label:{},disabled:{type:Boolean},name:{},indeterminate:{type:Boolean}},emits:["update:modelValue","change"],setup(s,{emit:w}){const l=s,e=w,a=U("checkbox"),t=re("checkboxGroup",null),v=f(()=>!!t),y=f(()=>l.value??l.label),g=f(()=>v.value?t.modelValue.value.includes(y.value):Array.isArray(l.modelValue)?l.modelValue.includes(y.value):!!l.modelValue),p=f(()=>{if(l.disabled)return!0;if(v.value){const x=t.disabled,B=t.min>0&&t.modelValue.value.length<=t.min,C=t.max>0&&t.modelValue.value.length>=t.max;return g.value&&B||!g.value&&C?!0:x}return!1}),D=f(()=>[a.b(),a.is("checked",g.value),a.is("disabled",p.value),a.is("indeterminate",l.indeterminate&&!g.value)]),S=()=>{if(!p.value)if(v.value)t.changeValue(y.value);else{let x;if(Array.isArray(l.modelValue)){const B=l.modelValue.indexOf(y.value);B>-1?x=[...l.modelValue.slice(0,B),...l.modelValue.slice(B+1)]:x=[...l.modelValue,y.value]}else x=!l.modelValue;e("update:modelValue",x),e("change",x)}};return(x,B)=>(h(),b("label",{class:r(D.value),onClick:te(S,["prevent"])},[M("span",{class:r(d(a).e("input"))},[M("input",{type:"checkbox",checked:g.value,disabled:p.value,name:s.name,value:y.value},null,8,De)],2),x.$slots.default||s.label!==void 0?(h(),b("span",{key:0,class:r(d(a).e("label"))},[j(x.$slots,"default",{},()=>[Ke(N(s.label),1)])],2)):A("",!0)],2))}}),je=X({name:"XForm",__name:"index",props:{model:{default:()=>({})},rules:{default:()=>({})},labelWidth:{default:"100px"},labelPosition:{default:"right"},layout:{default:"horizontal"},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"default"}},emits:["validate","submit","reset"],setup(s,{expose:w,emit:l}){const e=s,a=l,t=U("form"),v=L([]),y=f(()=>e.layout==="inline"||e.inline),g=f(()=>e.layout==="vertical"||e.labelPosition==="top"),p=f(()=>[t.b(),t.m(`label-${g.value?"top":e.labelPosition}`),t.is("inline",y.value),t.is("vertical",g.value)]),D=f(()=>({width:typeof e.labelWidth=="number"?`${e.labelWidth}px`:e.labelWidth})),S=i=>{v.value.push(i)},x=i=>{const o=v.value.indexOf(i);o>-1&&v.value.splice(o,1)},B=async()=>{let i=!0;for(const o of v.value)await o.validate()||(i=!1);return i},C=async i=>{const o=Array.isArray(i)?i:[i];let F=!0;for(const W of v.value)o.includes(W.prop)&&(await W.validate()||(F=!1));return F},T=()=>{v.value.forEach(i=>{i.resetField()})},k=i=>{if(i){const o=Array.isArray(i)?i:[i];v.value.forEach(F=>{o.includes(F.prop)&&F.clearValidate()})}else v.value.forEach(o=>{o.clearValidate()})},z=i=>{console.log("[XForm] handleSubmit triggered",i),i.preventDefault(),a("submit")},$=i=>{console.log("[XForm] handleReset triggered",i),i.preventDefault(),T(),a("reset")},K=Be(e,"model");return ne("form",{model:K,rules:e.rules,labelWidth:e.labelWidth,labelPosition:g.value?"top":e.labelPosition,disabled:e.disabled,size:e.size,labelStyle:D,addField:S,removeField:x,emit:a}),w({validate:B,validateField:C,resetFields:T,clearValidate:k}),(i,o)=>(h(),b("form",{class:r(p.value),onSubmit:z,onReset:$},[j(i.$slots,"default")],34))}}),Ie=X({name:"XFormItem",__name:"item",props:{prop:{},label:{},labelWidth:{},required:{type:Boolean},rules:{},showMessage:{type:Boolean}},setup(s,{expose:w}){const l=s,e=U("form-item"),a=re("form",null),t=L(""),v=L(""),y=f(()=>l.required?!0:g().some(k=>k.required)),g=()=>{const k=[];return l.rules&&k.push(...l.rules),a&&l.prop&&a.rules[l.prop]&&k.push(...a.rules[l.prop]),k},p=()=>{var k;if(!(!a||!l.prop))return(k=a.model.value)==null?void 0:k[l.prop]},D=k=>{!a||!l.prop||a.model.value&&(a.model.value[l.prop]=k)},S=async k=>{const z=g();if(z.length===0)return t.value="valid",!0;const $=p();let K=!0,i="";for(const o of z)if(!(k&&o.trigger&&o.trigger!==k)){if(o.required&&($==null||$===""||Array.isArray($)&&$.length===0)){K=!1,i=o.message||"该字段为必填项";break}if(o.min!==void 0||o.max!==void 0){const F=typeof $=="string"?$.length:0;if(o.min!==void 0&&F<o.min){K=!1,i=o.message||`长度不能小于 ${o.min} 个字符`;break}if(o.max!==void 0&&F>o.max){K=!1,i=o.message||`长度不能大于 ${o.max} 个字符`;break}}if(o.pattern&&$&&!o.pattern.test($)){K=!1,i=o.message||"格式不正确";break}if(o.validator)try{await new Promise((F,W)=>{o.validator(o,$,E=>{E?W(E):F()})})}catch(F){K=!1,i=F.message||o.message||"验证失败";break}}return t.value=K?"valid":"invalid",v.value=i,a&&l.prop&&a.emit("validate",l.prop,K,i),K},x=()=>{D(void 0),B()},B=()=>{t.value="",v.value=""},C=f(()=>[e.b(),e.is("required",y.value),e.is("error",t.value==="invalid"),e.is("success",t.value==="valid")]),T=f(()=>{const k=l.labelWidth??(a==null?void 0:a.labelWidth)??"100px";return{width:typeof k=="number"?`${k}px`:k}});return ue(()=>p(),()=>{t.value==="invalid"&&S("change")}),de(()=>{a&&l.prop&&a.addField({prop:l.prop,validate:S,resetField:x,clearValidate:B})}),ce(()=>{a&&l.prop&&a.removeField({prop:l.prop,validate:S,resetField:x,clearValidate:B})}),w({validate:S,resetField:x,clearValidate:B}),(k,z)=>(h(),b("div",{class:r(C.value)},[s.label?(h(),b("label",{key:0,class:r(d(e).e("label")),style:se(T.value)},N(s.label),7)):A("",!0),M("div",{class:r(d(e).e("content"))},[j(k.$slots,"default"),s.showMessage!==!1&&t.value==="invalid"?(h(),b("div",{key:0,class:r(d(e).e("error"))},N(v.value),3)):A("",!0)],2)],2))}});function _e(s,w,l){return l?l(w,s):s.toLowerCase().includes(w.toLowerCase())}function pe(s,w,l="value",e="children"){for(const a of s){if(a[l]===w)return a;if(a[e]&&a[e].length>0){const t=pe(a[e],w,l,e);if(t)return t}}return null}function ae(s,w,l="value",e="children"){const a=[];function t(v){for(const y of v){if(y[l]===w)return a.push(y),!0;if(y[e]&&y[e].length>0){if(a.push(y),t(y[e]))return!0;a.pop()}}return!1}return t(s),a}function Me(s,w="children"){const l=[];function e(a,t=0,v=null){for(const y of a)l.push({...y,level:t,parent:v}),y[w]&&y[w].length>0&&e(y[w],t+1,y)}return e(s),l}const Ae=["onClick"],ze=["placeholder","disabled","readonly","value"],Ne=["onClick"],Pe=["onClick"],Ge=X({name:"XSelect",__name:"index",props:{modelValue:{default:void 0},value:{default:void 0},options:{default:()=>[]},type:{default:"single"},placeholder:{default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},filterMethod:{},size:{default:"default"},multipleLimit:{default:0},collapseTags:{type:Boolean,default:!0},maxCollapseTags:{default:1},separator:{default:" / "},valueKey:{default:"value"},labelKey:{default:"label"},childrenKey:{default:"children"},noDataText:{default:"暂无数据"},noMatchText:{default:"无匹配数据"}},emits:["update:modelValue","update:value","change","clear","focus","blur","visible-change","remove-tag"],setup(s,{emit:w}){const l=s,e=w,a=U("select"),t=()=>Se().next(),v=L(),y=L(),g=L(),p=L(!1),D=L(2e3),S=L(""),x=L(-1),B=L({top:"0px",left:"0px"}),C=f(()=>l.type==="multiple"),T=f(()=>l.type==="cascader"),k=L([]),z=()=>l.modelValue!==void 0?l.modelValue:l.value!==void 0?l.value:"",$=u=>{e("update:modelValue",u),e("update:value",u),e("change",u)},K=f(()=>{const u=z();return C.value?Array.isArray(u)?u:[]:T.value?Array.isArray(u)?u:u?[u]:[]:u!==""&&u!==null&&u!==void 0?[u]:[]}),i=f(()=>T.value?Me(l.options,l.childrenKey):l.options.map(u=>({...u,level:0}))),o=f(()=>!l.filterable||!S.value?i.value:i.value.filter(u=>{const m=u[l.labelKey]||"";return _e(m,S.value,l.filterMethod)})),F=f(()=>{const u=[];for(const m of K.value){const V=pe(l.options,m,l.valueKey,l.childrenKey);V&&u.push(V)}return u}),W=f(()=>{if(C.value)return"";if(T.value)return ae(l.options,K.value[K.value.length-1],l.valueKey,l.childrenKey).map(m=>m[l.labelKey]).join(l.separator);const u=F.value[0];return u?u[l.labelKey]:""}),E=f(()=>C.value?F.value:[]),Q=f(()=>l.collapseTags?E.value.slice(0,l.maxCollapseTags):E.value),H=f(()=>l.collapseTags?Math.max(0,E.value.length-l.maxCollapseTags):0),Y=f(()=>[a.b(),a.m(l.size),a.is("disabled",l.disabled),a.is("multiple",C.value),a.is("cascader",T.value),a.is("filterable",l.filterable),a.is("focus",p.value)]),q=()=>{if(!v.value||!g.value||!p.value)return;const u=v.value.getBoundingClientRect(),m=g.value.getBoundingClientRect();let V=u.bottom+4,P=u.left;P+m.width>window.innerWidth&&(P=window.innerWidth-m.width-8),V+m.height>window.innerHeight&&(V=u.top-m.height-4),B.value={top:`${V}px`,left:`${P}px`}},Z=()=>{l.disabled||(p.value=!0,D.value=t(),S.value="",Ce(()=>{q()}),e("visible-change",!0),e("focus",{}))},n=()=>{p.value=!1,S.value="",k.value=[],e("visible-change",!1),e("blur",{})},c=u=>{if(!u.disabled)if(C.value){const m=[...K.value],V=u[l.valueKey],P=m.indexOf(V);if(P>-1)m.splice(P,1),e("remove-tag",V);else{if(l.multipleLimit>0&&m.length>=l.multipleLimit)return;m.push(V)}$(m)}else if(T.value)if(u.children&&u.children.length>0){const m=ae(l.options,u[l.valueKey],l.valueKey,l.childrenKey);k.value=m}else{const m=ae(l.options,u[l.valueKey],l.valueKey,l.childrenKey).map(V=>V[l.valueKey]);$(m),n()}else $(u[l.valueKey]),n()},_=u=>{const m=K.value.filter(V=>V!==u[l.valueKey]);$(m),e("remove-tag",u[l.valueKey])},R=()=>{const u=C.value?[]:"";$(u),e("clear")},ee=u=>{S.value=u.target.value},I=u=>{if(!v.value)return;const m=u.target;v.value.contains(m)||g.value&&g.value.contains(m)||n()},ie=u=>{if(u.key==="Escape")n();else if(u.key==="Enter"&&p.value){const m=o.value[x.value];m&&c(m)}else u.key==="ArrowDown"&&p.value?(u.preventDefault(),x.value=Math.min(x.value+1,o.value.length-1)):u.key==="ArrowUp"&&p.value&&(u.preventDefault(),x.value=Math.max(x.value-1,0))},le=u=>K.value.includes(u[l.valueKey]),oe=(u,m)=>[a.e("option"),a.is("selected",le(u)),a.is("disabled",u.disabled===!0),a.is("hover",x.value===m),a.is("group",!!(u.children&&u.children.length>0))],fe=f(()=>{if(!T.value)return[];const u=[l.options];for(const m of k.value)m.children&&m.children.length>0&&u.push(m.children);return u});return de(()=>{document.addEventListener("click",I),document.addEventListener("keydown",ie)}),ce(()=>{document.removeEventListener("click",I),document.removeEventListener("keydown",ie),document.removeEventListener("scroll",q,!0)}),ue(p,u=>{u?document.addEventListener("scroll",q,!0):document.removeEventListener("scroll",q,!0)}),ne("select",{selectedValues:K,handleSelect:c,isSelected:le}),(u,m)=>(h(),b("div",{ref_key:"selectRef",ref:v,class:r(Y.value)},[M("div",{class:r(d(a).e("wrapper")),onClick:m[0]||(m[0]=V=>p.value?n():Z())},[C.value&&E.value.length>0?(h(),b("div",{key:0,class:r(d(a).e("tags"))},[(h(!0),b(G,null,J(Q.value,V=>(h(),b("span",{key:V[s.valueKey],class:r(d(a).e("tag"))},[M("span",{class:r(d(a).e("tag-text"))},N(V[s.labelKey]),3),M("span",{class:r(d(a).e("tag-close")),onClick:te(P=>_(V),["stop"])},"×",10,Ae)],2))),128)),H.value>0?(h(),b("span",{key:0,class:r(d(a).e("tag-count"))}," +"+N(H.value),3)):A("",!0)],2)):A("",!0),M("input",{ref_key:"inputRef",ref:y,class:r(d(a).e("input")),placeholder:C.value&&E.value.length>0?"":s.placeholder,disabled:s.disabled,readonly:!s.filterable||!p.value,value:s.filterable&&p.value?S.value:W.value,onInput:ee},null,42,ze),M("span",{class:r(d(a).e("suffix"))},[s.clearable&&K.value.length>0&&!s.disabled?(h(),b("span",{key:0,class:r(d(a).e("clear")),onClick:te(R,["stop"])},"×",2)):(h(),b("span",{key:1,class:r([d(a).e("arrow"),d(a).is("reverse",p.value)])},"▼",2))],2)],2),(h(),ye(we,{to:"body"},[ge(Ve,{name:"fade"},{default:xe(()=>[ve(M("div",{ref_key:"popperRef",ref:g,class:r([d(a).e("popper"),d(a).is("cascader",T.value)]),style:se({zIndex:D.value,...B.value})},[T.value?(h(),b("div",{key:0,class:r(d(a).e("cascader-panels"))},[(h(!0),b(G,null,J(fe.value,(V,P)=>(h(),b("div",{key:P,class:r(d(a).e("cascader-panel"))},[(h(!0),b(G,null,J(V,(O,me)=>(h(),b("div",{key:O[s.valueKey],class:r(oe(O,me)),onClick:Ee=>c(O)},[M("span",{class:r(d(a).e("option-label"))},N(O[s.labelKey]),3),O.children&&O.children.length>0?(h(),b("span",{key:0,class:r(d(a).e("option-arrow"))},"›",2)):A("",!0)],10,Ne))),128))],2))),128))],2)):(h(),b(G,{key:1},[o.value.length===0?(h(),b("div",{key:0,class:r(d(a).e("empty"))},N(S.value?s.noMatchText:s.noDataText),3)):(h(),b("div",{key:1,class:r(d(a).e("options"))},[(h(!0),b(G,null,J(o.value,(V,P)=>(h(),b("div",{key:V[s.valueKey],class:r(oe(V,P)),onClick:O=>c(V)},[M("span",{class:r(d(a).e("option-label"))},N(V[s.labelKey]),3),le(V)?(h(),b("span",{key:0,class:r(d(a).e("option-check"))},"✓",2)):A("",!0)],10,Pe))),128))],2))],64))],6),[[ke,p.value]])]),_:1})]))],2))}});export{je as B,Ue as D,Ie as F,Ge as P,qe as T,Xe as V,Oe as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.x-tabs__header{position:relative}.x-tabs__nav{display:flex;border-bottom:2px solid #e4e7ed}.x-tabs__item{padding:0 20px;height:40px;line-height:40px;font-size:14px;color:#606266;cursor:pointer;transition:color .2s;position:relative}.x-tabs__item:hover{color:#409eff}.x-tabs__item--active{color:#409eff;font-weight:500}.x-tabs__item--active:after{content:"";position:absolute;bottom:-2px;left:0;right:0;height:2px;background-color:#409eff}.x-tabs__item.is-disabled{color:#c0c4cc;cursor:not-allowed}.x-tabs__item.is-disabled:hover{color:#c0c4cc}.x-tabs__content{padding:20px 0}.x-tabs--card .x-tabs__nav{border-bottom:none}.x-tabs--card .x-tabs__item{border:1px solid #e4e7ed;border-bottom:none;margin-right:-1px;padding:0 16px}.x-tabs--card .x-tabs__item--active{background-color:#fff;border-bottom:1px solid #fff}.x-tab-pane{padding:20px;outline:none}.x-menu{list-style:none;margin:0;padding:0;position:relative;font-size:14px;box-sizing:border-box}.x-menu--vertical{display:block;width:220px;min-height:100%;border-right:1px solid var(--color-border-lighter, #e6e6e6);transition:width .3s ease,background-color .3s ease}.x-menu--vertical>.x-menu-item,.x-menu--vertical>.x-sub-menu{display:block;width:100%}.x-menu--horizontal{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;width:100%;border-bottom:1px solid var(--color-border-lighter, #e6e6e6)}.x-menu--horizontal>.x-menu-item,.x-menu--horizontal>.x-sub-menu{flex:0 0 auto}.x-menu.is-collapse{width:64px!important;min-width:64px}.x-menu.is-collapse>.x-menu-item{height:56px;line-height:56px;padding:0 20px;text-align:center}.x-menu.is-collapse>.x-menu-item .x-menu-item__content{justify-content:center}.x-menu.is-collapse>.x-menu-item .x-menu-item__text{display:none}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__title{height:56px;line-height:56px;padding:0 20px;text-align:center;justify-content:center}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__title .x-sub-menu__content{justify-content:center}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__title .x-sub-menu__text,.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__title .x-sub-menu__arrow{display:none}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__menu{position:absolute;left:64px;top:0;min-width:180px;background-color:var(--bg-color, #fff);box-shadow:var(--box-shadow, 0 2px 12px rgba(0, 0, 0, .12));border-radius:4px;z-index:100;border:1px solid var(--color-border-light, #e4e7ed)}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__menu .x-menu-item{height:50px;line-height:50px;padding:0 20px;text-align:left}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__menu .x-menu-item .x-menu-item__content{justify-content:flex-start}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__menu .x-menu-item .x-menu-item__text{display:inline}.x-menu.is-collapse>.x-sub-menu>.x-sub-menu__menu .x-sub-menu__title .x-sub-menu__text{display:inline}.x-menu.is-dark{background-color:#1f2d3d;border-color:#1f2d3d;color:#bfcbd9}.x-menu.is-dark .x-menu-item,.x-menu.is-dark .x-sub-menu__title{color:#bfcbd9}.x-menu.is-dark .x-menu-item:hover,.x-menu.is-dark .x-sub-menu__title:hover{background-color:#263445}.x-menu.is-dark .x-menu-item.is-active{color:#409eff;background-color:#263445}.x-menu.is-dark .x-sub-menu__menu{background-color:#1f2d3d;border-color:#1f2d3d}.x-menu-item{list-style:none;margin:0;padding:0 20px;cursor:pointer;transition:all .3s ease;height:56px;line-height:56px;color:var(--color-text-primary, #303133);position:relative;white-space:nowrap;box-sizing:border-box}.x-menu-item__content{display:flex;align-items:center;height:100%}.x-menu-item__icon{margin-right:8px;font-size:18px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.x-menu-item__icon svg,.x-menu-item__icon i{font-size:18px}.x-menu-item__text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:opacity .3s ease}.x-menu-item:hover{background-color:var(--color-primary-light-9, #f0f7ff)}.x-menu-item.is-active{color:var(--color-primary, #409eff);background-color:var(--color-primary-light-9, #ecf5ff)}.x-menu-item.is-active:not(.is-horizontal):before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background-color:var(--color-primary, #409eff);border-radius:0 2px 2px 0}.x-menu-item.is-collapse{padding:0;text-align:center}.x-menu-item.is-collapse .x-menu-item__content{justify-content:center;padding:0}.x-menu-item.is-collapse .x-menu-item__icon{margin-right:0;font-size:20px}.x-menu-item.is-collapse .x-menu-item__icon svg,.x-menu-item.is-collapse .x-menu-item__icon i{font-size:20px}.x-menu-item.is-collapse .x-menu-item__text{opacity:0;width:0;overflow:hidden}.x-menu-item.is-horizontal{display:inline-block;height:56px;line-height:56px}.x-menu-item.is-horizontal:hover{background-color:transparent}.x-menu-item.is-horizontal.is-active{background-color:transparent;border-bottom:2px solid var(--color-primary, #409eff)}.x-menu-item.is-horizontal.is-active:before{display:none}.x-menu-item.is-disabled{color:var(--color-text-disabled, #c0c4cc);cursor:not-allowed}.x-menu-item.is-disabled:hover{background-color:transparent}.x-menu-item-group{list-style:none}.x-menu-item-group__title{padding:20px 20px 10px;font-size:13px;color:#909399;line-height:1}.x-menu-item-group>ul{padding:0}.x-sub-menu{list-style:none;margin:0;padding:0;position:relative}.x-sub-menu__title{display:flex;align-items:center;cursor:pointer;transition:all .3s ease;color:var(--color-text-primary, #303133);height:100%}.x-sub-menu__content{display:flex;align-items:center;width:100%;height:100%}.x-sub-menu__icon{margin-right:8px;font-size:18px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.x-sub-menu__icon svg,.x-sub-menu__icon i{font-size:18px}.x-sub-menu__text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:opacity .3s ease}.x-sub-menu__arrow{font-size:12px;transition:transform .3s ease;color:var(--color-text-secondary, #909399);margin-left:4px;display:flex;align-items:center}.x-sub-menu__arrow svg{transition:transform .3s ease}.x-sub-menu__arrow.is-open svg{transform:rotate(180deg)}.x-sub-menu__menu{list-style:none;margin:0;padding:0;background-color:var(--bg-color, #fff)}.x-sub-menu__menu.is-collapse{border:1px solid var(--color-border-light, #e4e7ed);border-radius:4px}.x-sub-menu--vertical{display:block;width:100%}.x-sub-menu--vertical .x-sub-menu__title{height:56px;line-height:56px;padding:0 20px}.x-sub-menu--vertical .x-sub-menu__title:hover{background-color:var(--color-primary-light-9, #f0f7ff)}.x-sub-menu--vertical .x-sub-menu__menu{min-width:200px;border-right:none}.x-sub-menu--vertical .x-sub-menu__menu .x-menu-item,.x-sub-menu--vertical .x-sub-menu__menu .x-sub-menu__title{padding-left:40px}.x-sub-menu--vertical.is-nested .x-sub-menu__menu{position:absolute;left:100%;top:0;box-shadow:var(--box-shadow, 0 2px 12px rgba(0, 0, 0, .12));border-radius:4px;border:1px solid var(--color-border-light, #e4e7ed)}.x-sub-menu--horizontal{display:inline-block;height:56px}.x-sub-menu--horizontal .x-sub-menu__title{height:56px;line-height:56px;padding:0 20px}.x-sub-menu--horizontal .x-sub-menu__title:hover{background-color:transparent}.x-sub-menu--horizontal .x-sub-menu__menu{position:absolute;top:100%;left:0;min-width:180px;box-shadow:var(--box-shadow, 0 2px 12px rgba(0, 0, 0, .12));border-radius:4px;z-index:100;border:1px solid var(--color-border-light, #e4e7ed)}.x-sub-menu--horizontal .x-sub-menu__menu .x-menu-item{display:block;height:50px;line-height:50px;padding-left:20px}.x-sub-menu--horizontal .x-sub-menu__menu .x-menu-item.is-active:before{display:none}.x-sub-menu.is-collapse>.x-sub-menu__title{height:56px;line-height:56px;padding:0 20px;text-align:center}.x-sub-menu.is-collapse>.x-sub-menu__title .x-sub-menu__content{justify-content:center}.x-sub-menu.is-collapse>.x-sub-menu__title .x-sub-menu__text,.x-sub-menu.is-collapse>.x-sub-menu__title .x-sub-menu__arrow{display:none}.x-sub-menu.is-collapse>.x-sub-menu__title .x-sub-menu__icon{margin-right:0;font-size:20px}.x-sub-menu.is-collapse>.x-sub-menu__title .x-sub-menu__icon svg,.x-sub-menu.is-collapse>.x-sub-menu__title .x-sub-menu__icon i{font-size:20px}.x-sub-menu.is-collapse>.x-sub-menu__menu{position:absolute;left:64px;top:0;min-width:180px;box-shadow:var(--box-shadow, 0 2px 12px rgba(0, 0, 0, .12));border-radius:4px;z-index:100;border:1px solid var(--color-border-light, #e4e7ed);background-color:var(--bg-color, #fff)}.x-sub-menu.is-collapse>.x-sub-menu__menu .x-menu-item{height:50px;line-height:50px;padding:0 20px;text-align:left}.x-sub-menu.is-collapse>.x-sub-menu__menu .x-menu-item .x-menu-item__content{justify-content:flex-start}.x-sub-menu.is-collapse>.x-sub-menu__menu .x-menu-item .x-menu-item__text{display:inline;opacity:1;width:auto}.x-sub-menu.is-collapse>.x-sub-menu__menu .x-sub-menu__title{padding:0 20px}.x-sub-menu.is-collapse>.x-sub-menu__menu .x-sub-menu__title .x-sub-menu__text{display:inline;opacity:1}.x-sub-menu.is-collapse>.x-sub-menu__menu .x-sub-menu__title .x-sub-menu__arrow{display:flex}.x-sub-menu.is-active>.x-sub-menu__title{color:var(--color-primary, #409eff)}.x-sub-menu.is-disabled .x-sub-menu__title{color:var(--color-text-disabled, #c0c4cc);cursor:not-allowed}.zoom-in-top-enter-active,.zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transform-origin:center top}.zoom-in-top-enter-from,.zoom-in-top-leave-to{opacity:0;transform:scaleY(0)}.zoom-in-left-enter-active,.zoom-in-left-leave-active{opacity:1;transition:opacity .2s ease,transform .2s ease;transform:translate(0)}.zoom-in-left-enter-from,.zoom-in-left-leave-to{opacity:0;transform:translate(-10px)}.x-breadcrumb{font-size:14px;line-height:1}.x-breadcrumb__list{display:flex;flex-wrap:wrap;align-items:center;margin:0;padding:0;list-style:none}.x-breadcrumb__item{display:inline-flex;align-items:center;color:#606266}.x-breadcrumb__item:last-child .x-breadcrumb__separator{display:none}.x-breadcrumb__item:last-child .x-breadcrumb__text{font-weight:500;color:#303133}.x-breadcrumb__link,.x-breadcrumb__text{display:inline-flex;align-items:center}.x-breadcrumb__link{cursor:pointer;transition:color .2s}.x-breadcrumb__link:hover{color:#409eff}.x-breadcrumb__text{color:inherit}.x-breadcrumb__separator{margin:0 8px;color:#c0c4cc;font-size:12px;-webkit-user-select:none;user-select:none}.x-breadcrumb__separator-icon{font-size:14px}.x-breadcrumb__item.is-disabled .x-breadcrumb__link,.x-breadcrumb__item.is-disabled .x-breadcrumb__text{color:#c0c4cc;cursor:not-allowed}.x-steps{display:flex;width:100%;font-size:14px}.x-steps--horizontal{flex-direction:row;align-items:flex-start}.x-steps--horizontal.is-center{align-items:center}.x-steps--vertical{flex-direction:column;min-height:300px}.x-steps.is-simple{display:flex;align-items:center;padding:12px 16px;background:#fafafa;border-radius:4px}.x-step{position:relative;flex:1;cursor:pointer}.x-step--horizontal{display:flex;flex-direction:column;align-items:center}.x-step--horizontal .x-step__head{display:flex;align-items:center;justify-content:center;width:100%;position:relative}.x-step--horizontal .x-step__icon{position:relative;z-index:1}.x-step--horizontal .x-step__line{flex:1;height:2px;background-color:#e4e7ed;transition:background-color .3s;min-width:20px}.x-step--horizontal .x-step__content{margin-top:10px;text-align:center;padding:0 4px}.x-step--vertical{display:flex;flex-direction:row}.x-step--vertical .x-step__head{display:flex;flex-direction:column;align-items:center;position:relative}.x-step--vertical .x-step__line{width:2px;height:32px;background-color:#e4e7ed;transition:background-color .3s}.x-step--vertical .x-step__content{margin-left:12px;flex:1;padding-bottom:24px}.x-step__head{display:flex;align-items:center}.x-step__icon{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:#fff;border:2px solid #c0c4cc;color:#c0c4cc;flex-shrink:0;transition:all .3s;box-sizing:border-box}.x-step__icon-inner{font-size:13px;font-weight:600;color:inherit}.x-step__content{width:100%}.x-step__title{font-size:14px;font-weight:500;color:#303133;line-height:1.5}.x-step__description{font-size:12px;color:#909399;margin-top:4px;line-height:1.5}.x-step.is-wait .x-step__icon{border-color:#c0c4cc;color:#c0c4cc}.x-step.is-wait .x-step__title{color:#c0c4cc}.x-step.is-process .x-step__icon{border-color:#409eff;background-color:#409eff;color:#fff}.x-step.is-process .x-step__title{color:#303133;font-weight:600}.x-step.is-finish .x-step__icon{border-color:#67c23a;background-color:#67c23a;color:#fff}.x-step.is-finish .x-step__title{color:#303133}.x-step.is-finish .x-step__line{background-color:#67c23a}.x-step.is-success .x-step__icon{border-color:#67c23a;background-color:#67c23a;color:#fff}.x-step.is-success .x-step__title{color:#67c23a}.x-step.is-success .x-step__line{background-color:#67c23a}.x-step.is-error .x-step__icon{border-color:#f56c6c;background-color:#f56c6c;color:#fff}.x-step.is-error .x-step__title{color:#f56c6c}.x-page-header{padding:16px 0}.x-page-header__main{display:flex;align-items:center;justify-content:space-between;line-height:28px}.x-page-header__left{display:flex;align-items:center;flex:1;min-width:0}.x-page-header__back{display:inline-flex;align-items:center;margin-right:16px;font-size:14px;color:#606266;cursor:pointer;transition:color .2s}.x-page-header__back:hover{color:#409eff}.x-page-header__back-icon{font-size:16px}.x-page-header__back-text{margin-left:4px}.x-page-header__title{font-size:20px;font-weight:600;color:#303133}.x-page-header__subtitle{margin-left:12px;font-size:14px;font-weight:400;color:#909399}.x-page-header__extra{flex-shrink:0;display:flex;align-items:center;gap:8px}.x-page-header__content{margin-top:16px}.x-page-header__footer{margin-top:16px;padding-top:16px;border-top:1px solid #ebeef5}.x-dropdown{display:inline-block;position:relative;color:#606266;font-size:14px}.x-dropdown.is-disabled{color:#c0c4cc;cursor:not-allowed}.x-dropdown__trigger{cursor:pointer}.x-dropdown__menu{position:absolute;top:100%;left:0;z-index:2000;min-width:150px;padding:5px 0;margin:5px 0;background-color:#fff;border:1px solid #ebeef5;border-radius:4px;box-shadow:0 2px 12px #0000001a}.x-dropdown__menu--top{top:auto;bottom:100%}.x-dropdown__menu--top-start{top:auto;bottom:100%;left:0}.x-dropdown__menu--top-end{top:auto;bottom:100%;left:auto;right:0}.x-dropdown__menu--bottom{top:100%;bottom:auto}.x-dropdown__menu--bottom-start{top:100%;left:0}.x-dropdown__menu--bottom-end{top:100%;left:auto;right:0}.x-dropdown-zoom-enter-active,.x-dropdown-zoom-leave-active{transition:opacity .2s,transform .2s}.x-dropdown-zoom-enter-from,.x-dropdown-zoom-leave-to{opacity:0;transform:scaleY(.8)}.x-dropdown-menu{margin:0;padding:0;list-style:none}.x-dropdown-item{display:flex;align-items:center;padding:8px 16px;margin:0;font-size:14px;color:#606266;cursor:pointer;transition:background-color .2s;list-style:none}.x-dropdown-item:hover{background-color:#f5f7fa;color:#409eff}.x-dropdown-item.is-disabled{color:#c0c4cc;cursor:not-allowed}.x-dropdown-item.is-disabled:hover{background-color:transparent;color:#c0c4cc}.x-dropdown-item.is-divided{border-top:1px solid #ebeef5;margin-top:5px;padding-top:13px}.x-dropdown-item__icon{margin-right:8px}.x-dropdown-item__content{flex:1}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
-
searchRef: HTMLDivElement;
|
|
3
|
-
dropdownRef: HTMLDivElement;
|
|
4
|
-
}, HTMLDivElement>;
|
|
5
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
-
searchRef: HTMLDivElement;
|
|
3
|
-
dropdownRef: HTMLDivElement;
|
|
4
|
-
}, HTMLDivElement>;
|
|
5
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
menuList?: any[];
|
|
3
|
-
showLogo?: boolean;
|
|
4
|
-
showUser?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
menuList: any[];
|
|
8
|
-
showLogo: boolean;
|
|
9
|
-
showUser: boolean;
|
|
10
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
menu: any;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
-
searchRef: HTMLDivElement;
|
|
3
|
-
dropdownRef: HTMLDivElement;
|
|
4
|
-
}, HTMLDivElement>;
|
|
5
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 应用组合函数
|
|
3
|
-
* 提供应用级别的状态和方法
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 应用级别组合函数
|
|
7
|
-
* @returns 应用状态和方法
|
|
8
|
-
*/
|
|
9
|
-
export declare function useApp(): {
|
|
10
|
-
userName: import('vue').ComputedRef<string>;
|
|
11
|
-
userInfo: import('vue').ComputedRef<{
|
|
12
|
-
appId: string;
|
|
13
|
-
userId: string;
|
|
14
|
-
userName: string;
|
|
15
|
-
departmentName?: string | undefined;
|
|
16
|
-
email?: string | undefined;
|
|
17
|
-
mobilePhone?: string | undefined;
|
|
18
|
-
positionName?: string | undefined;
|
|
19
|
-
avatar?: string | undefined;
|
|
20
|
-
} | null>;
|
|
21
|
-
appName: import('vue').ComputedRef<string>;
|
|
22
|
-
isLoggedIn: import('vue').ComputedRef<boolean>;
|
|
23
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
24
|
-
theme: import('vue').ComputedRef<import('../stores/app').ThemeMode>;
|
|
25
|
-
isCollapsed: import('vue').ComputedRef<boolean>;
|
|
26
|
-
layout: import('vue').ComputedRef<import('../stores/app').LayoutMode>;
|
|
27
|
-
toggleTheme: () => void;
|
|
28
|
-
toggleCollapse: () => void;
|
|
29
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 表单组合函数
|
|
3
|
-
*/
|
|
4
|
-
export interface FormOptions<T = any> {
|
|
5
|
-
rules?: Record<string, any[]>;
|
|
6
|
-
onSubmit?: (data: T) => Promise<void> | void;
|
|
7
|
-
}
|
|
8
|
-
export declare function useForm<T extends Record<string, any> = Record<string, any>>(initialValues: T, options?: FormOptions<T>): {
|
|
9
|
-
formRef: import('vue').Ref<any, any>;
|
|
10
|
-
formData: import('vue').Reactive<T>;
|
|
11
|
-
rules: Record<string, any[]> | undefined;
|
|
12
|
-
loading: import('vue').Ref<boolean, boolean>;
|
|
13
|
-
visible: import('vue').Ref<boolean, boolean>;
|
|
14
|
-
isEdit: import('vue').Ref<boolean, boolean>;
|
|
15
|
-
openAdd: () => void;
|
|
16
|
-
openEdit: (data: Partial<T>) => void;
|
|
17
|
-
close: () => void;
|
|
18
|
-
resetForm: () => void;
|
|
19
|
-
handleSubmit: () => Promise<void>;
|
|
20
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 表格组合函数
|
|
3
|
-
*/
|
|
4
|
-
export interface TableOptions<T = any> {
|
|
5
|
-
fetchData: (params: any) => Promise<{
|
|
6
|
-
list: T[];
|
|
7
|
-
total: number;
|
|
8
|
-
}>;
|
|
9
|
-
defaultPageSize?: number;
|
|
10
|
-
}
|
|
11
|
-
export declare function useTable<T = any>(options: TableOptions<T>): {
|
|
12
|
-
loading: import('vue').Ref<boolean, boolean>;
|
|
13
|
-
data: any;
|
|
14
|
-
total: import('vue').Ref<number, number>;
|
|
15
|
-
currentPage: import('vue').Ref<number, number>;
|
|
16
|
-
pageSize: import('vue').Ref<number, number>;
|
|
17
|
-
searchParams: Record<string, any>;
|
|
18
|
-
pagination: import('vue').ComputedRef<{
|
|
19
|
-
current: number;
|
|
20
|
-
pageSize: number;
|
|
21
|
-
total: number;
|
|
22
|
-
}>;
|
|
23
|
-
getData: () => Promise<void>;
|
|
24
|
-
handleSearch: () => void;
|
|
25
|
-
handleReset: () => void;
|
|
26
|
-
handlePageChange: (page: number) => void;
|
|
27
|
-
handleSizeChange: (size: number) => void;
|
|
28
|
-
refresh: () => void;
|
|
29
|
-
};
|
package/dist/enums/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 枚举常量
|
|
3
|
-
*/
|
|
4
|
-
export declare enum Status {
|
|
5
|
-
ENABLED = 1,
|
|
6
|
-
DISABLED = 0
|
|
7
|
-
}
|
|
8
|
-
export declare enum Gender {
|
|
9
|
-
UNKNOWN = 0,
|
|
10
|
-
MALE = 1,
|
|
11
|
-
FEMALE = 2
|
|
12
|
-
}
|
|
13
|
-
export declare enum MenuType {
|
|
14
|
-
DIRECTORY = 0,
|
|
15
|
-
MENU = 1,
|
|
16
|
-
BUTTON = 2
|
|
17
|
-
}
|
|
18
|
-
export declare const StatusText: Record<Status, string>;
|
|
19
|
-
export declare const GenderText: Record<Gender, string>;
|
|
20
|
-
export declare const MenuTypeText: Record<MenuType, string>;
|
|
21
|
-
export declare const StatusOptions: {
|
|
22
|
-
label: string;
|
|
23
|
-
value: Status;
|
|
24
|
-
}[];
|
|
25
|
-
export declare const GenderOptions: {
|
|
26
|
-
label: string;
|
|
27
|
-
value: Gender;
|
|
28
|
-
}[];
|
|
29
|
-
export declare const MenuTypeOptions: {
|
|
30
|
-
label: string;
|
|
31
|
-
value: MenuType;
|
|
32
|
-
}[];
|