Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh-order-h5
Project
Project
Details
Activity
Releases
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
李俊赕
wxh-order-h5
Commits
1fc53c45
Commit
1fc53c45
authored
Mar 05, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式优化1
parent
306e8e1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
31 deletions
+56
-31
service.vue
web/src/views/h5/shzhida/order/service.vue
+56
-31
No files found.
web/src/views/h5/shzhida/order/service.vue
View file @
1fc53c45
...
@@ -2,11 +2,14 @@
...
@@ -2,11 +2,14 @@
<div
class=
"main"
>
<div
class=
"main"
>
<section
class=
"page-container"
>
<section
class=
"page-container"
>
<div
class=
"menu-wrapper"
ref=
"menu"
>
<div
class=
"menu-wrapper"
ref=
"menu"
>
<div
:class=
"['menu-item',currentMenuIndex===menuIndex ? 'active' : '']"
v-for=
"(menu,menuIndex) in 50"
:key=
"menuIndex"
@
click=
"changeMenu(menu,menuIndex)"
>
<div
class=
"content"
>
menu
{{
menuIndex
}}
<div
:class=
"['menu-item',currentMenuIndex===menuIndex ? 'active' : '']"
v-for=
"(menu,menuIndex) in menuList"
:key=
"menuIndex"
@
click=
"changeMenu(menu,menuIndex)"
>
{{
menu
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"container-wrapper"
ref=
"container"
>
<div
class=
"container-wrapper"
ref=
"container"
>
<div
class=
"content"
>
<template
v-for=
"(item,itemIndex) in formList"
>
<template
v-for=
"(item,itemIndex) in formList"
>
<div
:key=
"itemIndex"
class=
"content-box"
>
<div
:key=
"itemIndex"
class=
"content-box"
>
<div
class=
"title"
>
<div
class=
"title"
>
...
@@ -24,11 +27,13 @@
...
@@ -24,11 +27,13 @@
</div>
</div>
</div>
</div>
</template>
</template>
</div>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<mt-button
type=
"primary"
size=
"small"
:plain=
"true"
>
保存
</mt-button>
<mt-button
type=
"primary"
size=
"small"
:plain=
"true"
>
保存
</mt-button>
<mt-button
type=
"primary"
size=
"small"
>
提交信息
</mt-button>
<mt-button
type=
"primary"
size=
"small"
>
提交信息
</mt-button>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</template>
</template>
...
@@ -67,6 +72,7 @@ export default {
...
@@ -67,6 +72,7 @@ export default {
scrollContent
:
null
,
scrollContent
:
null
,
scrollY
:
0
,
scrollY
:
0
,
formList
:
[],
formList
:
[],
menuList
:
[],
inApp
:
true
,
inApp
:
true
,
loading
:
true
,
loading
:
true
,
orderId
:
''
,
orderId
:
''
,
...
@@ -153,11 +159,15 @@ export default {
...
@@ -153,11 +159,15 @@ export default {
methods
:
{
methods
:
{
initPageData
()
{
initPageData
()
{
const
query
=
this
.
$route
.
query
const
query
=
this
.
$route
.
query
console
.
log
(
query
,
'query'
)
const
{
type
}
=
query
const
{
type
}
=
query
this
.
type
=
type
this
.
type
=
type
this
.
formList
=
getData
(
type
)
this
.
formList
=
getData
(
type
)
this
.
formList
.
map
(
item
=>
{
this
.
menuList
.
push
(
item
.
title
)
})
this
.
$nextTick
(()
=>
{
this
.
initScroll
()
this
.
initScroll
()
})
},
},
changeMenu
(
item
,
index
)
{
changeMenu
(
item
,
index
)
{
this
.
currentMenuIndex
=
index
this
.
currentMenuIndex
=
index
...
@@ -166,25 +176,30 @@ export default {
...
@@ -166,25 +176,30 @@ export default {
)
)
const
el
=
contentBox
[
index
]
const
el
=
contentBox
[
index
]
this
.
currentTime
=
new
Date
().
getTime
()
this
.
currentTime
=
new
Date
().
getTime
()
console
.
log
(
contentBox
,
'contentBox'
)
this
.
scrollContent
.
scrollToElement
(
el
,
0
)
this
.
scrollContent
.
scrollToElement
(
el
,
0
)
},
},
initScroll
()
{
initScroll
()
{
// this.srcollMenu = new BScroll(this.$refs.menu, {
// this.srcollMenu = new BScroll(this.$refs.menu, {
// probeType: 3,
// scrollX: true,
// scrollY: false,
// startX: 0,
// eventPassthrough: 'vertical',
// click: true
// click: true
// })
// })
console
.
log
(
this
.
$refs
,
'refs'
)
this
.
scrollContent
=
new
BScroll
(
this
.
$refs
.
container
,
{
this
.
scrollContent
=
new
BScroll
(
this
.
$refs
.
container
,
{
probeType
:
3
,
probeType
:
3
,
click
:
true
click
:
true
})
})
this
.
scrollContent
.
on
(
'scroll'
,
pos
=>
{
this
.
scrollContent
.
on
(
'scroll'
,
pos
=>
{
console
.
log
(
pos
,
'pos'
)
this
.
scrollY
=
Math
.
abs
(
Math
.
round
(
pos
.
y
))
this
.
scrollY
=
Math
.
abs
(
Math
.
round
(
pos
.
y
))
})
})
this
.
$nextTick
(()
=>
{
this
.
calculateHeight
()
this
.
_calculateHeight
()
})
},
},
calculateHeight
()
{
_calculateHeight
()
{
const
contentBox
=
this
.
$refs
.
container
.
getElementsByClassName
(
const
contentBox
=
this
.
$refs
.
container
.
getElementsByClassName
(
'content-box'
'content-box'
)
)
...
@@ -274,17 +289,27 @@ export default {
...
@@ -274,17 +289,27 @@ export default {
// display: flex;
// display: flex;
}
}
.menu-wrapper{
.menu-wrapper{
position: relative;
z-index: 10;
width:100%;
background: #fff;
.content{
display: flex;
display: flex;
overflow: auto;
overflow: auto;
}
.menu-item{
.menu-item{
flex:1;
// flex:1;
white-space: nowrap;
font-weight: bold;
padding:px2rem(30) px2rem(40);
padding:px2rem(30) px2rem(40);
}
}
.menu-item.active{
.menu-item.active{
border-bottom:px2rem(
2
) solid #26a2ff ;
border-bottom:px2rem(
6
) solid #26a2ff ;
}
}
}
}
.container-wrapper{
.container-wrapper{
height:calc(100vh - 100px);
// overflow: auto;
width:100%;
width:100%;
border-radius:px2rem(10) ;
border-radius:px2rem(10) ;
padding:px2rem(20);
padding:px2rem(20);
...
...
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