123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <template>
- <view class="div" @click="onclick()">
- <image mode="aspectFit" class="img order-item-icon" :src="src" />
- <label class="item-title order-item-title">{{title}}</label>
- <text class="span number" v-if="orderNumber == 0 ? '': orderNumber ">{{ orderNumber }}</text>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- export default {
- props: {
- src: {
- type: String
- },
- title: {
- type: String
- },
- testAttr: {
- type: String
- },
- id: {
- default: ''
- },
- orderNumber: {
- type: Number,
- default: 0
- }
- },
- data () {
- return {
- isEmpty: false
- }
- },
- created () {
- },
- methods: {
- onclick () {
- this.$emit('onclick')
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .order-item {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: center;
- }
- .item-title {
- font-size:$subFontSize;
- color: #333;
- }
- .order-item-icon {
- width: 1.4rem;
- height: 1.4rem;
- font-size:1.3rem;
- margin-top:0.8rem;
- }
- .order-item-title {
- margin-top:0.4rem;
- }
- .span.number {
- width:0.8rem;
- height:0.8rem;
- line-height:0.8rem;
- margin-top:-2.8rem;
- margin-left:0.8rem;
- background: $primaryColor;
- border-radius:50%;
- font-size:$h6;
- text-align: center;
- color: RGBA(255, 255, 255, 1);
- font-weight: normal;
- z-index: 2;
- }
- </style>
|