parent
359c587e1b
commit
35675e0129
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 134 B |
After Width: | Height: | Size: 133 B |
After Width: | Height: | Size: 135 B |
After Width: | Height: | Size: 135 B |
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div class="goods-item"></div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "GoodsItem",
|
||||
props: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.goods-item {
|
||||
width: 14.5rem;
|
||||
height: 21.25rem;
|
||||
// background: #ffffff;
|
||||
background: url(~/assets/images/goods/item.png);
|
||||
background-size: contain;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div class="sort-item" @click="onSort">
|
||||
<span class="sort-item-txt">{{ sortText }}</span>
|
||||
<div class="sort-img-box">
|
||||
<img
|
||||
v-if="sortType === 1"
|
||||
src="~/assets/images/goods/sort-t1.png"
|
||||
alt="sort"
|
||||
/>
|
||||
<img
|
||||
v-if="sortType === 0"
|
||||
src="~/assets/images/goods/sort-t2.png"
|
||||
alt="sort"
|
||||
/>
|
||||
<img
|
||||
v-if="sortType === 0"
|
||||
src="~/assets/images/goods/sort-b1.png"
|
||||
alt="sort"
|
||||
/>
|
||||
<img
|
||||
v-if="sortType === 1"
|
||||
src="~/assets/images/goods/sort-b2.png"
|
||||
alt="sort"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Debounce } from "~/plugins/utils";
|
||||
export default {
|
||||
name: "Sort",
|
||||
props: {
|
||||
sortText: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
sortType: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
// onSort:Debounce((e) => {
|
||||
// console.log(1)
|
||||
// }, 1000)
|
||||
onSort: function () {
|
||||
console.log(Debounce)
|
||||
Debounce(()=>{
|
||||
console.log(1)
|
||||
}, 1000)();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.sort-item {
|
||||
margin-right: 3.13rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.sort-item-txt {
|
||||
margin-right: 0.38rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.sort-img-box{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
img{
|
||||
width: 0.38rem;
|
||||
height: 0.19rem;
|
||||
margin: 0.08rem 0;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue