|
@@ -75,7 +75,7 @@ export default {
|
|
|
this.$emit('click', item)
|
|
|
},
|
|
|
setItemwidth () { // 适配嵌入工作台内
|
|
|
- const bodyWidth = document.body.clientWidth
|
|
|
+ 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
|
|
@@ -84,6 +84,7 @@ export default {
|
|
|
var elements = document.querySelectorAll('.card-item')
|
|
|
elements.forEach(function (ele) {
|
|
|
ele.style.width = newwidth + 'px' // 设置新的宽度
|
|
|
+ console.log(ele.style.width)
|
|
|
})
|
|
|
}
|
|
|
}
|