Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
eslotsys-game-nuxt
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
毛线
eslotsys-game-nuxt
Commits
388daca5
Commit
388daca5
authored
Jul 11, 2023
by
毛线
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c24d782e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
5 deletions
+90
-5
default.vue
layouts/default.vue
+90
-5
No files found.
layouts/default.vue
View file @
388daca5
...
@@ -18,14 +18,24 @@ export default {
...
@@ -18,14 +18,24 @@ export default {
data
()
{
data
()
{
return
{
return
{
zoom
:
1
,
zoom
:
1
,
deg
:
0
,
// 旋转角度
right
:
0
,
position
:
'relative'
,
marginSceen
:
false
,
marginSceen
:
false
,
isMoblie
:
false
,
scale
:
1
,
}
}
},
},
computed
:
{
computed
:
{
style
()
{
style
()
{
const
style
=
{}
const
style
=
{}
const
{
zoom
}
=
this
const
{
zoom
,
deg
,
right
,
position
,
scale
}
=
this
style
.
zoom
=
zoom
style
.
zoom
=
zoom
// style.transform = `rotate(${deg}deg) scale(1.72)`
style
.
transform
=
`rotate(
${
deg
}
deg) scale(
${
scale
}
)`
style
.
right
=
`
${
right
}
px`
style
.
position
=
position
return
style
return
style
},
},
},
},
...
@@ -46,23 +56,98 @@ export default {
...
@@ -46,23 +56,98 @@ export default {
'SetInnerHeight'
,
'SetInnerHeight'
,
]),
]),
initSceen
()
{
initSceen
()
{
const
{
innerWidth
,
}
=
window
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
// return
}
if
(
innerWidth
>
750
)
{
this
.
initPcSceen
()
}
else
{
this
.
initMobileSceen
()
}
},
// 初始化pc屏幕
initPcSceen
()
{
let
zoom
=
1
let
zoom
=
1
const
{
innerWidth
,
innerHeight
}
=
window
const
{
innerWidth
,
innerHeight
}
=
window
if
(
innerWidth
/
innerHeight
>
1080
/
608
)
{
if
(
innerWidth
/
innerHeight
>
1080
/
608
)
{
console
.
log
(
'比例'
)
zoom
=
window
.
innerHeight
/
608
zoom
=
window
.
innerHeight
/
608
this
.
marginSceen
=
true
this
.
marginSceen
=
true
}
else
{
}
else
{
zoom
=
window
.
innerWidth
/
1080
zoom
=
window
.
innerWidth
/
1080
this
.
marginSceen
=
false
this
.
marginSceen
=
false
}
}
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
}
this
.
SetZoom
(
zoom
)
this
.
SetZoom
(
zoom
)
// this.SetInnerWidth(innerWidth)
// this.SetInnerWidth(innerWidth)
// this.SetInnerHeight(innerHeight)
// this.SetInnerHeight(innerHeight)
this
.
zoom
=
zoom
this
.
zoom
=
zoom
this
.
deg
=
0
this
.
right
=
0
this
.
position
=
'relative'
this
.
isMoblie
=
false
this
.
scale
=
1
},
// 初始化移动端屏幕
initMobileSceen
()
{
let
zoom
=
1
const
{
innerWidth
,
innerHeight
}
=
window
// if (innerWidth / innerHeight > 1080 / 608) {
// zoom = window.innerHeight / 608
// this.marginSceen = false
// } else {
// zoom = window.innerWidth / 1080
// this.marginSceen = false
// }
if
(
innerHeight
/
innerWidth
>
1080
/
608
)
{
zoom
=
window
.
innerWidth
/
1080
console
.
log
(
1
)
this
.
SetZoom
(
zoom
)
this
.
zoom
=
zoom
this
.
deg
=
90
this
.
position
=
'relative'
this
.
isMoblie
=
true
this
.
right
=
0
this
.
scale
=
1.72
}
else
{
zoom
=
window
.
innerHeight
/
1080
console
.
log
(
2
)
this
.
SetZoom
(
zoom
)
this
.
zoom
=
zoom
this
.
deg
=
90
this
.
position
=
'relative'
this
.
isMoblie
=
false
this
.
right
=
0
this
.
scale
=
1
// this.initMobileSceen2()
}
// this.position = 'absolute'
},
// 初始化移动端屏幕
initMobileSceen2
()
{
let
zoom
=
1
let
right
=
0
const
{
innerWidth
,
innerHeight
}
=
window
if
(
innerHeight
/
innerWidth
>
1080
/
608
)
{
console
.
log
(
1
)
zoom
=
window
.
innerWidth
/
608
this
.
marginSceen
=
false
right
=
363
}
else
{
console
.
log
(
2
)
zoom
=
window
.
innerHeight
/
1080
this
.
marginSceen
=
true
right
=
(
1080
/
window
.
innerWidth
*
200
)
-
innerHeight
/
0.5
+
608
*
2
}
this
.
SetZoom
(
zoom
)
this
.
zoom
=
zoom
this
.
right
=
right
this
.
deg
=
90
this
.
position
=
'absolute'
this
.
scale
=
1
},
},
},
},
}
}
...
...
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