鍍金池/ 問(wèn)答/HTML/ iview-area中的al-cascader動(dòng)態(tài)改變 model 時(shí), 不能正

iview-area中的al-cascader動(dòng)態(tài)改變 model 時(shí), 不能正確顯示選中項(xiàng)

我要做的是一個(gè)選擇地理位置的,使用的是iview-area的al-cascader實(shí)現(xiàn)
https://github.com/iview/ivie...

clipboard.png

設(shè)置的默認(rèn)值
clipboard.png

設(shè)置的默認(rèn)值的效果
clipboard.png

現(xiàn)在是我重新給basicsForm.location賦值
this.basicsForm.location = ['遼寧省', '沈陽(yáng)市', '和平區(qū)'];
這種方式用了,沒(méi)效果
this.$set(this.basicsForm.location, 0, res.result.province);
this.$set(this.basicsForm.location, 1, res.result.city);
this.$set(this.basicsForm.location, 2, res.result.district);

頁(yè)面沒(méi)選中設(shè)置的數(shù)據(jù)
clipboard.png

我使用了vue的this.$nextTick方法,頁(yè)面也沒(méi)有變化

回答
編輯回答
傻叼

這個(gè)坑。。。之前用的時(shí)候還是1.5.8這個(gè)版本,現(xiàn)在已經(jīng)更新到1.5.17版本了,升級(jí)版本就ok了,笑哭!?。?/p>

2017年3月25日 13:30