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
52404ae0
Commit
52404ae0
authored
Jun 28, 2019
by
Nature
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决content高度100%页面遮挡问题
parent
a92c762a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
2 deletions
+54
-2
index.vue
packages/components/HContent/index.vue
+51
-0
hlsPopup.vue
src/pages/hlsPopup.vue
+1
-1
home.vue
src/pages/home.vue
+1
-0
index.js
src/router/index.js
+1
-1
No files found.
packages/components/HContent/index.vue
View file @
52404ae0
...
...
@@ -10,6 +10,7 @@
</
template
>
<
script
>
import
{
detectOS
}
from
'../../common/utils/index'
export
default
{
name
:
'HContent'
,
props
:
{
...
...
@@ -18,6 +19,56 @@ export default {
default
:
''
,
},
},
mounted
()
{
this
.
contentHeight
()
},
methods
:
{
getHeader
()
{
let
$el
=
this
.
$el
.
previousElementSibling
do
{
if
(
$el
)
{
if
(
$el
.
_prevClass
.
indexOf
(
'h-header'
)
!==
-
1
)
{
break
}
$el
=
$el
.
previousElementSibling
}
}
while
(
$el
)
return
$el
},
getNextElementHeight
()
{
let
nextElement
=
this
.
$el
.
nextElementSibling
let
height
=
0
if
(
nextElement
)
{
height
=
window
.
getComputedStyle
(
nextElement
).
height
if
(
height
)
{
height
=
Number
(
height
.
replace
(
'px'
,
''
))
}
}
return
height
},
contentHeight
()
{
const
headerEl
=
this
.
getHeader
()
const
nextHeight
=
this
.
getNextElementHeight
()
const
winHeight
=
window
.
innerHeight
const
winWidth
=
window
.
innerWidth
let
paddingHeight
=
0
if
(
headerEl
)
{
if
(
detectOS
()
===
'ios'
&&
winWidth
===
375
&&
winHeight
===
812
)
{
paddingHeight
=
40
}
else
if
(
detectOS
()
===
'ios'
&&
winWidth
===
414
&&
winHeight
===
896
)
{
paddingHeight
=
40
}
else
if
(
detectOS
()
===
'ios'
)
{
paddingHeight
=
20
}
else
{
paddingHeight
=
0
}
}
let
content
=
this
.
$el
let
offsetTop
=
content
.
offsetTop
content
.
style
.
height
=
(
window
.
innerHeight
-
offsetTop
-
paddingHeight
-
nextHeight
)
+
'px'
},
},
}
</
script
>
...
...
src/pages/hlsPopup.vue
View file @
52404ae0
...
...
@@ -9,7 +9,7 @@
操作
</div>
</h-header>
<s-tab
:overflowX=
"true"
:showDivider=
"true"
:defaultActive=
"6"
has-border=
"true"
>
<s-tab
:overflowX=
"true"
:showDivider=
"true"
:defaultActive=
"6"
:
has-border=
"true"
>
<tab-item>
工商资料
</tab-item>
<tab-item>
股东成员
</tab-item>
<tab-item>
对外投资
</tab-item>
...
...
src/pages/home.vue
View file @
52404ae0
...
...
@@ -6,6 +6,7 @@
</div>
<div
slot=
"center"
>
小易
</div>
</h-header>
<h-content
id=
"home-content"
>
<div
v-for=
"item in message"
class=
"message"
>
<p
v-show=
"false"
class=
"message-time"
v-text=
"item.time"
/>
...
...
src/router/index.js
View file @
52404ae0
...
...
@@ -14,7 +14,7 @@ export default new Router({
path
:
'/'
,
redirect
:
'/home'
,
},
{
path
:
'/home'
,
component
:
Home
,
name
:
'Home'
,
meta
:
{
keepAlive
:
tru
e
}},
{
path
:
'/home'
,
component
:
Home
,
name
:
'Home'
,
meta
:
{
keepAlive
:
fals
e
}},
// test工具类
{
path
:
'/hls-popup'
,
component
:
HlsPopup
,
name
:
'HlsPopup'
,
meta
:
{
keepAlive
:
false
}},
],
...
...
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