feat: production页的CMS变更
This commit is contained in:
@ -6,18 +6,19 @@
|
||||
class="document-card"
|
||||
>
|
||||
<div class="document-info">
|
||||
<h3>{{ doc.caption || doc.name }}</h3>
|
||||
<h3>{{ doc.title }}</h3>
|
||||
<div class="document-content">
|
||||
<span v-if="doc.size" class="document-meta"
|
||||
>大小: {{ formatFileSize(doc.size) }}
|
||||
</span>
|
||||
<span v-if="doc.ext" class="document-meta"
|
||||
>格式: {{ formatFileExtension(doc.ext) }}</span
|
||||
<span v-if="doc.filename" class="document-meta"
|
||||
>格式:
|
||||
{{ formatFileExtension(getFileExtension(doc.filename)) }}</span
|
||||
>
|
||||
<el-button
|
||||
class="download-button"
|
||||
type="primary"
|
||||
@click="handleDownload(doc.name, doc.url)"
|
||||
@click="handleDownload(doc.title, doc.url)"
|
||||
>
|
||||
下载
|
||||
</el-button>
|
||||
@ -30,7 +31,7 @@
|
||||
<script setup lang="ts">
|
||||
defineProps({
|
||||
documents: {
|
||||
type: Array as () => Array<StrapiMedia>,
|
||||
type: Array as () => Array<ProductDocumentView>,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
<el-collapse class="question-collapse" accordion>
|
||||
<el-collapse-item
|
||||
v-for="question in questions"
|
||||
:key="question.documentId"
|
||||
:key="question.id"
|
||||
:title="question.title"
|
||||
:name="question.documentId"
|
||||
:name="question.id"
|
||||
>
|
||||
<markdown-renderer :content="question.content || ''" />
|
||||
</el-collapse-item>
|
||||
@ -16,11 +16,7 @@
|
||||
<script setup lang="ts">
|
||||
defineProps({
|
||||
questions: {
|
||||
type: Array as () => Array<{
|
||||
title: string;
|
||||
content: string;
|
||||
documentId: string;
|
||||
}>,
|
||||
type: Array as PropType<QuestionView[]>,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
@ -3,15 +3,15 @@
|
||||
<el-collapse v-model="activeName">
|
||||
<el-collapse-item
|
||||
v-for="item in data"
|
||||
:key="item.title"
|
||||
:title="item.title"
|
||||
:name="item.title"
|
||||
:key="item.name"
|
||||
:title="item.name"
|
||||
:name="item.name"
|
||||
>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item
|
||||
v-for="subItem in item.items"
|
||||
:key="subItem.label"
|
||||
:label="subItem.label"
|
||||
v-for="subItem in item.specs"
|
||||
:key="subItem.key"
|
||||
:label="subItem.value"
|
||||
>
|
||||
{{ subItem.value }}
|
||||
</el-descriptions-item>
|
||||
@ -24,15 +24,15 @@
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object as () => ProductionSpecGroup[],
|
||||
type: Object as () => ProductSpecGroupView[],
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
// 默认全部展开
|
||||
const activeName = ref<string[]>(
|
||||
props.data.map((item: ProductionSpecGroup) => {
|
||||
return item.title;
|
||||
props.data.map((item: ProductSpecGroupView) => {
|
||||
return item.name;
|
||||
}) || []
|
||||
);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user