parent
c352cc236a
commit
52161f7955
3 changed files with 119 additions and 57 deletions
@ -0,0 +1,65 @@ |
||||
<script setup lang="ts"> |
||||
import { ElTable, ElTableColumn } from 'element-plus'; |
||||
import { computed } from 'vue'; |
||||
|
||||
const props = defineProps(['data']); |
||||
const dataCom = computed(() => { |
||||
console.log(props.data, 'data'); |
||||
const o = props.data |
||||
return [ |
||||
{ title: '视频', count: o.video?.length }, |
||||
{ title: 'PPT', count: o.PPT?.length }, |
||||
{ title: '试题', count: o.word?.length }, |
||||
{ title: '文档', count: o.other?.length }, |
||||
{ title: '其他', count: o.questions?.length }, |
||||
] |
||||
}); |
||||
</script> |
||||
|
||||
<template> |
||||
<div class="con"> |
||||
<div class="title"> |
||||
<h5>知识点简介</h5> |
||||
<div class="con">这是知识点的简介</div> |
||||
</div> |
||||
<div class="basics"> |
||||
<el-table :data="dataCom" height="150" style="width: 100%"> |
||||
<el-table-column prop="title" label="资源" width="180" /> |
||||
<el-table-column prop="count" label="数量" width="180" /> |
||||
</el-table> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<style lang="scss" scoped> |
||||
.title{ |
||||
h5{ |
||||
text-align: center; |
||||
} |
||||
height: 100px; |
||||
background-color: #f3f3f3; |
||||
} |
||||
</style> |
||||
|
||||
<!-- <ul> |
||||
<li> |
||||
<div class="title">PPT</div> |
||||
<div class="count">数量:{{ data.PPT?.length || 0 }}</div> |
||||
</li> |
||||
<li> |
||||
<div class="title">文档</div> |
||||
<div class="count">数量:{{ data.word?.length || 0 }}</div> |
||||
</li> |
||||
<li> |
||||
<div class="title">其他</div> |
||||
<div class="count">数量:{{ data.other?.length || 0 }}</div> |
||||
</li> |
||||
<li> |
||||
<div class="title">视频</div> |
||||
<div class="count">数量:{{ data.video?.length || 0 }}</div> |
||||
</li> |
||||
<li> |
||||
<div class="title">试题</div> |
||||
<div class="count">数量:{{ data.questions?.length || 0 }}</div> |
||||
</li> |
||||
</ul> --> |
Loading…
Reference in new issue