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
c9d4ed65
Commit
c9d4ed65
authored
Sep 19, 2019
by
JingChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
键盘弹出问题修复
parent
180619c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
16 deletions
+24
-16
index.vue
packages/components/HContent/index.vue
+8
-12
home.vue
src/pages/home.vue
+16
-4
www.zip
www.zip
+0
-0
No files found.
packages/components/HContent/index.vue
View file @
c9d4ed65
...
...
@@ -4,8 +4,7 @@
*/
<
template
>
<div
:class=
"cusClass"
class=
"content"
>
<div
class=
"content"
>
<slot/>
</div>
</
template
>
...
...
@@ -15,10 +14,6 @@ import { detectOS } from '../../common/utils/index'
export
default
{
name
:
'HContent'
,
props
:
{
cusClass
:
{
type
:
String
,
default
:
''
,
},
calContent
:
{
type
:
Boolean
,
default
:
true
,
...
...
@@ -26,14 +21,15 @@ export default {
},
data
()
{
return
{
docmHeight
:
'0'
,
// 默认屏幕高度
showHeight
:
'0'
,
// 实时屏幕高度
topHeight
:
'0'
,
// content距离顶部的高度
contentsHeight
:
'0'
,
// 内容区域本来高度
docmHeight
:
0
,
// 默认屏幕高度
showHeight
:
0
,
// 实时屏幕高度
topHeight
:
0
,
// content距离顶部的高度
contentsHeight
:
0
,
// 内容区域本来高度
isResize
:
false
,
// 默认屏幕高度是否已获取
fontSize
:
Number
(
window
.
document
.
documentElement
.
style
.
fontSize
.
replace
(
'px'
,
''
)),
winHeight
:
window
.
innerHeight
,
winWidth
:
window
.
innerWidth
,
contentScrollTop
:
0
,
}
},
watch
:
{
...
...
@@ -72,10 +68,10 @@ export default {
this
.
contentHeight
()
}
this
.
contentsHeight
=
this
.
$el
.
style
.
height
.
slice
(
0
,
this
.
$el
.
style
.
height
.
length
-
2
)
this
.
topHeight
=
this
.
$el
.
offsetTop
+
40
if
(
detectOS
()
===
'ios'
)
{
document
.
body
.
addEventListener
(
'focusin'
,
()
=>
{
// 软键盘弹出的事件处理
let
keyboardHeight
=
this
.
getKeyBoardHeight
()
let
activeElement
=
document
.
activeElement
let
offsetTop
=
activeElement
.
offsetTop
...
...
@@ -179,7 +175,7 @@ export default {
}
return
400
}
else
{
return
275
return
300
}
},
},
...
...
src/pages/home.vue
View file @
c9d4ed65
...
...
@@ -10,10 +10,6 @@
<tab-item>
Vue
</tab-item>
<tab-item>
APP
</tab-item>
</s-tab>
<s-tab>
<tab-item>
Vue
</tab-item>
<tab-item>
APP
</tab-item>
</s-tab>
<h-content
>
<list-item>
<item>
...
...
@@ -56,6 +52,22 @@
<section
slot=
"name"
>
tun
</section>
<input
slot=
"content"
type=
"text"
>
</item>
<item>
<section
slot=
"name"
>
tun
</section>
<input
slot=
"content"
type=
"text"
>
</item>
<item>
<section
slot=
"name"
>
tun
</section>
<input
slot=
"content"
type=
"text"
>
</item>
<item>
<section
slot=
"name"
>
tun
</section>
<input
slot=
"content"
type=
"text"
>
</item>
<item>
<section
slot=
"name"
>
tun
</section>
<input
slot=
"content"
type=
"text"
>
</item>
</list-item>
</h-content>
<!--
<s-tab>
...
...
www.zip
deleted
100644 → 0
View file @
180619c9
File deleted
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