Skip to content

Commit 369aab3

Browse files
committed
修复卡牌用缩略图模式时的显示错误
1 parent 64cdfc7 commit 369aab3

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

src/components/CardsList/CardItem.vue

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,28 @@ const handleGive = (gid) => {
3232

3333
<style lang="less" scoped>
3434
.card.item {
35-
width: 32px;
36-
height: 32px;
35+
width: 48px;
36+
height: 48px;
3737
display: flex;
3838
align-items: center;
3939
justify-content: flex-start;
4040
41+
.image {
42+
width: 48px;
43+
height: 48px;
44+
position: absolute;
45+
46+
.sprite {
47+
scale: 2;
48+
width: 32px;
49+
height: 32px;
50+
background-image: url("/assets/cards_sprite.png");
51+
background-size: 640px 160px;
52+
background-repeat: no-repeat;
53+
image-rendering: pixelated;
54+
}
55+
}
56+
4157
&.list-styled {
4258
width: 100%;
4359
height: 64px;
@@ -115,16 +131,5 @@ const handleGive = (gid) => {
115131
display: none;
116132
}
117133
118-
.image {
119-
.sprite {
120-
scale: 3;
121-
width: 32px;
122-
height: 32px;
123-
background-image: url("/assets/cards_sprite.png");
124-
background-size: 640px 160px;
125-
background-repeat: no-repeat;
126-
image-rendering: pixelated;
127-
}
128-
}
129134
}
130135
</style>

0 commit comments

Comments
 (0)