|
@@ -79,8 +79,8 @@ export default {
|
|
if (window.goTemplateData && window.goTemplateData.inIframe && bodyWidth > 1248) {
|
|
if (window.goTemplateData && window.goTemplateData.inIframe && bodyWidth > 1248) {
|
|
const element = document.querySelectorAll('.card-item')[0]
|
|
const element = document.querySelectorAll('.card-item')[0]
|
|
const itemwidth = element.offsetWidth + 104 // 104是margin
|
|
const itemwidth = element.offsetWidth + 104 // 104是margin
|
|
- const num = Math.floor((bodyWidth - 48) / itemwidth)
|
|
|
|
- const newwidth = ((Math.floor((bodyWidth - (itemwidth * num) - 48) / num)) + itemwidth) - 104
|
|
|
|
|
|
+ const num = Math.floor((bodyWidth - 96) / itemwidth)
|
|
|
|
+ const newwidth = ((Math.floor((bodyWidth - (itemwidth * num) - 96) / num)) + itemwidth) - 104
|
|
var elements = document.querySelectorAll('.card-item')
|
|
var elements = document.querySelectorAll('.card-item')
|
|
elements.forEach(function (ele) {
|
|
elements.forEach(function (ele) {
|
|
ele.style.width = newwidth + 'px' // 设置新的宽度
|
|
ele.style.width = newwidth + 'px' // 设置新的宽度
|