From 46294efc71d71ae5a29b1aa17a7442672daf2117 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Fri, 11 Aug 2017 11:27:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E5=BF=98=E5=BD=95?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=9C=AA=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + public/scripts/controllers/note-controller.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/.gitignore b/.gitignore index 8951f53..b64a055 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ uploads /public/images/snap/ /public/images/favicon/ .tags +package-lock.json \ No newline at end of file diff --git a/public/scripts/controllers/note-controller.js b/public/scripts/controllers/note-controller.js index 65c79e2..28a56ea 100644 --- a/public/scripts/controllers/note-controller.js +++ b/public/scripts/controllers/note-controller.js @@ -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(); }