You've already forked guangan-mp
1.0.0
This commit is contained in:
46
components/i-tutorial-list/i-tutorial-list.vue
Normal file
46
components/i-tutorial-list/i-tutorial-list.vue
Normal file
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="p-3 rounded-lg bg-white mt-2" v-for="(item,index) in resdata" :key="index" @click="toShow(item)">
|
||||
<text class="font32 line15">{{item.title}}</text>
|
||||
<view class="flex align-center justify-between mt-2">
|
||||
<view class="flex align-center">
|
||||
<uni-icons type="eye" size="16" color="#cccccc"></uni-icons>
|
||||
<text class="font24 text-muted">{{item.view_count}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"i-tutorial-list",
|
||||
props:{
|
||||
resdata:{
|
||||
type:Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
console.log(this.resdata)
|
||||
},
|
||||
methods:{
|
||||
toShow(item){
|
||||
uni.navigateTo({
|
||||
url:'/pages/tutorial/detail?id='+item.id,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
Reference in New Issue
Block a user