hookehuyr

用户页面样式优化

<!--
* @Date: 2024-10-18 17:57:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-21 18:13:26
* @LastEditTime: 2024-10-22 17:57:02
* @FilePath: /hager/src/views/user/index.vue
* @Description: 文件描述
-->
......@@ -54,8 +54,11 @@ export default {
methods: {
handleHeight () {
//
if ($('#router-view').outerHeight() > $('.user-box').height()) {
$('.user-box').height($('#router-view').outerHeight())
// if ($('#router-view').outerHeight() > $('.user-box').height()) {
// $('.user-box').height($('#router-view').outerHeight())
// }
if ($('#router-view').outerHeight() < $('.user-box').height()) {
$('#router-view').height($('.user-box').outerHeight())
}
// 判断是否被遮挡,让屏幕能滚动
if (!this.isElementInViewport('#router-view')) { // #router-view 被屏幕遮挡
......
......@@ -32,6 +32,7 @@
<script>
import mixin from 'common/mixin';
import hagerInput from '@/components/common/hagerInput.vue';
import $ from 'jquery';
export default {
mixins: [mixin.init],
......@@ -47,7 +48,9 @@ export default {
}
},
mounted () {
if ($('#router-view').outerHeight() < $('.user-box').height()) {
$('#router-view').height($('.user-box').outerHeight())
}
},
methods: {
onHandle () {
......
<!--
* @Date: 2024-10-18 18:00:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-21 09:59:33
* @LastEditTime: 2024-10-22 17:58:47
* @FilePath: /hager/src/views/user/login.vue
* @Description: 文件描述
-->
......@@ -29,6 +29,7 @@
<script>
import mixin from 'common/mixin';
import hagerInput from '@/components/common/hagerInput.vue';
import $ from 'jquery';
export default {
mixins: [mixin.init],
......@@ -40,7 +41,9 @@ export default {
}
},
mounted () {
if ($('#router-view').outerHeight() < $('.user-box').height()) {
$('#router-view').height($('.user-box').outerHeight())
}
},
methods: {
onSubmit () {
......@@ -59,6 +62,8 @@ export default {
<style lang="less" scoped>
.hager-login-page {
padding: 2rem 0.5rem 0;
display: flex;
flex-direction: column;
&.xs {
background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('https://cdn.ipadbiz.cn/hager/img/user/l-bg.png');
background-size: 80% 50%;
......@@ -112,12 +117,6 @@ export default {
cursor: pointer;
}
}
.privacy {
}
.login {
}
}
}
}
......
<!--
* @Date: 2024-10-18 18:00:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-21 18:04:13
* @LastEditTime: 2024-10-22 18:05:31
* @FilePath: /hager/src/views/user/register.vue
* @Description: 文件描述
-->
......@@ -29,6 +29,7 @@
<script>
import mixin from 'common/mixin';
import hagerInput from '@/components/common/hagerInput.vue';
import $ from 'jquery';
export default {
mixins: [mixin.init],
......@@ -43,7 +44,9 @@ export default {
}
},
mounted () {
if ($('#router-view').outerHeight() < $('.user-box').height()) {
$('#router-view').height($('.user-box').outerHeight())
}
},
methods: {
onSubmit () {
......
......@@ -26,6 +26,7 @@
import mixin from 'common/mixin';
import hagerInput from '@/components/common/hagerInput.vue';
import { Message } from 'element-ui';
import $ from 'jquery';
export default {
mixins: [mixin.init],
......@@ -38,7 +39,9 @@ export default {
}
},
mounted () {
if ($('#router-view').outerHeight() < $('.user-box').height()) {
$('#router-view').height($('.user-box').outerHeight())
}
},
methods: {
onSubmit () {
......