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,34 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<style lang="less" scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

View File

@@ -0,0 +1,30 @@
<template lang="pug">
van-tabbar(v-model='active' route active-color="#42e97d")
van-tabbar-item(icon='home-o' to="/home" ) 首页
van-tabbar-item(icon='shopping-cart-o' to="/car" ) 购物车
van-tabbar-item(icon='apps-o' to="/type" ) 分类
van-tabbar-item(icon='contact' to="/me" ) 我的
</template>
<script>
export default {
name: 'Nav',
data() {
return {
active: 0
}
},
created() {
},
methods: {
async getIndex() {
}
},
components: {}
}
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,64 @@
<template lang="pug">
.ShopItem
van-row()
van-col(span='12' v-for="(item,index) in list" :key="index")
router-link(:to="{ path: '/info', query: { id: item.wares_id } }")
img(:src="item.wares_masterimg[0]")
h3.title {{ item.wares_title }}
p.desc {{ item.wares_info }}
p.pice {{ item.wares_oldprice }}
</template>
<script>
export default {
name: 'ShopItem',
props: {
list: {
type: Array,
default: () => []
}
},
data() {
return {}
},
created() {
},
methods: {
async getIndex() {
}
},
components: {}
}
</script>
<style lang="less" scoped>
.ShopItem {
.van-col {
text-align: center;
margin-bottom: 15px;
height: 267px;
img {
width: 100%;
}
.title {
font-size: 0.37333rem;
color: #000;
}
.desc {
color: rgba(0,0,0,0.54);
font-size: 0.32rem;
margin-top: 0.08333rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pice {
color: #ea625b;
font-size: 0.37333rem;
margin-top: 0.13333rem;
}
}
}
</style>

View File

@@ -0,0 +1,74 @@
<template lang="pug">
.Swiper
van-swipe(:autoplay='3000', indicator-color='white', @change="onChange", :initial-swipe="current")
van-swipe-item(v-for="(item,index) in list" :key="index" @click="emitClick")
slot(:item='item')
template(#indicator='' v-if="isIndicator")
.custom-indicator {{ current + 1 }} / {{ list.length }}
</template>
<script>
export default {
name: 'Swiper',
props: {
list: {
type: Array,
default: () => []
},
isIndicator: {
type: Boolean,
default: false
},
initSwiper: {
type: Number,
default: 0
}
},
data() {
return {
current: this.initSwiper
}
},
watch: {
initSwiper(index) {
this.current = index
}
},
created() {
},
methods: {
emitClick() {
this.$emit("tap", this.current)
},
async getIndex() {
},
onChange(index) {
this.current = index;
}
},
components: {}
}
</script>
<style lang="less" scoped>
.van-swipe {
/deep/ img {
width: 100%;
}
/deep/ .custom-indicator {
position: absolute;
right: 15px;
bottom: 15px;
padding: 4px 10px;
font-size: 0.32rem;
background-color: rgba(0,0,0,.5);
color: #fff;
border-radius: 12px;
}
}
</style>