Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
微笑面对bug
ddz
提交
a2598830
ddz
项目概览
微笑面对bug
/
ddz
通知
5
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ddz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a2598830
编写于
9月 20, 2020
作者:
微笑面对bug
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
界面
上级
e9ea23f9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
36 deletion
+26
-36
src/components/Game.vue
src/components/Game.vue
+26
-36
未找到文件。
src/components/Game.vue
浏览文件 @
a2598830
<
template
>
<div
style=
"user-select: none"
>
<div
style=
"width: 300px;height:300px;float: left; position: fixed ; left: 0
px
; top: 0px; background-color: aliceblue; text-align: center"
>
<div
style=
"width: 300px;height:300px;float: left; position: fixed ; left: 0; top: 0px; background-color: aliceblue; text-align: center"
>
<span>
{{
player2Str
[
0
]
}}
</br>
{{
player2Str
[
1
]
}}
</br></br>
{{
player2Str
[
2
]
}}
手牌:
{{
player2Str
[
1
]
}}
<br/>
上次出牌:
{{
player2Str
[
2
]
}}
</span>
</div>
<div
style=
"width: 300px;height:300px;float: left; position: fixed ;
left: 600px
; top: 0px; background-color: aliceblue; text-align: center"
>
<div
style=
"width: 300px;height:300px;float: left; position: fixed ;
right: 0
; top: 0px; background-color: aliceblue; text-align: center"
>
<span>
{{
player1Str
[
0
]
}}
</br>
{{
player1Str
[
1
]
}}
</br></br>
{{
player1Str
[
2
]
}}
手牌:
{{
player1Str
[
1
]
}}
<br/>
上次出牌:
{{
player1Str
[
2
]
}}
</span>
</div>
<div
style=
"width: 300px;height:300px;float: left; position: fixed ; left: 300px; top: 300px; background-color: aliceblue; text-align: center"
>
<span>
{{
player0Str
[
0
]
}}
</br>
{{
player0Str
[
1
]
}}
</br></br>
{{
player0Str
[
2
]
}}
</span>
<div>
<input
v-model=
"playerStr"
type=
"text"
/>
<button
@
click=
"sendPoker"
>
send
</button>
<button
@
click=
"pass"
>
pass
</button>
</div>
</div>
<div
style=
"width: 300px;height:300px;float: left; position: fixed ; left:
3
00px; top: 0px; background-color: aliceblue; text-align: center"
>
<div
style=
"width: 300px;height:300px;float: left; position: fixed ; left:
6
00px; top: 0px; background-color: aliceblue; text-align: center"
>
<div
style=
"width: 300px;word-wrap: break-word;"
>
{{
deskStr
[
0
]
}}
<
/br
>
已出的牌:
<
br/
>
{{
deskStr
[
1
]
}}
</div>
</div>
<div
style=
"position: fixed;left:
300px;top: 6
00px;"
>
<button
@
click=
"reStart"
>
reStart
</button>
<div
style=
"position: fixed;left:
600px;top: 3
00px;"
>
<button
@
click=
"reStart"
>
开始新一局
</button>
</div>
<div
:style=
"
{ marginLeft: playerMarginLeft-150 + 'px' }" style="position: fixed;bottom:0;width: 100%;height: 200px;line-height: 200px;">
你是
{{
game
.
playerList
[
0
].
type
===
'
nongmin
'
?
'
农民
'
:
'
地主
'
}}
</div>
<div
:style=
"
{ marginLeft: playerMarginLeft + 'px' }" style="position: fixed;bottom:0;width: 100%;height: 200px;">
<div
@
mouseenter=
"enter($event,item)"
@
mousedown=
"pickPoker(item)"
v-for=
"item in game.playerList[0].pokerList"
:class=
"
{ selected: item.selected }" class="poker" style="">
{{
item
.
text
}}
...
...
@@ -64,7 +49,7 @@
</div>
<div
:style=
"
{ marginLeft: deskPokerMarginLeft + 'px' }" style="position: fixed;bottom:400px;width: 100%;height: 200px">
<div
v-show=
"deskPoker.length>0"
v-for=
"item in deskPoker"
style=
"height:100%;width:100px;border: solid 1px;border-radius: 8px;float: left;margin-left:-50px;background-color: azure
"
>
<div
v-show=
"deskPoker.length>0"
v-for=
"item in deskPoker"
class=
"pokerDesk
"
>
{{
item
.
text
}}
</div>
<div
v-show=
"deskPoker.length===0"
style=
"height:100%;width:100px;float: left;margin-left:-50px;font-size: 50px;"
>
...
...
@@ -145,7 +130,7 @@ export default {
return
[
game
.
playerList
[
i
].
name
+
'
:
'
+
game
.
playerList
[
i
].
type
+
'
:
'
+
game
.
playerList
[
i
].
pokerList
.
length
,
game
.
playerList
[
i
].
pokerListToString
(),
'
last :
'
+
game
.
playerList
[
i
].
lastSendObjToString
()
game
.
playerList
[
i
].
lastSendObjToString
()
];
},
player1Str
:
function
()
{
...
...
@@ -154,7 +139,7 @@ export default {
return
[
game
.
playerList
[
i
].
name
+
'
:
'
+
game
.
playerList
[
i
].
type
+
'
:
'
+
game
.
playerList
[
i
].
pokerList
.
length
,
game
.
playerList
[
i
].
pokerListToString
(),
'
last :
'
+
game
.
playerList
[
i
].
lastSendObjToString
()
game
.
playerList
[
i
].
lastSendObjToString
()
];
},
player0Str
:
function
()
{
...
...
@@ -163,7 +148,7 @@ export default {
return
[
game
.
playerList
[
i
].
name
+
'
:
'
+
game
.
playerList
[
i
].
type
+
'
:
'
+
game
.
playerList
[
i
].
pokerList
.
length
,
game
.
playerList
[
i
].
pokerListToString
(),
'
last :
'
+
game
.
playerList
[
i
].
lastSendObjToString
()
game
.
playerList
[
i
].
lastSendObjToString
()
];
},
deskStr
:
function
()
{
...
...
@@ -228,8 +213,13 @@ export default {
</
script
>
<
style
scoped
>
.pokerDesk
{
height
:
100%
;
width
:
100px
;
border
:
solid
1px
;
border-radius
:
16px
;
float
:
left
;
margin-left
:
-50px
;
background-color
:
azure
;
font-size
:
30px
;
}
.poker
{
height
:
100%
;
width
:
100px
;
border
:
solid
1px
;
border-radius
:
8px
;
float
:
left
;
margin-left
:
-50px
;
background-color
:
azure
;
height
:
100%
;
width
:
100px
;
border
:
solid
1px
;
border-radius
:
16px
;
float
:
left
;
margin-left
:
-50px
;
background-color
:
azure
;
font-size
:
30px
;
}
.poker
:hover
{
background-color
:
antiquewhite
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录