mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-20 10:59:21 +08:00
Deploying to gh-pages from @ fc345dc77b24a89583f061dee420b7a29a5f4420 🚀
This commit is contained in:
parent
12f90fbeef
commit
ab8d30538d
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"./index-CCNeBscs.js";/* empty css */import{_ as n}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{t as c}from"./element-zW3XFg-9.js";import{ac as _,v as d,x as i,A as l,y as m,L as e,J as o,a2 as p}from"./vue-V9u7w0-f.js";const u={},f={class:"error"},v={class:"error-svg"};function x(r,t){const s=c,a=_("router-link");return d(),i("div",f,[l("div",v,[m(r.$slots,"default",{},void 0,!0)]),e(a,{to:"/"},{default:o(()=>[e(s,{type:"primary"},{default:o(()=>t[0]||(t[0]=[p(" 回到首页 ")])),_:1})]),_:1})])}const V=n(u,[["render",x],["__scopeId","data-v-19cd37a7"]]);export{V as L};
|
||||
import"./index-Bkps3Xdp.js";/* empty css */import{_ as n}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{t as c}from"./element-oKb_SSI8.js";import{ac as _,v as d,x as i,A as l,y as m,L as e,J as o,a2 as p}from"./vue-DGZ00u4B.js";const u={},f={class:"error"},v={class:"error-svg"};function x(r,t){const s=c,a=_("router-link");return d(),i("div",f,[l("div",v,[m(r.$slots,"default",{},void 0,!0)]),e(a,{to:"/"},{default:o(()=>[e(s,{type:"primary"},{default:o(()=>t[0]||(t[0]=[p(" 回到首页 ")])),_:1})]),_:1})])}const V=n(u,[["render",x],["__scopeId","data-v-19cd37a7"]]);export{V as L};
|
@ -1 +1 @@
|
||||
import{e as v}from"./index-CCNeBscs.js";/* empty css *//* empty css */import{n as w,ak as g,al as R,o as x}from"./element-zW3XFg-9.js";import{t as S,r as V,w as h,v as l,I as u,J as r,A as a,x as k,G as B,ai as E,u as _,a2 as b,O as C,L as n,h as N}from"./vue-V9u7w0-f.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const G={class:"switch-roles"},I=S({__name:"SwitchRoles",setup(L){const t=v(),o=V(t.roles[0]);return h(o,i=>{t.changeRoles(i)}),(i,e)=>{const c=w,d=g,p=R,m=x;return l(),u(m,{shadow:"never"},{default:r(()=>[a("div",null,[e[1]||(e[1]=a("span",null,"你的角色:",-1)),(l(!0),k(B,null,E(_(t).roles,(s,f)=>(l(),u(c,{key:f,effect:"plain",size:"large"},{default:r(()=>[b(C(s),1)]),_:2},1024))),128))]),a("div",G,[e[2]||(e[2]=a("span",null,"切换用户:",-1)),n(p,{modelValue:_(o),"onUpdate:modelValue":e[0]||(e[0]=s=>N(o)?o.value=s:null)},{default:r(()=>[n(d,{label:"editor",value:"editor"}),n(d,{label:"admin",value:"admin"})]),_:1},8,["modelValue"])])]),_:1})}}}),J=y(I,[["__scopeId","data-v-93f990ce"]]);export{J as S};
|
||||
import{e as v}from"./index-Bkps3Xdp.js";/* empty css *//* empty css */import{n as w,ak as g,al as R,o as x}from"./element-oKb_SSI8.js";import{t as S,r as V,w as h,v as l,I as u,J as r,A as a,x as k,G as B,ai as E,u as _,a2 as b,O as C,L as n,h as N}from"./vue-DGZ00u4B.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const G={class:"switch-roles"},I=S({__name:"SwitchRoles",setup(L){const t=v(),o=V(t.roles[0]);return h(o,i=>{t.changeRoles(i)}),(i,e)=>{const c=w,d=g,p=R,m=x;return l(),u(m,{shadow:"never"},{default:r(()=>[a("div",null,[e[1]||(e[1]=a("span",null,"你的角色:",-1)),(l(!0),k(B,null,E(_(t).roles,(s,f)=>(l(),u(c,{key:f,effect:"plain",size:"large"},{default:r(()=>[b(C(s),1)]),_:2},1024))),128))]),a("div",G,[e[2]||(e[2]=a("span",null,"切换用户:",-1)),n(p,{modelValue:_(o),"onUpdate:modelValue":e[0]||(e[0]=s=>N(o)?o.value=s:null)},{default:r(()=>[n(d,{label:"editor",value:"editor"}),n(d,{label:"admin",value:"admin"})]),_:1},8,["modelValue"])])]),_:1})}}}),J=y(I,[["__scopeId","data-v-93f990ce"]]);export{J as S};
|
@ -1 +1 @@
|
||||
import{j as g,e as x}from"./index-CCNeBscs.js";/* empty css *//* empty css *//* empty css *//* empty css */import{S as E}from"./SwitchRoles-CtRgARyx.js";import{t as P,o as w,aj as h,n as y,w as T,s as B}from"./element-zW3XFg-9.js";import{t as C,ak as z,v as a,x as D,L as o,J as t,R as p,I as r,a2 as s,u,F as f}from"./vue-V9u7w0-f.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-_W0GpTmX.js";function v(n){if(g(n)&&n.length>0){const{roles:i}=x();return i.some(e=>n.includes(e))}else return console.error("参数必须是一个数组且长度大于 0,参考:checkPermission(['admin','editor'])"),!1}const S={class:"app-container"},V=C({__name:"button-level",setup(n){return(i,e)=>{const l=P,m=w,b=h,d=y,c=T,k=B,_=z("permission");return a(),D("div",S,[o(E),o(m,{header:"权限指令 v-permission 示例",shadow:"never",class:"margin-top-20"},{default:t(()=>[p((a(),r(l,null,{default:t(()=>e[0]||(e[0]=[s(" admin ")])),_:1})),[[_,["admin"]]]),p((a(),r(l,null,{default:t(()=>e[1]||(e[1]=[s(" admin 和 editor ")])),_:1})),[[_,["admin","editor"]]])]),_:1}),o(m,{header:"权限函数 checkPermission 示例",shadow:"never",class:"margin-top-20"},{default:t(()=>[o(b,{type:"warning",size:"large"},{default:t(()=>e[2]||(e[2]=[s(" Element Plus 的 el-tab-pane 和 el-table-column 以及其它动态渲染 DOM 的场景不适合使用 v-permission 这种情况下你可以通过 v-if + checkPermission 来实现 ")])),_:1}),o(k,{type:"border-card",class:"margin-top-20"},{default:t(()=>[u(v)(["admin"])?(a(),r(c,{key:0,label:"admin"},{default:t(()=>[o(d,{size:"large"},{default:t(()=>e[3]||(e[3]=[s(` v-if="checkPermission(['admin'])" `)])),_:1})]),_:1})):f("",!0),u(v)(["admin","editor"])?(a(),r(c,{key:1,label:"admin 和 editor"},{default:t(()=>[o(d,{size:"large"},{default:t(()=>e[4]||(e[4]=[s(` v-if="checkPermission(['admin', 'editor'])" `)])),_:1})]),_:1})):f("",!0)]),_:1})]),_:1})])}}}),G=N(V,[["__scopeId","data-v-3d1bb89f"]]);export{G as default};
|
||||
import{j as g,e as x}from"./index-Bkps3Xdp.js";/* empty css *//* empty css *//* empty css *//* empty css */import{S as E}from"./SwitchRoles-DK4iNpwY.js";import{t as P,o as w,aj as h,n as y,w as T,s as B}from"./element-oKb_SSI8.js";import{t as C,ak as z,v as a,x as D,L as o,J as t,R as p,I as r,a2 as s,u,F as f}from"./vue-DGZ00u4B.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-BHVxIU4B.js";function v(n){if(g(n)&&n.length>0){const{roles:i}=x();return i.some(e=>n.includes(e))}else return console.error("参数必须是一个数组且长度大于 0,参考:checkPermission(['admin','editor'])"),!1}const S={class:"app-container"},V=C({__name:"button-level",setup(n){return(i,e)=>{const l=P,m=w,b=h,d=y,c=T,k=B,_=z("permission");return a(),D("div",S,[o(E),o(m,{header:"权限指令 v-permission 示例",shadow:"never",class:"margin-top-20"},{default:t(()=>[p((a(),r(l,null,{default:t(()=>e[0]||(e[0]=[s(" admin ")])),_:1})),[[_,["admin"]]]),p((a(),r(l,null,{default:t(()=>e[1]||(e[1]=[s(" admin 和 editor ")])),_:1})),[[_,["admin","editor"]]])]),_:1}),o(m,{header:"权限函数 checkPermission 示例",shadow:"never",class:"margin-top-20"},{default:t(()=>[o(b,{type:"warning",size:"large"},{default:t(()=>e[2]||(e[2]=[s(" Element Plus 的 el-tab-pane 和 el-table-column 以及其它动态渲染 DOM 的场景不适合使用 v-permission 这种情况下你可以通过 v-if + checkPermission 来实现 ")])),_:1}),o(k,{type:"border-card",class:"margin-top-20"},{default:t(()=>[u(v)(["admin"])?(a(),r(c,{key:0,label:"admin"},{default:t(()=>[o(d,{size:"large"},{default:t(()=>e[3]||(e[3]=[s(` v-if="checkPermission(['admin'])" `)])),_:1})]),_:1})):f("",!0),u(v)(["admin","editor"])?(a(),r(c,{key:1,label:"admin 和 editor"},{default:t(()=>[o(d,{size:"large"},{default:t(()=>e[4]||(e[4]=[s(` v-if="checkPermission(['admin', 'editor'])" `)])),_:1})]),_:1})):f("",!0)]),_:1})]),_:1})])}}}),G=N(V,[["__scopeId","data-v-3d1bb89f"]]);export{G as default};
|
1
assets/el-dialog-Cop0q8z2.css
Normal file
1
assets/el-dialog-Cop0q8z2.css
Normal file
@ -0,0 +1 @@
|
||||
:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:.5}.v-modal-enter{animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{background:var(--el-popup-modal-bg-color);height:100%;left:0;opacity:var(--el-popup-modal-opacity);position:fixed;top:0;width:100%}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:16px;--el-dialog-border-radius:var(--el-border-radius-base);background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;margin:var(--el-dialog-margin-top,15vh) auto 50px;overflow-wrap:break-word;padding:var(--el-dialog-padding-primary);position:relative;width:var(--el-dialog-width,50%)}.el-dialog:focus{outline:none!important}.el-dialog.is-align-center{margin:auto}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;border-radius:0;height:100%;margin-bottom:0;overflow:auto}.el-dialog__wrapper{bottom:0;left:0;margin:0;overflow:auto;position:fixed;right:0;top:0}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none}.el-dialog__header{padding-bottom:var(--el-dialog-padding-primary)}.el-dialog__header.show-close{padding-right:calc(var(--el-dialog-padding-primary) + var(--el-message-close-size, 16px))}.el-dialog__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:48px;outline:none;padding:0;position:absolute;right:0;top:0;width:48px}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{color:var(--el-text-color-primary);font-size:var(--el-dialog-title-font-size);line-height:var(--el-dialog-font-line-height)}.el-dialog__body{color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size)}.el-dialog__footer{box-sizing:border-box;padding-top:var(--el-dialog-padding-primary);text-align:right}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-overlay-dialog{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}.dialog-fade-enter-active{animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{animation:dialog-fade-out var(--el-transition-duration)}@keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}
|
@ -1 +0,0 @@
|
||||
:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:.5}.v-modal-enter{animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{background:var(--el-popup-modal-bg-color);height:100%;left:0;opacity:var(--el-popup-modal-opacity);position:fixed;top:0;width:100%}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:16px;--el-dialog-border-radius:var(--el-border-radius-base);background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;margin:var(--el-dialog-margin-top,15vh) auto 50px;overflow-wrap:break-word;padding:var(--el-dialog-padding-primary);position:relative;width:var(--el-dialog-width,50%)}.el-dialog:focus{outline:none!important}.el-dialog.is-align-center{margin:auto}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;height:100%;margin-bottom:0;overflow:auto}.el-dialog__wrapper{bottom:0;left:0;margin:0;overflow:auto;position:fixed;right:0;top:0}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none}.el-dialog__header{padding-bottom:var(--el-dialog-padding-primary)}.el-dialog__header.show-close{padding-right:calc(var(--el-dialog-padding-primary) + var(--el-message-close-size, 16px))}.el-dialog__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:48px;outline:none;padding:0;position:absolute;right:0;top:0;width:48px}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{color:var(--el-text-color-primary);font-size:var(--el-dialog-title-font-size);line-height:var(--el-dialog-font-line-height)}.el-dialog__body{color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size)}.el-dialog__footer{box-sizing:border-box;padding-top:var(--el-dialog-padding-primary);text-align:right}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-overlay-dialog{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}.dialog-fade-enter-active{animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{animation:dialog-fade-out var(--el-transition-duration)}@keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}
|
1
assets/el-input-BCtgWP8V.css
Normal file
1
assets/el-input-BCtgWP8V.css
Normal file
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{f as e}from"./index-CCNeBscs.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{f as e}from"./index-Bkps3Xdp.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};
|
File diff suppressed because one or more lines are too long
20
assets/element-oKb_SSI8.js
Normal file
20
assets/element-oKb_SSI8.js
Normal file
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 n}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{v as o,x as a,A as e}from"./vue-V9u7w0-f.js";const r={},i={"uno-padding-20":"","h-full":"","text-center":"",flex:"","select-none":"","all:transition-400":""};function s(c,t){return o(),a("div",i,t[0]||(t[0]=[e("div",{ma:""},[e("div",{"text-5xl":"",fw100:"","animate-bounce-alt":"","animate-count-infinite":"","animate-duration-1s":""}," UnoCSS "),e("div",{op30:"","text-lg":"",fw300:"",m1:"","dark:op60":""}," 该页面是一个 UnoCSS 的使用案例,其他页面依旧采用 Scss "),e("div",{m2:"","uno-flex-x-center":"","text-lg":"",op30:"",hover:"op80","dark:op60":"","dark:hover":"op80"},[e("a",{href:"https://antfu.me/posts/reimagine-atomic-css-zh",target:"_blank"}," 推荐阅读:重新构想原子化 CSS ")])],-1)]))}const f=n(r,[["render",s]]);export{f as default};
|
||||
import{_ as n}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{v as o,x as a,A as e}from"./vue-DGZ00u4B.js";const r={},i={"uno-padding-20":"","h-full":"","text-center":"",flex:"","select-none":"","all:transition-400":""};function s(c,t){return o(),a("div",i,t[0]||(t[0]=[e("div",{ma:""},[e("div",{"text-5xl":"",fw100:"","animate-bounce-alt":"","animate-count-infinite":"","animate-duration-1s":""}," UnoCSS "),e("div",{op30:"","text-lg":"",fw300:"",m1:"","dark:op60":""}," 该页面是一个 UnoCSS 的使用案例,其他页面依旧采用 Scss "),e("div",{m2:"","uno-flex-x-center":"","text-lg":"",op30:"",hover:"op80","dark:op60":"","dark:hover":"op80"},[e("a",{href:"https://antfu.me/posts/reimagine-atomic-css-zh",target:"_blank"}," 推荐阅读:重新构想原子化 CSS ")])],-1)]))}const f=n(r,[["render",s]]);export{f as default};
|
@ -1 +1 @@
|
||||
import{t,ay as r,az as a,v as o,x as s}from"./vue-V9u7w0-f.js";const m=t({__name:"index",setup(n){const e=r();return a().replace({path:`/${e.params.path}`,query:e.query}),(c,p)=>(o(),s("div"))}});export{m as default};
|
||||
import{t,ay as r,az as a,v as o,x as s}from"./vue-DGZ00u4B.js";const m=t({__name:"index",setup(n){const e=r();return a().replace({path:`/${e.params.path}`,query:e.query}),(c,p)=>(o(),s("div"))}});export{m as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/index-CQ3ybqyO.css
Normal file
1
assets/index-CQ3ybqyO.css
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import"./index-CCNeBscs.js";/* empty css */import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{ad as i,o as p}from"./element-zW3XFg-9.js";import{ac as _,v as l,x as m,A as o,L as e,J as r,a2 as d}from"./vue-V9u7w0-f.js";import"./vxe-_W0GpTmX.js";const f={},u={class:"app-container"};function v(x,t){const n=i,a=_("router-view"),s=p;return l(),m("div",u,[o("h4",null,[t[1]||(t[1]=o("span",null," 三级及其以上路由缓存功能默认关闭,需要请前往此配置文件中打开: ",-1)),e(n,{type:"primary",href:"https://github.com/un-pany/v3-admin-vite/blob/main/src/router/config.ts",target:"_blank"},{default:r(()=>t[0]||(t[0]=[d(" src/router/config.ts ")])),_:1})]),e(s,{header:"二级路由"},{default:r(()=>[e(a)]),_:1})])}const B=c(f,[["render",v],["__scopeId","data-v-688a264b"]]);export{B as default};
|
||||
import"./index-Bkps3Xdp.js";/* empty css */import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{ad as i,o as p}from"./element-oKb_SSI8.js";import{ac as _,v as l,x as m,A as o,L as e,J as r,a2 as d}from"./vue-DGZ00u4B.js";import"./vxe-BHVxIU4B.js";const f={},u={class:"app-container"};function v(x,t){const n=i,a=_("router-view"),s=p;return l(),m("div",u,[o("h4",null,[t[1]||(t[1]=o("span",null," 三级及其以上路由缓存功能默认关闭,需要请前往此配置文件中打开: ",-1)),e(n,{type:"primary",href:"https://github.com/un-pany/v3-admin-vite/blob/main/src/router/config.ts",target:"_blank"},{default:r(()=>t[0]||(t[0]=[d(" src/router/config.ts ")])),_:1})]),e(s,{header:"二级路由"},{default:r(()=>[e(a)]),_:1})])}const B=c(f,[["render",v],["__scopeId","data-v-688a264b"]]);export{B as default};
|
@ -1 +1 @@
|
||||
import"./index-CCNeBscs.js";/* empty css *//* empty css */import{o as r,C as s}from"./element-zW3XFg-9.js";import{t as p,r as m,v as c,x as d,L as o,J as i,u,h as _}from"./vue-V9u7w0-f.js";import"./vxe-_W0GpTmX.js";const f={class:"app-container"},L=p({name:"Level3",__name:"index",setup(x){const e=m("");return(h,t)=>{const a=s,n=r;return c(),d("div",f,[o(n,{header:"三级路由"},{default:i(()=>[o(a,{modelValue:u(e),"onUpdate:modelValue":t[0]||(t[0]=l=>_(e)?e.value=l:null),placeholder:"输入任意字符测试缓存"},null,8,["modelValue"])]),_:1})])}}});export{L as default};
|
||||
import"./index-Bkps3Xdp.js";/* empty css *//* empty css */import{o as r,C as s}from"./element-oKb_SSI8.js";import{t as p,r as m,v as c,x as d,L as o,J as i,u,h as _}from"./vue-DGZ00u4B.js";import"./vxe-BHVxIU4B.js";const f={class:"app-container"},L=p({name:"Level3",__name:"index",setup(x){const e=m("");return(h,t)=>{const a=s,n=r;return c(),d("div",f,[o(n,{header:"三级路由"},{default:i(()=>[o(a,{modelValue:u(e),"onUpdate:modelValue":t[0]||(t[0]=l=>_(e)?e.value=l:null),placeholder:"输入任意字符测试缓存"},null,8,["modelValue"])]),_:1})])}}});export{L as default};
|
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{f as B,e as U,u as N}from"./index-CCNeBscs.js";/* empty css *//* empty css *//* empty css */import{t as k,v as h,x as E,aE as R,H as q,r as m,az as A,U as L,u as e,I as T,F as $,L as o,A as c,J as a,al as J,M as K,a2 as O}from"./vue-V9u7w0-f.js";import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-Bp3sHccs.js";import{W as H,X as W,Y as X,Z as Y,_ as Z,$ as j,E as G,C as P,a0 as Q,k as ee,a1 as oe,t as se}from"./element-zW3XFg-9.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-_W0GpTmX.js";/* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";const te="/v3-admin-vite/assets/logo-text-2-CVewf8RJ.png";function ae(){return B({url:"login/code",method:"get"})}function re(r){return B({url:"users/login",method:"post",data:r})}const le=k({__name:"Owl",props:{closeEyes:{type:Boolean}},setup(r){const i=r;return(p,u)=>(h(),E("div",{class:q(["owl",{"owl-password":i.closeEyes}])},u[0]||(u[0]=[R('<div class="hand-down-left" data-v-9d98ae89></div><div class="hand-down-right" data-v-9d98ae89></div><div class="hand-up-left" data-v-9d98ae89></div><div class="hand-up-right" data-v-9d98ae89></div><div class="close-eyes" data-v-9d98ae89></div>',5)]),2))}}),ne=C(le,[["__scopeId","data-v-9d98ae89"]]);function de(){const r=m(!1);return{isFocus:r,handleBlur:()=>{r.value=!1},handleFocus:()=>{r.value=!0}}}const ie={class:"login-container"},ue={class:"login-card"},ce={class:"content"},me=k({__name:"index",setup(r){const i=A(),p=U(),u=N(),{isFocus:b,handleBlur:w,handleFocus:x}=de(),y=m(null),f=m(!1),_=m(""),t=L({username:"admin",password:"12345678",code:""}),I={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"}]};function F(){var l;(l=y.value)==null||l.validate(s=>{if(!s){G.error("表单校验不通过");return}f.value=!0,re(t).then(({data:n})=>{p.setToken(n.token),i.push("/")}).catch(()=>{g(),t.password=""}).finally(()=>{f.value=!1})})}function g(){t.code="",_.value="",ae().then(l=>{_.value=l.data})}return g(),(l,s)=>{const n=P,v=Q,V=ee,S=oe,z=se,M=H;return h(),E("div",ie,[e(u).showThemeSwitch?(h(),T(D,{key:0,class:"theme-switch"})):$("",!0),o(ne,{"close-eyes":e(b)},null,8,["close-eyes"]),c("div",ue,[s[4]||(s[4]=c("div",{class:"title"},[c("img",{src:te})],-1)),c("div",ce,[o(M,{ref_key:"loginFormRef",ref:y,model:e(t),rules:I,onKeyup:J(F,["enter"])},{default:a(()=>[o(v,{prop:"username"},{default:a(()=>[o(n,{modelValue:e(t).username,"onUpdate:modelValue":s[0]||(s[0]=d=>e(t).username=d),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":e(W),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),o(v,{prop:"password"},{default:a(()=>[o(n,{modelValue:e(t).password,"onUpdate:modelValue":s[1]||(s[1]=d=>e(t).password=d),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":e(X),size:"large","show-password":"",onBlur:e(w),onFocus:e(x)},null,8,["modelValue","prefix-icon","onBlur","onFocus"])]),_:1}),o(v,{prop:"code"},{default:a(()=>[o(n,{modelValue:e(t).code,"onUpdate:modelValue":s[2]||(s[2]=d=>e(t).code=d),modelModifiers:{trim:!0},placeholder:"验证码",type:"text",tabindex:"3","prefix-icon":e(Y),maxlength:"7",size:"large",onBlur:e(w),onFocus:e(x)},{append:a(()=>[o(S,{src:e(_),draggable:"false",onClick:g},{placeholder:a(()=>[o(V,null,{default:a(()=>[o(e(Z))]),_:1})]),error:a(()=>[o(V,null,{default:a(()=>[o(e(j))]),_:1})]),_:1},8,["src"])]),_:1},8,["modelValue","prefix-icon","onBlur","onFocus"])]),_:1}),o(z,{loading:e(f),type:"primary",size:"large",onClick:K(F,["prevent"])},{default:a(()=>s[3]||(s[3]=[O(" 登 录 ")])),_:1},8,["loading"])]),_:1},8,["model"])])])])}}}),ke=C(me,[["__scopeId","data-v-85c0703d"]]);export{ke as default};
|
||||
import{f as B,e as U,u as N}from"./index-Bkps3Xdp.js";/* empty css *//* empty css *//* empty css */import{t as k,v as h,x as E,aE as R,H as q,r as m,az as A,U as L,u as e,I as T,F as $,L as o,A as c,J as a,al as J,M as K,a2 as O}from"./vue-DGZ00u4B.js";import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-CLBi0Znk.js";import{W as H,X as W,Y as X,Z as Y,_ as Z,$ as j,E as G,C as P,a0 as Q,k as ee,a1 as oe,t as se}from"./element-oKb_SSI8.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-BHVxIU4B.js";/* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";const te="/v3-admin-vite/assets/logo-text-2-CVewf8RJ.png";function ae(){return B({url:"login/code",method:"get"})}function re(r){return B({url:"users/login",method:"post",data:r})}const le=k({__name:"Owl",props:{closeEyes:{type:Boolean}},setup(r){const i=r;return(p,u)=>(h(),E("div",{class:q(["owl",{"owl-password":i.closeEyes}])},u[0]||(u[0]=[R('<div class="hand-down-left" data-v-9d98ae89></div><div class="hand-down-right" data-v-9d98ae89></div><div class="hand-up-left" data-v-9d98ae89></div><div class="hand-up-right" data-v-9d98ae89></div><div class="close-eyes" data-v-9d98ae89></div>',5)]),2))}}),ne=C(le,[["__scopeId","data-v-9d98ae89"]]);function de(){const r=m(!1);return{isFocus:r,handleBlur:()=>{r.value=!1},handleFocus:()=>{r.value=!0}}}const ie={class:"login-container"},ue={class:"login-card"},ce={class:"content"},me=k({__name:"index",setup(r){const i=A(),p=U(),u=N(),{isFocus:b,handleBlur:w,handleFocus:x}=de(),y=m(null),f=m(!1),_=m(""),t=L({username:"admin",password:"12345678",code:""}),I={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"}]};function F(){var l;(l=y.value)==null||l.validate(s=>{if(!s){G.error("表单校验不通过");return}f.value=!0,re(t).then(({data:n})=>{p.setToken(n.token),i.push("/")}).catch(()=>{g(),t.password=""}).finally(()=>{f.value=!1})})}function g(){t.code="",_.value="",ae().then(l=>{_.value=l.data})}return g(),(l,s)=>{const n=P,v=Q,V=ee,S=oe,z=se,M=H;return h(),E("div",ie,[e(u).showThemeSwitch?(h(),T(D,{key:0,class:"theme-switch"})):$("",!0),o(ne,{"close-eyes":e(b)},null,8,["close-eyes"]),c("div",ue,[s[4]||(s[4]=c("div",{class:"title"},[c("img",{src:te})],-1)),c("div",ce,[o(M,{ref_key:"loginFormRef",ref:y,model:e(t),rules:I,onKeyup:J(F,["enter"])},{default:a(()=>[o(v,{prop:"username"},{default:a(()=>[o(n,{modelValue:e(t).username,"onUpdate:modelValue":s[0]||(s[0]=d=>e(t).username=d),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":e(W),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),o(v,{prop:"password"},{default:a(()=>[o(n,{modelValue:e(t).password,"onUpdate:modelValue":s[1]||(s[1]=d=>e(t).password=d),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":e(X),size:"large","show-password":"",onBlur:e(w),onFocus:e(x)},null,8,["modelValue","prefix-icon","onBlur","onFocus"])]),_:1}),o(v,{prop:"code"},{default:a(()=>[o(n,{modelValue:e(t).code,"onUpdate:modelValue":s[2]||(s[2]=d=>e(t).code=d),modelModifiers:{trim:!0},placeholder:"验证码",type:"text",tabindex:"3","prefix-icon":e(Y),maxlength:"7",size:"large",onBlur:e(w),onFocus:e(x)},{append:a(()=>[o(S,{src:e(_),draggable:"false",onClick:g},{placeholder:a(()=>[o(V,null,{default:a(()=>[o(e(Z))]),_:1})]),error:a(()=>[o(V,null,{default:a(()=>[o(e(j))]),_:1})]),_:1},8,["src"])]),_:1},8,["modelValue","prefix-icon","onBlur","onFocus"])]),_:1}),o(z,{loading:e(f),type:"primary",size:"large",onClick:K(F,["prevent"])},{default:a(()=>s[3]||(s[3]=[O(" 登 录 ")])),_:1},8,["loading"])]),_:1},8,["model"])])])])}}}),ke=C(me,[["__scopeId","data-v-85c0703d"]]);export{ke as default};
|
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{h as y}from"./index-CCNeBscs.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";import{a2 as g,k as E,q as T,y as v,z as C,x as B}from"./element-zW3XFg-9.js";import{t as D,v as c,I as d,J as e,L as s,x as M,ai as V,u as l,G as b,A as p,O as I}from"./vue-V9u7w0-f.js";const G=D({__name:"index",setup(L){const{themeList:_,activeThemeName:u,setTheme:h}=y();function f({clientX:o,clientY:n},r){const m=Math.hypot(Math.max(o,window.innerWidth-o),Math.max(n,window.innerHeight-n)),t=document.documentElement.style;t.setProperty("--v3-theme-x",`${o}px`),t.setProperty("--v3-theme-y",`${n}px`),t.setProperty("--v3-theme-r",`${m}px`);const a=()=>{h(r)};document.startViewTransition?document.startViewTransition(a):a()}return(o,n)=>{const r=E,m=T,t=B,a=v,w=C;return c(),d(w,{trigger:"click"},{dropdown:e(()=>[s(a,null,{default:e(()=>[(c(!0),M(b,null,V(l(_),(i,x)=>(c(),d(t,{key:x,disabled:l(u)===i.name,onClick:k=>f(k,i.name)},{default:e(()=>[p("span",null,I(i.title),1)]),_:2},1032,["disabled","onClick"]))),128))]),_:1})]),default:e(()=>[p("div",null,[s(m,{effect:"dark",content:"主题模式",placement:"bottom"},{default:e(()=>[s(r,{size:20},{default:e(()=>[s(l(g))]),_:1})]),_:1})])]),_:1})}}});export{G as _};
|
||||
import{h as y}from"./index-Bkps3Xdp.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";import{a2 as g,k as E,q as T,y as v,z as C,x as B}from"./element-oKb_SSI8.js";import{t as D,v as c,I as d,J as e,L as s,x as M,ai as V,u as l,G as b,A as p,O as I}from"./vue-DGZ00u4B.js";const G=D({__name:"index",setup(L){const{themeList:_,activeThemeName:u,setTheme:h}=y();function f({clientX:o,clientY:n},r){const m=Math.hypot(Math.max(o,window.innerWidth-o),Math.max(n,window.innerHeight-n)),t=document.documentElement.style;t.setProperty("--v3-theme-x",`${o}px`),t.setProperty("--v3-theme-y",`${n}px`),t.setProperty("--v3-theme-r",`${m}px`);const a=()=>{h(r)};document.startViewTransition?document.startViewTransition(a):a()}return(o,n)=>{const r=E,m=T,t=B,a=v,w=C;return c(),d(w,{trigger:"click"},{dropdown:e(()=>[s(a,null,{default:e(()=>[(c(!0),M(b,null,V(l(_),(i,x)=>(c(),d(t,{key:x,disabled:l(u)===i.name,onClick:k=>f(k,i.name)},{default:e(()=>[p("span",null,I(i.title),1)]),_:2},1032,["disabled","onClick"]))),128))]),_:1})]),default:e(()=>[p("div",null,[s(m,{effect:"dark",content:"主题模式",placement:"bottom"},{default:e(()=>[s(r,{size:20},{default:e(()=>[s(l(g))]),_:1})]),_:1})])]),_:1})}}});export{G as _};
|
@ -1 +1 @@
|
||||
import"./index-CCNeBscs.js";/* empty css */import{S as a}from"./SwitchRoles-CtRgARyx.js";import{o as r}from"./element-zW3XFg-9.js";import{t as s,v as n,x as p,L as t,J as c,a2 as m}from"./vue-V9u7w0-f.js";import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-_W0GpTmX.js";/* empty css */const i={class:"app-container"},d=s({__name:"page-level",setup(l){return(f,e)=>{const o=r;return n(),p("div",i,[t(a),t(o,{shadow:"never",class:"content"},{default:c(()=>e[0]||(e[0]=[m(" 当前页面只有「Admin」角色可见,切换角色后将不能进入该页面 ")])),_:1})])}}}),B=_(d,[["__scopeId","data-v-a30433e8"]]);export{B as default};
|
||||
import"./index-Bkps3Xdp.js";/* empty css */import{S as a}from"./SwitchRoles-DK4iNpwY.js";import{o as r}from"./element-oKb_SSI8.js";import{t as s,v as n,x as p,L as t,J as c,a2 as m}from"./vue-DGZ00u4B.js";import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-BHVxIU4B.js";/* empty css */const i={class:"app-container"},d=s({__name:"page-level",setup(l){return(f,e)=>{const o=r;return n(),p("div",i,[t(a),t(o,{shadow:"never",class:"content"},{default:c(()=>e[0]||(e[0]=[m(" 当前页面只有「Admin」角色可见,切换角色后将不能进入该页面 ")])),_:1})])}}}),B=_(d,[["__scopeId","data-v-a30433e8"]]);export{B as default};
|
@ -1 +1 @@
|
||||
import"./index-CCNeBscs.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{r as u,f as w,t as x,v as r,x as f,L as d,J as i,R as v,u as l,I as p,a2 as R,G as k,ai as A,h as E,z as C}from"./vue-V9u7w0-f.js";import{E as D,o as L,a3 as M,ae as T,af as B,ag as F}from"./element-zW3XFg-9.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-_W0GpTmX.js";function O(c){const{api:a}=c,o=u(!1),e=u([]),m=u(""),t=()=>{o.value=!0,e.value=[],a().then(s=>{e.value=s.data}).finally(()=>{o.value=!1})};return w(()=>{t()}),{loading:o,options:e,value:m}}const P={code:0,data:[{label:"苹果",value:1},{label:"香蕉",value:2},{label:"橘子",value:3,disabled:!0}],message:"获取 Select 数据成功"},S="接口发生错误";function y(){return new Promise((c,a)=>{setTimeout(()=>{Math.random()<.8?c(P):(a(new Error(S)),D.error(S))},2e3)})}const G={class:"app-container"},I=x({__name:"use-fetch-select",setup(c){const{loading:a,options:o,value:e}=O({api:y});return(m,t)=>{const s=L,h=F,g=T,V=B,_=M;return r(),f("div",G,[d(s,{shadow:"never"},{default:i(()=>t[2]||(t[2]=[R(" 该示例是演示:通过 composable 自动调用 api 后拿到 Select 组件需要的数据并传递给 Select 组件 ")])),_:1}),v((r(),p(s,{header:"Select 示例",shadow:"never"},{default:i(()=>[d(g,{modelValue:l(e),"onUpdate:modelValue":t[0]||(t[0]=n=>E(e)?e.value=n:null),filterable:""},{default:i(()=>[(r(!0),f(k,null,A(l(o),(n,b)=>(r(),p(h,C({ref_for:!0},n,{key:b,placeholder:"请选择"}),null,16))),128))]),_:1},8,["modelValue"])]),_:1})),[[_,l(a)]]),v((r(),p(s,{header:"Select V2 示例(如果数据量过多,可以选择该组件)",shadow:"never"},{default:i(()=>[d(V,{modelValue:l(e),"onUpdate:modelValue":t[1]||(t[1]=n=>E(e)?e.value=n:null),options:l(o),filterable:"",placeholder:"请选择"},null,8,["modelValue","options"])]),_:1})),[[_,l(a)]])])}}}),Y=N(I,[["__scopeId","data-v-15aa76c1"]]);export{Y as default};
|
||||
import"./index-Bkps3Xdp.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{r as u,f as w,t as x,v as r,x as f,L as d,J as i,R as v,u as l,I as p,a2 as R,G as k,ai as A,h as E,z as C}from"./vue-DGZ00u4B.js";import{E as D,o as L,a3 as M,ae as T,af as B,ag as F}from"./element-oKb_SSI8.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-BHVxIU4B.js";function O(c){const{api:a}=c,o=u(!1),e=u([]),m=u(""),t=()=>{o.value=!0,e.value=[],a().then(s=>{e.value=s.data}).finally(()=>{o.value=!1})};return w(()=>{t()}),{loading:o,options:e,value:m}}const P={code:0,data:[{label:"苹果",value:1},{label:"香蕉",value:2},{label:"橘子",value:3,disabled:!0}],message:"获取 Select 数据成功"},S="接口发生错误";function y(){return new Promise((c,a)=>{setTimeout(()=>{Math.random()<.8?c(P):(a(new Error(S)),D.error(S))},2e3)})}const G={class:"app-container"},I=x({__name:"use-fetch-select",setup(c){const{loading:a,options:o,value:e}=O({api:y});return(m,t)=>{const s=L,h=F,g=T,V=B,_=M;return r(),f("div",G,[d(s,{shadow:"never"},{default:i(()=>t[2]||(t[2]=[R(" 该示例是演示:通过 composable 自动调用 api 后拿到 Select 组件需要的数据并传递给 Select 组件 ")])),_:1}),v((r(),p(s,{header:"Select 示例",shadow:"never"},{default:i(()=>[d(g,{modelValue:l(e),"onUpdate:modelValue":t[0]||(t[0]=n=>E(e)?e.value=n:null),filterable:""},{default:i(()=>[(r(!0),f(k,null,A(l(o),(n,b)=>(r(),p(h,C({ref_for:!0},n,{key:b,placeholder:"请选择"}),null,16))),128))]),_:1},8,["modelValue"])]),_:1})),[[_,l(a)]]),v((r(),p(s,{header:"Select V2 示例(如果数据量过多,可以选择该组件)",shadow:"never"},{default:i(()=>[d(V,{modelValue:l(e),"onUpdate:modelValue":t[1]||(t[1]=n=>E(e)?e.value=n:null),options:l(o),filterable:"",placeholder:"请选择"},null,8,["modelValue","options"])]),_:1})),[[_,l(a)]])])}}}),Y=N(I,[["__scopeId","data-v-15aa76c1"]]);export{Y as default};
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
import"./index-CCNeBscs.js";/* empty css *//* empty css *//* empty css */import{ah as m,o as _,E as u,t as g}from"./element-zW3XFg-9.js";import{t as f,v as E,x as y,L as a,J as n,a2 as c}from"./vue-V9u7w0-f.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-_W0GpTmX.js";const x={lock:!0,text:"加载中..."},p=(o,e={})=>{let r;return async(...i)=>{try{return r=m.service({...x,...e}),await o(...i)}finally{r.close()}}},v={code:0,data:{list:[]},message:"获取成功"};function C(o){return new Promise(e=>{setTimeout(()=>{e({...v,data:{list:o}})},1e3)})}function S(){return new Promise((o,e)=>{setTimeout(()=>{e(new Error("发生错误"))},1e3)})}const k={class:"app-container"},A=`
|
||||
import"./index-Bkps3Xdp.js";/* empty css *//* empty css *//* empty css */import{ah as m,o as _,E as u,t as g}from"./element-oKb_SSI8.js";import{t as f,v as E,x as y,L as a,J as n,a2 as c}from"./vue-DGZ00u4B.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-BHVxIU4B.js";const x={lock:!0,text:"加载中..."},p=(o,e={})=>{let r;return async(...i)=>{try{return r=m.service({...x,...e}),await o(...i)}finally{r.close()}}},v={code:0,data:{list:[]},message:"获取成功"};function C(o){return new Promise(e=>{setTimeout(()=>{e({...v,data:{list:o}})},1e3)})}function S(){return new Promise((o,e)=>{setTimeout(()=>{e(new Error("发生错误"))},1e3)})}const k={class:"app-container"},A=`
|
||||
<path class="path" d="
|
||||
M 30 15
|
||||
L 28 17
|
@ -1 +1 @@
|
||||
import"./index-CCNeBscs.js";/* empty css *//* empty css *//* empty css */import{u as d}from"./useWatermark-XzwShjbX.js";import{o as _,t as C,ai as v}from"./element-zW3XFg-9.js";import{t as y,r as W,v as w,x,L as o,J as t,a2 as r,u as l,A as b}from"./vue-V9u7w0-f.js";import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-_W0GpTmX.js";const g={class:"app-container"},B=y({__name:"use-watermark",setup($){const s=W(null),{setWatermark:f,clearWatermark:i}=d(s),{setWatermark:p,clearWatermark:k}=d();return(E,e)=>{const m=_,a=C,u=v;return w(),x("div",g,[o(m,{shadow:"never"},{default:t(()=>e[4]||(e[4]=[r(" 该示例是演示:通过调用 composable 开启或关闭水印, 支持局部、全局、自定义样式(颜色、透明度、字体大小、字体、倾斜角度等),并自带防御(防删、防隐藏)和自适应功能 ")])),_:1}),o(m,{header:"示例",shadow:"never"},{footer:t(()=>[o(u,null,{default:t(()=>[o(a,{type:"primary",onClick:e[0]||(e[0]=n=>l(f)("局部水印",{color:"#409eff"}))},{default:t(()=>e[5]||(e[5]=[r(" 创建局部水印 ")])),_:1}),o(a,{type:"warning",onClick:e[1]||(e[1]=n=>l(f)("没有防御功能的局部水印",{color:"#e6a23c",defense:!1}))},{default:t(()=>e[6]||(e[6]=[r(" 创建无防御局部水印 ")])),_:1}),o(a,{type:"danger",onClick:l(i)},{default:t(()=>e[7]||(e[7]=[r(" 清除局部水印 ")])),_:1},8,["onClick"])]),_:1}),o(u,null,{default:t(()=>[o(a,{type:"primary",onClick:e[2]||(e[2]=n=>l(p)("全局水印",{color:"#409eff"}))},{default:t(()=>e[8]||(e[8]=[r(" 创建全局水印 ")])),_:1}),o(a,{type:"warning",onClick:e[3]||(e[3]=n=>l(p)("没有防御功能的全局水印",{color:"#e6a23c",defense:!1}))},{default:t(()=>e[9]||(e[9]=[r(" 创建无防御全局水印 ")])),_:1}),o(a,{type:"danger",onClick:l(k)},{default:t(()=>e[10]||(e[10]=[r(" 清除全局水印 ")])),_:1},8,["onClick"])]),_:1})]),default:t(()=>[b("div",{ref_key:"localRef",ref:s,class:"local"},null,512)]),_:1})])}}}),j=c(B,[["__scopeId","data-v-2e8369f3"]]);export{j as default};
|
||||
import"./index-Bkps3Xdp.js";/* empty css *//* empty css *//* empty css */import{u as d}from"./useWatermark-BTfJLH9B.js";import{o as _,t as C,ai as v}from"./element-oKb_SSI8.js";import{t as y,r as W,v as w,x,L as o,J as t,a2 as r,u as l,A as b}from"./vue-DGZ00u4B.js";import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vxe-BHVxIU4B.js";const g={class:"app-container"},B=y({__name:"use-watermark",setup($){const s=W(null),{setWatermark:f,clearWatermark:i}=d(s),{setWatermark:p,clearWatermark:k}=d();return(E,e)=>{const m=_,a=C,u=v;return w(),x("div",g,[o(m,{shadow:"never"},{default:t(()=>e[4]||(e[4]=[r(" 该示例是演示:通过调用 composable 开启或关闭水印, 支持局部、全局、自定义样式(颜色、透明度、字体大小、字体、倾斜角度等),并自带防御(防删、防隐藏)和自适应功能 ")])),_:1}),o(m,{header:"示例",shadow:"never"},{footer:t(()=>[o(u,null,{default:t(()=>[o(a,{type:"primary",onClick:e[0]||(e[0]=n=>l(f)("局部水印",{color:"#409eff"}))},{default:t(()=>e[5]||(e[5]=[r(" 创建局部水印 ")])),_:1}),o(a,{type:"warning",onClick:e[1]||(e[1]=n=>l(f)("没有防御功能的局部水印",{color:"#e6a23c",defense:!1}))},{default:t(()=>e[6]||(e[6]=[r(" 创建无防御局部水印 ")])),_:1}),o(a,{type:"danger",onClick:l(i)},{default:t(()=>e[7]||(e[7]=[r(" 清除局部水印 ")])),_:1},8,["onClick"])]),_:1}),o(u,null,{default:t(()=>[o(a,{type:"primary",onClick:e[2]||(e[2]=n=>l(p)("全局水印",{color:"#409eff"}))},{default:t(()=>e[8]||(e[8]=[r(" 创建全局水印 ")])),_:1}),o(a,{type:"warning",onClick:e[3]||(e[3]=n=>l(p)("没有防御功能的全局水印",{color:"#e6a23c",defense:!1}))},{default:t(()=>e[9]||(e[9]=[r(" 创建无防御全局水印 ")])),_:1}),o(a,{type:"danger",onClick:l(k)},{default:t(()=>e[10]||(e[10]=[r(" 清除全局水印 ")])),_:1},8,["onClick"])]),_:1})]),default:t(()=>[b("div",{ref_key:"localRef",ref:s,class:"local"},null,512)]),_:1})])}}}),j=c(B,[["__scopeId","data-v-2e8369f3"]]);export{j as default};
|
1
assets/useWatermark-BTfJLH9B.js
Normal file
1
assets/useWatermark-BTfJLH9B.js
Normal file
@ -0,0 +1 @@
|
||||
import{B as u}from"./element-oKb_SSI8.js";import{r as L,Q as x}from"./vue-DGZ00u4B.js";const C={defense:!0,color:"#c0c4cc",opacity:.5,size:16,family:"serif",angle:-20,width:300,height:200},E=L(document.body);function $(i=E){let d,v,t=null;const r={watermarkElMutationObserver:void 0,parentElMutationObserver:void 0,parentElResizeObserver:void 0},O=(e,a={})=>{if(!i.value)return console.warn("请在 DOM 挂载完成后再调用 setWatermark 方法设置水印");d=e,v={...C,...a},t?b():f(),m(i.value)},f=()=>{const e=i.value.tagName.toLowerCase()===E.value.tagName.toLowerCase(),a=e?"fixed":"absolute",n=e?"":"relative";t=document.createElement("div"),t.style.pointerEvents="none",t.style.top="0",t.style.left="0",t.style.position=a,t.style.zIndex="99999";const{clientWidth:s,clientHeight:o}=i.value;b({width:s,height:o}),i.value.style.position=n,i.value.appendChild(t)},b=(e={})=>{t&&(d&&(t.style.background=`url(${y()}) left top repeat`),e.width&&(t.style.width=`${e.width}px`),e.height&&(t.style.height=`${e.height}px`))},y=()=>{const{color:e,opacity:a,size:n,family:s,angle:o,width:z,height:w}=v,c=document.createElement("canvas");c.width=z,c.height=w;const l=c.getContext("2d");return l&&(l.fillStyle=e,l.globalAlpha=a,l.font=`${n}px ${s}`,l.rotate(Math.PI/180*o),l.fillText(d,0,w/2)),c.toDataURL()},h=()=>{if(!(!i.value||!t)){p();try{i.value.removeChild(t)}catch{console.warn("水印元素已不存在,请重新创建")}finally{t=null}}},k=u(()=>{h(),f(),m(i.value)},100),m=e=>{v.defense?!r.watermarkElMutationObserver&&!r.parentElMutationObserver&&g(e):p("mutation"),r.parentElResizeObserver||M(e)},p=(e="all")=>{var a,n,s;(e==="mutation"||e==="all")&&((a=r.watermarkElMutationObserver)==null||a.disconnect(),r.watermarkElMutationObserver=void 0,(n=r.parentElMutationObserver)==null||n.disconnect(),r.parentElMutationObserver=void 0),(e==="resize"||e==="all")&&((s=r.parentElResizeObserver)==null||s.disconnect(),r.parentElResizeObserver=void 0)},g=e=>{const a=u(n=>{n.forEach(u(s=>{switch(s.type){case"attributes":s.target===t&&k();break;case"childList":s.removedNodes.forEach(o=>{o===t&&e.appendChild(t)});break}},100))},100);r.watermarkElMutationObserver=new MutationObserver(a),r.parentElMutationObserver=new MutationObserver(a),r.watermarkElMutationObserver.observe(t,{attributes:!0,childList:!1,subtree:!1}),r.parentElMutationObserver.observe(e,{attributes:!1,childList:!0,subtree:!1})},M=e=>{const a=u(()=>{const{clientWidth:n,clientHeight:s}=e;b({width:n,height:s})},500);r.parentElResizeObserver=new ResizeObserver(a),r.parentElResizeObserver.observe(e)};return x(()=>{h()}),{setWatermark:O,clearWatermark:h}}export{$ as u};
|
@ -1 +0,0 @@
|
||||
import{B as u}from"./element-zW3XFg-9.js";import{r as L,Q as x}from"./vue-V9u7w0-f.js";const C={defense:!0,color:"#c0c4cc",opacity:.5,size:16,family:"serif",angle:-20,width:300,height:200},E=L(document.body);function $(n=E){let v,d,t=null;const r={watermarkElMutationObserver:void 0,parentElMutationObserver:void 0,parentElResizeObserver:void 0},O=(e,a={})=>{if(!n.value)return console.warn("请在 DOM 挂载完成后再调用 setWatermark 方法设置水印");v=e,d={...C,...a},t?b():m(),f(n.value)},m=()=>{const e=n.value.tagName.toLowerCase()===E.value.tagName.toLowerCase(),a=e?"fixed":"absolute",i=e?"":"relative";t=document.createElement("div"),t.style.pointerEvents="none",t.style.top="0",t.style.left="0",t.style.position=a,t.style.zIndex="99999";const{clientWidth:s,clientHeight:l}=n.value;b({width:s,height:l}),n.value.style.position=i,n.value.appendChild(t)},b=(e={})=>{t&&(v&&(t.style.background=`url(${y()}) left top repeat`),e.width&&(t.style.width=`${e.width}px`),e.height&&(t.style.height=`${e.height}px`))},y=()=>{const{color:e,opacity:a,size:i,family:s,angle:l,width:z,height:w}=d,c=document.createElement("canvas");c.width=z,c.height=w;const o=c.getContext("2d");return o&&(o.fillStyle=e,o.globalAlpha=a,o.font=`${i}px ${s}`,o.rotate(Math.PI/180*l),o.fillText(v,0,w/2)),c.toDataURL()},h=()=>{if(!(!n.value||!t)){p();try{n.value.removeChild(t)}catch{console.warn("水印元素已不存在,请重新创建")}finally{t=null}}},k=u(()=>{h(),m(),f(n.value)},100),f=e=>{d.defense?!r.watermarkElMutationObserver&&!r.parentElMutationObserver&&g(e):p("mutation"),r.parentElResizeObserver||M(e)},p=(e="all")=>{var a,i,s;(e==="mutation"||e==="all")&&((a=r.watermarkElMutationObserver)==null||a.disconnect(),r.watermarkElMutationObserver=void 0,(i=r.parentElMutationObserver)==null||i.disconnect(),r.parentElMutationObserver=void 0),(e==="resize"||e==="all")&&((s=r.parentElResizeObserver)==null||s.disconnect(),r.parentElResizeObserver=void 0)},g=e=>{const a=u(i=>{i.forEach(u(s=>{switch(s.type){case"attributes":s.target===t&&k();break;case"childList":s.removedNodes.forEach(l=>{l===t&&e.appendChild(t)});break}},100))},100);r.watermarkElMutationObserver=new MutationObserver(a),r.parentElMutationObserver=new MutationObserver(a),r.watermarkElMutationObserver.observe(t,{attributes:!0,childList:!1,subtree:!1}),r.parentElMutationObserver.observe(e,{attributes:!1,childList:!0,subtree:!1})},M=e=>{const a=u(()=>{const{clientWidth:i,clientHeight:s}=e;b({width:i,height:s})},500);r.parentElResizeObserver=new ResizeObserver(a),r.parentElResizeObserver.observe(e)};return x(()=>{h()}),{setWatermark:O,clearWatermark:h}}export{$ as u};
|
1
assets/vue-DGZ00u4B.js
Normal file
1
assets/vue-DGZ00u4B.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
assets/vxe-BHVxIU4B.js
Normal file
4
assets/vxe-BHVxIU4B.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10
index.html
10
index.html
@ -7,11 +7,11 @@
|
||||
<link rel="stylesheet" href="/v3-admin-vite/app-loading.css" />
|
||||
<title>V3 Admin Vite</title>
|
||||
<script src="/v3-admin-vite/detect-ie.js" defer></script>
|
||||
<script type="module" crossorigin src="/v3-admin-vite/assets/index-CCNeBscs.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/assets/vue-V9u7w0-f.js">
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/assets/element-zW3XFg-9.js">
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/assets/vxe-_W0GpTmX.js">
|
||||
<link rel="stylesheet" crossorigin href="/v3-admin-vite/assets/index-C-UrDnbK.css">
|
||||
<script type="module" crossorigin src="/v3-admin-vite/assets/index-Bkps3Xdp.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/assets/vue-DGZ00u4B.js">
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/assets/element-oKb_SSI8.js">
|
||||
<link rel="modulepreload" crossorigin href="/v3-admin-vite/assets/vxe-BHVxIU4B.js">
|
||||
<link rel="stylesheet" crossorigin href="/v3-admin-vite/assets/index-CQ3ybqyO.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
|
Loading…
x
Reference in New Issue
Block a user