用了elementUI中的彈框,需求是點(diǎn)擊彈框內(nèi)的按鈕后,內(nèi)部彈框的寬度改變本來(lái)想通過(guò)//this.$refs.elDialog.style.width = '1500px' //1//this.$refs.elDialog.width = '1500px' //2第一句,width的值是能改變,也不報(bào)錯(cuò),但是實(shí)際樣式寬度沒(méi)有改變第二句,直接報(bào)錯(cuò)runner-3.25.5.min.js:1 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "width"found in---> <ElDialog>... (1 recursive calls) <Root>這是代碼請(qǐng)問(wèn)一下這種情況應(yīng)該怎么解決??
elementUI無(wú)法通過(guò)this.$refs動(dòng)態(tài)改變樣式?
紅糖糍粑
2019-03-13 22:15:37