28 lines
515 B
Vue
28 lines
515 B
Vue
<template>
|
|
<view class="listItem">
|
|
<video v-if="type == '2'" :src="url" :show-fullscreen-btn="true"></video>
|
|
<image v-else :src="url" mode="aspectFit"></image>
|
|
</view>
|
|
</template>
|
|
<style lang="scss" scoped>
|
|
.listItem{
|
|
width: 365rpx;
|
|
height: 500rpx;
|
|
margin-bottom: 20rpx;
|
|
>image,video{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
</style>
|
|
<script>
|
|
export default {
|
|
name:"listItem",
|
|
data(){
|
|
return {
|
|
|
|
}
|
|
},
|
|
props:['url','type']
|
|
}
|
|
</script> |