-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path-skuList.vue
executable file
·86 lines (83 loc) · 2.44 KB
/
-skuList.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<template>
<el-table :data="skuList" style="width: 100%">
<el-table-column label="Products" align="center" width="100">
<template slot-scope="scope">
<a :href="'/goods/' + scope.row.goods_id" target="_blank">
<img :src="scope.row[image]" class="goods-image">
</a>
</template>
</el-table-column>
<el-table-column label="Name" align="center">
<template slot-scope="scope">
<div style="display: inline-block">
<a :href="'/goods/' + scope.row.goods_id" target="_blank" class="goods-name">{{ scope.row[name] }}</a>
<p v-if="scope.row.spec_list" class="sku-spec">{{ scope.row | formatterSkuSpec }}</p>
<p v-if="scope.row.promotion_tags && scope.row.promotion_tags.length">
<span class="sku-act-tag" v-for="(tag, index) in scope.row.promotion_tags" :key="index">{{ tag }}</span>
</p>
</div>
</template>
</el-table-column>
<el-table-column label="Product price" align="center" width="120">
<template slot-scope="scope">{{ scope.row[price] | unitPrice('¥') }}</template>
</el-table-column>
<el-table-column label="Quantity" align="center" width="90">
<template slot-scope="scope">{{ scope.row[num] }}</template>
</el-table-column>
<el-table-column label="Subtotal" align="center" width="120">
<template slot-scope="scope">{{ ((scope.row[num] * scope.row[price])) | unitPrice('¥') }}</template>
</el-table-column>
</el-table>
</template>
<script>
export default {
name: 'member-sku-list',
props: {
skuList: {
type: Array
},
image: {
default: 'goods_image'
},
name: {
default: 'goods_name'
},
price: {
default: 'price'
},
num: {
default: 'num'
}
}
}
</script>
<style type="text/scss" lang="scss" scoped>
@import "../../assets/styles/color";
/deep/ .el-table__header th:first-child .cell {
font-size: 16px;
font-weight: bold;
}
.el-table {
border: 1px solid #ebeef5;
border-bottom: none;
font-size: 12px;
}
.goods-name {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.goods-image {
width: 50px;
height: 50px;
}
.sku-act-tag {
display: inline-block;
padding: 0 5px;
line-height: 15px;
margin-right: 5px;
border: 1px solid $color-main;
color: $color-main
}
</style>