@banmao/blocks 0.0.1-alpha.1 → 0.0.1-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -37
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +206 -118
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @banmao/
|
|
1
|
+
# @banmao/blocks
|
|
2
2
|
|
|
3
|
-
基于 Naive UI
|
|
3
|
+
基于 Naive UI 封装的登录组件。
|
|
4
4
|
|
|
5
5
|
## 特性
|
|
6
6
|
|
|
@@ -12,52 +12,31 @@
|
|
|
12
12
|
## 安装
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
# 安装
|
|
16
|
-
pnpm add
|
|
17
|
-
|
|
18
|
-
# 安装 @banmao/procomponent
|
|
19
|
-
pnpm add @banmao/procomponent
|
|
15
|
+
# 安装 @banmao/blocks
|
|
16
|
+
pnpm add @banmao/blocks
|
|
20
17
|
```
|
|
21
18
|
|
|
22
19
|
## 使用
|
|
23
20
|
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const app = createApp()
|
|
35
|
-
|
|
36
|
-
// 注册需要使用的组件
|
|
37
|
-
app.use(ProLayout)
|
|
38
|
-
app.use(ProTable)
|
|
39
|
-
app.use(ProForm)
|
|
40
|
-
app.use(DrawerForm)
|
|
41
|
-
app.use(ModalForm)
|
|
21
|
+
```vue
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { Login } from '@banmao/blocks'
|
|
24
|
+
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<Login />
|
|
29
|
+
</template>
|
|
42
30
|
```
|
|
43
31
|
|
|
44
32
|
## 组件列表
|
|
45
33
|
|
|
46
|
-
-
|
|
47
|
-
- ModalForm - 弹窗表单组件
|
|
48
|
-
- ProForm - 表单组件
|
|
49
|
-
- ProLayout - 布局组件
|
|
50
|
-
- ProTable - 表格组件
|
|
51
|
-
- ProText - 文本组件
|
|
52
|
-
- ProDescriptions - 描述列表组件
|
|
53
|
-
- ProList - 列表组件
|
|
54
|
-
- Tour - 漫游式引导组件
|
|
55
|
-
- Watermark - 水印组件
|
|
34
|
+
- Login - 登录表单组件
|
|
56
35
|
|
|
57
36
|
## 文档
|
|
58
37
|
|
|
59
|
-
访问 [ProComponent 文档](https://procomponent.banmao.cc/) 了解更多使用细节。
|
|
38
|
+
访问 [ProComponent 文档](https://procomponent.banmao.cc/blocks) 了解更多使用细节。
|
|
60
39
|
|
|
61
40
|
## License
|
|
62
41
|
|
|
63
|
-
[MIT](./LICENSE)
|
|
42
|
+
[MIT](./LICENSE)
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require('./index.css');"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),
|
|
1
|
+
require('./index.css');"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("naive-ui"),w=["finish","error","captcha","wechatFinish"],I={title:{type:String,default:"Welcome back"},subTitle:{type:String,default:"Login to your account"},layout:{type:String,default:"simple"},bg:{type:String,default:""},forgotUrl:{type:String,default:""},signUpUrl:{type:String,default:""},bgImageUrl:{type:String,default:""},logo:{type:Function},imagePosition:{type:String,default:"right"},actions:{type:Array}},U={title:{type:String,default:"Welcome back"},subTitle:{type:String,default:"Login to your account"},forgotUrl:{type:String,default:""},signUpUrl:{type:String,default:""},radius:{type:[Number,Boolean],default:8},shadow:{type:Boolean,default:!0},actions:{type:Array}},m=e.defineComponent({name:"LoginForm",props:U,emits:w,setup(r,{emit:i,slots:a}){const{actions:g,title:x,subTitle:l,signUpUrl:V,forgotUrl:d,shadow:n,radius:f}=r,u=e.reactive({username:"",password:""}),N=e.ref(!1),v={username:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:10,message:"长度在 3 到 10 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:20,message:"长度在 6 到 20 个字符",trigger:"blur"}]},p=e.ref(null),h=()=>{var t;(t=p.value)==null||t.validate(o=>{o?(console.error(o),i("error",o)):i("finish",e.toRaw(u))})},y=()=>{console.error("Weixin login is not supported yet."),i("wechatFinish")};return()=>e.createVNode("div",{class:["login-form",{"login-form-shadow":n}],style:[{borderRadius:f?`${f}px`:"none"}]},[e.createVNode("div",{class:"title"},[x]),e.createVNode("div",{class:"sub-title"},[l]),a.default?a.default():e.createVNode(c.NForm,{ref:p,model:u,rules:v,size:"large","show-require-mark":!1},{default:()=>[e.createVNode(c.NFormItem,{label:"用户名",path:"username"},{default:()=>[e.createVNode(c.NInput,{value:u.username,"onUpdate:value":t=>u.username=t,placeholder:"请输入用户名"},null)]}),e.createVNode(c.NFormItem,{label:"密码",path:"password"},{default:()=>[e.createVNode(c.NInput,{value:u.password,"onUpdate:value":t=>u.password=t,placeholder:"请输入密码",type:"password"},null)]}),e.createVNode("div",{class:"password-forgot"},[e.createVNode(c.NCheckbox,{checked:N.value,"onUpdate:checked":t=>N.value=t,label:"记住密码"},null),d&&e.createVNode("a",{href:d},[e.createTextVNode("忘记密码?")])]),e.createVNode(c.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(c.NButton,{"attr-type":"button",type:"primary",block:!0,onClick:()=>h()},{default:()=>[e.createTextVNode("登录")]})]}),g&&e.createVNode(c.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(c.NButton,{color:"#02E16E",ghost:!0,block:!0,onClick:()=>y()},{default:()=>[e.createTextVNode("微信登录")]})]})]}),V&&e.createVNode("div",{class:"signUp"},[e.createTextVNode("还没有账号?"),e.createVNode("a",{href:V},[e.createTextVNode("立即注册")])])])}});function F(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!e.isVNode(r)}const S=e.defineComponent({name:"LoginPage",props:I,emits:w,setup(r,{emit:i,slots:a}){const{layout:g,bg:x,bgImageUrl:l,imagePosition:V,...d}=r,n=e.computed(()=>V==="right");return()=>{var f,u,N,v,p,h,y,t;if(a.default){let o;if(g==="column"){let s;return e.createVNode("div",{class:["container","column"]},[e.createVNode("div",{class:"column-item",style:{order:n.value?1:2}},[n.value&&e.createVNode("div",{class:"logo"},[(f=a.logo)==null?void 0:f.call(a)]),e.createVNode(m,e.mergeProps(d,{shadow:!1,radius:!1,onFinish:b=>i("finish",b)}),F(s=a.default())?s:{default:()=>[s]})]),e.createVNode("div",{class:"column-muted",style:{order:n.value?2:1}},[!n.value&&e.createVNode("div",{class:"logo"},[(u=a.logo)==null?void 0:u.call(a)]),r.bgImageUrl&&e.createVNode("img",{src:r.bgImageUrl,alt:"Image",class:"column-muted-image"},null)])])}if(g==="card"){let s;return e.createVNode("div",{class:["container","flex-center","card-login-wrapper"],style:{backgroundImage:l?`url(${l})`:"transparent"}},[e.createVNode("div",{class:"logo"},[(N=a.logo)==null?void 0:N.call(a)]),e.createVNode("div",{class:"card-img-cover"},null),e.createVNode("div",{class:"card",style:{flexDirection:n.value?"row":"row-reverse"}},[e.createVNode("div",{class:["card-column-item","flex-1"]},[e.createVNode(m,e.mergeProps(d,{shadow:!1,radius:!1,onFinish:b=>i("finish",b)}),F(s=a.default())?s:{default:()=>[s]})]),e.createVNode("div",{class:["card-column-muted","flex-1"],style:{width:"350px"}},[l&&e.createVNode("img",{src:l,alt:"Image",class:"column-muted-image"},null)])])])}return e.createVNode("div",{class:["container","flex-center"],style:{backgroundImage:`url(${l})`,backgroundSize:"cover"}},[e.createVNode("div",{class:["flex-col","space-y-4"]},[(v=a.logo)==null?void 0:v.call(a),e.createVNode(m,e.mergeProps(d,{onFinish:s=>i("finish",s)}),F(o=a.default())?o:{default:()=>[o]})])])}else return g==="column"?e.createVNode("div",{class:["container","column",{"column-reverse":r.imagePosition==="left"}]},[e.createVNode("div",{class:"column-item"},[n.value&&e.createVNode("div",{class:"logo"},[(p=a.logo)==null?void 0:p.call(a)]),e.createVNode(m,e.mergeProps(d,{shadow:!1,radius:!1,onFinish:o=>i("finish",o)}),null)]),e.createVNode("div",{class:"column-muted"},[!n.value&&e.createVNode("div",{class:"logo"},[(h=a.logo)==null?void 0:h.call(a)]),r.bgImageUrl&&e.createVNode("img",{src:r.bgImageUrl,alt:"Image",class:"column-muted-image"},null)])]):g==="card"?e.createVNode("div",{class:["container","flex-center"]},[e.createVNode("div",{class:"logo"},[(y=a.logo)==null?void 0:y.call(a)]),e.createVNode("div",{class:"card"},[e.createVNode("div",{class:["card-column-item","flex-1"]},[e.createVNode(m,e.mergeProps(d,{shadow:!1,radius:!1,onFinish:o=>i("finish",o)}),null)]),e.createVNode("div",{class:["card-column-muted","flex-1"],style:{width:"350px"}},[l&&e.createVNode("img",{src:l,alt:"Image",class:"column-muted-image"},null)])])]):e.createVNode("div",{class:["container","flex-center"],style:{backgroundImage:`url(${l})`,backgroundSize:"cover"}},[e.createVNode("div",{class:["flex-col","space-y-4"]},[(t=a.logo)==null?void 0:t.call(a),e.createVNode(m,d,null)])])}}});exports.Login=S;exports.loginEmits=w;exports.loginFormProps=U;exports.loginProps=I;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.container{position:relative;width:100%;height:100svh}.flex-center{display:flex;align-items:center;justify-content:center}.flex-col{display:flex;flex-direction:column;justify-content:center;align-items:center}.space-y-4{gap:16px}.login-form{padding:32px 32px 24px;min-width:350px;background
|
|
1
|
+
:root{--color-link: hsl(221 100% 58%);--color-text: hsl(240 5% 96%);--color-section-text: hsl(240 6% 90%);--img-cover-color: oklch(1 0 none / .6);--img-cover-color-dark: oklch(.3 0 none / .6);--bg-color: oklch(1 0 none / .8);--bg-color-dark: oklch(.25 0 none / .8);--login-shadow: oklch(0 0 none / .2);--bg-muted: oklch(.25 .003 24)}.container{position:relative;width:100%;height:100svh}.flex-center{display:flex;align-items:center;justify-content:center}.flex-col{display:flex;flex-direction:column;justify-content:center;align-items:center}.space-y-4{gap:16px}.login-form{padding:32px 32px 24px;min-width:350px;background:var(--bg-color);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-sizing:border-box}.card .login-form{width:100%}.column .login-form,.dark .column .login-form{background:transparent}.login-form-shadow{box-shadow:0 2px 12px 0 var(--login-shadow)}.title{font-size:20px;font-weight:700;color:var(--color-text)}.sub-title{font-size:16px;color:var(--color-section-text);margin-bottom:32px}.signUp{text-align:center;color:var(--color-text)}.signUp a,.link{color:var(--color-link);text-decoration:none}.password-forgot{width:100%;display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.password-forgot a{color:var(--color-link);text-decoration:none}.column,.grid{display:grid}.column-reverse{direction:rtl}.column-reverse>*{direction:ltr}.card{width:100%;max-width:48rem;display:flex;box-sizing:border-box;box-shadow:0 2px 12px 0 var(--login-shadow);border-radius:.5rem;overflow:hidden}.card-column-item{display:flex;flex-direction:column;justify-content:center;align-items:center}.card-column-muted{width:100%;position:relative;display:none;background-color:var(--bg-muted)}.flex-1{flex:1}.logo{position:absolute;top:20px;left:20px;z-index:9;height:64px;min-width:64px}.column-item{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem}.column-muted{width:100%;position:relative;display:none;background-color:var(--bg-muted)}.column-muted-image{position:absolute;top:0;right:0;bottom:0;left:0;height:100%;width:100%;object-fit:cover}@media screen and (max-width: 1199px){.column-item{padding:40px}}@media screen and (max-width: 1200){.card{max-width:24rem}}@media screen and (min-width: 1200px){.column{grid-template-columns:repeat(2,minmax(0,1fr))}.column-muted,.card-column-muted{display:block}}.dark .column-muted-image{filter:brightness(.2)}.dark .column-muted-image{filter:grayscale(40%)}.dark .login-form{background-color:var(--bg-color-dark)}@media (prefers-color-scheme: light){:root{--color-text: #333;--color-section-text: #4f4f4f}.login-form{background:var(--bg-color)}.sub-title{color:var(--color-section-text)}}.card-login-wrapper{background-size:cover}.card-img-cover{position:absolute;top:0;width:100%;height:100%;background:var(--img-cover-color);z-index:0;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.dark .card-img-cover{background:var(--img-cover-color-dark)}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './index.css';import { defineComponent as
|
|
2
|
-
import { NForm as
|
|
3
|
-
const
|
|
1
|
+
import './index.css';import { defineComponent as L, reactive as P, ref as k, createVNode as e, createTextVNode as v, toRaw as D, computed as E, mergeProps as h, isVNode as A } from "vue";
|
|
2
|
+
import { NForm as W, NFormItem as x, NInput as B, NCheckbox as R, NButton as C } from "naive-ui";
|
|
3
|
+
const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
4
4
|
title: {
|
|
5
5
|
type: String,
|
|
6
6
|
default: "Welcome back"
|
|
@@ -39,7 +39,7 @@ const S = ["finish", "error", "captcha", "wechatFinish"], E = {
|
|
|
39
39
|
actions: {
|
|
40
40
|
type: Array
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, _ = {
|
|
43
43
|
title: {
|
|
44
44
|
type: String,
|
|
45
45
|
default: "Welcome back"
|
|
@@ -67,25 +67,26 @@ const S = ["finish", "error", "captcha", "wechatFinish"], E = {
|
|
|
67
67
|
actions: {
|
|
68
68
|
type: Array
|
|
69
69
|
}
|
|
70
|
-
},
|
|
70
|
+
}, g = /* @__PURE__ */ L({
|
|
71
71
|
name: "LoginForm",
|
|
72
|
-
props:
|
|
73
|
-
emits:
|
|
74
|
-
setup(
|
|
75
|
-
emit:
|
|
72
|
+
props: _,
|
|
73
|
+
emits: N,
|
|
74
|
+
setup(l, {
|
|
75
|
+
emit: t,
|
|
76
|
+
slots: a
|
|
76
77
|
}) {
|
|
77
78
|
const {
|
|
78
|
-
actions:
|
|
79
|
-
title:
|
|
80
|
-
subTitle:
|
|
81
|
-
signUpUrl:
|
|
82
|
-
forgotUrl:
|
|
83
|
-
shadow:
|
|
84
|
-
radius:
|
|
85
|
-
} =
|
|
79
|
+
actions: s,
|
|
80
|
+
title: S,
|
|
81
|
+
subTitle: u,
|
|
82
|
+
signUpUrl: y,
|
|
83
|
+
forgotUrl: n,
|
|
84
|
+
shadow: o,
|
|
85
|
+
radius: m
|
|
86
|
+
} = l, c = P({
|
|
86
87
|
username: "",
|
|
87
88
|
password: ""
|
|
88
|
-
}),
|
|
89
|
+
}), f = k(!1), b = {
|
|
89
90
|
username: [{
|
|
90
91
|
required: !0,
|
|
91
92
|
message: "请输入用户名",
|
|
@@ -106,159 +107,246 @@ const S = ["finish", "error", "captcha", "wechatFinish"], E = {
|
|
|
106
107
|
message: "长度在 6 到 20 个字符",
|
|
107
108
|
trigger: "blur"
|
|
108
109
|
}]
|
|
109
|
-
},
|
|
110
|
-
var
|
|
111
|
-
(
|
|
112
|
-
|
|
110
|
+
}, p = k(null), F = () => {
|
|
111
|
+
var r;
|
|
112
|
+
(r = p.value) == null || r.validate((i) => {
|
|
113
|
+
i ? (console.error(i), t("error", i)) : t("finish", D(c));
|
|
113
114
|
});
|
|
114
|
-
},
|
|
115
|
-
console.error("Weixin login is not supported yet."),
|
|
115
|
+
}, w = () => {
|
|
116
|
+
console.error("Weixin login is not supported yet."), t("wechatFinish");
|
|
116
117
|
};
|
|
117
118
|
return () => e("div", {
|
|
118
119
|
class: ["login-form", {
|
|
119
|
-
"login-form-shadow":
|
|
120
|
+
"login-form-shadow": o
|
|
120
121
|
}],
|
|
121
122
|
style: [{
|
|
122
|
-
borderRadius:
|
|
123
|
+
borderRadius: m ? `${m}px` : "none"
|
|
123
124
|
}]
|
|
124
125
|
}, [e("div", {
|
|
125
126
|
class: "title"
|
|
126
|
-
}, [
|
|
127
|
+
}, [S]), e("div", {
|
|
127
128
|
class: "sub-title"
|
|
128
|
-
}, [
|
|
129
|
-
ref:
|
|
130
|
-
model:
|
|
131
|
-
rules:
|
|
129
|
+
}, [u]), a.default ? a.default() : e(W, {
|
|
130
|
+
ref: p,
|
|
131
|
+
model: c,
|
|
132
|
+
rules: b,
|
|
132
133
|
size: "large",
|
|
133
134
|
"show-require-mark": !1
|
|
134
135
|
}, {
|
|
135
|
-
default: () => [e(
|
|
136
|
+
default: () => [e(x, {
|
|
136
137
|
label: "用户名",
|
|
137
138
|
path: "username"
|
|
138
139
|
}, {
|
|
139
|
-
default: () => [e(
|
|
140
|
-
value:
|
|
141
|
-
"onUpdate:value": (
|
|
140
|
+
default: () => [e(B, {
|
|
141
|
+
value: c.username,
|
|
142
|
+
"onUpdate:value": (r) => c.username = r,
|
|
142
143
|
placeholder: "请输入用户名"
|
|
143
144
|
}, null)]
|
|
144
|
-
}), e(
|
|
145
|
+
}), e(x, {
|
|
145
146
|
label: "密码",
|
|
146
147
|
path: "password"
|
|
147
148
|
}, {
|
|
148
|
-
default: () => [e(
|
|
149
|
-
value:
|
|
150
|
-
"onUpdate:value": (
|
|
149
|
+
default: () => [e(B, {
|
|
150
|
+
value: c.password,
|
|
151
|
+
"onUpdate:value": (r) => c.password = r,
|
|
151
152
|
placeholder: "请输入密码",
|
|
152
153
|
type: "password"
|
|
153
154
|
}, null)]
|
|
154
155
|
}), e("div", {
|
|
155
156
|
class: "password-forgot"
|
|
156
|
-
}, [e(
|
|
157
|
-
checked:
|
|
158
|
-
"onUpdate:checked": (
|
|
157
|
+
}, [e(R, {
|
|
158
|
+
checked: f.value,
|
|
159
|
+
"onUpdate:checked": (r) => f.value = r,
|
|
159
160
|
label: "记住密码"
|
|
160
|
-
}, null),
|
|
161
|
-
href:
|
|
162
|
-
}, [
|
|
161
|
+
}, null), n && e("a", {
|
|
162
|
+
href: n
|
|
163
|
+
}, [v("忘记密码?")])]), e(x, {
|
|
163
164
|
showLabel: !1
|
|
164
165
|
}, {
|
|
165
|
-
default: () => [e(
|
|
166
|
+
default: () => [e(C, {
|
|
166
167
|
"attr-type": "button",
|
|
167
168
|
type: "primary",
|
|
168
169
|
block: !0,
|
|
169
|
-
onClick: () =>
|
|
170
|
+
onClick: () => F()
|
|
170
171
|
}, {
|
|
171
|
-
default: () => [
|
|
172
|
+
default: () => [v("登录")]
|
|
172
173
|
})]
|
|
173
|
-
}),
|
|
174
|
+
}), s && e(x, {
|
|
174
175
|
showLabel: !1
|
|
175
176
|
}, {
|
|
176
|
-
default: () => [e(
|
|
177
|
+
default: () => [e(C, {
|
|
177
178
|
color: "#02E16E",
|
|
178
179
|
ghost: !0,
|
|
179
180
|
block: !0,
|
|
180
|
-
onClick: () =>
|
|
181
|
+
onClick: () => w()
|
|
181
182
|
}, {
|
|
182
|
-
default: () => [
|
|
183
|
+
default: () => [v("微信登录")]
|
|
183
184
|
})]
|
|
184
185
|
})]
|
|
185
|
-
}),
|
|
186
|
+
}), y && e("div", {
|
|
186
187
|
class: "signUp"
|
|
187
|
-
}, [
|
|
188
|
-
href:
|
|
189
|
-
}, [
|
|
188
|
+
}, [v("还没有账号?"), e("a", {
|
|
189
|
+
href: y
|
|
190
|
+
}, [v("立即注册")])])]);
|
|
190
191
|
}
|
|
191
|
-
})
|
|
192
|
+
});
|
|
193
|
+
function I(l) {
|
|
194
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !A(l);
|
|
195
|
+
}
|
|
196
|
+
const q = /* @__PURE__ */ L({
|
|
192
197
|
name: "LoginPage",
|
|
193
|
-
props:
|
|
194
|
-
emits:
|
|
195
|
-
setup(
|
|
196
|
-
emit:
|
|
198
|
+
props: T,
|
|
199
|
+
emits: N,
|
|
200
|
+
setup(l, {
|
|
201
|
+
emit: t,
|
|
197
202
|
slots: a
|
|
198
203
|
}) {
|
|
199
204
|
const {
|
|
200
|
-
layout:
|
|
201
|
-
bg:
|
|
205
|
+
layout: s,
|
|
206
|
+
bg: S,
|
|
202
207
|
bgImageUrl: u,
|
|
203
|
-
|
|
204
|
-
...
|
|
205
|
-
} =
|
|
208
|
+
imagePosition: y,
|
|
209
|
+
...n
|
|
210
|
+
} = l, o = E(() => y === "right");
|
|
206
211
|
return () => {
|
|
207
|
-
var
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
212
|
+
var m, c, f, b, p, F, w, r;
|
|
213
|
+
if (a.default) {
|
|
214
|
+
let i;
|
|
215
|
+
if (s === "column") {
|
|
216
|
+
let d;
|
|
217
|
+
return e("div", {
|
|
218
|
+
class: ["container", "column"]
|
|
219
|
+
}, [e("div", {
|
|
220
|
+
class: "column-item",
|
|
221
|
+
style: {
|
|
222
|
+
order: o.value ? 1 : 2
|
|
223
|
+
}
|
|
224
|
+
}, [o.value && e("div", {
|
|
225
|
+
class: "logo"
|
|
226
|
+
}, [(m = a.logo) == null ? void 0 : m.call(a)]), e(g, h(n, {
|
|
227
|
+
shadow: !1,
|
|
228
|
+
radius: !1,
|
|
229
|
+
onFinish: (U) => t("finish", U)
|
|
230
|
+
}), I(d = a.default()) ? d : {
|
|
231
|
+
default: () => [d]
|
|
232
|
+
})]), e("div", {
|
|
233
|
+
class: "column-muted",
|
|
234
|
+
style: {
|
|
235
|
+
order: o.value ? 2 : 1
|
|
236
|
+
}
|
|
237
|
+
}, [!o.value && e("div", {
|
|
238
|
+
class: "logo"
|
|
239
|
+
}, [(c = a.logo) == null ? void 0 : c.call(a)]), l.bgImageUrl && e("img", {
|
|
240
|
+
src: l.bgImageUrl,
|
|
241
|
+
alt: "Image",
|
|
242
|
+
class: "column-muted-image"
|
|
243
|
+
}, null)])]);
|
|
244
|
+
}
|
|
245
|
+
if (s === "card") {
|
|
246
|
+
let d;
|
|
247
|
+
return e("div", {
|
|
248
|
+
class: ["container", "flex-center", "card-login-wrapper"],
|
|
249
|
+
style: {
|
|
250
|
+
backgroundImage: u ? `url(${u})` : "transparent"
|
|
251
|
+
}
|
|
252
|
+
}, [e("div", {
|
|
253
|
+
class: "logo"
|
|
254
|
+
}, [(f = a.logo) == null ? void 0 : f.call(a)]), e("div", {
|
|
255
|
+
class: "card-img-cover"
|
|
256
|
+
}, null), e("div", {
|
|
257
|
+
class: "card",
|
|
258
|
+
style: {
|
|
259
|
+
flexDirection: o.value ? "row" : "row-reverse"
|
|
260
|
+
}
|
|
261
|
+
}, [e("div", {
|
|
262
|
+
class: ["card-column-item", "flex-1"]
|
|
263
|
+
}, [e(g, h(n, {
|
|
264
|
+
shadow: !1,
|
|
265
|
+
radius: !1,
|
|
266
|
+
onFinish: (U) => t("finish", U)
|
|
267
|
+
}), I(d = a.default()) ? d : {
|
|
268
|
+
default: () => [d]
|
|
269
|
+
})]), e("div", {
|
|
270
|
+
class: ["card-column-muted", "flex-1"],
|
|
271
|
+
style: {
|
|
272
|
+
width: "350px"
|
|
273
|
+
}
|
|
274
|
+
}, [u && e("img", {
|
|
275
|
+
src: u,
|
|
276
|
+
alt: "Image",
|
|
277
|
+
class: "column-muted-image"
|
|
278
|
+
}, null)])])]);
|
|
252
279
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
280
|
+
return e("div", {
|
|
281
|
+
class: ["container", "flex-center"],
|
|
282
|
+
style: {
|
|
283
|
+
backgroundImage: `url(${u})`,
|
|
284
|
+
backgroundSize: "cover"
|
|
285
|
+
}
|
|
286
|
+
}, [e("div", {
|
|
287
|
+
class: ["flex-col", "space-y-4"]
|
|
288
|
+
}, [(b = a.logo) == null ? void 0 : b.call(a), e(g, h(n, {
|
|
289
|
+
onFinish: (d) => t("finish", d)
|
|
290
|
+
}), I(i = a.default()) ? i : {
|
|
291
|
+
default: () => [i]
|
|
292
|
+
})])]);
|
|
293
|
+
} else
|
|
294
|
+
return s === "column" ? e("div", {
|
|
295
|
+
class: ["container", "column", {
|
|
296
|
+
"column-reverse": l.imagePosition === "left"
|
|
297
|
+
}]
|
|
298
|
+
}, [e("div", {
|
|
299
|
+
class: "column-item"
|
|
300
|
+
}, [o.value && e("div", {
|
|
301
|
+
class: "logo"
|
|
302
|
+
}, [(p = a.logo) == null ? void 0 : p.call(a)]), e(g, h(n, {
|
|
303
|
+
shadow: !1,
|
|
304
|
+
radius: !1,
|
|
305
|
+
onFinish: (i) => t("finish", i)
|
|
306
|
+
}), null)]), e("div", {
|
|
307
|
+
class: "column-muted"
|
|
308
|
+
}, [!o.value && e("div", {
|
|
309
|
+
class: "logo"
|
|
310
|
+
}, [(F = a.logo) == null ? void 0 : F.call(a)]), l.bgImageUrl && e("img", {
|
|
311
|
+
src: l.bgImageUrl,
|
|
312
|
+
alt: "Image",
|
|
313
|
+
class: "column-muted-image"
|
|
314
|
+
}, null)])]) : s === "card" ? e("div", {
|
|
315
|
+
class: ["container", "flex-center"]
|
|
316
|
+
}, [e("div", {
|
|
317
|
+
class: "logo"
|
|
318
|
+
}, [(w = a.logo) == null ? void 0 : w.call(a)]), e("div", {
|
|
319
|
+
class: "card"
|
|
320
|
+
}, [e("div", {
|
|
321
|
+
class: ["card-column-item", "flex-1"]
|
|
322
|
+
}, [e(g, h(n, {
|
|
323
|
+
shadow: !1,
|
|
324
|
+
radius: !1,
|
|
325
|
+
onFinish: (i) => t("finish", i)
|
|
326
|
+
}), null)]), e("div", {
|
|
327
|
+
class: ["card-column-muted", "flex-1"],
|
|
328
|
+
style: {
|
|
329
|
+
width: "350px"
|
|
330
|
+
}
|
|
331
|
+
}, [u && e("img", {
|
|
332
|
+
src: u,
|
|
333
|
+
alt: "Image",
|
|
334
|
+
class: "column-muted-image"
|
|
335
|
+
}, null)])])]) : e("div", {
|
|
336
|
+
class: ["container", "flex-center"],
|
|
337
|
+
style: {
|
|
338
|
+
backgroundImage: `url(${u})`,
|
|
339
|
+
backgroundSize: "cover"
|
|
340
|
+
}
|
|
341
|
+
}, [e("div", {
|
|
342
|
+
class: ["flex-col", "space-y-4"]
|
|
343
|
+
}, [(r = a.logo) == null ? void 0 : r.call(a), e(g, n, null)])]);
|
|
256
344
|
};
|
|
257
345
|
}
|
|
258
346
|
});
|
|
259
347
|
export {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
348
|
+
q as Login,
|
|
349
|
+
N as loginEmits,
|
|
350
|
+
_ as loginFormProps,
|
|
351
|
+
T as loginProps
|
|
264
352
|
};
|