Template
1
0
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 @ 0f1afe1a941aae65c024e87df060af077be128d2 🚀

This commit is contained in:
pany-ang 2024-02-06 08:22:47 +00:00
parent 68eb6a4a67
commit de22b966b2
19 changed files with 21 additions and 21 deletions

View File

@ -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-YVoBEDbL.js"></script>
<script type="module" crossorigin src="/v3-admin-vite/static/index-Fx4uz9-g.js"></script>
<link rel="modulepreload" crossorigin href="/v3-admin-vite/static/vue-edbHIJ2J.js">
<link rel="modulepreload" crossorigin href="/v3-admin-vite/static/element-6bs1qbFv.js">
<link rel="modulepreload" crossorigin href="/v3-admin-vite/static/vxe-gaPTatyF.js">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as n}from"./index-YVoBEDbL.js";import{ag as e,m as c,p as _,q as d,H as l,U as t,O as o,S as p}from"./vue-edbHIJ2J.js";const i={},u={class:"error-page"},f={class:"error-page-svg"};function m(r,g){const a=e("el-button"),s=e("router-link");return c(),_("div",u,[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 k=n(i,[["render",m],["__scopeId","data-v-2fba9562"]]);export{k as E};
import{_ as n}from"./index-Fx4uz9-g.js";import{ag as e,m as c,p as _,q as d,H as l,U as t,O as o,S as p}from"./vue-edbHIJ2J.js";const i={},u={class:"error-page"},f={class:"error-page-svg"};function m(r,g){const a=e("el-button"),s=e("router-link");return c(),_("div",u,[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 k=n(i,[["render",m],["__scopeId","data-v-2fba9562"]]);export{k as E};

View File

@ -1 +1 @@
import{e as u,_ as m}from"./index-YVoBEDbL.js";import{l as h,r as S,b as f,ag as c,m as v,p as w,q as t,T as g,u as b,U as s,O as I,aH as V,aI as x}from"./vue-edbHIJ2J.js";const R=e=>(V("data-v-54e6a169"),e=e(),x(),e),B={class:"switch-roles"},C=R(()=>t("span",null,"切换权限:",-1)),U=h({__name:"SwitchRoles",emits:["change"],setup(e,{emit:i}){const d=i,o=u(),a=S(o.roles[0]);return f(a,async l=>{await o.changeRoles(l),d("change")}),(l,n)=>{const r=c("el-radio-button"),p=c("el-radio-group");return v(),w("div",null,[t("div",null,"你的权限:"+g(b(o).roles),1),t("div",B,[C,s(p,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=_=>a.value=_)},{default:I(()=>[s(r,{label:"editor"}),s(r,{label:"admin"})]),_:1},8,["modelValue"])])])}}}),N=m(U,[["__scopeId","data-v-54e6a169"]]);export{N as S};
import{e as u,_ as m}from"./index-Fx4uz9-g.js";import{l as h,r as S,b as f,ag as c,m as v,p as w,q as t,T as g,u as b,U as s,O as I,aH as V,aI as x}from"./vue-edbHIJ2J.js";const R=e=>(V("data-v-54e6a169"),e=e(),x(),e),B={class:"switch-roles"},C=R(()=>t("span",null,"切换权限:",-1)),U=h({__name:"SwitchRoles",emits:["change"],setup(e,{emit:i}){const d=i,o=u(),a=S(o.roles[0]);return f(a,async l=>{await o.changeRoles(l),d("change")}),(l,n)=>{const r=c("el-radio-button"),p=c("el-radio-group");return v(),w("div",null,[t("div",null,"你的权限:"+g(b(o).roles),1),t("div",B,[C,s(p,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=_=>a.value=_)},{default:I(()=>[s(r,{label:"editor"}),s(r,{label:"admin"})]),_:1},8,["modelValue"])])])}}}),N=m(U,[["__scopeId","data-v-54e6a169"]]);export{N as S};

View File

@ -1 +1 @@
import{j as g,_ as y}from"./index-YVoBEDbL.js";import{S as b}from"./SwitchRoles-SMqDp3eS.js";import{l as P,r as C,ag as m,ap as x,m as a,p,U as s,q as _,P as u,M as o,O as t,S as e,u as f,R as v}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const k=r=>{if(Array.isArray(r)&&r.length>0){const{roles:n}=g();return n.some(l=>r.includes(l))}else return console.error("need roles! Like checkPermission(['admin','editor'])"),!1},w={class:"app-container"},z={class:"margin-top-15"},B=P({__name:"directive",setup(r){const n=C(1),l=()=>{n.value++};return(N,S)=>{const i=m("el-tag"),c=m("el-tab-pane"),h=m("el-tabs"),d=x("permission");return a(),p("div",w,[s(b,{onChange:l}),(a(),p("div",{key:n.value,class:"margin-top-30"},[_("div",null,[u((a(),o(i,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin']" 所以只有 admin 可以看见这句话 `)]),_:1})),[[d,["admin"]]])]),_("div",null,[u((a(),o(i,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['editor']" 所以只有 editor 可以看见这句话 `)]),_:1})),[[d,["editor"]]])]),_("div",z,[u((a(),o(i,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin', 'editor']" 所以 admin 和 editor 都可以看见这句话 `)]),_:1})),[[d,["admin","editor"]]])])])),(a(),p("div",{key:`checkPermission${n.value}`,class:"margin-top-30"},[s(i,{type:"warning",size:"large"},{default:t(()=>[e(" 例如 Element Plus 的 el-tab-pane 或 el-table-column 以及其它动态渲染 Dom 的场景不适合使用 v-permission这种情况下你可以通过 v-if 和 checkPermission 来实现: ")]),_:1}),s(h,{type:"border-card",class:"margin-top-15"},{default:t(()=>[f(k)(["admin"])?(a(),o(c,{key:0,label:"admin"},{default:t(()=>[e(" 这里采用了 "),s(i,null,{default:t(()=>[e(`v-if="checkPermission(['admin'])"`)]),_:1}),e(" 所以只有 admin 可以看见这句话 ")]),_:1})):v("",!0),f(k)(["editor"])?(a(),o(c,{key:1,label:"editor"},{default:t(()=>[e(" 这里采用了 "),s(i,null,{default:t(()=>[e(`v-if="checkPermission(['editor'])"`)]),_:1}),e(" 所以只有 editor 可以看见这句话 ")]),_:1})):v("",!0),f(k)(["admin","editor"])?(a(),o(c,{key:2,label:"admin 和 editor"},{default:t(()=>[e(" 这里采用了 "),s(i,null,{default:t(()=>[e(`v-if="checkPermission(['admin', 'editor'])"`)]),_:1}),e(" 所以 admin 和 editor 都可以看见这句话 ")]),_:1})):v("",!0)]),_:1})]))])}}}),j=y(B,[["__scopeId","data-v-6d704b73"]]);export{j as default};
import{j as g,_ as y}from"./index-Fx4uz9-g.js";import{S as b}from"./SwitchRoles-D87dCfXe.js";import{l as P,r as C,ag as m,ap as x,m as a,p,U as s,q as _,P as u,M as o,O as t,S as e,u as f,R as v}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const k=r=>{if(Array.isArray(r)&&r.length>0){const{roles:n}=g();return n.some(l=>r.includes(l))}else return console.error("need roles! Like checkPermission(['admin','editor'])"),!1},w={class:"app-container"},z={class:"margin-top-15"},B=P({__name:"directive",setup(r){const n=C(1),l=()=>{n.value++};return(N,S)=>{const i=m("el-tag"),c=m("el-tab-pane"),h=m("el-tabs"),d=x("permission");return a(),p("div",w,[s(b,{onChange:l}),(a(),p("div",{key:n.value,class:"margin-top-30"},[_("div",null,[u((a(),o(i,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin']" 所以只有 admin 可以看见这句话 `)]),_:1})),[[d,["admin"]]])]),_("div",null,[u((a(),o(i,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['editor']" 所以只有 editor 可以看见这句话 `)]),_:1})),[[d,["editor"]]])]),_("div",z,[u((a(),o(i,{type:"success",size:"large",effect:"plain"},{default:t(()=>[e(` 这里采用了 v-permission="['admin', 'editor']" 所以 admin 和 editor 都可以看见这句话 `)]),_:1})),[[d,["admin","editor"]]])])])),(a(),p("div",{key:`checkPermission${n.value}`,class:"margin-top-30"},[s(i,{type:"warning",size:"large"},{default:t(()=>[e(" 例如 Element Plus 的 el-tab-pane 或 el-table-column 以及其它动态渲染 Dom 的场景不适合使用 v-permission这种情况下你可以通过 v-if 和 checkPermission 来实现: ")]),_:1}),s(h,{type:"border-card",class:"margin-top-15"},{default:t(()=>[f(k)(["admin"])?(a(),o(c,{key:0,label:"admin"},{default:t(()=>[e(" 这里采用了 "),s(i,null,{default:t(()=>[e(`v-if="checkPermission(['admin'])"`)]),_:1}),e(" 所以只有 admin 可以看见这句话 ")]),_:1})):v("",!0),f(k)(["editor"])?(a(),o(c,{key:1,label:"editor"},{default:t(()=>[e(" 这里采用了 "),s(i,null,{default:t(()=>[e(`v-if="checkPermission(['editor'])"`)]),_:1}),e(" 所以只有 editor 可以看见这句话 ")]),_:1})):v("",!0),f(k)(["admin","editor"])?(a(),o(c,{key:2,label:"admin 和 editor"},{default:t(()=>[e(" 这里采用了 "),s(i,null,{default:t(()=>[e(`v-if="checkPermission(['admin', 'editor'])"`)]),_:1}),e(" 所以 admin 和 editor 都可以看见这句话 ")]),_:1})):v("",!0)]),_:1})]))])}}}),j=y(B,[["__scopeId","data-v-6d704b73"]]);export{j as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as s}from"./index-YVoBEDbL.js";import{ag as e,m as _,p as i,q as p,S as o,U as t,O as n}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const l={},m={class:"app-container"};function d(u,f){const r=e("el-link"),a=e("router-view"),c=e("el-card");return _(),i("div",m,[p("h4",null,[o(" 三级及其以上路由缓存功能默认关闭,需要请前往此配置文件中打开: "),t(r,{type:"primary",href:"https://github.com/un-pany/v3-admin-vite/blob/main/src/config/route.ts",target:"_blank"},{default:n(()=>[o(" src/config/route.ts ")]),_:1})]),t(c,{header:"二级路由 - menu1"},{default:n(()=>[t(a)]),_:1})])}const g=s(l,[["render",d],["__scopeId","data-v-6b5ec9cb"]]);export{g as default};
import{_ as s}from"./index-Fx4uz9-g.js";import{ag as e,m as _,p as i,q as p,S as o,U as t,O as n}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const l={},m={class:"app-container"};function d(u,f){const r=e("el-link"),a=e("router-view"),c=e("el-card");return _(),i("div",m,[p("h4",null,[o(" 三级及其以上路由缓存功能默认关闭,需要请前往此配置文件中打开: "),t(r,{type:"primary",href:"https://github.com/un-pany/v3-admin-vite/blob/main/src/config/route.ts",target:"_blank"},{default:n(()=>[o(" src/config/route.ts ")]),_:1})]),t(c,{header:"二级路由 - menu1"},{default:n(()=>[t(a)]),_:1})])}const g=s(l,[["render",d],["__scopeId","data-v-6b5ec9cb"]]);export{g as default};

View File

@ -1 +1 @@
import{_ as e}from"./index-YVoBEDbL.js";import{m as o,p as n,q as t}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.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:""},"该页面是一个 UnoCSS 的使用案例,其他页面依旧采用 Scss"),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=[s];function c(d,l){return o(),n("div",i,r)}const h=e(a,[["render",c]]);export{h as default};
import{_ as e}from"./index-Fx4uz9-g.js";import{m as o,p as n,q as t}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.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:""},"该页面是一个 UnoCSS 的使用案例,其他页面依旧采用 Scss"),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=[s];function c(d,l){return o(),n("div",i,r)}const h=e(a,[["render",c]]);export{h as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{i as e}from"./index-YVoBEDbL.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{i as e}from"./index-Fx4uz9-g.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};

View File

@ -1 +1 @@
import{_ as c,e as a}from"./index-YVoBEDbL.js";import{ag as s,m as n,p as r,U as _,l as i,M as p,Q as m,u as d}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const l={},u={class:"app-container center"};function f(t,o){const e=s("el-empty");return n(),r("div",u,[_(e,{description:"Admin 权限可见"})])}const v=c(l,[["render",f],["__scopeId","data-v-540a7bcc"]]),x={},h={class:"app-container center"};function y(t,o){const e=s("el-empty");return n(),r("div",h,[_(e,{description:"Editor 权限可见"})])}const $=c(x,[["render",y],["__scopeId","data-v-e677b768"]]),b=i({__name:"index",setup(t){const e=a().roles.includes("admin");return(k,A)=>(n(),p(m(d(e)?v:$)))}});export{b as default};
import{_ as c,e as a}from"./index-Fx4uz9-g.js";import{ag as s,m as n,p as r,U as _,l as i,M as p,Q as m,u as d}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const l={},u={class:"app-container center"};function f(t,o){const e=s("el-empty");return n(),r("div",u,[_(e,{description:"Admin 权限可见"})])}const v=c(l,[["render",f],["__scopeId","data-v-540a7bcc"]]),x={},h={class:"app-container center"};function y(t,o){const e=s("el-empty");return n(),r("div",h,[_(e,{description:"Editor 权限可见"})])}const $=c(x,[["render",y],["__scopeId","data-v-e677b768"]]),b=i({__name:"index",setup(t){const e=a().roles.includes("admin");return(k,A)=>(n(),p(m(d(e)?v:$)))}});export{b as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as n}from"./index-YVoBEDbL.js";import{ag as e,m as c,p as a,U as o,O as s}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.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 h=n(_,[["render",m]]);export{h as default};
import{_ as n}from"./index-Fx4uz9-g.js";import{ag as e,m as c,p as a,U as o,O as s}from"./vue-edbHIJ2J.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.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 h=n(_,[["render",m]]);export{h as default};

View File

@ -1 +1 @@
import{l as k,aD as C,r as f,Z as S,ag as s,m as U,p as z,U as e,q as c,O as t,u as i,a2 as I,S as q,a8 as F,aH as M,aI as R}from"./vue-edbHIJ2J.js";import{f as B,e as N,_ as D}from"./index-YVoBEDbL.js";import{v as E,w as H,x as K,y as L,z as Z}from"./element-6bs1qbFv.js";import{_ as A}from"./index.vue_vue_type_script_setup_true_lang-rtFXZDMh.js";import"./vxe-gaPTatyF.js";const O="/v3-admin-vite/static/logo-text-2-lXsH_ESZ.png",T=d=>(M("data-v-79326910"),d=d(),R(),d),X={class:"login-container"},$={class:"login-card"},j=T(()=>c("div",{class:"title"},[c("img",{src:O})],-1)),G={class:"content"},J=k({__name:"index",setup(d){const h=C(),g=f(null),u=f(!1),p=f(""),o=S({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 r;(r=g.value)==null||r.validate((a,l)=>{a?(u.value=!0,N().login(o).then(()=>{h.push({path:"/"})}).catch(()=>{m(),o.password=""}).finally(()=>{u.value=!1})):console.error("表单校验不通过",l)})},m=()=>{o.code="",p.value="",B().then(r=>{p.value=r.data})};return m(),(r,a)=>{const l=s("el-input"),_=s("el-form-item"),v=s("el-icon"),V=s("el-image"),y=s("el-button"),b=s("el-form");return U(),z("div",X,[e(A,{class:"theme-switch"}),c("div",$,[j,c("div",G,[e(b,{ref_key:"loginFormRef",ref:g,model:o,rules:w,onKeyup:F(x,["enter"])},{default:t(()=>[e(_,{prop:"username"},{default:t(()=>[e(l,{modelValue:o.username,"onUpdate:modelValue":a[0]||(a[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:t(()=>[e(l,{modelValue:o.password,"onUpdate:modelValue":a[1]||(a[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:t(()=>[e(l,{modelValue:o.code,"onUpdate:modelValue":a[2]||(a[2]=n=>o.code=n),modelModifiers:{trim:!0},placeholder:"验证码",type:"text",tabindex:"3","prefix-icon":i(K),maxlength:"7",size:"large"},{append:t(()=>[e(V,{src:p.value,onClick:m,draggable:"false"},{placeholder:t(()=>[e(v,null,{default:t(()=>[e(i(L))]),_:1})]),error:t(()=>[e(v,null,{default:t(()=>[e(i(Z))]),_:1})]),_:1},8,["src"])]),_:1},8,["modelValue","prefix-icon"])]),_:1}),e(y,{loading:u.value,type:"primary",size:"large",onClick:I(x,["prevent"])},{default:t(()=>[q("登 录")]),_:1},8,["loading"])]),_:1},8,["model"])])])])}}}),oe=D(J,[["__scopeId","data-v-79326910"]]);export{oe as default};
import{l as k,aD as C,r as f,Z as S,ag as s,m as U,p as z,U as e,q as c,O as t,u as i,a2 as I,S as q,a8 as F,aH as M,aI as R}from"./vue-edbHIJ2J.js";import{f as B,e as N,_ as D}from"./index-Fx4uz9-g.js";import{v as E,w as H,x as K,y as L,z as Z}from"./element-6bs1qbFv.js";import{_ as A}from"./index.vue_vue_type_script_setup_true_lang-RDjZ16F8.js";import"./vxe-gaPTatyF.js";const O="/v3-admin-vite/static/logo-text-2-lXsH_ESZ.png",T=d=>(M("data-v-79326910"),d=d(),R(),d),X={class:"login-container"},$={class:"login-card"},j=T(()=>c("div",{class:"title"},[c("img",{src:O})],-1)),G={class:"content"},J=k({__name:"index",setup(d){const h=C(),g=f(null),u=f(!1),p=f(""),o=S({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 r;(r=g.value)==null||r.validate((a,l)=>{a?(u.value=!0,N().login(o).then(()=>{h.push({path:"/"})}).catch(()=>{m(),o.password=""}).finally(()=>{u.value=!1})):console.error("表单校验不通过",l)})},m=()=>{o.code="",p.value="",B().then(r=>{p.value=r.data})};return m(),(r,a)=>{const l=s("el-input"),_=s("el-form-item"),v=s("el-icon"),V=s("el-image"),y=s("el-button"),b=s("el-form");return U(),z("div",X,[e(A,{class:"theme-switch"}),c("div",$,[j,c("div",G,[e(b,{ref_key:"loginFormRef",ref:g,model:o,rules:w,onKeyup:F(x,["enter"])},{default:t(()=>[e(_,{prop:"username"},{default:t(()=>[e(l,{modelValue:o.username,"onUpdate:modelValue":a[0]||(a[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:t(()=>[e(l,{modelValue:o.password,"onUpdate:modelValue":a[1]||(a[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:t(()=>[e(l,{modelValue:o.code,"onUpdate:modelValue":a[2]||(a[2]=n=>o.code=n),modelModifiers:{trim:!0},placeholder:"验证码",type:"text",tabindex:"3","prefix-icon":i(K),maxlength:"7",size:"large"},{append:t(()=>[e(V,{src:p.value,onClick:m,draggable:"false"},{placeholder:t(()=>[e(v,null,{default:t(()=>[e(i(L))]),_:1})]),error:t(()=>[e(v,null,{default:t(()=>[e(i(Z))]),_:1})]),_:1},8,["src"])]),_:1},8,["modelValue","prefix-icon"])]),_:1}),e(y,{loading:u.value,type:"primary",size:"large",onClick:I(x,["prevent"])},{default:t(()=>[q("登 录")]),_:1},8,["loading"])]),_:1},8,["model"])])])])}}}),oe=D(J,[["__scopeId","data-v-79326910"]]);export{oe as default};

View File

@ -1 +1 @@
import{h as k}from"./index-YVoBEDbL.js";import{A as g}from"./element-6bs1qbFv.js";import{l as h,ag as o,m as l,M as m,O as e,U as n,p as C,a7 as x,u as t,F as B,q as s,T}from"./vue-edbHIJ2J.js";const V=h({__name:"index",setup(b){const{themeList:c,activeThemeName:d,setTheme:r}=k();return(v,N)=>{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,T(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{V as _};
import{h as k}from"./index-Fx4uz9-g.js";import{A as g}from"./element-6bs1qbFv.js";import{l as h,ag as o,m as l,M as m,O as e,U as n,p as C,a7 as x,u as t,F as B,q as s,T}from"./vue-edbHIJ2J.js";const V=h({__name:"index",setup(b){const{themeList:c,activeThemeName:d,setTheme:r}=k();return(v,N)=>{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,T(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{V as _};

View File

@ -1 +1 @@
import{l as s,aD as n,ag as r,m as p,p as c,U as e,O as _,S as m}from"./vue-edbHIJ2J.js";import{S as i}from"./SwitchRoles-SMqDp3eS.js";import{_ as l}from"./index-YVoBEDbL.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const d={class:"app-container"},f=s({__name:"page",setup(g){const t=n(),a=()=>{t.push({path:"/403"})};return(h,u)=>{const o=r("el-tag");return p(),c("div",d,[e(i,{onChange:a}),e(o,{type:"warning",size:"large"},{default:_(()=>[m("当前页面只有 admin 权限可见,切换权限后将不能进入该页面")]),_:1})])}}}),S=l(f,[["__scopeId","data-v-7986af66"]]);export{S as default};
import{l as s,aD as n,ag as r,m as p,p as c,U as e,O as _,S as m}from"./vue-edbHIJ2J.js";import{S as i}from"./SwitchRoles-D87dCfXe.js";import{_ as l}from"./index-Fx4uz9-g.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const d={class:"app-container"},f=s({__name:"page",setup(g){const t=n(),a=()=>{t.push({path:"/403"})};return(h,u)=>{const o=r("el-tag");return p(),c("div",d,[e(i,{onChange:a}),e(o,{type:"warning",size:"large"},{default:_(()=>[m("当前页面只有 admin 权限可见,切换权限后将不能进入该页面")]),_:1})])}}}),S=l(f,[["__scopeId","data-v-7986af66"]]);export{S as default};

View File

@ -1 +1 @@
import{u as f}from"./useWatermark-cvdbE1cJ.js";import{l as C,r as v,ag as m,m as y,p as b,q as i,U as t,O as a,u as r,S as l,aH as W,aI as g}from"./vue-edbHIJ2J.js";import{_ as w}from"./index-YVoBEDbL.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const x=n=>(W("data-v-dbeea05d"),n=n(),g(),n),I={class:"app-container"},$=x(()=>i("h4",null," 该示例是演示:通过调用 hook开启或关闭水印 支持局部、全局、自定义样式(颜色、透明度、字体大小、字体、倾斜角度等),并自带防御(防删、防隐藏)和自适应功能 ",-1)),S=C({__name:"use-watermark",setup(n){const p=v(null),{setWatermark:c,clearWatermark:_}=f(p),{setWatermark:d,clearWatermark:k}=f();return(B,e)=>{const o=m("el-button"),u=m("el-button-group");return y(),b("div",I,[$,i("div",{ref_key:"localRef",ref:p,class:"local"},null,512),t(u,null,{default:a(()=>[t(o,{type:"primary",onClick:e[0]||(e[0]=s=>r(c)("局部水印",{color:"#409eff"}))},{default:a(()=>[l("创建局部水印")]),_:1}),t(o,{type:"warning",onClick:e[1]||(e[1]=s=>r(c)("没有防御功能的局部水印",{color:"#e6a23c",defense:!1}))},{default:a(()=>[l(" 关闭防御功能 ")]),_:1}),t(o,{type:"danger",onClick:r(_)},{default:a(()=>[l("清除局部水印")]),_:1},8,["onClick"])]),_:1}),t(u,null,{default:a(()=>[t(o,{type:"primary",onClick:e[2]||(e[2]=s=>r(d)("全局水印",{color:"#409eff"}))},{default:a(()=>[l("创建全局水印")]),_:1}),t(o,{type:"warning",onClick:e[3]||(e[3]=s=>r(d)("没有防御功能的全局水印",{color:"#e6a23c",defense:!1}))},{default:a(()=>[l(" 关闭防御功能 ")]),_:1}),t(o,{type:"danger",onClick:r(k)},{default:a(()=>[l("清除全局水印")]),_:1},8,["onClick"])]),_:1})])}}}),E=w(S,[["__scopeId","data-v-dbeea05d"]]);export{E as default};
import{u as f}from"./useWatermark-cvdbE1cJ.js";import{l as C,r as v,ag as m,m as y,p as b,q as i,U as t,O as a,u as r,S as l,aH as W,aI as g}from"./vue-edbHIJ2J.js";import{_ as w}from"./index-Fx4uz9-g.js";import"./element-6bs1qbFv.js";import"./vxe-gaPTatyF.js";const x=n=>(W("data-v-dbeea05d"),n=n(),g(),n),I={class:"app-container"},$=x(()=>i("h4",null," 该示例是演示:通过调用 hook开启或关闭水印 支持局部、全局、自定义样式(颜色、透明度、字体大小、字体、倾斜角度等),并自带防御(防删、防隐藏)和自适应功能 ",-1)),S=C({__name:"use-watermark",setup(n){const p=v(null),{setWatermark:c,clearWatermark:_}=f(p),{setWatermark:d,clearWatermark:k}=f();return(B,e)=>{const o=m("el-button"),u=m("el-button-group");return y(),b("div",I,[$,i("div",{ref_key:"localRef",ref:p,class:"local"},null,512),t(u,null,{default:a(()=>[t(o,{type:"primary",onClick:e[0]||(e[0]=s=>r(c)("局部水印",{color:"#409eff"}))},{default:a(()=>[l("创建局部水印")]),_:1}),t(o,{type:"warning",onClick:e[1]||(e[1]=s=>r(c)("没有防御功能的局部水印",{color:"#e6a23c",defense:!1}))},{default:a(()=>[l(" 关闭防御功能 ")]),_:1}),t(o,{type:"danger",onClick:r(_)},{default:a(()=>[l("清除局部水印")]),_:1},8,["onClick"])]),_:1}),t(u,null,{default:a(()=>[t(o,{type:"primary",onClick:e[2]||(e[2]=s=>r(d)("全局水印",{color:"#409eff"}))},{default:a(()=>[l("创建全局水印")]),_:1}),t(o,{type:"warning",onClick:e[3]||(e[3]=s=>r(d)("没有防御功能的全局水印",{color:"#e6a23c",defense:!1}))},{default:a(()=>[l(" 关闭防御功能 ")]),_:1}),t(o,{type:"danger",onClick:r(k)},{default:a(()=>[l("清除全局水印")]),_:1},8,["onClick"])]),_:1})])}}}),E=w(S,[["__scopeId","data-v-dbeea05d"]]);export{E as default};