You've already forked guangan-mp
46 lines
837 B
Vue
46 lines
837 B
Vue
<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> |