123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template lang="pug">
- .customer-card
- h2.customer-name {{ data.name }}
- img.customer-photo(:src="this.data.image_medium ? 'data:image/png;base64,' + this.data.image_medium : '/base/static/src/img/avatar.png'")
- </template>
- <script>
- export default {
- props: {
- data: {
- type: Object,
- default: () => {
- return {}
- }
- }
- }
- }
- </script>
- <style lang="sass">
- .customer-card
- width: 130px
- height: 160px
- margin: 5px
- border: 1px solid #d3d3d3
- display: inline-block
- position: relative
- &:hover
- cursor: pointer
- .customer-name
- width: 100%
- height: 30px
- font-size: 9pt
- text-align: center
- margin-top: 10px
- position: absolute
- top: 0
-
- .customer-photo
- width: 80px
- height: 80px
- margin: 0
- border: none
- position: absolute;
- top: 50%
- left: 50%
- margin-right: -50%
- transform: translate(-50%, -50%)
- </style>
|