if与confirm结合使用deletetodo() { if (confirm('是否删除' + this.todo.title + '?')) { this.$bus.$emit('delete', this.todo.id) }确定返回值true 取消false