Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mes
mes-ui
Commits
d308b2ff
Commit
d308b2ff
authored
Jan 18, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加页面标题容器,添加页面容器组件
parent
63593189
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
PageTitle.vue
src/components/Page/PageTitle.vue
+41
-0
PageWrapper.vue
src/components/Page/PageWrapper.vue
+26
-0
main.js
src/main.js
+6
-0
No files found.
src/components/Page/PageTitle.vue
0 → 100644
View file @
d308b2ff
<
template
>
<div
class=
"page-header"
>
<div
class=
"page-title"
>
<slot
/>
</div>
<div
class=
"page-buttons"
>
<el-button
size=
"mini"
type=
"default"
@
click=
"pageBack"
>
返回
</el-button>
<slot
name=
"buttons"
/>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{};
},
methods
:
{
pageBack
()
{
this
.
$router
.
go
(
-
1
);
},
},
};
</
script
>
<
style
lang=
"scss"
>
.page-header
{
background
:
#fff
;
padding
:
10px
0
7px
;
box-shadow
:
0
2px
3px
#e3e3e3
;
.page-buttons
{
padding
:
0
20px
;
}
.page-title
{
margin
:
0
;
font-size
:
18px
;
text-align
:
center
;
font-weight
:
600
;
}
}
</
style
>
src/components/Page/PageWrapper.vue
0 → 100644
View file @
d308b2ff
<
template
>
<div
class=
"page-wrapper"
>
<el-scrollbar
style=
"padding: 10px 0;"
:style=
"
{ height: scrollHeight }">
<slot
/>
</el-scrollbar>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{};
},
computed
:
{
scrollHeight
()
{
return
"calc(100vh - 70px - 83px)"
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.page-wrapper
{
}
</
style
>
src/main.js
View file @
d308b2ff
...
...
@@ -19,6 +19,10 @@ import './permission' // permission control
import
{
getDicts
}
from
"@/api/system/dict/data"
;
import
{
getConfigKey
}
from
"@/api/system/config"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
handleTree
}
from
"@/utils/ruoyi"
;
import
PageTitle
from
'@/components/Page/PageTitle.vue'
import
PageWrapper
from
'@/components/Page/PageWrapper.vue'
// 分页组件
import
Pagination
from
"@/components/Pagination"
;
// 自定义表格工具组件
...
...
@@ -54,6 +58,8 @@ Vue.prototype.download = download
Vue
.
prototype
.
handleTree
=
handleTree
// 全局组件挂载
Vue
.
component
(
'PageWrapper'
,
PageWrapper
)
Vue
.
component
(
'PageTitle'
,
PageTitle
)
Vue
.
component
(
'DictTag'
,
DictTag
)
Vue
.
component
(
'Pagination'
,
Pagination
)
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment