data(){
return {
recordOldValue:''
}
}
changeStyle() {
let MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver
let element = $("#contentTable").get(0)
this.observer = new MutationObserver((mutationList) => {
let width = parseFloat(getComputedStyle(element).getPropertyValue('width'));
if (width === this.recordOldValue.width) {
return
}
this.recordOldValue = width
this.pageWidth = this.recordOldValue
})
this.observer.observe(element, { attributes: true, subtree: true, characterData: true, attributeFilter: ['style'], attributeOldValue: true })
},