|
@@ -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')
|