fixed: 修复富文本组件 查看详情没有正确展示的bug
This commit is contained in:
parent
07c21caf8d
commit
2412e7151f
|
@ -258,6 +258,9 @@
|
||||||
{{- if eq .FieldType "pictures" }}
|
{{- if eq .FieldType "pictures" }}
|
||||||
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if eq .FieldType "richtext" }}
|
||||||
|
<RichView v-model="detailFrom.{{.FieldJson}}" />
|
||||||
|
{{- end }}
|
||||||
{{- if eq .FieldType "file" }}
|
{{- if eq .FieldType "file" }}
|
||||||
<div class="fileBtn" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index">
|
<div class="fileBtn" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index">
|
||||||
<el-button type="primary" text bg @click="onDownloadFile(item.url)">
|
<el-button type="primary" text bg @click="onDownloadFile(item.url)">
|
||||||
|
@ -774,7 +777,6 @@ getDataSourceFunc()
|
||||||
{{- if .Desc }}
|
{{- if .Desc }}
|
||||||
<el-descriptions-item label="{{ .FieldDesc }}">
|
<el-descriptions-item label="{{ .FieldDesc }}">
|
||||||
{{- if .CheckDataSource }}
|
{{- if .CheckDataSource }}
|
||||||
<template #default="scope">
|
|
||||||
{{- if eq .DataSource.Association 2}}
|
{{- if eq .DataSource.Association 2}}
|
||||||
<el-tag v-for="(item,key) in filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}})" :key="key">
|
<el-tag v-for="(item,key) in filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}})" :key="key">
|
||||||
{{ "{{ item }}" }}
|
{{ "{{ item }}" }}
|
||||||
|
@ -782,15 +784,12 @@ getDataSourceFunc()
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<span>{{"{{"}} filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}}) {{"}}"}}</span>
|
<span>{{"{{"}} filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}}) {{"}}"}}</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</template>
|
|
||||||
{{- else if .DictType}}
|
{{- else if .DictType}}
|
||||||
<template #default="scope">
|
|
||||||
{{if eq .FieldType "array"}}
|
{{if eq .FieldType "array"}}
|
||||||
<el-tag class="mr-1" v-for="item in detailFrom.{{.FieldJson}}" :key="item"> {{"{{"}} filterDict(item,{{.DictType}}Options) {{"}}"}}</el-tag>
|
<el-tag class="mr-1" v-for="item in detailFrom.{{.FieldJson}}" :key="item"> {{"{{"}} filterDict(item,{{.DictType}}Options) {{"}}"}}</el-tag>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{"{{"}} filterDict(detailFrom.{{.FieldJson}},{{.DictType}}Options) {{"}}"}}
|
{{"{{"}} filterDict(detailFrom.{{.FieldJson}},{{.DictType}}Options) {{"}}"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</template>
|
|
||||||
{{- else if and (ne .FieldType "picture" ) (ne .FieldType "pictures" ) (ne .FieldType "file" ) (ne .FieldType "array" ) }}
|
{{- else if and (ne .FieldType "picture" ) (ne .FieldType "pictures" ) (ne .FieldType "file" ) (ne .FieldType "array" ) }}
|
||||||
{{"{{"}} detailFrom.{{.FieldJson}} {{"}}"}}
|
{{"{{"}} detailFrom.{{.FieldJson}} {{"}}"}}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
@ -803,6 +802,9 @@ getDataSourceFunc()
|
||||||
{{- if eq .FieldType "pictures" }}
|
{{- if eq .FieldType "pictures" }}
|
||||||
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if eq .FieldType "richtext" }}
|
||||||
|
<RichView v-model="detailFrom.{{.FieldJson}}" />
|
||||||
|
{{- end }}
|
||||||
{{- if eq .FieldType "file" }}
|
{{- if eq .FieldType "file" }}
|
||||||
<div class="fileBtn" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index">
|
<div class="fileBtn" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index">
|
||||||
<el-button type="primary" text bg @click="onDownloadFile(item.url)">
|
<el-button type="primary" text bg @click="onDownloadFile(item.url)">
|
||||||
|
@ -845,6 +847,7 @@ import SelectImage from '@/components/selectImage/selectImage.vue'
|
||||||
{{- if .HasRichText }}
|
{{- if .HasRichText }}
|
||||||
// 富文本组件
|
// 富文本组件
|
||||||
import RichEdit from '@/components/richtext/rich-edit.vue'
|
import RichEdit from '@/components/richtext/rich-edit.vue'
|
||||||
|
import RichView from '@/components/richtext/rich-view.vue'
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .HasFile }}
|
{{- if .HasFile }}
|
||||||
|
|
|
@ -258,6 +258,9 @@
|
||||||
{{- if eq .FieldType "pictures" }}
|
{{- if eq .FieldType "pictures" }}
|
||||||
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if eq .FieldType "richtext" }}
|
||||||
|
<RichView v-model="detailFrom.{{.FieldJson}}" />
|
||||||
|
{{- end }}
|
||||||
{{- if eq .FieldType "file" }}
|
{{- if eq .FieldType "file" }}
|
||||||
<div class="fileBtn" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index">
|
<div class="fileBtn" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index">
|
||||||
<el-button type="primary" text bg @click="onDownloadFile(item.url)">
|
<el-button type="primary" text bg @click="onDownloadFile(item.url)">
|
||||||
|
@ -774,7 +777,6 @@ getDataSourceFunc()
|
||||||
{{- if .Desc }}
|
{{- if .Desc }}
|
||||||
<el-descriptions-item label="{{ .FieldDesc }}">
|
<el-descriptions-item label="{{ .FieldDesc }}">
|
||||||
{{- if .CheckDataSource }}
|
{{- if .CheckDataSource }}
|
||||||
<template #default="scope">
|
|
||||||
{{- if eq .DataSource.Association 2}}
|
{{- if eq .DataSource.Association 2}}
|
||||||
<el-tag v-for="(item,key) in filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}})" :key="key">
|
<el-tag v-for="(item,key) in filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}})" :key="key">
|
||||||
{{ "{{ item }}" }}
|
{{ "{{ item }}" }}
|
||||||
|
@ -782,15 +784,12 @@ getDataSourceFunc()
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<span>{{"{{"}} filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}}) {{"}}"}}</span>
|
<span>{{"{{"}} filterDataSource(dataSource.{{.FieldJson}},detailFrom.{{.FieldJson}}) {{"}}"}}</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</template>
|
|
||||||
{{- else if .DictType}}
|
{{- else if .DictType}}
|
||||||
<template #default="scope">
|
|
||||||
{{if eq .FieldType "array"}}
|
{{if eq .FieldType "array"}}
|
||||||
<el-tag class="mr-1" v-for="item in detailFrom.{{.FieldJson}}" :key="item"> {{"{{"}} filterDict(item,{{.DictType}}Options) {{"}}"}}</el-tag>
|
<el-tag class="mr-1" v-for="item in detailFrom.{{.FieldJson}}" :key="item"> {{"{{"}} filterDict(item,{{.DictType}}Options) {{"}}"}}</el-tag>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{"{{"}} filterDict(detailFrom.{{.FieldJson}},{{.DictType}}Options) {{"}}"}}
|
{{"{{"}} filterDict(detailFrom.{{.FieldJson}},{{.DictType}}Options) {{"}}"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</template>
|
|
||||||
{{- else if and (ne .FieldType "picture" ) (ne .FieldType "pictures" ) (ne .FieldType "file" ) (ne .FieldType "array" ) }}
|
{{- else if and (ne .FieldType "picture" ) (ne .FieldType "pictures" ) (ne .FieldType "file" ) (ne .FieldType "array" ) }}
|
||||||
{{"{{"}} detailFrom.{{.FieldJson}} {{"}}"}}
|
{{"{{"}} detailFrom.{{.FieldJson}} {{"}}"}}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
@ -800,6 +799,9 @@ getDataSourceFunc()
|
||||||
{{- if eq .FieldType "array" }}
|
{{- if eq .FieldType "array" }}
|
||||||
<ArrayCtrl v-model="detailFrom.{{ .FieldJson }}"/>
|
<ArrayCtrl v-model="detailFrom.{{ .FieldJson }}"/>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if eq .FieldType "richtext" }}
|
||||||
|
<RichView v-model="detailFrom.{{.FieldJson}}" />
|
||||||
|
{{- end }}
|
||||||
{{- if eq .FieldType "pictures" }}
|
{{- if eq .FieldType "pictures" }}
|
||||||
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
<el-image style="width: 50px; height: 50px; margin-right: 10px" :preview-src-list="returnArrImg(detailFrom.{{ .FieldJson }})" :initial-index="index" v-for="(item,index) in detailFrom.{{ .FieldJson }}" :key="index" :src="getUrl(item)" fit="cover" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -845,6 +847,7 @@ import SelectImage from '@/components/selectImage/selectImage.vue'
|
||||||
{{- if .HasRichText }}
|
{{- if .HasRichText }}
|
||||||
// 富文本组件
|
// 富文本组件
|
||||||
import RichEdit from '@/components/richtext/rich-edit.vue'
|
import RichEdit from '@/components/richtext/rich-edit.vue'
|
||||||
|
import RichView from '@/components/richtext/rich-view.vue'
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .HasFile }}
|
{{- if .HasFile }}
|
||||||
|
|
Loading…
Reference in New Issue