Browse Source

提交 问题修改

wenmenghao 10 tháng trước cách đây
mục cha
commit
7e1e786d9e
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      jydocs-pc/src/components/SelectedRecommend.vue

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

@@ -77,8 +77,7 @@ export default {
     setItemwidth () { // 适配嵌入工作台内
       const bodyWidth = window.screen.width - 212
       if (window.goTemplateData && window.goTemplateData.inIframe && bodyWidth > 1248) {
-        const element = document.querySelectorAll('.card-item')[0]
-        const itemwidth = element.offsetWidth + 104 // 104是margin
+        const itemwidth = 279 + 104 // 104是margin
         const num = Math.floor((bodyWidth - 96) / itemwidth)
         const newwidth = ((Math.floor((bodyWidth - (itemwidth * num) - 96) / num)) + itemwidth) - 104
         var elements = document.querySelectorAll('.card-item')