filter.vue
1.78 KB
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
87
88
<template>
<div class="filter">
<div class="filter-actions">
<a href="javascript:; filter-action">清空</a>
<button class="button button-small filter-action">确定</button>
</div>
<div class="filter-params">
<ul class="filter-cates">
<li class="filter-cate" v-for="filter in filters">
<i class="icon icon-right"></i>
<span>{{filter.classfly}}</span>
<span class="filter-cate-val">{{val[filter.key]}}</span>
</li>
</ul>
</div>
</div>
</template>
<style>
@import "../../scss/common/color";
.filter {
padding: 0 20px;
}
.filter-actions {
text-align: right;
padding: 10px 0;
}
.filter-action {
margin-left: 20px;
}
.filter-actions,
.filter-cate {
border-bottom: 1px solid $grey;
}
.filter-cates {
list-style: none;
margin: 0;
padding: 0;
}
.filter-cate {
.icon-right {
float: right;
}
}
.filter-cate-val {
float: right;
}
.filter-cate-val,
.filter-cate .icon {
color: $grey;
}
</style>
<script>
module.exports = {
data: function() {
return {
val: {
brand: 'Supreme',
category: '夹克'
},
filters: [{
classfly: 'Brand品牌',
key: 'brand',
itemArray: []
}, {
classfly: 'Category品类',
key: 'category',
itemArray: []
}, {
classfly: 'Color颜色',
key: 'color',
itemArray: []
}, {
classfly: 'Size尺寸',
key: 'size',
itemArray: []
}]
};
}
};
</script>