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
03df51db
Commit
03df51db
authored
Jul 12, 2023
by
毛线
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹窗兼容
parent
40db9b73
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
23 deletions
+70
-23
.gitignore
.gitignore
+2
-0
index.vue
components/common/header/index.vue
+1
-1
confirm.vue
components/dialog/confirm.vue
+8
-22
index.vue
components/dialog/index.vue
+59
-0
images.vue
pages/images.vue
+0
-0
No files found.
.gitignore
View file @
03df51db
...
@@ -88,3 +88,5 @@ sw.*
...
@@ -88,3 +88,5 @@ sw.*
# Vim swap files
# Vim swap files
*.swp
*.swp
/pages/test/*
components/common/header/index.vue
View file @
03df51db
...
@@ -174,7 +174,7 @@ export default {
...
@@ -174,7 +174,7 @@ export default {
.header
{
.header
{
height
:
80px
;
height
:
80px
;
position
:
relative
;
position
:
relative
;
z-index
:
1
;
z-index
:
1
00
;
}
}
.left-block
{
.left-block
{
position
:
absolute
;
position
:
absolute
;
...
...
components/dialog/confirm.vue
View file @
03df51db
<
template
>
<
template
>
<Dialog
<Dialog
:visible
.
sync=
"visible"
ref=
"dialog"
:show-close=
"false"
:append-to-body=
"true"
:style=
"style"
top=
"0px"
custom-class=
"game-dialog"
title=
""
width=
"542px"
width=
"542px"
modal-append-to-body
>
>
<div
class=
"bg"
/>
<div
class=
"bg"
/>
<div
class=
"content"
>
<div
class=
"content"
>
...
@@ -26,9 +19,7 @@
...
@@ -26,9 +19,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
Dialog
from
'@/components/dialog/index'
Dialog
,
}
from
'element-ui'
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -57,18 +48,14 @@ export default {
...
@@ -57,18 +48,14 @@ export default {
...
mapState
([
...
mapState
([
'zoom'
,
'zoom'
,
]),
]),
style
()
{
},
const
{
zoom
}
=
this
watch
:
{
const
style
=
{
visible
(
value
)
{
zoom
,
if
(
value
)
{
}
this
.
$refs
.
dialog
.
show
()
const
{
innerWidth
,
innerHeight
}
=
window
if
(
innerWidth
/
innerHeight
>
1080
/
608
)
{
style
.
top
=
`120px`
}
else
{
}
else
{
style
.
top
=
`
${(
innerHeight
/
2
-
(
184
*
zoom
))
/
zoom
}
px`
this
.
$refs
.
dialog
.
close
()
}
}
return
style
},
},
},
},
methods
:
{
methods
:
{
...
@@ -77,7 +64,6 @@ export default {
...
@@ -77,7 +64,6 @@ export default {
this
.
visible
=
false
this
.
visible
=
false
},
},
show
()
{
show
()
{
console
.
log
(
'show'
)
this
.
visible
=
true
this
.
visible
=
true
},
},
},
},
...
...
components/dialog/index.vue
0 → 100644
View file @
03df51db
<
template
>
<div
v-show=
"visible"
class=
"dialog-layout"
>
<div
class=
"mark"
/>
<div
class=
"dlalog"
>
<slot/>
</div>
</div>
</
template
>
<
script
>
export
default
{
components
:
{
},
data
()
{
return
{
visible
:
false
,
}
},
methods
:
{
show
()
{
this
.
visible
=
true
},
close
()
{
this
.
visible
=
false
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dialog-layout
{
position
:
fixed
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
z-index
:
9999
;
.mark
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
background
:
black
;
opacity
:
0
.3
;
}
.dlalog
{
width
:
620px
;
height
:
350px
;
position
:
relative
;
}
}
</
style
>
pages/
test
.vue
→
pages/
images
.vue
View file @
03df51db
File moved
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