Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
breast-feeding-ai-demo-web
Project
Project
Details
Activity
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
朱国瑞
breast-feeding-ai-demo-web
Commits
c537b246
Commit
c537b246
authored
Jun 01, 2022
by
朱国瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容优化
parent
96056b49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
evicePixelRatio.js
src/utils/evicePixelRatio.js
+1
-1
complete.vue
src/views/complete.vue
+1
-1
index.vue
src/views/index.vue
+3
-3
No files found.
src/utils/evicePixelRatio.js
View file @
c537b246
...
@@ -26,7 +26,7 @@ class DevicePixelRatio {
...
@@ -26,7 +26,7 @@ class DevicePixelRatio {
_correct
()
{
_correct
()
{
let
t
=
this
;
let
t
=
this
;
//页面devicePixelRatio(设备像素比例)变化后,计算页面body标签zoom修改其大小,来抵消devicePixelRatio带来的变化。
//页面devicePixelRatio(设备像素比例)变化后,计算页面body标签zoom修改其大小,来抵消devicePixelRatio带来的变化。
document
.
getElementById
(
'main'
).
style
.
zoom
=
1
/
window
.
devicePixelRatio
;
document
.
getElementById
(
'main'
).
style
.
zoom
=
1
.25
/
window
.
devicePixelRatio
;
}
}
//监听页面缩放
//监听页面缩放
_watch
()
{
_watch
()
{
...
...
src/views/complete.vue
View file @
c537b246
...
@@ -106,7 +106,7 @@ export default {
...
@@ -106,7 +106,7 @@ export default {
height
:
100%
;
height
:
100%
;
}
}
.pc
{
.pc
{
height
:
100vh
;
height
:
calc
(
var
(
--
vh
,
1vh
)
*
100
)
;
align-items
:
center
;
align-items
:
center
;
.main_content
{
.main_content
{
width
:
375px
;
width
:
375px
;
...
...
src/views/index.vue
View file @
c537b246
...
@@ -685,7 +685,7 @@ export default {
...
@@ -685,7 +685,7 @@ export default {
height
:
100%
;
height
:
100%
;
}
}
.pc
{
.pc
{
height
:
100vh
;
height
:
calc
(
var
(
--
vh
,
1vh
)
*
100
)
;
align-items
:
center
;
align-items
:
center
;
.main_content
{
.main_content
{
width
:
375px
;
width
:
375px
;
...
@@ -874,8 +874,8 @@ export default {
...
@@ -874,8 +874,8 @@ export default {
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
width
:
100
vw
;
width
:
100
%
;
height
:
calc
(
var
(
--
vh
,
1vh
)
*
100
)
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
...
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