Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-10-20 13:20:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cb7ec0686295259ae4cfe017eaeb9810386b1e58
cb7ec068
1 parent
5578a230
用户相关功能页调整
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
components.d.ts
src/components/common/hagerHeader.vue
src/views/user/index.vue
components.d.ts
View file @
cb7ec06
...
...
@@ -7,11 +7,20 @@ export {}
/* prettier-ignore */
declare
module
'vue'
{
export
interface
GlobalComponents
{
ElBreadcrumb
:
typeof
import
(
'element-ui/lib/breadcrumb'
)[
'default'
]
ElBreadcrumbItem
:
typeof
import
(
'element-ui/lib/breadcrumb-item'
)[
'default'
]
ElCarousel
:
typeof
import
(
'element-ui/lib/carousel'
)[
'default'
]
ElCarouselItem
:
typeof
import
(
'element-ui/lib/carousel-item'
)[
'default'
]
ElCheckbox
:
typeof
import
(
'element-ui/lib/checkbox'
)[
'default'
]
ElCol
:
typeof
import
(
'element-ui/lib/col'
)[
'default'
]
ElCollapse
:
typeof
import
(
'element-ui/lib/collapse'
)[
'default'
]
ElCollapseItem
:
typeof
import
(
'element-ui/lib/collapse-item'
)[
'default'
]
ElCollapseTransition
:
typeof
import
(
'element-ui/lib/transitions/collapse-transition'
)[
'default'
]
ElImage
:
typeof
import
(
'element-ui/lib/image'
)[
'default'
]
ElInput
:
typeof
import
(
'element-ui/lib/input'
)[
'default'
]
ElOption
:
typeof
import
(
'element-ui/lib/option'
)[
'default'
]
ElRow
:
typeof
import
(
'element-ui/lib/row'
)[
'default'
]
ElSelect
:
typeof
import
(
'element-ui/lib/select'
)[
'default'
]
ElTooltip
:
typeof
import
(
'element-ui/lib/tooltip'
)[
'default'
]
HagerBox
:
typeof
import
(
'./src/components/common/hagerBox.vue'
)[
'default'
]
HagerCarousel
:
typeof
import
(
'./src/components/hagerCarousel.vue'
)[
'default'
]
...
...
src/components/common/hagerHeader.vue
View file @
cb7ec06
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-
18 09:34:29
* @LastEditTime: 2024-10-
20 13:01:08
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
...
...
@@ -434,7 +434,7 @@ export default {
},
goToLogin () {
this.$router.push({
path: '/login'
path: '/
user/
login'
});
},
openMenu () {
...
...
src/views/user/index.vue
View file @
cb7ec06
<!--
* @Date: 2024-10-18 17:57:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-20 1
2:10:21
* @LastEditTime: 2024-10-20 1
3:19:23
* @FilePath: /hager/src/views/user/index.vue
* @Description: 文件描述
-->
...
...
@@ -9,13 +9,13 @@
<div class="hager-user-page">
<div class="centered-div">
<el-row>
<el-col :span="1
4
">
<el-col :span="1
3
">
<div class="user-box" style="background-color: #EFF7FB;">
<div class="user-logo"></div>
<div class="user-bg"></div>
</div>
</el-col>
<el-col :span="1
0
">
<el-col :span="1
1
">
<router-view id="router-view"></router-view>
</el-col>
</el-row>
...
...
@@ -36,18 +36,21 @@ export default {
},
mounted () {
// 设置用户盒子高度
this.handleResize
();
// this.handleHeight
();
// 监听窗口的 resize 事件
window.addEventListener('resize', this.handle
Resize
);
window.addEventListener('resize', this.handle
Height
);
},
methods: {
handleResize () {
handleHeight () {
//
if ($('#router-view').outerHeight() > $('.user-box').height()) {
$('.user-box').height($('#router-view').outerHeight())
}
}
},
beforeDestroy() {
// 在组件销毁前移除监听器,防止内存泄漏
window.removeEventListener('resize', this.handle
Resize
);
window.removeEventListener('resize', this.handle
Height
);
}
}
</script>
...
...
Please
register
or
login
to post a comment