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
2526baac
Commit
2526baac
authored
Sep 24, 2019
by
24776
Browse files
Options
Browse Files
Download
Plain Diff
content
parents
be768efe
c9d4ed65
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
11 deletions
+49
-11
index.vue
packages/components/HContent/index.vue
+30
-11
home.vue
src/pages/home.vue
+19
-0
No files found.
packages/components/HContent/index.vue
View file @
2526baac
...
@@ -4,8 +4,7 @@
...
@@ -4,8 +4,7 @@
*/
*/
<
template
>
<
template
>
<div
<div
class=
"content"
>
:class=
"cusClass"
class=
"content"
>
<slot/>
<slot/>
</div>
</div>
</
template
>
</
template
>
...
@@ -15,10 +14,6 @@ import { detectOS } from '../../common/utils/index'
...
@@ -15,10 +14,6 @@ import { detectOS } from '../../common/utils/index'
export
default
{
export
default
{
name
:
'HContent'
,
name
:
'HContent'
,
props
:
{
props
:
{
cusClass
:
{
type
:
String
,
default
:
''
,
},
calContent
:
{
calContent
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
,
...
@@ -26,16 +21,17 @@ export default {
...
@@ -26,16 +21,17 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
docmHeight
:
'0'
,
// 默认屏幕高度
docmHeight
:
0
,
// 默认屏幕高度
showHeight
:
'0'
,
// 实时屏幕高度
showHeight
:
0
,
// 实时屏幕高度
topHeight
:
'0'
,
// content距离顶部的高度
topHeight
:
0
,
// content距离顶部的高度
contentsHeight
:
'0'
,
// 内容区域本来高度
contentsHeight
:
0
,
// 内容区域本来高度
isResize
:
false
,
// 默认屏幕高度是否已获取
isResize
:
false
,
// 默认屏幕高度是否已获取
distance
:
0
,
distance
:
0
,
final
:
0
,
final
:
0
,
fontSize
:
Number
(
window
.
document
.
documentElement
.
style
.
fontSize
.
replace
(
'px'
,
''
)),
fontSize
:
Number
(
window
.
document
.
documentElement
.
style
.
fontSize
.
replace
(
'px'
,
''
)),
winHeight
:
window
.
innerHeight
,
winHeight
:
window
.
innerHeight
,
winWidth
:
window
.
innerWidth
,
winWidth
:
window
.
innerWidth
,
contentScrollTop
:
0
,
}
}
},
},
watch
:
{
watch
:
{
...
@@ -71,6 +67,29 @@ export default {
...
@@ -71,6 +67,29 @@ export default {
// this.$el.style.height = parseInt(this.contentsHeight) + this.distance + 'px'
// this.$el.style.height = parseInt(this.contentsHeight) + this.distance + 'px'
// this.$el.scrollTop = this.final
// this.$el.scrollTop = this.final
})
})
// document.body.addEventListener('focusout', () => {
// if (detectOS() === 'ios') {
// document.body.addEventListener('focusin', () => {
// // 软键盘弹出的事件处理
// let keyboardHeight = this.getKeyBoardHeight()
// let activeElement = document.activeElement
// let offsetTop = activeElement.offsetTop
// let offsetParent = activeElement.offsetParent
// if (activeElement === document.body) {
// return
// }
// while (offsetParent !== document.body) {
// offsetTop += offsetParent.offsetTop
// offsetParent = offsetParent.offsetParent
// }
// offsetTop = (innerHeight - offsetTop)
<
keyboardHeight
?
(
keyboardHeight
-
(
innerHeight
-
offsetTop
))
:
0
// if (offsetTop > 0) {
// this.$el.style.transition = 'all .2s cubic-bezier(0.165, 0.84, 0.44, 1) 0s'
// this.$el.style.transform = 'translate(0px, -' + offsetTop + 'px) scale(1) translateZ(0px)'
// this.$el.style.height = parseInt(this.contentsHeight) + offsetTop + 'px'
// }
// })
document
.
body
.
addEventListener
(
'focusout'
,
()
=>
{
document
.
body
.
addEventListener
(
'focusout'
,
()
=>
{
// 软键盘收起的事件处理
// 软键盘收起的事件处理
this
.
$el
.
style
.
height
=
parseInt
(
this
.
contentsHeight
)
+
'px'
this
.
$el
.
style
.
height
=
parseInt
(
this
.
contentsHeight
)
+
'px'
...
@@ -187,7 +206,7 @@ export default {
...
@@ -187,7 +206,7 @@ export default {
}
}
return
400
return
400
}
else
{
}
else
{
return
3
25
return
3
00
}
}
},
},
},
},
...
...
src/pages/home.vue
View file @
2526baac
...
@@ -10,7 +10,10 @@
...
@@ -10,7 +10,10 @@
<tab-item>
Vue
</tab-item>
<tab-item>
Vue
</tab-item>
<tab-item>
APP
</tab-item>
<tab-item>
APP
</tab-item>
</s-tab>
</s-tab>
<<<<<<<
HEAD
<div
style=
"backgroundColor:red;height:50px"
/>
<div
style=
"backgroundColor:red;height:50px"
/>
=======
>>>>>>> c9d4ed65258c2013b54bec8dadfe8daca1f98232
<h-content
>
<h-content
>
<list-item>
<list-item>
<item>
<item>
...
@@ -97,6 +100,22 @@
...
@@ -97,6 +100,22 @@
<section
slot=
"name"
>
tun
</section>
<section
slot=
"name"
>
tun
</section>
<input
slot=
"content"
type=
"text"
>
<input
slot=
"content"
type=
"text"
>
</item>
</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>
</list-item>
</h-content>
</h-content>
<!--
<s-tab>
<!--
<s-tab>
...
...
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