添加备忘录默认未分类

This commit is contained in:
luchenqun 2017-08-11 11:27:43 +08:00
parent 72beb74de5
commit 46294efc71
2 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@ uploads
/public/images/snap/
/public/images/favicon/
.tags
package-lock.json

View File

@ -69,6 +69,18 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind
$("#noteedit")[0].focus();
});
}
console.log('$scope.showAddNote');
// 没有选中分类,默认一个分类
if (!$scope.currentTagId) {
$scope.tags.forEach((tag) => {
tag.clicked = false;
if (tag.name == '未分类') {
$scope.currentTagId = tag.id;
tag.clicked = true;
}
})
}
updateEditPos();
}