hookehuyr

用户页面样式优化

1 <!-- 1 <!--
2 * @Date: 2024-10-18 17:57:33 2 * @Date: 2024-10-18 17:57:33
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-10-21 18:13:26 4 + * @LastEditTime: 2024-10-22 17:57:02
5 * @FilePath: /hager/src/views/user/index.vue 5 * @FilePath: /hager/src/views/user/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -54,8 +54,11 @@ export default { ...@@ -54,8 +54,11 @@ export default {
54 methods: { 54 methods: {
55 handleHeight () { 55 handleHeight () {
56 // 56 //
57 - if ($('#router-view').outerHeight() > $('.user-box').height()) { 57 + // if ($('#router-view').outerHeight() > $('.user-box').height()) {
58 - $('.user-box').height($('#router-view').outerHeight()) 58 + // $('.user-box').height($('#router-view').outerHeight())
59 + // }
60 + if ($('#router-view').outerHeight() < $('.user-box').height()) {
61 + $('#router-view').height($('.user-box').outerHeight())
59 } 62 }
60 // 判断是否被遮挡,让屏幕能滚动 63 // 判断是否被遮挡,让屏幕能滚动
61 if (!this.isElementInViewport('#router-view')) { // #router-view 被屏幕遮挡 64 if (!this.isElementInViewport('#router-view')) { // #router-view 被屏幕遮挡
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
32 <script> 32 <script>
33 import mixin from 'common/mixin'; 33 import mixin from 'common/mixin';
34 import hagerInput from '@/components/common/hagerInput.vue'; 34 import hagerInput from '@/components/common/hagerInput.vue';
35 +import $ from 'jquery';
35 36
36 export default { 37 export default {
37 mixins: [mixin.init], 38 mixins: [mixin.init],
...@@ -47,7 +48,9 @@ export default { ...@@ -47,7 +48,9 @@ export default {
47 } 48 }
48 }, 49 },
49 mounted () { 50 mounted () {
50 - 51 + if ($('#router-view').outerHeight() < $('.user-box').height()) {
52 + $('#router-view').height($('.user-box').outerHeight())
53 + }
51 }, 54 },
52 methods: { 55 methods: {
53 onHandle () { 56 onHandle () {
......
1 <!-- 1 <!--
2 * @Date: 2024-10-18 18:00:47 2 * @Date: 2024-10-18 18:00:47
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-10-21 09:59:33 4 + * @LastEditTime: 2024-10-22 17:58:47
5 * @FilePath: /hager/src/views/user/login.vue 5 * @FilePath: /hager/src/views/user/login.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
29 <script> 29 <script>
30 import mixin from 'common/mixin'; 30 import mixin from 'common/mixin';
31 import hagerInput from '@/components/common/hagerInput.vue'; 31 import hagerInput from '@/components/common/hagerInput.vue';
32 +import $ from 'jquery';
32 33
33 export default { 34 export default {
34 mixins: [mixin.init], 35 mixins: [mixin.init],
...@@ -40,7 +41,9 @@ export default { ...@@ -40,7 +41,9 @@ export default {
40 } 41 }
41 }, 42 },
42 mounted () { 43 mounted () {
43 - 44 + if ($('#router-view').outerHeight() < $('.user-box').height()) {
45 + $('#router-view').height($('.user-box').outerHeight())
46 + }
44 }, 47 },
45 methods: { 48 methods: {
46 onSubmit () { 49 onSubmit () {
...@@ -59,6 +62,8 @@ export default { ...@@ -59,6 +62,8 @@ export default {
59 <style lang="less" scoped> 62 <style lang="less" scoped>
60 .hager-login-page { 63 .hager-login-page {
61 padding: 2rem 0.5rem 0; 64 padding: 2rem 0.5rem 0;
65 + display: flex;
66 + flex-direction: column;
62 &.xs { 67 &.xs {
63 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'); 68 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');
64 background-size: 80% 50%; 69 background-size: 80% 50%;
...@@ -112,12 +117,6 @@ export default { ...@@ -112,12 +117,6 @@ export default {
112 cursor: pointer; 117 cursor: pointer;
113 } 118 }
114 } 119 }
115 - .privacy {
116 -
117 - }
118 - .login {
119 -
120 - }
121 } 120 }
122 } 121 }
123 } 122 }
......
1 <!-- 1 <!--
2 * @Date: 2024-10-18 18:00:47 2 * @Date: 2024-10-18 18:00:47
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-10-21 18:04:13 4 + * @LastEditTime: 2024-10-22 18:05:31
5 * @FilePath: /hager/src/views/user/register.vue 5 * @FilePath: /hager/src/views/user/register.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
29 <script> 29 <script>
30 import mixin from 'common/mixin'; 30 import mixin from 'common/mixin';
31 import hagerInput from '@/components/common/hagerInput.vue'; 31 import hagerInput from '@/components/common/hagerInput.vue';
32 +import $ from 'jquery';
32 33
33 export default { 34 export default {
34 mixins: [mixin.init], 35 mixins: [mixin.init],
...@@ -43,7 +44,9 @@ export default { ...@@ -43,7 +44,9 @@ export default {
43 } 44 }
44 }, 45 },
45 mounted () { 46 mounted () {
46 - 47 + if ($('#router-view').outerHeight() < $('.user-box').height()) {
48 + $('#router-view').height($('.user-box').outerHeight())
49 + }
47 }, 50 },
48 methods: { 51 methods: {
49 onSubmit () { 52 onSubmit () {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
26 import mixin from 'common/mixin'; 26 import mixin from 'common/mixin';
27 import hagerInput from '@/components/common/hagerInput.vue'; 27 import hagerInput from '@/components/common/hagerInput.vue';
28 import { Message } from 'element-ui'; 28 import { Message } from 'element-ui';
29 +import $ from 'jquery';
29 30
30 export default { 31 export default {
31 mixins: [mixin.init], 32 mixins: [mixin.init],
...@@ -38,7 +39,9 @@ export default { ...@@ -38,7 +39,9 @@ export default {
38 } 39 }
39 }, 40 },
40 mounted () { 41 mounted () {
41 - 42 + if ($('#router-view').outerHeight() < $('.user-box').height()) {
43 + $('#router-view').height($('.user-box').outerHeight())
44 + }
42 }, 45 },
43 methods: { 46 methods: {
44 onSubmit () { 47 onSubmit () {
......