Skip to content

Commit 99a6dc6

Browse files
committed
fix:登录模块ui优化
1 parent a6add41 commit 99a6dc6

5 files changed

Lines changed: 52 additions & 39 deletions

File tree

packages/design-core/src/login/ForgotPassword.vue

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
<tiny-button type="primary" @click="handleForgot"> 提交</tiny-button>
5656
</tiny-form-item>
5757
</tiny-form>
58+
<div class="forgot-bottom">
59+
<div class="to-login" @click="toLogin">去登录</div>
60+
</div>
5861
</div>
5962
</template>
6063

@@ -131,6 +134,10 @@ export default {
131134
}
132135
}
133136
137+
const toLogin = () => {
138+
emit('changeStatus', useLogin().LOGIN)
139+
}
140+
134141
watch(
135142
() => state.forgotData.password,
136143
() => {
@@ -139,7 +146,8 @@ export default {
139146
)
140147
return {
141148
state,
142-
handleForgot
149+
handleForgot,
150+
toLogin
143151
}
144152
}
145153
}
@@ -150,7 +158,7 @@ export default {
150158
color: #191919;
151159
font-size: 24px;
152160
font-weight: 600;
153-
margin-bottom: 28px;
161+
margin-bottom: 36px;
154162
}
155163
156164
.pw-tips {
@@ -170,6 +178,16 @@ export default {
170178
}
171179
}
172180
181+
.forgot-bottom {
182+
display: flex;
183+
justify-content: center;
184+
font-size: 14px;
185+
.to-login {
186+
cursor: pointer;
187+
color: #1476ff;
188+
}
189+
}
190+
173191
:deep(.tiny-form-item__content) {
174192
margin-left: 0 !important;
175193
}

packages/design-core/src/login/Index.vue

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ export default {
6161
height: 100vh;
6262
background: linear-gradient(to top left, #e7f0ff, #fff);
6363
display: flex;
64-
padding: 10%;
64+
padding: 10% 10% 0 10%;
6565
.login-left {
6666
flex: 2;
6767
.login-img {
6868
max-height: 500px;
69-
min-height: 298px;
7069
width: 100%;
7170
height: 100%;
7271
background-image: url(../../assets/login-bg.svg);
@@ -83,15 +82,30 @@ export default {
8382
box-sizing: border-box;
8483
max-width: 440px;
8584
min-width: 340px;
86-
max-height: 500px;
87-
min-height: 298px;
8885
width: 100%;
89-
height: 100%;
9086
background: #fff;
9187
border-radius: 12px;
9288
box-shadow: 0 8px 40px 0 #dce6f6;
93-
padding: 48px 60px;
89+
padding: 52px 60px 80px 60px;
90+
max-height: 100%;
91+
overflow-y: auto;
9492
}
9593
}
94+
95+
:deep(.tiny-form-item__content) {
96+
margin-left: 0 !important;
97+
}
98+
:deep(.tiny-button.tiny-button.tiny-button.tiny-button) {
99+
width: 100%;
100+
background: #595959;
101+
height: 32px;
102+
margin-top: 20px;
103+
}
104+
:deep(.tiny-input.tiny-input .tiny-input__inner.tiny-input__inner) {
105+
height: 32px;
106+
}
107+
:deep(.tiny-form.tiny-form.tiny-form .tiny-form-item) {
108+
margin-bottom: 20px;
109+
}
96110
}
97111
</style>

packages/design-core/src/login/Login.vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,14 @@ export default {
9393
color: #191919;
9494
font-size: 24px;
9595
font-weight: 600;
96-
margin-bottom: 28px;
96+
margin-bottom: 36px;
9797
}
9898
9999
.login-bottom {
100-
margin-top: 16px;
101100
display: flex;
102101
justify-content: space-between;
103102
color: #1476ff;
104-
margin-bottom: 32px;
103+
font-size: 14px;
105104
div {
106105
cursor: pointer;
107106
}
@@ -140,11 +139,4 @@ export default {
140139
cursor: pointer;
141140
}
142141
}
143-
:deep(.tiny-form-item__content) {
144-
margin-left: 0 !important;
145-
}
146-
:deep(.tiny-button.tiny-button.tiny-button.tiny-button) {
147-
width: 100%;
148-
background: #595959;
149-
}
150142
</style>

packages/design-core/src/login/Register.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default {
157157
color: #191919;
158158
font-size: 24px;
159159
font-weight: 600;
160-
margin-bottom: 28px;
160+
margin-bottom: 36px;
161161
}
162162
163163
.pw-tips {
@@ -178,11 +178,10 @@ export default {
178178
}
179179
180180
.register-bottom {
181-
margin-top: 16px;
182181
display: flex;
183182
justify-content: center;
184183
color: #808080;
185-
margin-bottom: 32px;
184+
font-size: 14px;
186185
.to-login {
187186
cursor: pointer;
188187
color: #1476ff;

packages/design-core/src/login/RegisterSuccess.vue

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import { reactive, computed } from 'vue'
2020
import { TinyCheckbox, TinyButton } from '@opentiny/vue'
2121
import useLogin from './js/useLogin'
22+
import { useModal } from '@opentiny/tiny-engine-meta-register'
2223
2324
export default {
2425
components: {
@@ -37,14 +38,13 @@ export default {
3738
emit('changeStatus', useLogin().LOGIN)
3839
}
3940
40-
const copy = () => {
41-
const textarea = document.createElement('textarea')
42-
43-
textarea.value = `${publicKey.value}`
44-
document.body.appendChild(textarea)
45-
textarea.select()
46-
document.execCommand('copy')
47-
document.body.removeChild(textarea)
41+
const copy = async () => {
42+
try {
43+
await navigator.clipboard.writeText(publicKey.value)
44+
useModal().message({ message: '复制成功', status: 'success' })
45+
} catch (err) {
46+
useModal().message({ message: '复制失败', status: 'error' })
47+
}
4848
}
4949
5050
return {
@@ -94,14 +94,4 @@ export default {
9494
margin-bottom: 20px;
9595
}
9696
}
97-
98-
:deep(.tiny-button.tiny-button.tiny-button.tiny-button) {
99-
margin-top: 20px;
100-
background: #fff;
101-
color: #191919;
102-
border: 1px solid #c9c9c9;
103-
}
104-
:deep(.tiny-button.tiny-button.tiny-button.tiny-button.tiny-button--primary:not(.is-disabled)):hover {
105-
background: #fff;
106-
}
10797
</style>

0 commit comments

Comments
 (0)