forked from github/dataease
fix(移动端): 增加密码输入框图标
This commit is contained in:
parent
d52e5a8efc
commit
dbcfcd751e
@ -46,6 +46,10 @@ const validatePwd = value => {
|
||||
return regep.test(value)
|
||||
}
|
||||
|
||||
const visible = ref(true)
|
||||
const clickRightIcon = () => {
|
||||
visible.value = !visible.value
|
||||
}
|
||||
const onSubmit = async () => {
|
||||
if (!checkUsername(username.value) || !validatePwd(password.value)) {
|
||||
showToast({
|
||||
@ -106,13 +110,21 @@ const usernameEndValidate = ({ status, message }) => {
|
||||
</div>
|
||||
<van-field
|
||||
v-model="password"
|
||||
type="password"
|
||||
:type="visible ? 'password' : 'text'"
|
||||
@click-right-icon="clickRightIcon"
|
||||
:style="{ borderColor: !!passwordError ? '#F54A45' : '#bbbfc4' }"
|
||||
name="密码"
|
||||
placeholder="请输入密码"
|
||||
:rules="[{ required: true, message: '请填写密码' }]"
|
||||
@end-validate="passwordEndValidate"
|
||||
/>
|
||||
>
|
||||
<template #right-icon>
|
||||
<el-icon>
|
||||
<Icon v-if="visible" name="icon_invisible_outlined"></Icon>
|
||||
<Icon v-else name="icon_visible_outlined"></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
</van-field>
|
||||
<div v-if="!!passwordError" class="van-ed-error">
|
||||
{{ passwordError }}
|
||||
</div>
|
||||
@ -159,6 +171,15 @@ const usernameEndValidate = ({ status, message }) => {
|
||||
color: #f54a45;
|
||||
}
|
||||
|
||||
.van-field__right-icon {
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: -2px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.van-field {
|
||||
border: 1px solid #bbbfc4;
|
||||
border-radius: 4px;
|
||||
|
@ -599,7 +599,12 @@ const getMenuList = (val: boolean) => {
|
||||
</div>
|
||||
</el-aside>
|
||||
|
||||
<div class="dataset-content" :class="(isDataEaseBi || isIframe) && 'h100'">
|
||||
<div
|
||||
class="dataset-content"
|
||||
:class="{
|
||||
auto: isIframe
|
||||
}"
|
||||
>
|
||||
<template v-if="!state.datasetTree.length && mounted">
|
||||
<empty-background description="暂无数据集" img-type="none">
|
||||
<el-button
|
||||
@ -794,6 +799,9 @@ const getMenuList = (val: boolean) => {
|
||||
|
||||
.dataset-content {
|
||||
background: #f5f6f7;
|
||||
&.auto {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.dataset-list {
|
||||
|
@ -808,7 +808,13 @@ const getMenuList = (val: boolean) => {
|
||||
</div>
|
||||
</el-aside>
|
||||
|
||||
<div class="datasource-content" :class="(isDataEaseBi || isIframe) && 'h100'">
|
||||
<div
|
||||
class="datasource-content"
|
||||
:class="{
|
||||
auto: isIframe,
|
||||
h100: isDataEaseBi || isIframe
|
||||
}"
|
||||
>
|
||||
<template v-if="!state.datasourceTree.length && mounted">
|
||||
<empty-background description="暂无数据源" img-type="none">
|
||||
<el-button
|
||||
@ -1620,6 +1626,9 @@ const getMenuList = (val: boolean) => {
|
||||
.datasource-content {
|
||||
background: #f5f6f7;
|
||||
overflow-y: auto;
|
||||
&.auto {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.m24 {
|
||||
|
Loading…
Reference in New Issue
Block a user