You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
708 B
38 lines
708 B
<template> |
|
<div class="style"> |
|
<img :src="img" /> |
|
<div v-if="selected" class="select-item"> |
|
<a-icon type="check" /> |
|
</div> |
|
</div> |
|
</template> |
|
|
|
<script> |
|
import AIcon from 'ant-design-vue/es/icon/icon' |
|
export default { |
|
name: 'StyleItem', |
|
props: ['selected', 'img'], |
|
components: {AIcon} |
|
} |
|
</script> |
|
|
|
<style lang="less" scoped> |
|
.style{ |
|
margin-right: 16px; |
|
position: relative; |
|
border-radius: 4px; |
|
cursor: pointer; |
|
.select-item{ |
|
position: absolute; |
|
top: 0; |
|
right: 0; |
|
width: 100%; |
|
padding-top: 15px; |
|
padding-left: 24px; |
|
height: 100%; |
|
color: #1890ff; |
|
font-size: 14px; |
|
font-weight: bold; |
|
} |
|
} |
|
</style>
|
|
|