Browse Source

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

wenmenghao 10 tháng trước cách đây
mục cha
commit
157c48b09b
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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' // 设置新的宽度