Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-easy-ui
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
easyUI
hls-easy-ui
Commits
d521e0c5
Commit
d521e0c5
authored
Nov 06, 2019
by
JingChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scroll
parent
9f4b3be4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
7 deletions
+66
-7
index.vue
packages/components/STab/index.vue
+4
-0
tab-item.vue
packages/components/STab/tab-item.vue
+4
-1
index.vue
packages/components/Scroll/index.vue
+53
-1
hlsPopup.vue
src/pages/hlsPopup.vue
+2
-2
home.vue
src/pages/home.vue
+3
-3
No files found.
packages/components/STab/index.vue
View file @
d521e0c5
...
@@ -34,6 +34,10 @@ export default {
...
@@ -34,6 +34,10 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
},
},
showBottomBorder
:
{
type
:
Boolean
,
default
:
false
,
},
overflowX
:
{
overflowX
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
,
...
...
packages/components/STab/tab-item.vue
View file @
d521e0c5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<section
:class=
"[tabClass]"
class=
"h-tab-item"
@
click=
"titleClick"
>
<section
:class=
"[tabClass]"
class=
"h-tab-item"
@
click=
"titleClick"
>
<div
class=
"h-item"
>
<div
class=
"h-item"
>
<slot/>
<slot/>
<div
class=
"bottom-border"
/>
<div
v-if=
"showBottomBorder"
class=
"bottom-border"
/>
</div>
</div>
<div
v-show=
"showDivider"
class=
"tab-divider"
/>
<div
v-show=
"showDivider"
class=
"tab-divider"
/>
</section>
</section>
...
@@ -21,6 +21,9 @@ export default {
...
@@ -21,6 +21,9 @@ export default {
showDivider
()
{
showDivider
()
{
return
this
.
$parent
.
showDivider
return
this
.
$parent
.
showDivider
},
},
showBottomBorder
()
{
return
this
.
$parent
.
showBottomBorder
},
tabClass
()
{
tabClass
()
{
if
(
this
.
$parent
.
hasBorder
)
{
if
(
this
.
$parent
.
hasBorder
)
{
return
this
.
$parent
.
position
===
'top'
?
'vue-1px-b'
:
'vue-1px-t'
return
this
.
$parent
.
position
===
'top'
?
'vue-1px-b'
:
'vue-1px-t'
...
...
packages/components/Scroll/index.vue
View file @
d521e0c5
...
@@ -188,6 +188,7 @@ export default {
...
@@ -188,6 +188,7 @@ export default {
bubbleY
:
0
,
// 气泡y坐标,
bubbleY
:
0
,
// 气泡y坐标,
isIos
:
false
,
isIos
:
false
,
fullScreen
:
true
,
fullScreen
:
true
,
fontSize
:
Number
(
window
.
document
.
documentElement
.
style
.
fontSize
.
replace
(
'px'
,
''
)),
}
}
},
},
computed
:
{
computed
:
{
...
@@ -232,6 +233,55 @@ export default {
...
@@ -232,6 +233,55 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
getHeaderHeight
()
{
let
vm
=
this
let
$el
=
vm
.
$el
.
previousElementSibling
let
headerHeight
=
0
do
{
if
(
$el
)
{
let
elHeight
=
window
.
getComputedStyle
(
$el
).
height
let
part
=
/^
\d
+
(\.\d
+
)?
px$/
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
headerHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
}
if
(
$el
.
_prevClass
&&
$el
.
_prevClass
.
indexOf
(
'h-header'
)
===
0
)
{
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
headerHeight
+=
0.8
*
vm
.
fontSize
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
headerHeight
+=
0.8
*
vm
.
fontSize
}
else
if
(
detectOS
()
===
'ios'
)
{
headerHeight
+=
0.4
*
vm
.
fontSize
}
}
$el
=
$el
.
previousElementSibling
}
}
while
(
$el
)
return
headerHeight
},
getNextElementHeight
()
{
let
vm
=
this
let
nextElement
=
this
.
$el
.
nextElementSibling
let
nextHeight
=
0
do
{
if
(
nextElement
)
{
let
elHeight
=
window
.
getComputedStyle
(
nextElement
).
height
let
part
=
/^
\d
+
(\.\d
+
)?
px$/
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
nextHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
}
if
(
nextElement
.
_prevClass
&&
nextElement
.
_prevClass
.
indexOf
(
'h-bottom-tab'
)
===
0
)
{
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
nextHeight
+=
vm
.
fontSize
*
0.68
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
nextHeight
+=
vm
.
fontSize
*
0.68
}
}
nextElement
=
nextElement
.
nextElementSibling
}
}
while
(
nextElement
)
return
nextHeight
},
// 初始化scroll
// 初始化scroll
initScroll
()
{
initScroll
()
{
let
vm
=
this
let
vm
=
this
...
@@ -239,6 +289,8 @@ export default {
...
@@ -239,6 +289,8 @@ export default {
// 设置scrollContent的最小高,实现高度不足时也有回弹效果
// 设置scrollContent的最小高,实现高度不足时也有回弹效果
if
(
this
.
$refs
.
scrollContent
)
{
if
(
this
.
$refs
.
scrollContent
)
{
// const headerHeight = vm.getHeaderHeight()
// const nextHeight = vm.getNextElementHeight()
this
.
$refs
.
scrollContent
.
style
.
minHeight
=
`
${
this
.
$refs
.
scroll
.
getBoundingClientRect
().
height
+
1
}
px`
this
.
$refs
.
scrollContent
.
style
.
minHeight
=
`
${
this
.
$refs
.
scroll
.
getBoundingClientRect
().
height
+
1
}
px`
if
(
vm
.
hasFoot
.
footFlag
)
{
if
(
vm
.
hasFoot
.
footFlag
)
{
let
height
=
vm
.
hasFoot
.
height
||
88
let
height
=
vm
.
hasFoot
.
height
||
88
...
@@ -406,7 +458,7 @@ export default {
...
@@ -406,7 +458,7 @@ export default {
//$ = vue-better-scroll
//$ = vue-better-scroll
.vue-better-scroll {
.vue-better-scroll {
width 100%
width 100%
overflow hidden
overflow hidden
!important
box-sizing border-box
box-sizing border-box
position relative
position relative
height 100%
height 100%
...
...
src/pages/hlsPopup.vue
View file @
d521e0c5
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<tab-item>
涉诉公告
</tab-item>
<tab-item>
涉诉公告
</tab-item>
<tab-item>
司法协助
</tab-item>
<tab-item>
司法协助
</tab-item>
</s-tab>
</s-tab>
<
h-content
class=
"has-footer"
>
<
scroll
class=
"has-footer"
>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showLoading"
>
showLoading
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showLoading"
>
showLoading
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"hideLoading"
>
hideLoading
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"hideLoading"
>
hideLoading
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showLongTop"
>
showLongTop
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showLongTop"
>
showLongTop
</h-button>
...
@@ -239,7 +239,7 @@
...
@@ -239,7 +239,7 @@
</div>
</div>
<h2
class=
"item-title"
>
Modal
</h2>
<h2
class=
"item-title"
>
Modal
</h2>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showModal"
>
Modal
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showModal"
>
Modal
</h-button>
</
h-content
>
</
scroll
>
<bottom-tab
:show-divider=
"true"
>
<bottom-tab
:show-divider=
"true"
>
<tab-button
cusClass=
"button-exit"
@
click
.
native=
"showConfirm"
><img
<tab-button
cusClass=
"button-exit"
@
click
.
native=
"showConfirm"
><img
...
...
src/pages/home.vue
View file @
d521e0c5
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</div>
</div>
<div
slot=
"center"
>
小易
</div>
<div
slot=
"center"
>
小易
</div>
</h-header>
</h-header>
<s-tab>
<s-tab
:has-border=
"true"
:show-divider=
"true"
:show-bottom-border=
"true"
>
<tab-item>
Vue
</tab-item>
<tab-item>
Vue
</tab-item>
<tab-item
@
click
.
native=
"showModal = !showModal"
>
APP
</tab-item>
<tab-item
@
click
.
native=
"showModal = !showModal"
>
APP
</tab-item>
</s-tab>
</s-tab>
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
</s-tab>
-->
</s-tab>
-->
<!--
<div
style=
"height: 40px;"
/>
-->
<!--
<div
style=
"height: 40px;"
/>
-->
<bottom-tab/>
<bottom-tab/>
<h-modal
v-model=
"showModal"
position=
"
left
"
>
<h-modal
v-model=
"showModal"
position=
"
top
"
>
<div>
123
</div>
<div>
123
</div>
</h-modal>
</h-modal>
</h-view>
</h-view>
...
@@ -199,7 +199,7 @@ export default {
...
@@ -199,7 +199,7 @@ export default {
box-shadow: none;
box-shadow: none;
}
}
.modal{
.modal{
left
:50%
top
:50%
}
}
.content {
.content {
background-color: #eeeeee;
background-color: #eeeeee;
...
...
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