Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
e-shield-h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8af9bd80
authored
Jul 22, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
键盘弹起页面高度问题
1 parent
6338c2be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
public/index.html
src/App.vue
src/views/index.vue
public/index.html
View file @
8af9bd8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
id=
"viewportMeta"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
<title>
<
%= htmlWebpackPlugin.options.title %>
<
%= htmlWebpackPlugin.options.title %>
...
...
src/App.vue
View file @
8af9bd8
...
@@ -33,7 +33,7 @@ export default {
...
@@ -33,7 +33,7 @@ export default {
}
}
html
,
html
,
body
{
body
{
height
:
100
%
;
height
:
100
vh
;
//
min-height
:
100%
;
//
min-height
:
100%
;
//
min-height
:
100%
;
//
min-height
:
100%
;
}
}
...
...
src/views/index.vue
View file @
8af9bd8
...
@@ -223,7 +223,22 @@ export default defineComponent({
...
@@ -223,7 +223,22 @@ export default defineComponent({
window
.
AMap
=
AMap
;
window
.
AMap
=
AMap
;
mapContentRefs
.
value
.
initMap
(
"container"
);
mapContentRefs
.
value
.
initMap
(
"container"
);
});
});
var
realHeight
=
window
.
innerWidth
>
window
.
innerHeight
?
window
.
innerWidth
:
window
.
innerHeight
;
initViewport
(
realHeight
);
});
});
const
initViewport
=
(
height
)
=>
{
var
metaEl
=
document
.
querySelector
(
"#viewportMeta"
);
console
.
log
(
metaEl
);
var
content
=
"height="
+
height
+
",width=device-width,initial-scale=1.0,user-scalable=no"
;
metaEl
.
setAttribute
(
"name"
,
"viewport"
);
metaEl
.
setAttribute
(
"content"
,
content
);
};
const
checkIsShareDead
=
(
id
)
=>
{
const
checkIsShareDead
=
(
id
)
=>
{
if
(
_timeoutId
)
{
if
(
_timeoutId
)
{
clearTimeout
(
_timeoutId
);
clearTimeout
(
_timeoutId
);
...
@@ -620,6 +635,7 @@ export default defineComponent({
...
@@ -620,6 +635,7 @@ export default defineComponent({
routeQuery
,
routeQuery
,
ISLOADING
,
ISLOADING
,
showOverlay
,
showOverlay
,
initViewport
,
};
};
},
},
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment