fecrprd/pages/dynamic/industry/index.vue

71 lines
1.2 KiB
Vue

<template>
<view>
<view class="container" v-for="(item,index) in data.items" :key="index" @click="toDetail(item)">
<view class="container-top">
<view class="container-name">
{{item.title}}
</view>
</view>
<view class="container-content-key">
{{item.content}}
</view>
<view class="container-bottom">
<view class="container-date">
{{item.daily_time.replace("T"," ")}}
</view>
<uni-icons type="more-filled" size="12"></uni-icons>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
data: [Object]
},
data() {
return {
}
},
methods: {
toDetail(value) {
uni.redirectTo({
url: "/pages/dynamic/industry/detail?id=" + value.id,
})
}
}
}
</script>
<style lang="scss" scoped>
.container {
padding: 20px;
border: 1px solid #eee;
font-size: 12px;
&-name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-weight: 800;
}
&-content-key{
padding:10px 0 0 0;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
display: -webkit-box;
}
&-bottom {
display: flex;
justify-content: space-between;
align-items: center;
}
}
</style>