备忘录如果没有不显示标签
This commit is contained in:
parent
9f516d0c4e
commit
c3ff388274
|
|
@ -100,6 +100,7 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind
|
||||||
$scope.tags.forEach((tag) => {
|
$scope.tags.forEach((tag) => {
|
||||||
if ($scope.currentTagId === tag.id) {
|
if ($scope.currentTagId === tag.id) {
|
||||||
tagName = tag.name;
|
tagName = tag.name;
|
||||||
|
tag.ncnt += 1;
|
||||||
}
|
}
|
||||||
if (!$scope.currentTagId) {
|
if (!$scope.currentTagId) {
|
||||||
if (tag.name == '未分类') {
|
if (tag.name == '未分类') {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="ui segment js-note-card" style="padding:14px 0px 0px 0px;">
|
<div class="ui segment js-note-card" style="padding:14px 0px 0px 0px;">
|
||||||
<div class="ui container" style="padding-left:14px">
|
<div class="ui container" style="padding-left:14px">
|
||||||
<div class="ui label" style="margin:3px 15px 8px 0px;cursor:default;" ng-class="{green:tag.clicked}" ng-repeat="tag in tags"
|
<div class="ui label" style="margin:3px 15px 8px 0px;cursor:default;" ng-class="{green:tag.clicked}" ng-repeat="tag in tags"
|
||||||
ng-click="clickTag(tag.id)">{{ tag.name }} ({{ tag.ncnt || 0 }})</div>
|
ng-click="clickTag(tag.id)" ng-show="tag.ncnt || add">{{ tag.name }} ({{ tag.ncnt || 0 }})</div>
|
||||||
<div class="ui label" style="margin:3px 15px 8px 0px;cursor:default;" ng-click="showAddNote()" data-tooltip="点击添加备忘。你也可以在任意界面按快捷键A(不区分大小写)增加备忘录。">
|
<div class="ui label" style="margin:3px 15px 8px 0px;cursor:default;" ng-click="showAddNote()" data-tooltip="点击添加备忘。你也可以在任意界面按快捷键A(不区分大小写)增加备忘录。">
|
||||||
<i class="plus icon" style="margin-right:0px;"></i>
|
<i class="plus icon" style="margin-right:0px;"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,6 @@ CREATE TABLE `notes` (
|
||||||
`content` text DEFAULT NULL, -- 备忘内容
|
`content` text DEFAULT NULL, -- 备忘内容
|
||||||
`tag_id` int(11) DEFAULT NULL, -- 分类id
|
`tag_id` int(11) DEFAULT NULL, -- 分类id
|
||||||
`created_at` datetime DEFAULT now(), -- 创建时间
|
`created_at` datetime DEFAULT now(), -- 创建时间
|
||||||
`public` tinyint(4) DEFAULT '1', -- 是否公开 1 公开,0 不公开
|
`public` tinyint(4) DEFAULT '0', -- 是否公开 1 公开,0 不公开
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue