3 changed files with 110 additions and 6 deletions
@ -0,0 +1,87 @@ |
|||
<!-- |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-11-09 13:49:24 |
|||
@ 备注: 查看新闻内容详情 |
|||
--> |
|||
<script lang='ts' setup> |
|||
const props = defineProps({ |
|||
lookPageIsShow:{ |
|||
type:Boolean, |
|||
default:false, |
|||
}, |
|||
lookPageInfo:{ |
|||
type:Object, |
|||
default(){ |
|||
return {} |
|||
} |
|||
}, |
|||
drawerWidht:{ |
|||
type:Number, |
|||
default:100 |
|||
} |
|||
}) |
|||
const emits = defineEmits(["update:lookPageIsShow"]); |
|||
const isShow = computed({ |
|||
get: () => props.lookPageIsShow, |
|||
set: (val) => { |
|||
emits("update:lookPageIsShow", val); |
|||
}, |
|||
}); |
|||
const dawerChare = ref<any>(null) |
|||
const dawerChareHeight = ref<any>(null) |
|||
onMounted(() => { |
|||
dawerChareHeight.value = dawerChare.value?.clientWidth |
|||
console.log("热门新闻-sun->",props.drawerWidht,dawerChareHeight.value) |
|||
}) |
|||
|
|||
</script> |
|||
<template> |
|||
<el-drawer ref="dawerChare" v-model="isShow" :size="props.drawerWidht" > |
|||
<template #header="{ titleId, titleClass }"> |
|||
<div class="orgAllMothsTitle"> |
|||
<el-text :id="titleId" :class="titleClass" style="font-size:20px;font-weight: bold;">{{ props.lookPageInfo.title }}</el-text> |
|||
<div> |
|||
<el-text class="head_arb"><i class="fa fa-eye"></i>阅读量:{{ props.lookPageInfo.readNumber }}</el-text> |
|||
<el-text class="head_arb"><i class="fa fa-bookmark-o"></i>收藏:{{ props.lookPageInfo.collectNumber }}</el-text> |
|||
<el-text class="head_arb"><i class="fa fa-thumbs-o-up"></i>赞:{{ props.lookPageInfo.likeNumber }}</el-text> |
|||
<el-text class="head_arb"><i class="fa fa-thumbs-o-down"></i>踩:{{ props.lookPageInfo.criticizeNumber }}</el-text> |
|||
<el-text class="head_arb"><i class="fa fa-comments-o"></i>评论:{{ props.lookPageInfo.commentNumber }}</el-text> |
|||
<el-text class="head_arb"><i class="fa fa-clock-o"></i>发布时间:{{ props.lookPageInfo.time }}</el-text> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<div class="app-container"> |
|||
|
|||
|
|||
<!-- <iframe v-if="props.lookPageInfo.pagetype!=1" id="lookpdfcont" scrolling='no' frameborder="0" :src="'https://docu.hxgk.group/lookfilepdf?id='+props.lookPageInfo.id" width="100%" style="border: 0; padding: 0px;"> |
|||
|
|||
This browser does not support PDFs. Please download the PDF to view it: <a :href="'https://docu.hxgk.group/lookfilepdf?id=' + props.lookPageInfo.id">Download PDF</a> |
|||
|
|||
</iframe> --> |
|||
<iframe v-if="props.lookPageInfo.pagetype!=1" id="lookpdfcont" scrolling='no' frameborder="0" :src="props.lookPageInfo.fileUrl" width="100%" :height="dawerChareHeight" style="border: 0; padding: 0px; height:100%"> |
|||
This browser does not support PDFs. Please download the PDF to view it: <a :href="props.lookPageInfo.fileUrl">Download PDF</a> |
|||
</iframe> |
|||
<div v-else v-html="props.lookPageInfo.pageInfo"></div> |
|||
</div> |
|||
</el-drawer> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
.orgAllMothsTitle{ |
|||
width:100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content:space-between; |
|||
.head_arb{ |
|||
padding-right:10px; |
|||
i { |
|||
padding-right:5px; |
|||
} |
|||
} |
|||
} |
|||
.el-drawer__header{ |
|||
padding:0px; |
|||
} |
|||
.app-container{ |
|||
height: calc(100vh - 100px); |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue