first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<template>
<div class="CardItem">
<div v-if="list.length != 0">
<van-card
v-for="(item,index) in list"
:key="index"
:num="item.goods_num"
:price="item.goods_totalprice"
:desc="item.wares_info"
:title="item.wares_title"
:thumb="item.wares_masterimg[0]"
/>
</div>
<div class="nodata" v-else>
暂无数据
</div>
</div>
</template>
<script>
export default {
name: "CardItem",
props: {
list: {
type: Array,
default: () => []
}
},
data() {
return {}
},
created() {
},
methods: {}
}
</script>
<style scoped lang="less">
.nodata {
text-align: center;
margin-top: 20%;
font-size: 14px;
color: #8d8d8d;
}
</style>

View File

@@ -0,0 +1,57 @@
<template>
<div class="swiper">
<van-swipe class="my-swipe" @change="onChange"
indicator-color="white">
<van-swipe-item v-for="(item,index) in data" :key="index">
<slot :item="item" :index="index"></slot>
</van-swipe-item>
<template #indicator v-if="showIndicator">
<div class="custom-indicator">{{ current + 1 }} / {{ data.length }}</div>
</template>
</van-swipe>
</div>
</template>
<script>
export default {
name: "swiper",
props: {
data: {
type: Array,
default: () => []
},
showIndicator: {
type: Boolean,
default: false
}
},
data() {
return {
current: 0
}
},
created() {
},
methods: {
onChange(index) {
this.current = index
}
}
}
</script>
<style scoped lang="less">
.custom-indicator {
position: absolute;
right: 5px;
bottom: 5px;
padding: 4px 10px;
font-size: 14px;
background-color: rgba(0,0,0,.5);
color: #fff;
border-radius: 12px;
}
</style>

View File

@@ -0,0 +1,28 @@
<template>
<div class="tabbar">
<van-tabbar v-model="active" route>
<van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
<van-tabbar-item icon="search" to="/type">分类</van-tabbar-item>
<van-tabbar-item icon="friends-o" to="/car">购物车</van-tabbar-item>
<van-tabbar-item icon="setting-o" to="/me">我的</van-tabbar-item>
</van-tabbar>
</div>
</template>
<script>
export default {
name: "tabbar",
data() {
return {
active: 0
}
},
created() {
},
methods: {}
}
</script>
<style scoped>
</style>