1 回答

TA貢獻(xiàn)1825條經(jīng)驗(yàn) 獲得超4個(gè)贊
export default {
data() {
return {
seen: '數(shù)據(jù)'
}
},
components: {
},
methods: {
a:function() {
const that = this;
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
that.seen = true
}
}
//箭頭函數(shù)
//xmlhttp.onreadystatechange = () => {
// if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
// this.seen = true
//}
//}
}
}
}
添加回答
舉報(bào)