Page({
data: {
techTags: [],
honorTags: []
},
onAddTechTag() {
wx.showModal({
title: '添加技术标签',
content: '',
editable:true,
placeholderText:'请输入技术标签',
success: (res) => {
if (res.confirm) {
const newTag = { name: res.editableValue}
const techTags = this.data.techTags.concat(newTag);
this.setData({ techTags });
}
}
})
},
onAddHonorTag() {
wx.showModal({
title: '添加荣誉标签',
content: '',
editable:true,
placeholderText:'请输入荣誉标签',
success: (res) => {
if (res.confirm) {
const newTag = { name: res.editableValue}
const honorTags = this.data.honorTags.concat(newTag);
this.setData({ honorTags });
}
}
})
}
})
为什么不看文档