fix: 卡片容器链接添加withBase
This commit is contained in:
parent
73166332c5
commit
26510a3eb4
|
|
@ -238,7 +238,7 @@ function getCardListDOM(dataList, row, config) {
|
||||||
let listDOM = ''
|
let listDOM = ''
|
||||||
dataList.forEach(item => {
|
dataList.forEach(item => {
|
||||||
listDOM += `
|
listDOM += `
|
||||||
<${item.link ? 'a href="' + item.link + '" target="' + target + '"' : 'span'} class="card-item ${row ? 'row-' + row : ''}"
|
<${item.link ? 'a href="' + withBase(item.link) + '" target="' + target + '"' : 'span'} class="card-item ${row ? 'row-' + row : ''}"
|
||||||
style="${item.bgColor ? 'background-color:' + item.bgColor + ';--randomColor:' + item.bgColor + ';' : '--randomColor: var(--bodyBg);'}${item.textColor ? 'color:' + item.textColor + ';' : ''}"
|
style="${item.bgColor ? 'background-color:' + item.bgColor + ';--randomColor:' + item.bgColor + ';' : '--randomColor: var(--bodyBg);'}${item.textColor ? 'color:' + item.textColor + ';' : ''}"
|
||||||
>
|
>
|
||||||
${item.avatar ? '<img src="' + withBase(item.avatar) + '" class="no-zoom">' : ''}
|
${item.avatar ? '<img src="' + withBase(item.avatar) + '" class="no-zoom">' : ''}
|
||||||
|
|
@ -261,7 +261,7 @@ function getCardImgListDOM(dataList, row, config) {
|
||||||
dataList.forEach(item => {
|
dataList.forEach(item => {
|
||||||
listDOM += `
|
listDOM += `
|
||||||
<div class="card-item ${row ? 'row-' + row : ''}" >
|
<div class="card-item ${row ? 'row-' + row : ''}" >
|
||||||
<a href="${item.link}" target="${target}">
|
<a href="${withBase(item.link)}" target="${target}">
|
||||||
<div class="box-img" style="height: ${imgHeight}">
|
<div class="box-img" style="height: ${imgHeight}">
|
||||||
<img src="${withBase(item.img)}" class="no-zoom" style="object-fit: ${objectFit}">
|
<img src="${withBase(item.img)}" class="no-zoom" style="object-fit: ${objectFit}">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue