问题描述
代码
import Ember from 'ember';
export default Ember.Component.extend({
editing: false,actions: {
editTodo() {
this.toggleProperty("editing");
},submitTodo() {
const todo = this.get("todo");
if (todo.get("title") == "") {
todo.destroyRecord().then(() => {
this.toggleProperty("editing");
});
} else {
this.toggleProperty("editing");
}
},deleteTodo() {
this.get("todo").destroyRecord();
}
}
});
这个“编辑”属性是如何起作用的,谁能解释一下?我是 ember 的新手
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)