fix: 图文显示有误,articles为数组

Signed-off-by: dhb52 <dhb52@126.com>
pull/97/head
dhb52 2023-04-07 15:46:05 +00:00 committed by Gitee
parent 7cc8d9067c
commit 973cfe33a8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 8 additions and 8 deletions

View File

@ -52,7 +52,7 @@
<icon icon="ep:circle-check" />
</el-button>
<el-dialog title="选择图片" v-model="dialogImageVisible" width="90%" append-to-body>
<wx-material-select :obj-data="objDataRef" @selectMaterial="selectMaterial" />
<wx-material-select :obj-data="objDataRef" @select-material="selectMaterial" />
</el-dialog>
</el-col>
<!-- 文件上传 -->
@ -104,7 +104,7 @@
素材库选择<i class="el-icon-circle-check el-icon--right"></i>
</el-button>
<el-dialog title="选择语音" v-model="dialogVoiceVisible" width="90%" append-to-body>
<WxMaterialSelect :objData="objData" @selectMaterial="selectMaterial" />
<WxMaterialSelect :objData="objData" @select-material="selectMaterial" />
</el-dialog>
</el-col>
<!-- 文件上传 -->
@ -162,7 +162,7 @@
<icon icon="ep:circle-check" />
</el-button>
<el-dialog title="选择视频" v-model="dialogVideoVisible" width="90%" append-to-body>
<wx-material-select :objData="objDataRef" @selectMaterial="selectMaterial" />
<wx-material-select :objData="objDataRef" @select-material="selectMaterial" />
</el-dialog>
</el-col>
<!-- 文件上传 -->
@ -196,7 +196,7 @@
</el-row>
</template>
<el-row>
<div class="select-item" v-if="objDataRef.articles.size > 0">
<div class="select-item" v-if="objDataRef.articles.length > 0">
<wx-news :articles="objDataRef.articles" />
<el-col class="ope-row">
<el-button type="danger" circle @click="deleteObj">
@ -218,7 +218,7 @@
<el-dialog title="选择图文" v-model="dialogNewsVisible" width="90%" append-to-body>
<wx-material-select
:objData="objDataRef"
@selectMaterial="selectMaterial"
@select-material="selectMaterial"
:newsType="newsType"
/>
</el-dialog>
@ -270,7 +270,7 @@
<el-dialog title="选择图片" v-model="dialogThumbVisible" width="80%" append-to-body>
<wx-material-select
:objData="{ type: 'image', accountId: objDataRef.accountId }"
@selectMaterial="selectMaterial"
@select-material="selectMaterial"
/>
</el-dialog>
</el-col>
@ -482,7 +482,7 @@ export default defineComponent({
// tempObjItem
let tempObjItem = {
type: '',
articles: '',
articles: [],
thumbMediaId: '',
thumbMediaUrl: '',
introduction: '',
@ -560,7 +560,7 @@ export default defineComponent({
}
const deleteObj = () => {
if (objDataRef.type === 'news') {
objDataRef.articles = ''
objDataRef.articles = []
} else if (objDataRef.type === 'image') {
objDataRef.mediaId = null
objDataRef.url = null