1记某、圖片的處理
updated() {
//處理富文本內(nèi)圖片適配
let DomList = document
.getElementsByClassName('text')[0]
.querySelectorAll('img');
for (let i in DomList) {
if (DomList[i].style) {
DomList[i].style.width = '300px';
DomList[i].style.height = '200px';
DomList[i].style.marginBottom = '10px';
}
}
},
2疾呻、表格的處理
updated() {
//處理富文本內(nèi)table適配
let DomList = document.querySelectorAll('table');
for (let i in DomList) {
if (DomList[i].style) {
DomList[i].style.width = '100%';
DomList[i].style.margin = '10px 0';
DomList[i].border = '1';
}
}
},