fix: 目录页的图片改为非必填

This commit is contained in:
xugaoyi 2022-01-06 19:54:15 +08:00
parent 492260d5ea
commit 801022b780
2 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="theme-vdoing-content">
<div class="column-wrapper">
<img :src="$withBase(pageData.imgUrl)" />
<img v-if="pageData.imgUrl" :src="$withBase(pageData.imgUrl)" />
<dl class="column-info">
<dt class="title">{{ pageData.title }}</dt>
<dd class="description" v-html="pageData.description"></dd>

View File

@ -283,6 +283,7 @@ function getCardImgListDOM(dataList, row, config) {
// 添加base路径
function withBase(path) {
if (!path) return '';
if (base && path.charAt(0) === '/') {
return base + path.slice(1);
} else {