瀏覽代碼

Merge branch 'dev/v1.2.16_wmh' of jianyu/jy-docs into feature/v1.2.16

wenmenghao 10 月之前
父節點
當前提交
157c48b09b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      jydocs-pc/src/components/SelectedRecommend.vue

+ 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' // 设置新的宽度