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
c277405f
Commit
c277405f
authored
Jun 01, 2021
by
Hello
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
content
parent
63c1508e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
27 deletions
+24
-27
index.vue
packages/components/HContent/index.vue
+24
-27
No files found.
packages/components/HContent/index.vue
View file @
c277405f
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
fontSize
:
Number
(
window
.
document
.
documentElement
.
style
.
fontSize
.
replace
(
'px'
,
''
)),
fontSize
:
Number
(
window
.
document
.
documentElement
.
style
.
fontSize
.
replace
(
'px'
,
''
)),
winHeight
:
Number
(
window
.
localStorage
.
getItem
(
'height'
))
||
window
.
innerHeight
,
winHeight
:
Number
(
window
.
localStorage
.
getItem
(
'height'
))
||
window
.
innerHeight
,
winWidth
:
window
.
innerWidth
,
winWidth
:
window
.
innerWidth
,
height
:
0
,
height
:
0
,
startY
:
0
,
startY
:
0
,
...
@@ -91,14 +91,13 @@ export default {
...
@@ -91,14 +91,13 @@ export default {
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
headerHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
headerHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
}
}
if
(
$el
.
_prevClass
&&
$el
.
_prevClass
.
indexOf
(
'h-header'
)
===
0
)
{
let
paddingTopHeight
=
window
.
getComputedStyle
(
$el
).
paddingTop
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
let
paddingBottomHeight
=
window
.
getComputedStyle
(
$el
).
paddingBottom
headerHeight
+=
0.8
*
vm
.
fontSize
if
(
paddingTopHeight
&&
part
.
test
(
paddingTopHeight
))
{
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
headerHeight
+=
Number
(
paddingTopHeight
.
replace
(
'px'
,
''
))
headerHeight
+=
0.8
*
vm
.
fontSize
}
}
else
if
(
detectOS
()
===
'ios'
)
{
if
(
paddingBottomHeight
&&
part
.
test
(
paddingBottomHeight
))
{
headerHeight
+=
0.4
*
vm
.
fontSize
headerHeight
+=
Number
(
paddingBottomHeight
.
replace
(
'px'
,
''
))
}
}
}
$el
=
$el
.
previousElementSibling
$el
=
$el
.
previousElementSibling
}
}
...
@@ -108,7 +107,7 @@ export default {
...
@@ -108,7 +107,7 @@ export default {
},
},
getNextElementHeight
()
{
getNextElementHeight
()
{
let
vm
=
this
let
vm
=
this
let
nextElement
=
this
.
$el
.
nextElementSibling
let
nextElement
=
vm
.
$el
.
nextElementSibling
let
nextHeight
=
0
let
nextHeight
=
0
do
{
do
{
if
(
nextElement
)
{
if
(
nextElement
)
{
...
@@ -117,30 +116,28 @@ export default {
...
@@ -117,30 +116,28 @@ export default {
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
nextHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
nextHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
}
}
if
(
nextElement
.
_prevClass
&&
nextElement
.
_prevClass
.
indexOf
(
'h-bottom-tab'
)
===
0
)
{
let
paddingTopHeight
=
window
.
getComputedStyle
(
nextElement
).
paddingTop
let
height
=
nextElement
.
clientHeight
let
paddingBottomHeight
=
window
.
getComputedStyle
(
nextElement
).
paddingBottom
if
(
detectOS
()
===
'ios'
&&
height
>
Math
.
ceil
(
vm
.
fontSize
*
0.88
))
{
if
(
paddingTopHeight
&&
part
.
test
(
paddingTopHeight
))
{
nextHeight
+=
0
nextHeight
+=
Number
(
paddingTopHeight
.
replace
(
'px'
,
''
))
}
else
{
}
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
if
(
paddingBottomHeight
&&
part
.
test
(
paddingBottomHeight
))
{
nextHeight
+=
vm
.
fontSize
*
0.68
nextHeight
+=
Number
(
paddingBottomHeight
.
replace
(
'px'
,
''
))
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
nextHeight
+=
vm
.
fontSize
*
0.68
}
}
}
}
nextElement
=
nextElement
.
nextElementSibling
}
}
nextElement
=
nextElement
.
nextElementSibling
}
while
(
nextElement
)
}
while
(
nextElement
)
return
nextHeight
return
nextHeight
},
},
contentHeight
()
{
contentHeight
()
{
let
vm
=
this
let
vm
=
this
const
headerHeight
=
vm
.
getHeaderHeight
()
vm
.
$nextTick
(()
=>
{
const
nextHeight
=
vm
.
getNextElementHeight
()
const
headerHeight
=
vm
.
getHeaderHeight
()
let
content
=
vm
.
$el
const
nextHeight
=
vm
.
getNextElementHeight
()
vm
.
height
=
(
vm
.
winHeight
-
nextHeight
-
headerHeight
)
let
content
=
vm
.
$el
content
.
style
.
height
=
(
vm
.
winHeight
-
nextHeight
-
headerHeight
)
+
'px'
vm
.
height
=
(
vm
.
winHeight
-
nextHeight
-
headerHeight
)
content
.
style
.
height
=
(
vm
.
winHeight
-
nextHeight
-
headerHeight
)
+
'px'
})
},
},
getKeyBoardHeight
()
{
getKeyBoardHeight
()
{
let
innerWidth
=
window
.
innerWidth
let
innerWidth
=
window
.
innerWidth
...
...
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