product.vue 2.48 KB
<template>
    <div class="product clearfix">
        <div class="checkbox">
            <input type="checkbox" v-model="product.checked" id="checkbox-{{product.goodsId}}">
            <label for="checkbox-{{product.goodsId}}"></label>
        </div>
        <img class="image" v-bind:src="product.goodsImage | resize 100 130">
        <div class="info">
            <div class="p-title">
                {{product.productName}}{{product.productName}}{{product.productName}}{{product.productName}}
            </div>
            <div class="meta">
                <span class="color">颜色: {{product.colorName}}</span>
                <span class="size">尺码: {{product.sizeName}}</span>
            </div>
        </div>
        <div class="price">
            &yen;{{product.lastPrice}}
            <p class="num">
                x1
            </p>
        </div>
    </div>
    <reason v-bind:product="product" v-bind:refund-data="refundData"></reason>
</template>

<script>
    const reason = require('home/refund/reason.vue');

    module.exports = {
        props: ['product', 'refundData'],
        components: {
            reason
        }
    };
</script>

<style>
    .product {
        position: relative;
        padding: 0 30px;
        height: 170px;
        font-size: 24px;
        line-height: 1.5;
        background: #fff;

        &:after {
            content: "";
            position: absolute;
            left: 30px;
            bottom: -1px;
            width: 690px;
            height: 0;
            border-bottom: 1px solid #eee;
            z-index: 1;
        }

        .checkbox {
            float: left;
            margin-top: 67px;

            label:before {
                border-radius: 100%;
            }
        }

        .image {
            float: left;
            margin: 20px;
            width: 100px;
            height: 130px;
        }

        .info {
            padding: 15px 0;
            width: 520px;

            .p-title {
                color: #000;
                font-size: 24px;
                height: 72px;
                overflow: hidden;
            }

            .meta {
                margin-top: 10px;
                color: #b0b0b0;
            }

            .color {
                margin-right: 30px;
            }
        }

        .price {
            position: absolute;
            top: 15px;
            right: 30px;
            text-align: right;

            .num {
                color: #b0b0b0;
            }
        }
    }
</style>