ray-template/js/index-CChanisz.js

2 lines
9.5 KiB
JavaScript

import{j as C,q as L,r as F,f as v,t as r,h as P,T,v as A}from"./hooks-Dx3WCPci.js";import"./dayjs@1.11.10-C8LoRVP6.js";import"./print-js@1.6.0-BdoEj60G.js";import"./vue-hooks-plus@2.2.1_vue@3.5.12-CDC3yd1M.js";import"./lodash@4.17.21-Cw59kuJw.js";import"./js-cookie@3.0.5-Z_8Sd105.js";import"./screenfull@5.2.0-DmMZCkhi.js";import"./jsbarcode@3.11.6-DGNGFp02.js";import{u as $}from"./vue-router@4.3.2_vue@3.5.12-DofREeSi.js";import{s as f}from"./utils-CozJMALc.js";import"./currency.js@2.0.4-9OAR_aOO.js";import{a5 as y,M as w,Q as q,q as z,O as G,l as I,c as l,a8 as b,i as V,a as D,b as S,N as Q,s as E,a9 as u,F as x}from"./naive-ui@2.40.1_vue@3.5.12-DHsO9NF4.js";import{l as a,b as e,v as c,I as g,F as H}from"./@vue_runtime-core@3.5.12-o4JnKqGq.js";import{k as d,e as _,v as j}from"./@vue_reactivity@3.5.12-IcmYCeX3.js";import{Q as B}from"./vue3-next-qrcode@2.0.10_typescript@5.2.2-jc-XBHxJ.js";import{L as U}from"./ray-dCjhX_JK.js";import{d as W}from"./@vueuse_core@11.1.0_vue@3.5.12-DcbFWgSD.js";import{A as K}from"./index-CnbvNhnT.js";import"./lodash-es@4.17.21-CeZG2a4n.js";import"./interactjs@1.10.26-DZL_TZzP.js";import"./call-bind@1.0.7-Cpj98o6Y.js";import"./pinia-plugin-persistedstate@4.1.1_pinia@2.2.4-_Zka_ujQ.js";import"./destr@2.0.3-CVtkxrq9.js";import"./deep-pick-omit@1.2.1-CegYQlcN.js";import"./pinia@2.2.4_typescript@5.2.2_vue@3.5.12-DcSddqfC.js";import"./vue-demi@0.14.10_vue@3.5.12-Dq6ymT-8.js";import"./html-to-image@1.11.11-BOFdlgi9.js";import"./vue-i18n@9.13.1_vue@3.5.12-BPgVS6jR.js";import"./@intlify_shared@9.13.1-BxU0OzX2.js";import"./@intlify_core-base@9.13.1-C6DqbPB6.js";import"./@intlify_message-compiler@9.13.1-GrLDMuy_.js";import"./@vueuse_shared@11.1.0_vue@3.5.12-C48LWOin.js";import"./echarts@5.5.0-CezqL3m-.js";import"./zrender@5.5.0-DW8ownf1.js";import"./tslib@2.3.0-BDyQ-Jie.js";import"./@vue_runtime-dom@3.5.12-CgYSV3BI.js";import"./@vue_shared@3.5.12--5_uv9t5.js";import"./date-fns@3.6.0-q9PkOyxq.js";import"./seemly@0.3.8-DjGKl9dV.js";import"./vueuc@0.4.64_vue@3.5.12-C5OYL2zc.js";import"./evtd@0.2.4-CI_DDEu_.js";import"./@css-render_vue3-ssr@0.15.14_vue@3.5.12-CozsU_5I.js";import"./vooks@0.2.12_vue@3.5.12-fnTfirhD.js";import"./vdirs@0.1.8_vue@3.5.12-C0KV5pCE.js";import"./@juggle_resize-observer@3.4.0-C8OzoCMD.js";import"./css-render@0.15.14-C5toWlUr.js";import"./@emotion_hash@0.8.0-WldOFDRm.js";import"./treemate@0.3.11-DKekKYbv.js";import"./date-fns-tz@3.1.3_date-fns@3.6.0-ztskLDQQ.js";import"./async-validator@4.2.5-DKvM95Vc.js";import"./@css-render_plugin-bem@0.15.14_css-render@0.15.14-Be8eOoM-.js";function M(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const X=a({name:"RSigning",setup(){const t=d(),{t:i}=F(),{signing:n}=C(),{getRootPath:o}=L(),s=d(!1),R=()=>({name:"Ray Admin",pwd:"123456"}),k=$(),p=d(R()),N={name:{required:!0,message:i("views.login.index.NamePlaceholder"),trigger:["blur","input"]},pwd:{required:!0,message:i("views.login.index.PasswordPlaceholder"),trigger:["blur","input"]}};return{signingForm:p,loginFormRef:t,handleLogin:()=>{var m;(m=t.value)==null||m.validate(O=>{O||(s.value=!0,n(p.value).then(h=>{h.code===0&&setTimeout(()=>{window.$message.success(`欢迎${p.value.name}登陆~`),f(v.token,"tokenValue","localStorage"),f(v.signing,h.data,"localStorage"),k.push(o.value),s.value=!1},2*1e3)}).catch(()=>{window.$message.error("不可以这样哟, 不可以哟")}))})},rules:N,loading:s}},render(){let t;const{$t:i,loading:n}=this;return e(z,{model:this.signingForm,ref:"loginFormRef",rules:this.rules},{default:()=>[e(y,{label:i("views.login.index.Name"),path:"name"},{default:()=>[e(w,{value:this.signingForm.name,"onUpdate:value":o=>this.signingForm.name=o,placeholder:i("views.login.index.NamePlaceholder")},null)]}),e(y,{label:i("views.login.index.Password"),path:"pwd"},{default:()=>[e(w,{value:this.signingForm.pwd,"onUpdate:value":o=>this.signingForm.pwd=o,type:"password",showPasswordOn:"click",placeholder:i("views.login.index.PasswordPlaceholder"),onKeydown:o=>o.key==="Enter"&&this.handleLogin()},null)]}),e(q,{style:["width: 100%","margin-to: 18px"],type:"primary",onClick:this.handleLogin.bind(this),loading:n},M(t=i("views.login.index.Login"))?t:{default:()=>[t]})]})}}),Y=a({name:"RRegister",render(){return e(G,{status:"info",title:"提示",description:"我实在是不想写了..."},null)}}),J=a({name:"QRCodeSigning",setup(){const t=_({qrcodeValue:"https://github.com/XiaoDaiGua-Ray/xiaodaigua-ray.github.io"});return{...j(t)}},render(){return e("div",{class:"qrcode-signing"},[e(B,{text:"ray template yes",size:200,logoImage:U},null)])}});function Z(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const ee=a({name:"SSOSigning",setup(){return{ssoSigningOptions:[{icon:"github",key:"github",tooltipLabel:"Github登陆"},{icon:"google",key:"google",tooltipLabel:"Google登陆"},{icon:"twitter",key:"twitter",tooltipLabel:"Twitter登陆"}],handleSSOSigningClick:n=>{window.$message.info(`调用${n.tooltipLabel}`)}}},render(){let t;return e(l,{class:"sso-signing",align:"center"},Z(t=this.ssoSigningOptions.map(i=>e(I,{key:i.key},{trigger:()=>e(r,{name:i.icon,size:"24",cursor:"pointer",onClick:this.handleSSOSigningClick.bind(this,i)},null),default:()=>i.tooltipLabel})))?t:{default:()=>[t]})}});var te={pkg:{dependencies:{"@vueuse/core":"^11.1.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10",echarts:"^5.5.0","html-to-image":"1.11.11",interactjs:"1.10.26",jsbarcode:"3.11.6","lodash-es":"^4.17.21",mockjs:"1.1.0","naive-ui":"^2.40.1",pinia:"^2.2.4","pinia-plugin-persistedstate":"^4.1.1","print-js":"^1.6.0",vue:"^3.5.12","vue-demi":"0.14.6","vue-hooks-plus":"2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.3.2","vue3-next-qrcode":"2.0.10"},devDependencies:{"@commitlint/cli":"^17.8.1","@commitlint/config-conventional":"^17.8.1","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.2.2","@types/dom-to-image":"2.6.7","@types/jsbarcode":"3.11.4","@types/lodash-es":"^4.17.12","@types/mockjs":"1.0.7","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","@vitejs/plugin-vue":"^5.1.0","@vitejs/plugin-vue-jsx":"^4.0.0","@vitest/ui":"1.4.0","@vue/eslint-config-prettier":"^9.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/test-utils":"2.4.3",autoprefixer:"^10.4.16",depcheck:"^1.4.7",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-config-standard-with-typescript":"^43.0.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-promise":"^6.1.1","eslint-plugin-vue":"^9.25.0","happy-dom":"14.3.1",husky:"8.0.3","lint-staged":"^15.2.0",postcss:"^8.4.38","postcss-px-to-viewport-8-with-include":"1.2.2",prettier:"^3.2.5",sass:"1.71.1","svg-sprite-loader":"^6.0.11",typescript:"^5.2.2","unplugin-auto-import":"^0.18.2","unplugin-vue-components":"^0.27.4",vite:"^5.4.3","vite-bundle-analyzer":"0.9.4","vite-plugin-cdn2":"1.1.0","vite-plugin-compression":"^0.5.1","vite-plugin-ejs":"^1.7.0","vite-plugin-eslint":"1.8.1","vite-plugin-inspect":"^0.8.3","vite-plugin-mock-dev-server":"1.4.7","vite-plugin-svg-icons":"^2.0.1","vite-svg-loader":"^4.0.0","vite-tsconfig-paths":"4.3.2",vitest:"1.5.2","vue-tsc":"^2.0.13"},name:"ray-template",version:"4.9.7"},layout:{copyright:"Copyright © 2022-present Ray",sideBarLogo:{icon:"ray",title:"Ray Template",url:"/dashboard",jumpType:"station"}},appPrimaryColor:{primaryColor:"#2d8cf0",primaryFadeColor:"rgba(45, 140, 240, 0.3)"}};function ie(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const tt=a({name:"RLogin",setup(){const{layout:{copyright:t}}=te,i=_({tabsValue:"signing"}),{height:n,width:o}=W(),{updateLocale:s}=P();return{...j(i),windowHeight:n,updateLocale:s,copyright:t,windowWidth:o}},render(){let t;const{$t:i}=this;return e("div",{class:["login"],style:[`height: ${this.windowHeight}px`,`--login-height: ${this.windowHeight}px`]},[e("div",{class:["login-wrapper",this.windowWidth>=1440?"login-wrapper--divider":""]},[e("div",{class:["login-wrapper__content"]},[e(l,{align:"center",class:"login-title__wrapper"},{default:()=>[e(r,{name:"ray",size:"48"},null),e(b,{class:"login-title",type:"info",size:28},{default:()=>[g("Ray Template")]})]}),e(l,{align:"center",class:"login-action__wrapper"},{default:()=>[e(T,null,null),e(V,{options:A,onSelect:n=>this.updateLocale(n),trigger:"click"},{default:()=>[e(r,{customClassName:"login-icon",name:"language",size:"18",cursor:"pointer"},null)]})]}),e(D,{cols:"s:1 m:1 l:2 xl:2 2xl:2",itemResponsive:!1,responsive:"screen"},{default:()=>[e(S,{span:"s:0 m:0 l:1 xl:1 2xl:1",class:"login__left-wrapper"},{default:()=>[e(l,{align:"center",vertical:!0},{default:()=>[e(r,{name:"login_bg",width:"368",height:"368"},null),e(b,{class:"login-title",type:"info",size:36},ie(t=i("views.login.index.RayTemplate"))?t:{default:()=>[t]})]})]}),e(S,{span:1,class:"login__right-wrapper"},{default:()=>[e(Q,{class:"login__right-wrapper__content",embedded:!0,bordered:!1},{default:()=>[e(E,{value:this.tabsValue,"onUpdate:value":n=>this.tabsValue=n,type:"line",animated:!0,size:"large"},{default:()=>e(H,null,[e(u,{tab:i("views.login.index.Signing"),name:"signing"},{default:()=>[e(X,null,null)]}),e(u,{tab:i("views.login.index.Register"),name:"register"},{default:()=>[e(Y,null,null)]}),e(u,{tab:i("views.login.index.QRCodeSigning"),name:"qrcodeSigning"},{default:()=>[e(J,null,null)]})])}),e(x,null,{default:()=>[g("其他登陆方式")]}),e(ee,null,null),e(x,null,{default:()=>[g("友情链接")]}),e(K,null,null)]})]})]}),e(l,{align:"center",justify:"center",class:"login-copyright__wrapper"},{default:()=>[this.copyright]})])])])}});export{tt as default};