Explorar o código

提交 问题修改

wenmenghao hai 9 meses
pai
achega
7e1e786d9e
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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')