mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-21 11:29:20 +08:00
Deploying to gh-pages from @ cc87ab3ccc5d5bf4e06cb6e5e410b612af99ac9b 🚀
This commit is contained in:
parent
9e7bf5bdae
commit
0d40fac0c8
@ -6,7 +6,7 @@
|
||||
<link rel="icon" href="/v3-admin-vite/favicon.ico" />
|
||||
<link rel="stylesheet" href="/v3-admin-vite/app-loading.css" />
|
||||
<title>V3 Admin Vite</title>
|
||||
<script type="module" crossorigin src="/v3-admin-vite/static/index-ac67ab38.js"></script>
|
||||
<script type="module" crossorigin src="/v3-admin-vite/static/index-97c15cdc.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/static/vue-2207505e.js">
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/static/element-a4dc66a7.js">
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/static/vxe-51e6f8a7.js">
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_}from"./index-ac67ab38.js";import{ah as e,l as n,m as c,p as d,I as l,V as t,P as o,T as p}from"./vue-2207505e.js";const u={},i={class:"error-page"},f={class:"error-page-svg"};function m(r,v){const a=e("el-button"),s=e("router-link");return n(),c("div",i,[d("div",f,[l(r.$slots,"default",{},void 0,!0)]),t(s,{to:"/"},{default:o(()=>[t(a,{type:"primary"},{default:o(()=>[p("回到首页")]),_:1})]),_:1})])}const h=_(u,[["render",m],["__scopeId","data-v-2fba9562"]]);export{h as E};
|
||||
import{_}from"./index-97c15cdc.js";import{ah as e,l as n,m as c,p as d,I as l,V as t,P as o,T as p}from"./vue-2207505e.js";const u={},i={class:"error-page"},f={class:"error-page-svg"};function m(r,v){const a=e("el-button"),s=e("router-link");return n(),c("div",i,[d("div",f,[l(r.$slots,"default",{},void 0,!0)]),t(s,{to:"/"},{default:o(()=>[t(a,{type:"primary"},{default:o(()=>[p("回到首页")]),_:1})]),_:1})])}const h=_(u,[["render",m],["__scopeId","data-v-2fba9562"]]);export{h as E};
|
@ -1 +1 @@
|
||||
import{d as p,_ as u}from"./index-ac67ab38.js";import{H as m,r as h,b as v,ah as _,l as S,m as w,p as t,U as f,u as g,V as a,P as V,aH as b,aI as x}from"./vue-2207505e.js";const I=e=>(b("data-v-54e6a169"),e=e(),x(),e),R={class:"switch-roles"},y=I(()=>t("span",null,"切换权限:",-1)),B=m({__name:"SwitchRoles",emits:["change"],setup(e,{emit:r}){const o=p(),s=h(o.roles[0]);return v(s,async l=>{await o.changeRoles(l),r("change")}),(l,n)=>{const c=_("el-radio-button"),d=_("el-radio-group");return S(),w("div",null,[t("div",null,"你的权限:"+f(g(o).roles),1),t("div",R,[y,a(d,{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=i=>s.value=i)},{default:V(()=>[a(c,{label:"editor"}),a(c,{label:"admin"})]),_:1},8,["modelValue"])])])}}});const k=u(B,[["__scopeId","data-v-54e6a169"]]);export{k as S};
|
||||
import{d as p,_ as u}from"./index-97c15cdc.js";import{H as m,r as h,b as v,ah as _,l as S,m as w,p as t,U as f,u as g,V as a,P as V,aH as b,aI as x}from"./vue-2207505e.js";const I=e=>(b("data-v-54e6a169"),e=e(),x(),e),R={class:"switch-roles"},y=I(()=>t("span",null,"切换权限:",-1)),B=m({__name:"SwitchRoles",emits:["change"],setup(e,{emit:r}){const o=p(),s=h(o.roles[0]);return v(s,async l=>{await o.changeRoles(l),r("change")}),(l,n)=>{const c=_("el-radio-button"),d=_("el-radio-group");return S(),w("div",null,[t("div",null,"你的权限:"+f(g(o).roles),1),t("div",R,[y,a(d,{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=i=>s.value=i)},{default:V(()=>[a(c,{label:"editor"}),a(c,{label:"admin"})]),_:1},8,["modelValue"])])])}}});const k=u(B,[["__scopeId","data-v-54e6a169"]]);export{k as S};
|
@ -1 +1 @@
|
||||
import{i as g,_ as y}from"./index-ac67ab38.js";import{S as b}from"./SwitchRoles-7835bd28.js";import{H as P,r as x,ah as m,ar as C,l as i,m as _,V as s,p,Q as u,O as o,P as t,T as e,u as f,S as v}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const h=r=>{if(Array.isArray(r)&&r.length>0){const{roles:n}=g();return n.some(c=>r.includes(c))}else return console.error("need roles! Like checkPermission(['admin','editor'])"),!1},V={class:"app-container"},w={class:"margin-top-15"},z=P({__name:"directive",setup(r){const n=x(1),c=()=>{n.value++};return(B,N)=>{const a=m("el-tag"),l=m("el-tab-pane"),k=m("el-tabs"),d=C("permission");return i(),_("div",V,[s(b,{onChange:c}),(i(),_("div",{key:n.value,class:"margin-top-30"},[p("div",null,[u((i(),o(a,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin']" 所以只有 admin 可以看见这句话 `)]),_:1})),[[d,["admin"]]])]),p("div",null,[u((i(),o(a,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['editor']" 所以只有 editor 可以看见这句话 `)]),_:1})),[[d,["editor"]]])]),p("div",w,[u((i(),o(a,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin', 'editor']" 所以 admin 和 editor 都可以看见这句话 `)]),_:1})),[[d,["admin","editor"]]])])])),(i(),_("div",{key:`checkPermission${n.value}`,class:"margin-top-30"},[s(a,{type:"warning",size:"large"},{default:t(()=>[e(" 例如 Element Plus 的 el-tab-pane 或 el-table-column 以及其它动态渲染 Dom 的场景不适合使用 v-permission,这种情况下你可以通过 v-if 和 checkPermission 来实现: ")]),_:1}),s(k,{type:"border-card",class:"margin-top-15"},{default:t(()=>[f(h)(["admin"])?(i(),o(l,{key:0,label:"admin"},{default:t(()=>[e(" 这里采用了 "),s(a,null,{default:t(()=>[e(`v-if="checkPermission(['admin'])"`)]),_:1}),e(" 所以只有 admin 可以看见这句话 ")]),_:1})):v("",!0),f(h)(["editor"])?(i(),o(l,{key:1,label:"editor"},{default:t(()=>[e(" 这里采用了 "),s(a,null,{default:t(()=>[e(`v-if="checkPermission(['editor'])"`)]),_:1}),e(" 所以只有 editor 可以看见这句话 ")]),_:1})):v("",!0),f(h)(["admin","editor"])?(i(),o(l,{key:2,label:"admin 和 editor"},{default:t(()=>[e(" 这里采用了 "),s(a,null,{default:t(()=>[e(`v-if="checkPermission(['admin', 'editor'])"`)]),_:1}),e(" 所以 admin 和 editor 都可以看见这句话 ")]),_:1})):v("",!0)]),_:1})]))])}}});const T=y(z,[["__scopeId","data-v-6d704b73"]]);export{T as default};
|
||||
import{i as g,_ as y}from"./index-97c15cdc.js";import{S as b}from"./SwitchRoles-a5443d4d.js";import{H as P,r as x,ah as m,ar as C,l as i,m as _,V as s,p,Q as u,O as o,P as t,T as e,u as f,S as v}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const h=r=>{if(Array.isArray(r)&&r.length>0){const{roles:n}=g();return n.some(c=>r.includes(c))}else return console.error("need roles! Like checkPermission(['admin','editor'])"),!1},V={class:"app-container"},w={class:"margin-top-15"},z=P({__name:"directive",setup(r){const n=x(1),c=()=>{n.value++};return(B,N)=>{const a=m("el-tag"),l=m("el-tab-pane"),k=m("el-tabs"),d=C("permission");return i(),_("div",V,[s(b,{onChange:c}),(i(),_("div",{key:n.value,class:"margin-top-30"},[p("div",null,[u((i(),o(a,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin']" 所以只有 admin 可以看见这句话 `)]),_:1})),[[d,["admin"]]])]),p("div",null,[u((i(),o(a,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['editor']" 所以只有 editor 可以看见这句话 `)]),_:1})),[[d,["editor"]]])]),p("div",w,[u((i(),o(a,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin', 'editor']" 所以 admin 和 editor 都可以看见这句话 `)]),_:1})),[[d,["admin","editor"]]])])])),(i(),_("div",{key:`checkPermission${n.value}`,class:"margin-top-30"},[s(a,{type:"warning",size:"large"},{default:t(()=>[e(" 例如 Element Plus 的 el-tab-pane 或 el-table-column 以及其它动态渲染 Dom 的场景不适合使用 v-permission,这种情况下你可以通过 v-if 和 checkPermission 来实现: ")]),_:1}),s(k,{type:"border-card",class:"margin-top-15"},{default:t(()=>[f(h)(["admin"])?(i(),o(l,{key:0,label:"admin"},{default:t(()=>[e(" 这里采用了 "),s(a,null,{default:t(()=>[e(`v-if="checkPermission(['admin'])"`)]),_:1}),e(" 所以只有 admin 可以看见这句话 ")]),_:1})):v("",!0),f(h)(["editor"])?(i(),o(l,{key:1,label:"editor"},{default:t(()=>[e(" 这里采用了 "),s(a,null,{default:t(()=>[e(`v-if="checkPermission(['editor'])"`)]),_:1}),e(" 所以只有 editor 可以看见这句话 ")]),_:1})):v("",!0),f(h)(["admin","editor"])?(i(),o(l,{key:2,label:"admin 和 editor"},{default:t(()=>[e(" 这里采用了 "),s(a,null,{default:t(()=>[e(`v-if="checkPermission(['admin', 'editor'])"`)]),_:1}),e(" 所以 admin 和 editor 都可以看见这句话 ")]),_:1})):v("",!0)]),_:1})]))])}}});const T=y(z,[["__scopeId","data-v-6d704b73"]]);export{T as default};
|
@ -1 +1 @@
|
||||
import{_ as n}from"./index-ac67ab38.js";import{ah as e,l as c,m as a,V as o,P as s}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const _={},i={class:"app-container"};function m(p,d){const t=e("router-view"),r=e("el-card");return c(),a("div",i,[o(r,{header:"三级路由 - menu1-2"},{default:s(()=>[o(t)]),_:1})])}const x=n(_,[["render",m]]);export{x as default};
|
||||
import{_ as n}from"./index-97c15cdc.js";import{ah as e,l as c,m as a,V as o,P as s}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const _={},i={class:"app-container"};function m(p,d){const t=e("router-view"),r=e("el-card");return c(),a("div",i,[o(r,{header:"三级路由 - menu1-2"},{default:s(()=>[o(t)]),_:1})])}const x=n(_,[["render",m]]);export{x as default};
|
@ -1 +1 @@
|
||||
import{h as e}from"./index-ac67ab38.js";function r(t){return e({url:"table",method:"post",data:t})}function u(t){return e({url:`table/${t}`,method:"delete"})}function l(t){return e({url:"table",method:"put",data:t})}function n(t){return e({url:"table",method:"get",params:t})}export{r as c,u as d,n as g,l as u};
|
||||
import{h as e}from"./index-97c15cdc.js";function r(t){return e({url:"table",method:"post",data:t})}function u(t){return e({url:`table/${t}`,method:"delete"})}function l(t){return e({url:"table",method:"put",data:t})}function n(t){return e({url:"table",method:"get",params:t})}export{r as c,u as d,n as g,l as u};
|
@ -1 +1 @@
|
||||
import{H as k,aE as C,r as f,_ as z,ah as s,l as I,m as U,V as e,p as c,P as a,u as i,a3 as F,T as M,a9 as R,aH as S,aI as q}from"./vue-2207505e.js";import{e as B,d as K,_ as N}from"./index-ac67ab38.js";import{v as E,w as H,x as L,y as T,z as A}from"./element-a4dc66a7.js";import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-1e352134.js";import"./vxe-51e6f8a7.js";const P="/v3-admin-vite/static/logo-text-2-eef467fb.png",$=d=>(S("data-v-de8307a8"),d=d(),q(),d),j={class:"login-container"},G={class:"login-card"},J=$(()=>c("div",{class:"title"},[c("img",{src:P})],-1)),O={class:"content"},Q=k({__name:"index",setup(d){const h=C(),g=f(null),u=f(!1),p=f(""),o=z({username:"admin",password:"12345678",code:""}),w={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:8,max:16,message:"长度在 8 到 16 个字符",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},x=()=>{var l;(l=g.value)==null||l.validate((t,r)=>{t?(u.value=!0,K().login(o).then(()=>{h.push({path:"/"})}).catch(()=>{m(),o.password=""}).finally(()=>{u.value=!1})):console.error("表单校验不通过",r)})},m=()=>{o.code="",p.value="",B().then(l=>{p.value=l.data})};return m(),(l,t)=>{const r=s("el-input"),_=s("el-form-item"),v=s("el-icon"),y=s("el-image"),V=s("el-button"),b=s("el-form");return I(),U("div",j,[e(D,{class:"theme-switch"}),c("div",G,[J,c("div",O,[e(b,{ref_key:"loginFormRef",ref:g,model:o,rules:w,onKeyup:R(x,["enter"])},{default:a(()=>[e(_,{prop:"username"},{default:a(()=>[e(r,{modelValue:o.username,"onUpdate:modelValue":t[0]||(t[0]=n=>o.username=n),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":i(E),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),e(_,{prop:"password"},{default:a(()=>[e(r,{modelValue:o.password,"onUpdate:modelValue":t[1]||(t[1]=n=>o.password=n),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":i(H),size:"large","show-password":""},null,8,["modelValue","prefix-icon"])]),_:1}),e(_,{prop:"code"},{default:a(()=>[e(r,{modelValue:o.code,"onUpdate:modelValue":t[2]||(t[2]=n=>o.code=n),modelModifiers:{trim:!0},placeholder:"验证码",type:"text",tabindex:"3","prefix-icon":i(L),maxlength:"7",size:"large"},{append:a(()=>[e(y,{src:p.value,onClick:m,draggable:"false"},{placeholder:a(()=>[e(v,null,{default:a(()=>[e(i(T))]),_:1})]),error:a(()=>[e(v,null,{default:a(()=>[e(i(A))]),_:1})]),_:1},8,["src"])]),_:1},8,["modelValue","prefix-icon"])]),_:1}),e(V,{loading:u.value,type:"primary",size:"large",onClick:F(x,["prevent"])},{default:a(()=>[M("登 录")]),_:1},8,["loading","onClick"])]),_:1},8,["model","onKeyup"])])])])}}});const oe=N(Q,[["__scopeId","data-v-de8307a8"]]);export{oe as default};
|
||||
import{H as k,aE as C,r as f,_ as z,ah as s,l as I,m as U,V as e,p as c,P as a,u as i,a3 as F,T as M,a9 as R,aH as S,aI as q}from"./vue-2207505e.js";import{e as B,d as K,_ as N}from"./index-97c15cdc.js";import{v as E,w as H,x as L,y as T,z as A}from"./element-a4dc66a7.js";import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-ff750191.js";import"./vxe-51e6f8a7.js";const P="/v3-admin-vite/static/logo-text-2-eef467fb.png",$=d=>(S("data-v-de8307a8"),d=d(),q(),d),j={class:"login-container"},G={class:"login-card"},J=$(()=>c("div",{class:"title"},[c("img",{src:P})],-1)),O={class:"content"},Q=k({__name:"index",setup(d){const h=C(),g=f(null),u=f(!1),p=f(""),o=z({username:"admin",password:"12345678",code:""}),w={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:8,max:16,message:"长度在 8 到 16 个字符",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},x=()=>{var l;(l=g.value)==null||l.validate((t,r)=>{t?(u.value=!0,K().login(o).then(()=>{h.push({path:"/"})}).catch(()=>{m(),o.password=""}).finally(()=>{u.value=!1})):console.error("表单校验不通过",r)})},m=()=>{o.code="",p.value="",B().then(l=>{p.value=l.data})};return m(),(l,t)=>{const r=s("el-input"),_=s("el-form-item"),v=s("el-icon"),y=s("el-image"),V=s("el-button"),b=s("el-form");return I(),U("div",j,[e(D,{class:"theme-switch"}),c("div",G,[J,c("div",O,[e(b,{ref_key:"loginFormRef",ref:g,model:o,rules:w,onKeyup:R(x,["enter"])},{default:a(()=>[e(_,{prop:"username"},{default:a(()=>[e(r,{modelValue:o.username,"onUpdate:modelValue":t[0]||(t[0]=n=>o.username=n),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":i(E),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),e(_,{prop:"password"},{default:a(()=>[e(r,{modelValue:o.password,"onUpdate:modelValue":t[1]||(t[1]=n=>o.password=n),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":i(H),size:"large","show-password":""},null,8,["modelValue","prefix-icon"])]),_:1}),e(_,{prop:"code"},{default:a(()=>[e(r,{modelValue:o.code,"onUpdate:modelValue":t[2]||(t[2]=n=>o.code=n),modelModifiers:{trim:!0},placeholder:"验证码",type:"text",tabindex:"3","prefix-icon":i(L),maxlength:"7",size:"large"},{append:a(()=>[e(y,{src:p.value,onClick:m,draggable:"false"},{placeholder:a(()=>[e(v,null,{default:a(()=>[e(i(T))]),_:1})]),error:a(()=>[e(v,null,{default:a(()=>[e(i(A))]),_:1})]),_:1},8,["src"])]),_:1},8,["modelValue","prefix-icon"])]),_:1}),e(V,{loading:u.value,type:"primary",size:"large",onClick:F(x,["prevent"])},{default:a(()=>[M("登 录")]),_:1},8,["loading","onClick"])]),_:1},8,["model","onKeyup"])])])])}}});const oe=N(Q,[["__scopeId","data-v-de8307a8"]]);export{oe as default};
|
@ -1 +1 @@
|
||||
import{_ as c,d as a}from"./index-ac67ab38.js";import{ah as s,l as n,m as _,V as r,H as i,O as d,R as p,u as m}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const l={},u={class:"app-container center"};function f(t,o){const e=s("el-empty");return n(),_("div",u,[r(e,{description:"Admin 权限可见"})])}const v=c(l,[["render",f],["__scopeId","data-v-540a7bcc"]]);const y={},x={class:"app-container center"};function h(t,o){const e=s("el-empty");return n(),_("div",x,[r(e,{description:"Editor 权限可见"})])}const b=c(y,[["render",h],["__scopeId","data-v-e677b768"]]),S=i({__name:"index",setup(t){const e=a().roles.includes("admin");return(A,E)=>(n(),d(p(m(e)?v:b)))}});export{S as default};
|
||||
import{_ as c,d as a}from"./index-97c15cdc.js";import{ah as s,l as n,m as _,V as r,H as i,O as d,R as p,u as m}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const l={},u={class:"app-container center"};function f(t,o){const e=s("el-empty");return n(),_("div",u,[r(e,{description:"Admin 权限可见"})])}const v=c(l,[["render",f],["__scopeId","data-v-540a7bcc"]]);const y={},x={class:"app-container center"};function h(t,o){const e=s("el-empty");return n(),_("div",x,[r(e,{description:"Editor 权限可见"})])}const b=c(y,[["render",h],["__scopeId","data-v-e677b768"]]),S=i({__name:"index",setup(t){const e=a().roles.includes("admin");return(A,E)=>(n(),d(p(m(e)?v:b)))}});export{S as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as e}from"./index-ac67ab38.js";import{l as o,m as n,p as t}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const a={},i={"h-full":"","uno-padding-20":""},s=t("div",{"h-full":"","text-center":"",flex:"","select-none":"","all:transition-400":""},[t("div",{ma:""},[t("div",{"text-5xl":"",fw100:"","animate-bounce-alt":"","animate-count-infinite":"","animate-1s":""},"UnoCSS"),t("div",{op30:"","dark:op60":"","text-lg":"",fw300:"",m1:""},"具有高性能且极具灵活性的即时原子化 CSS 引擎"),t("div",{m2:"",flex:"","justify-center":"","text-lg":"",op30:"","dark:op60":"",hover:"op80","dark:hover":"op80"},[t("a",{href:"https://antfu.me/posts/reimagine-atomic-css-zh",target:"_blank"},"推荐阅读:重新构想原子化 CSS")])])],-1),r=t("div",{absolute:"","bottom-5":"","right-0":"","left-0":"","text-center":"",op30:"","dark:op60":"",fw300:""}," 该页面是一个 UnoCSS 的使用案例,其他页面依旧采用 Scss ",-1),c=[s,r];function d(l,f){return o(),n("div",i,c)}const x=e(a,[["render",d]]);export{x as default};
|
||||
import{_ as e}from"./index-97c15cdc.js";import{l as o,m as n,p as t}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const a={},i={"h-full":"","uno-padding-20":""},s=t("div",{"h-full":"","text-center":"",flex:"","select-none":"","all:transition-400":""},[t("div",{ma:""},[t("div",{"text-5xl":"",fw100:"","animate-bounce-alt":"","animate-count-infinite":"","animate-1s":""},"UnoCSS"),t("div",{op30:"","dark:op60":"","text-lg":"",fw300:"",m1:""},"具有高性能且极具灵活性的即时原子化 CSS 引擎"),t("div",{m2:"",flex:"","justify-center":"","text-lg":"",op30:"","dark:op60":"",hover:"op80","dark:hover":"op80"},[t("a",{href:"https://antfu.me/posts/reimagine-atomic-css-zh",target:"_blank"},"推荐阅读:重新构想原子化 CSS")])])],-1),r=t("div",{absolute:"","bottom-5":"","right-0":"","left-0":"","text-center":"",op30:"","dark:op60":"",fw300:""}," 该页面是一个 UnoCSS 的使用案例,其他页面依旧采用 Scss ",-1),c=[s,r];function d(l,f){return o(),n("div",i,c)}const x=e(a,[["render",d]]);export{x as default};
|
@ -1 +1 @@
|
||||
import{_ as n}from"./index-ac67ab38.js";import{ah as e,l as c,m as a,V as o,P as s}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const _={},i={class:"app-container"};function m(p,d){const t=e("router-view"),r=e("el-card");return c(),a("div",i,[o(r,{header:"二级路由 - menu1"},{default:s(()=>[o(t)]),_:1})])}const x=n(_,[["render",m]]);export{x as default};
|
||||
import{_ as n}from"./index-97c15cdc.js";import{ah as e,l as c,m as a,V as o,P as s}from"./vue-2207505e.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const _={},i={class:"app-container"};function m(p,d){const t=e("router-view"),r=e("el-card");return c(),a("div",i,[o(r,{header:"二级路由 - menu1"},{default:s(()=>[o(t)]),_:1})])}const x=n(_,[["render",m]]);export{x as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{f as k}from"./index-ac67ab38.js";import{A as g}from"./element-a4dc66a7.js";import{H as h,ah as o,l,O as m,P as e,V as n,m as C,a8 as x,u as t,F as B,p as s,U as b}from"./vue-2207505e.js";const L=h({__name:"index",setup(v){const{themeList:c,activeThemeName:d,setTheme:r}=k();return(N,T)=>{const _=o("el-icon"),p=o("el-tooltip"),i=o("el-dropdown-item"),u=o("el-dropdown-menu"),f=o("el-dropdown");return l(),m(f,{trigger:"click",onCommand:t(r)},{dropdown:e(()=>[n(u,null,{default:e(()=>[(l(!0),C(B,null,x(t(c),(a,w)=>(l(),m(i,{key:w,disabled:t(d)===a.name,command:a.name},{default:e(()=>[s("span",null,b(a.title),1)]),_:2},1032,["disabled","command"]))),128))]),_:1})]),default:e(()=>[s("div",null,[n(p,{effect:"dark",content:"主题模式",placement:"bottom"},{default:e(()=>[n(_,{size:20},{default:e(()=>[n(t(g))]),_:1})]),_:1})])]),_:1},8,["onCommand"])}}});export{L as _};
|
||||
import{f as k}from"./index-97c15cdc.js";import{A as g}from"./element-a4dc66a7.js";import{H as h,ah as o,l,O as m,P as e,V as n,m as C,a8 as x,u as t,F as B,p as s,U as b}from"./vue-2207505e.js";const L=h({__name:"index",setup(v){const{themeList:c,activeThemeName:d,setTheme:r}=k();return(N,T)=>{const _=o("el-icon"),p=o("el-tooltip"),i=o("el-dropdown-item"),u=o("el-dropdown-menu"),f=o("el-dropdown");return l(),m(f,{trigger:"click",onCommand:t(r)},{dropdown:e(()=>[n(u,null,{default:e(()=>[(l(!0),C(B,null,x(t(c),(a,w)=>(l(),m(i,{key:w,disabled:t(d)===a.name,command:a.name},{default:e(()=>[s("span",null,b(a.title),1)]),_:2},1032,["disabled","command"]))),128))]),_:1})]),default:e(()=>[s("div",null,[n(p,{effect:"dark",content:"主题模式",placement:"bottom"},{default:e(()=>[n(_,{size:20},{default:e(()=>[n(t(g))]),_:1})]),_:1})])]),_:1},8,["onCommand"])}}});export{L as _};
|
@ -1 +1 @@
|
||||
import{H as s,aE as n,ah as _,l as p,m as r,V as e,P as c,T as i}from"./vue-2207505e.js";import{S as l}from"./SwitchRoles-7835bd28.js";import{_ as m}from"./index-ac67ab38.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const d={class:"app-container"},u=s({__name:"page",setup(f){const t=n(),a=()=>{t.push({path:"/403"})};return(g,h)=>{const o=_("el-tag");return p(),r("div",d,[e(l,{onChange:a}),e(o,{type:"warning",size:"large"},{default:c(()=>[i("当前页面只有 admin 权限可见,切换权限后将不能进入该页面")]),_:1})])}}});const R=m(u,[["__scopeId","data-v-7986af66"]]);export{R as default};
|
||||
import{H as s,aE as n,ah as _,l as p,m as r,V as e,P as c,T as i}from"./vue-2207505e.js";import{S as l}from"./SwitchRoles-a5443d4d.js";import{_ as m}from"./index-97c15cdc.js";import"./element-a4dc66a7.js";import"./vxe-51e6f8a7.js";const d={class:"app-container"},u=s({__name:"page",setup(f){const t=n(),a=()=>{t.push({path:"/403"})};return(g,h)=>{const o=_("el-tag");return p(),r("div",d,[e(l,{onChange:a}),e(o,{type:"warning",size:"large"},{default:c(()=>[i("当前页面只有 admin 权限可见,切换权限后将不能进入该页面")]),_:1})])}}});const R=m(u,[["__scopeId","data-v-7986af66"]]);export{R as default};
|
@ -1,4 +1,4 @@
|
||||
import{I as d,b as r}from"./element-a4dc66a7.js";import{H as p,ah as _,l as m,m as g,V as c,P as i,T as l,p as f}from"./vue-2207505e.js";const h={lock:!0,text:"加载中..."},u=(s,e={})=>{let t;return async(...a)=>{try{return t=d.service({...h,...e}),await s(...a)}finally{t==null||t.close()}}},k={code:0,data:{list:[]},message:"获取成功"};function w(s){return new Promise(e=>{setTimeout(()=>{e({...k,data:{list:s}})},1e3)})}function y(){return new Promise((s,e)=>{setTimeout(()=>{e(new Error("发生错误"))},1e3)})}const C={class:"app-container"},E=f("h4",null,"该示例是演示:通过将要执行的函数传递给 hook,让 hook 自动开启全屏 loading,函数执行结束后自动关闭 loading",-1),x=`
|
||||
import{I as d,b as n}from"./element-a4dc66a7.js";import{H as p,ah as _,l as m,m as g,V as c,P as i,T as l,p as f}from"./vue-2207505e.js";const h={lock:!0,text:"加载中..."},u=(s,e={})=>{let t;return async(...a)=>{try{return t=d.service({...h,...e}),await s(...a)}finally{t==null||t.close()}}},y={code:0,data:{list:[]},message:"获取成功"};function k(s){return new Promise(e=>{setTimeout(()=>{e({...y,data:{list:s}})},1e3)})}function w(){return new Promise((s,e)=>{setTimeout(()=>{e(new Error("发生错误"))},1e3)})}const C={class:"app-container"},E=f("h4",null,"该示例是演示:通过将要执行的函数传递给 hook,让 hook 自动开启全屏 loading,函数执行结束后自动关闭 loading",-1),x=`
|
||||
<path class="path" d="
|
||||
M 30 15
|
||||
L 28 17
|
||||
@ -7,4 +7,4 @@ import{I as d,b as r}from"./element-a4dc66a7.js";import{H as p,ah as _,l as m,m
|
||||
A 15 15, 0, 1, 1, 27.99 7.5
|
||||
L 15 15
|
||||
" style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/>
|
||||
`,b=p({__name:"use-fullscreen-loading",setup(s){const e={text:"即将发生错误...",background:"#F56C6C20",svg:x,svgViewBox:"-10, -10, 50, 50"},t=async()=>{const o=await u(w)([2,3,3]);r.success(`${o.message},传参为 ${o.data.list.toString()}`)},a=async()=>{try{await u(y,e)()}catch(o){r.error(o.message)}};return(o,S)=>{const n=_("el-button");return m(),g("div",C,[E,c(n,{onClick:t},{default:i(()=>[l("查询成功")]),_:1}),c(n,{onClick:a},{default:i(()=>[l("查询失败")]),_:1})])}}});export{b as default};
|
||||
`,b=p({__name:"use-fullscreen-loading",setup(s){const e={text:"即将发生错误...",background:"#F56C6C20",svg:x,svgViewBox:"-10, -10, 50, 50"},t=async()=>{const o=await u(k)([2,3,3]);n.success(`${o.message},传参为 ${o.data.list.toString()}`)},a=async()=>{try{await u(w,e)()}catch(o){n.error(o.message)}};return(o,S)=>{const r=_("el-button");return m(),g("div",C,[E,c(r,{type:"primary",onClick:t},{default:i(()=>[l("查询成功")]),_:1}),c(r,{type:"danger",onClick:a},{default:i(()=>[l("查询失败")]),_:1})])}}});export{b as default};
|
1
static/use-watermark-2b05ffb4.js
Normal file
1
static/use-watermark-2b05ffb4.js
Normal file
@ -0,0 +1 @@
|
||||
import{J as $}from"./element-a4dc66a7.js";import{r as I,s as B,c as H,z as S,H as V,ah as O,l as D,m as M,p as L,V as c,P as u,u as y,T as k,aH as T,aI as G}from"./vue-2207505e.js";import{_ as P}from"./index-97c15cdc.js";import"./vxe-51e6f8a7.js";const z={color:"#c0c4cc",opacity:.5,size:"16px",family:"serif",angle:-20,width:200,height:150},U=I(document.body);function W(s=U){let v;const t=B(null),C=e=>{const{color:a,opacity:l,size:r,family:m,angle:_,width:p,height:x}=v??z,b=document.createElement("canvas");b.width=p,b.height=x;const o=b.getContext("2d");return o&&(o.fillStyle=a,o.globalAlpha=l,o.font=r+" "+m,o.rotate(Math.PI/180*_),o.clearRect(0,0,p,x),o.fillText(e,0,x/2)),b.toDataURL()},f=()=>{!s.value||!t.value||(s.value.removeChild(t.value),t.value=null,h(s.value))},d=(e={})=>{t.value&&(e.width&&(t.value.style.width=`${e.width}px`),e.height&&(t.value.style.height=`${e.height}px`),e.text&&(t.value.style.background=`url(${C(e.text)}) left top repeat`))},g=e=>{if(!s.value)return;if(t.value){d({text:e});return}const a=document.createElement("div");t.value=a,a.style.pointerEvents="none",a.style.top="0",a.style.left="0",a.style.position="absolute",a.style.zIndex="9999";const{clientWidth:l,clientHeight:r}=s.value;d({width:l,height:r,text:e}),s.value.appendChild(a)},n=(e,a={})=>{s.value&&(s.value.style.position="relative",v={...z,...a},g(e),i(s.value),H()&&S(f))},i=e=>{e._mutationObserver||e._resizeObserver||!t.value||(w(e),R(e))},h=e=>{var a,l;(a=e._mutationObserver)==null||a.disconnect(),e._mutationObserver=void 0,(l=e._resizeObserver)==null||l.unobserve(e),e._resizeObserver=void 0},w=e=>{const a={attributes:!0,childList:!0,subtree:!0},l=m=>{m.forEach(_=>{switch(_.type){case"childList":_.removedNodes.forEach(p=>{p===t.value&&e.appendChild(t.value)});break;case"attributes":t.value.style.display==="none"?t.value.style.display="block":t.value.style.visibility==="hidden"&&(t.value.style.visibility="visible");break}})},r=new MutationObserver(l);r.observe(e,a),e._mutationObserver=r},R=e=>{const a=$(()=>{const{clientWidth:r,clientHeight:m}=e;d({width:r,height:m})},500),l=new ResizeObserver(a);l.observe(e),e._resizeObserver=l};return{setWatermark:n,clear:f}}const A=s=>(T("data-v-aa4c9b3e"),s=s(),G(),s),E={class:"app-container"},J=A(()=>L("h4",null,"该示例是演示:通过调用 hook,开启或关闭水印(支持局部、全局、自定义样式)",-1)),j=V({__name:"use-watermark",setup(s){const v=I(null),{setWatermark:t,clear:C}=W(v),{setWatermark:f,clear:d}=W();return(g,n)=>{const i=O("el-button"),h=O("el-button-group");return D(),M("div",E,[J,L("div",{ref_key:"localRef",ref:v,class:"local"},null,512),c(h,null,{default:u(()=>[c(i,{type:"primary",onClick:n[0]||(n[0]=w=>y(t)("局部水印",{color:"#409eff"}))},{default:u(()=>[k("创建局部水印")]),_:1}),c(i,{type:"danger",onClick:y(C)},{default:u(()=>[k("清除局部水印")]),_:1},8,["onClick"])]),_:1}),c(h,null,{default:u(()=>[c(i,{type:"primary",onClick:n[1]||(n[1]=w=>y(f)("全局水印"))},{default:u(()=>[k("创建全局水印")]),_:1}),c(i,{type:"danger",onClick:y(d)},{default:u(()=>[k("清除全局水印")]),_:1},8,["onClick"])]),_:1})])}}});const X=P(j,[["__scopeId","data-v-aa4c9b3e"]]);export{X as default};
|
@ -1 +0,0 @@
|
||||
.local[data-v-3a15d249]{height:30vh;border:2px dashed var(--el-color-primary);margin-bottom:20px}.el-button-group[data-v-3a15d249]{margin-right:10px}
|
1
static/use-watermark-bd559b9d.css
Normal file
1
static/use-watermark-bd559b9d.css
Normal file
@ -0,0 +1 @@
|
||||
.local[data-v-aa4c9b3e]{height:30vh;border:2px dashed var(--el-color-primary);margin-bottom:20px}.el-button-group[data-v-aa4c9b3e]{margin-right:10px}
|
@ -1 +0,0 @@
|
||||
import{J as $}from"./element-a4dc66a7.js";import{r as L,s as B,c as I,z as V,H as D,ah as z,l as H,m as M,p as T,V as c,P as u,u as y,T as k}from"./vue-2207505e.js";import{_ as G}from"./index-ac67ab38.js";import"./vxe-51e6f8a7.js";const W={color:"#c0c4cc",opacity:.5,size:"16px",family:"serif",angle:-20,width:200,height:150},P=L(document.body);function g(l=P){let v;const t=B(null),C=e=>{const{color:a,opacity:s,size:r,family:m,angle:h,width:b,height:x}=v??W,p=document.createElement("canvas");p.width=b,p.height=x;const n=p.getContext("2d");return n&&(n.fillStyle=a,n.globalAlpha=s,n.font=r+" "+m,n.rotate(Math.PI/180*h),n.clearRect(0,0,b,x),n.fillText(e,0,x/2)),p.toDataURL()},f=()=>{!l.value||!t.value||(l.value.removeChild(t.value),t.value=null,_(l.value))},d=(e={})=>{t.value&&(e.width&&(t.value.style.width=`${e.width}px`),e.height&&(t.value.style.height=`${e.height}px`),e.text&&(t.value.style.background=`url(${C(e.text)}) left top repeat`))},O=e=>{if(!l.value)return;if(t.value){d({text:e});return}const a=document.createElement("div");t.value=a,a.style.pointerEvents="none",a.style.top="0",a.style.left="0",a.style.position="absolute",a.style.zIndex="9999";const{clientWidth:s,clientHeight:r}=l.value;d({width:s,height:r,text:e}),l.value.appendChild(a)},o=(e,a={})=>{l.value&&(l.value.style.position="relative",v={...W,...a},O(e),i(l.value),I()&&V(f))},i=e=>{e._mutationObserver||e._resizeObserver||!t.value||(w(e),R(e))},_=e=>{var a,s;(a=e._mutationObserver)==null||a.disconnect(),e._mutationObserver=void 0,(s=e._resizeObserver)==null||s.unobserve(e),e._resizeObserver=void 0},w=e=>{const a={attributes:!0,childList:!0,subtree:!0},s=m=>{m.forEach(h=>{switch(h.type){case"childList":h.removedNodes.forEach(b=>{b===t.value&&e.appendChild(t.value)});break;case"attributes":t.value.style.display==="none"?t.value.style.display="block":t.value.style.visibility==="hidden"&&(t.value.style.visibility="visible");break}})},r=new MutationObserver(s);r.observe(e,a),e._mutationObserver=r},R=e=>{const a=$(()=>{const{clientWidth:r,clientHeight:m}=e;d({width:r,height:m})},500),s=new ResizeObserver(a);s.observe(e),e._resizeObserver=s};return{setWatermark:o,clear:f}}const U={class:"app-container"},A=D({__name:"use-watermark",setup(l){const v=L(null),{setWatermark:t,clear:C}=g(v),{setWatermark:f,clear:d}=g();return(O,o)=>{const i=z("el-button"),_=z("el-button-group");return H(),M("div",U,[T("div",{ref_key:"localRef",ref:v,class:"local"},null,512),c(_,null,{default:u(()=>[c(i,{type:"primary",onClick:o[0]||(o[0]=w=>y(t)("局部水印",{color:"#409eff"}))},{default:u(()=>[k("创建局部水印")]),_:1}),c(i,{type:"primary",onClick:y(C)},{default:u(()=>[k("清除局部水印")]),_:1},8,["onClick"])]),_:1}),c(_,null,{default:u(()=>[c(i,{type:"primary",onClick:o[1]||(o[1]=w=>y(f)("全局水印"))},{default:u(()=>[k("创建全局水印")]),_:1}),c(i,{type:"primary",onClick:y(d)},{default:u(()=>[k("清除全局水印")]),_:1},8,["onClick"])]),_:1})])}}});const q=G(A,[["__scopeId","data-v-3a15d249"]]);export{q as default};
|
Loading…
x
Reference in New Issue
Block a user