@banmao/blocks 0.0.1-alpha.10 → 0.0.1-alpha.12
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/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +60 -52
- package/package.json +15 -15
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),i=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:d,slots:a}){const{actions:g,title:x,subTitle:t,signUpUrl:v,forgotUrl:n,shadow:c,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 o;(o=p.value)==null||o.validate(l=>{l?(console.error(l),d("error",l)):d("finish",e.toRaw(u))})},y=()=>{console.error("Weixin login is not supported yet."),d("wechatFinish")};return()=>e.createVNode("div",{class:["login-form",{"login-form-shadow":c}],style:[{borderRadius:f?`${f}px`:"none"}]},[e.createVNode("div",{class:"title"},[x]),e.createVNode("div",{class:"sub-title"},[t]),a.default?a.default():e.createVNode(i.NForm,{ref:p,model:u,rules:V,size:"large","show-require-mark":!1},{default:()=>[e.createVNode(i.NFormItem,{label:"用户名",path:"username"},{default:()=>[e.createVNode(i.NInput,{value:u.username,"onUpdate:value":o=>u.username=o,placeholder:"请输入用户名"},null)]}),e.createVNode(i.NFormItem,{label:"密码",path:"password"},{default:()=>[e.createVNode(i.NInput,{value:u.password,"onUpdate:value":o=>u.password=o,placeholder:"请输入密码",type:"password"},null)]}),e.createVNode("div",{class:"password-forgot"},[e.createVNode(i.NCheckbox,{checked:N.value,"onUpdate:checked":o=>N.value=o,label:"记住密码"},null),n&&e.createVNode("a",{href:n},[e.createTextVNode("忘记密码?")])]),e.createVNode(i.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(i.NButton,{"attr-type":"button",type:"primary",block:!0,onClick:()=>h()},{default:()=>[e.createTextVNode("登录")]})]}),g&&e.createVNode(i.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(i.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:d,slots:a}){const{layout:g,bg:x,bgImageUrl:t,imagePosition:v,...n}=r,c=e.computed(()=>v==="right");return()=>{var f,u,N,V,p,h,y,o;if(a.default){let l;if(g==="column"){let s;return e.createVNode("div",{class:["container","column"]},[e.createVNode("div",{class:"column-item",style:{order:c.value?1:2}},[c.value&&e.createVNode("div",{class:"logo"},[(f=a.logo)==null?void 0:f.call(a)]),e.createVNode(m,e.mergeProps(n,{shadow:!1,radius:!1,onFinish:b=>d("finish",b)}),F(s=a.default())?s:{default:()=>[s]})]),e.createVNode("div",{class:"column-muted",style:{order:c.value?2:1}},[!c.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:t?`url(${t})`:"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:c.value?"row":"row-reverse"}},[e.createVNode("div",{class:["card-column-item","flex-1"]},[e.createVNode(m,e.mergeProps(n,{shadow:!1,radius:!1,onFinish:b=>d("finish",b)}),F(s=a.default())?s:{default:()=>[s]})]),e.createVNode("div",{class:["card-column-muted","flex-1"],style:{width:"350px"}},[t&&e.createVNode("img",{src:t,alt:"Image",class:"column-muted-image"},null)])])])}return e.createVNode("div",{class:["container","flex-center"],style:{backgroundImage:`url(${t})`,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(n,{onFinish:s=>d("finish",s)}),F(l=a.default())?l:{default:()=>[l]})])])}else return g==="column"?e.createVNode("div",{class:["container","column",{"column-reverse":r.imagePosition==="left"}]},[e.createVNode("div",{class:"column-item"},[c.value&&e.createVNode("div",{class:"logo"},[(p=a.logo)==null?void 0:p.call(a)]),e.createVNode(m,e.mergeProps(n,{shadow:!1,radius:!1,onFinish:l=>d("finish",l)}),null)]),e.createVNode("div",{class:"column-muted"},[!c.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","card-login-wrapper"],style:{backgroundImage:t?`url(${t})`:"transparent",backgroundSize:"cover"}},[e.createVNode("div",{class:"logo"},[(y=a.logo)==null?void 0:y.call(a)]),e.createVNode("div",{class:"card-img-cover"},null),e.createVNode("div",{class:"card",style:{flexDirection:c.value?"row":"row-reverse"}},[e.createVNode("div",{class:["card-column-item","flex-1"]},[e.createVNode(m,e.mergeProps(n,{shadow:!1,radius:!1,onFinish:l=>d("finish",l)}),null)]),e.createVNode("div",{class:["card-column-muted","flex-1"],style:{width:"350px"}},[t&&e.createVNode("img",{src:t,alt:"Image",class:"column-muted-image"},null)])])]):e.createVNode("div",{class:["container","flex-center"],style:{backgroundImage:`url(${t})`,backgroundSize:"cover"}},[e.createVNode("div",{class:["flex-col","space-y-4"]},[(o=a.logo)==null?void 0:o.call(a),e.createVNode(m,n,null)])])}}});exports.Login=S;exports.loginEmits=w;exports.loginFormProps=U;exports.loginProps=I;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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(
|
|
1
|
+
:root{--color-link: hsl(221 100% 58%);--color-text: hsl(240 5% 20%);--color-text-dark: hsl(240 5% 96%);--color-section-text: hsl(240 6% 30%);--color-section-text-dark: 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)}.dark .title{color:var(--color-text-dark)}.dark .sub-title{color:var(--color-section-text-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(10px);backdrop-filter:blur(10px)}.dark .card-img-cover{background:var(--img-cover-color-dark)}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { NForm as W, NFormItem as x, NInput as B, NCheckbox as
|
|
3
|
-
const N = ["finish", "error", "captcha", "wechatFinish"],
|
|
1
|
+
import { defineComponent as L, reactive as P, ref as S, 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 $, NButton as C } from "naive-ui";
|
|
3
|
+
import './index.css';const N = ["finish", "error", "captcha", "wechatFinish"], z = {
|
|
4
4
|
title: {
|
|
5
5
|
type: String,
|
|
6
6
|
default: "Welcome back"
|
|
@@ -39,7 +39,7 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
39
39
|
actions: {
|
|
40
40
|
type: Array
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, R = {
|
|
43
43
|
title: {
|
|
44
44
|
type: String,
|
|
45
45
|
default: "Welcome back"
|
|
@@ -69,7 +69,7 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
69
69
|
}
|
|
70
70
|
}, g = /* @__PURE__ */ L({
|
|
71
71
|
name: "LoginForm",
|
|
72
|
-
props:
|
|
72
|
+
props: R,
|
|
73
73
|
emits: N,
|
|
74
74
|
setup(l, {
|
|
75
75
|
emit: t,
|
|
@@ -77,8 +77,8 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
77
77
|
}) {
|
|
78
78
|
const {
|
|
79
79
|
actions: s,
|
|
80
|
-
title:
|
|
81
|
-
subTitle:
|
|
80
|
+
title: I,
|
|
81
|
+
subTitle: r,
|
|
82
82
|
signUpUrl: y,
|
|
83
83
|
forgotUrl: o,
|
|
84
84
|
shadow: n,
|
|
@@ -86,7 +86,7 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
86
86
|
} = l, c = P({
|
|
87
87
|
username: "",
|
|
88
88
|
password: ""
|
|
89
|
-
}), f =
|
|
89
|
+
}), f = S(!1), b = {
|
|
90
90
|
username: [{
|
|
91
91
|
required: !0,
|
|
92
92
|
message: "请输入用户名",
|
|
@@ -107,10 +107,10 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
107
107
|
message: "长度在 6 到 20 个字符",
|
|
108
108
|
trigger: "blur"
|
|
109
109
|
}]
|
|
110
|
-
}, p =
|
|
111
|
-
var
|
|
112
|
-
(
|
|
113
|
-
|
|
110
|
+
}, p = S(null), F = () => {
|
|
111
|
+
var i;
|
|
112
|
+
(i = p.value) == null || i.validate((u) => {
|
|
113
|
+
u ? (console.error(u), t("error", u)) : t("finish", D(c));
|
|
114
114
|
});
|
|
115
115
|
}, w = () => {
|
|
116
116
|
console.error("Weixin login is not supported yet."), t("wechatFinish");
|
|
@@ -124,9 +124,9 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
124
124
|
}]
|
|
125
125
|
}, [e("div", {
|
|
126
126
|
class: "title"
|
|
127
|
-
}, [
|
|
127
|
+
}, [I]), e("div", {
|
|
128
128
|
class: "sub-title"
|
|
129
|
-
}, [
|
|
129
|
+
}, [r]), a.default ? a.default() : e(W, {
|
|
130
130
|
ref: p,
|
|
131
131
|
model: c,
|
|
132
132
|
rules: b,
|
|
@@ -139,7 +139,7 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
139
139
|
}, {
|
|
140
140
|
default: () => [e(B, {
|
|
141
141
|
value: c.username,
|
|
142
|
-
"onUpdate:value": (
|
|
142
|
+
"onUpdate:value": (i) => c.username = i,
|
|
143
143
|
placeholder: "请输入用户名"
|
|
144
144
|
}, null)]
|
|
145
145
|
}), e(x, {
|
|
@@ -148,15 +148,15 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
148
148
|
}, {
|
|
149
149
|
default: () => [e(B, {
|
|
150
150
|
value: c.password,
|
|
151
|
-
"onUpdate:value": (
|
|
151
|
+
"onUpdate:value": (i) => c.password = i,
|
|
152
152
|
placeholder: "请输入密码",
|
|
153
153
|
type: "password"
|
|
154
154
|
}, null)]
|
|
155
155
|
}), e("div", {
|
|
156
156
|
class: "password-forgot"
|
|
157
|
-
}, [e(
|
|
157
|
+
}, [e($, {
|
|
158
158
|
checked: f.value,
|
|
159
|
-
"onUpdate:checked": (
|
|
159
|
+
"onUpdate:checked": (i) => f.value = i,
|
|
160
160
|
label: "记住密码"
|
|
161
161
|
}, null), o && e("a", {
|
|
162
162
|
href: o
|
|
@@ -190,12 +190,12 @@ const N = ["finish", "error", "captcha", "wechatFinish"], T = {
|
|
|
190
190
|
}, [v("立即注册")])])]);
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
-
function
|
|
194
|
-
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !
|
|
193
|
+
function k(l) {
|
|
194
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !A(l);
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const j = /* @__PURE__ */ L({
|
|
197
197
|
name: "LoginPage",
|
|
198
|
-
props:
|
|
198
|
+
props: z,
|
|
199
199
|
emits: N,
|
|
200
200
|
setup(l, {
|
|
201
201
|
emit: t,
|
|
@@ -203,15 +203,15 @@ const q = /* @__PURE__ */ L({
|
|
|
203
203
|
}) {
|
|
204
204
|
const {
|
|
205
205
|
layout: s,
|
|
206
|
-
bg:
|
|
207
|
-
bgImageUrl:
|
|
206
|
+
bg: I,
|
|
207
|
+
bgImageUrl: r,
|
|
208
208
|
imagePosition: y,
|
|
209
209
|
...o
|
|
210
|
-
} = l, n =
|
|
210
|
+
} = l, n = E(() => y === "right");
|
|
211
211
|
return () => {
|
|
212
|
-
var m, c, f, b, p, F, w,
|
|
212
|
+
var m, c, f, b, p, F, w, i;
|
|
213
213
|
if (a.default) {
|
|
214
|
-
let
|
|
214
|
+
let u;
|
|
215
215
|
if (s === "column") {
|
|
216
216
|
let d;
|
|
217
217
|
return e("div", {
|
|
@@ -227,7 +227,7 @@ const q = /* @__PURE__ */ L({
|
|
|
227
227
|
shadow: !1,
|
|
228
228
|
radius: !1,
|
|
229
229
|
onFinish: (U) => t("finish", U)
|
|
230
|
-
}),
|
|
230
|
+
}), k(d = a.default()) ? d : {
|
|
231
231
|
default: () => [d]
|
|
232
232
|
})]), e("div", {
|
|
233
233
|
class: "column-muted",
|
|
@@ -247,33 +247,32 @@ const q = /* @__PURE__ */ L({
|
|
|
247
247
|
return e("div", {
|
|
248
248
|
class: ["container", "flex-center", "card-login-wrapper"],
|
|
249
249
|
style: {
|
|
250
|
-
backgroundImage:
|
|
250
|
+
backgroundImage: r ? `url(${r})` : "transparent"
|
|
251
251
|
}
|
|
252
252
|
}, [e("div", {
|
|
253
253
|
class: "logo"
|
|
254
254
|
}, [(f = a.logo) == null ? void 0 : f.call(a)]), e("div", {
|
|
255
255
|
class: "card-img-cover"
|
|
256
256
|
}, null), e("div", {
|
|
257
|
-
class: "card"
|
|
258
|
-
}, [e("div", {
|
|
259
|
-
class: ["card-column-item", "flex-1"],
|
|
257
|
+
class: "card",
|
|
260
258
|
style: {
|
|
261
|
-
|
|
259
|
+
flexDirection: n.value ? "row" : "row-reverse"
|
|
262
260
|
}
|
|
261
|
+
}, [e("div", {
|
|
262
|
+
class: ["card-column-item", "flex-1"]
|
|
263
263
|
}, [e(g, h(o, {
|
|
264
264
|
shadow: !1,
|
|
265
265
|
radius: !1,
|
|
266
266
|
onFinish: (U) => t("finish", U)
|
|
267
|
-
}),
|
|
267
|
+
}), k(d = a.default()) ? d : {
|
|
268
268
|
default: () => [d]
|
|
269
269
|
})]), e("div", {
|
|
270
270
|
class: ["card-column-muted", "flex-1"],
|
|
271
271
|
style: {
|
|
272
|
-
width: "350px"
|
|
273
|
-
"flex-direction": n.value ? "column-reverse" : "column"
|
|
272
|
+
width: "350px"
|
|
274
273
|
}
|
|
275
|
-
}, [
|
|
276
|
-
src:
|
|
274
|
+
}, [r && e("img", {
|
|
275
|
+
src: r,
|
|
277
276
|
alt: "Image",
|
|
278
277
|
class: "column-muted-image"
|
|
279
278
|
}, null)])])]);
|
|
@@ -281,15 +280,15 @@ const q = /* @__PURE__ */ L({
|
|
|
281
280
|
return e("div", {
|
|
282
281
|
class: ["container", "flex-center"],
|
|
283
282
|
style: {
|
|
284
|
-
backgroundImage: `url(${
|
|
283
|
+
backgroundImage: `url(${r})`,
|
|
285
284
|
backgroundSize: "cover"
|
|
286
285
|
}
|
|
287
286
|
}, [e("div", {
|
|
288
287
|
class: ["flex-col", "space-y-4"]
|
|
289
288
|
}, [(b = a.logo) == null ? void 0 : b.call(a), e(g, h(o, {
|
|
290
289
|
onFinish: (d) => t("finish", d)
|
|
291
|
-
}),
|
|
292
|
-
default: () => [
|
|
290
|
+
}), k(u = a.default()) ? u : {
|
|
291
|
+
default: () => [u]
|
|
293
292
|
})])]);
|
|
294
293
|
} else
|
|
295
294
|
return s === "column" ? e("div", {
|
|
@@ -303,7 +302,7 @@ const q = /* @__PURE__ */ L({
|
|
|
303
302
|
}, [(p = a.logo) == null ? void 0 : p.call(a)]), e(g, h(o, {
|
|
304
303
|
shadow: !1,
|
|
305
304
|
radius: !1,
|
|
306
|
-
onFinish: (
|
|
305
|
+
onFinish: (u) => t("finish", u)
|
|
307
306
|
}), null)]), e("div", {
|
|
308
307
|
class: "column-muted"
|
|
309
308
|
}, [!n.value && e("div", {
|
|
@@ -313,41 +312,50 @@ const q = /* @__PURE__ */ L({
|
|
|
313
312
|
alt: "Image",
|
|
314
313
|
class: "column-muted-image"
|
|
315
314
|
}, null)])]) : s === "card" ? e("div", {
|
|
316
|
-
class: ["container", "flex-center"]
|
|
315
|
+
class: ["container", "flex-center", "card-login-wrapper"],
|
|
316
|
+
style: {
|
|
317
|
+
backgroundImage: r ? `url(${r})` : "transparent",
|
|
318
|
+
backgroundSize: "cover"
|
|
319
|
+
}
|
|
317
320
|
}, [e("div", {
|
|
318
321
|
class: "logo"
|
|
319
322
|
}, [(w = a.logo) == null ? void 0 : w.call(a)]), e("div", {
|
|
320
|
-
class: "card"
|
|
323
|
+
class: "card-img-cover"
|
|
324
|
+
}, null), e("div", {
|
|
325
|
+
class: "card",
|
|
326
|
+
style: {
|
|
327
|
+
flexDirection: n.value ? "row" : "row-reverse"
|
|
328
|
+
}
|
|
321
329
|
}, [e("div", {
|
|
322
330
|
class: ["card-column-item", "flex-1"]
|
|
323
331
|
}, [e(g, h(o, {
|
|
324
332
|
shadow: !1,
|
|
325
333
|
radius: !1,
|
|
326
|
-
onFinish: (
|
|
334
|
+
onFinish: (u) => t("finish", u)
|
|
327
335
|
}), null)]), e("div", {
|
|
328
336
|
class: ["card-column-muted", "flex-1"],
|
|
329
337
|
style: {
|
|
330
338
|
width: "350px"
|
|
331
339
|
}
|
|
332
|
-
}, [
|
|
333
|
-
src:
|
|
340
|
+
}, [r && e("img", {
|
|
341
|
+
src: r,
|
|
334
342
|
alt: "Image",
|
|
335
343
|
class: "column-muted-image"
|
|
336
344
|
}, null)])])]) : e("div", {
|
|
337
345
|
class: ["container", "flex-center"],
|
|
338
346
|
style: {
|
|
339
|
-
backgroundImage: `url(${
|
|
347
|
+
backgroundImage: `url(${r})`,
|
|
340
348
|
backgroundSize: "cover"
|
|
341
349
|
}
|
|
342
350
|
}, [e("div", {
|
|
343
351
|
class: ["flex-col", "space-y-4"]
|
|
344
|
-
}, [(
|
|
352
|
+
}, [(i = a.logo) == null ? void 0 : i.call(a), e(g, o, null)])]);
|
|
345
353
|
};
|
|
346
354
|
}
|
|
347
355
|
});
|
|
348
356
|
export {
|
|
349
|
-
|
|
357
|
+
j as Login,
|
|
350
358
|
N as loginEmits,
|
|
351
|
-
|
|
352
|
-
|
|
359
|
+
R as loginFormProps,
|
|
360
|
+
z as loginProps
|
|
353
361
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@banmao/blocks",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -17,33 +17,33 @@
|
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/lodash-es": "^4.17.12",
|
|
20
|
-
"@vitest/coverage-v8": "
|
|
21
|
-
"@vitest/ui": "
|
|
20
|
+
"@vitest/coverage-v8": "3.1.4",
|
|
21
|
+
"@vitest/ui": "3.1.4",
|
|
22
22
|
"@vue/test-utils": "^2.4.6",
|
|
23
23
|
"@vue/tsconfig": "^0.7.0",
|
|
24
|
-
"glob": "^11.0.
|
|
25
|
-
"happy-dom": "^
|
|
24
|
+
"glob": "^11.0.2",
|
|
25
|
+
"happy-dom": "^17.4.7",
|
|
26
26
|
"naive-ui": "^2.41.0",
|
|
27
|
-
"typescript": "
|
|
28
|
-
"unplugin-auto-import": "^
|
|
29
|
-
"unplugin-icons": "^22.
|
|
30
|
-
"unplugin-vue-components": "^
|
|
31
|
-
"vite": "^6.
|
|
27
|
+
"typescript": "^5.7.3",
|
|
28
|
+
"unplugin-auto-import": "^19.2.0",
|
|
29
|
+
"unplugin-icons": "^22.1.0",
|
|
30
|
+
"unplugin-vue-components": "^28.5.0",
|
|
31
|
+
"vite": "^6.3.5",
|
|
32
32
|
"vite-plugin-compression": "^0.5.1",
|
|
33
33
|
"vite-plugin-svg-icons": "^2.0.1",
|
|
34
|
-
"vue": "^3.5.
|
|
35
|
-
"vue-tsc": "^2.2.
|
|
34
|
+
"vue": "^3.5.14",
|
|
35
|
+
"vue-tsc": "^2.2.10"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"naive-ui": "^2.41.0",
|
|
39
|
-
"vue": "^3.5.
|
|
39
|
+
"vue": "^3.5.14"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@iconify/vue": "^4.3.0",
|
|
43
|
-
"@vueuse/core": "^
|
|
43
|
+
"@vueuse/core": "^13.2.0",
|
|
44
44
|
"lodash-es": "^4.17.21",
|
|
45
45
|
"vue-draggable-next": "^2.2.1",
|
|
46
|
-
"vue-router": "^4.5.
|
|
46
|
+
"vue-router": "^4.5.1",
|
|
47
47
|
"vue3-text-clamp": "^0.1.2",
|
|
48
48
|
"@banmao/draw": "^0.0.4"
|
|
49
49
|
},
|