wenmenghao 10 ay önce
ebeveyn
işleme
f96cfd2c01

+ 2 - 2
jydocs-pc/src/components/SelectedRecommend.vue

@@ -79,8 +79,8 @@ export default {
       if (window.goTemplateData && window.goTemplateData.inIframe && bodyWidth > 1248) {
         const element = document.querySelectorAll('.card-item')[0]
         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')
         elements.forEach(function (ele) {
           ele.style.width = newwidth + 'px' // 设置新的宽度