問題描述我有很多個組件需要引用,這些組件的結構都不一致,但是需要在他們上面加一個上移下移。并且一個組件可能會有多個,所以需要用到v-for。通過改變data來渲染更新視圖,但是由于模板中已經把地方組件寫死在那了,就算數據改變了,視圖的位置也不會更新。相關代碼模板:處理:data(){return{currency:['initial','basic','introduce','education','work','skill']}},methods:{orderTake(order,index){if(order=='asc'){if(index>1){letstr1=this.currency[index],str2=this.currency[index-1];this.currency[index]=str2;this.currency[index-1]=str1;console.log(this.currency)}}elseif(order=='desc'){if(index
vue多組件怎么做排序?
慕的地6264312
2019-05-09 22:53:45