<script>
export default {
data() {
return {
articlePageNum: 1,
articleHasNextPage: true,
articleTypes: [],
}
},
onLoad: function() {
this.getList()
},
methods: {
handleClickItem: function(key) {
this.$set(this.articleTypes, key, {
title: this.articleTypes[key].title,
current: true
})
console.log(this.articleTypes)
this.articlePageNum = 1
this.articleHasNextPage = true
this.getList()
},
getList: function() {
let arr = []
for (let i = 0; i < 10; i++) {
arr.push({
title: '' + i,
current: false,
currentColor: ''
})
}
this.$set(this, 'articleTypes', [...arr])
}
}
}
</script>
李by白
- 发布:2018-09-04 16:56
- 更新:2018-09-04 17:04
- 阅读:1048