在标签里面能进行删除编辑,标签上限为30
This commit is contained in:
parent
0ea5887444
commit
1c77706722
|
|
@ -98,7 +98,6 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$scope.bookmarks = data;
|
$scope.bookmarks = data;
|
||||||
data.forEach((item) => console.log(item.name, item.click));
|
|
||||||
if ($scope.bookmarks.length == 0) {
|
if ($scope.bookmarks.length == 0) {
|
||||||
toastr.info('您还没有书签,请点击菜单栏的添加按钮进行添加', "提示");
|
toastr.info('您还没有书签,请点击菜单栏的添加按钮进行添加', "提示");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,11 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (tags.length + $scope.tags.length >= 30) {
|
||||||
|
toastr.error('标签个数总数不能超过30个!', "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bookmarkService.addTags(params)
|
bookmarkService.addTags(params)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
$scope.tags = data;
|
$scope.tags = data;
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', 'book
|
||||||
$scope.getBookmarks = function(tagId, currentPage) {
|
$scope.getBookmarks = function(tagId, currentPage) {
|
||||||
$scope.bookmarkClicked = true;
|
$scope.bookmarkClicked = true;
|
||||||
$scope.currentTagId = tagId;
|
$scope.currentTagId = tagId;
|
||||||
|
$scope.currentPage = currentPage;
|
||||||
$scope.loadBookmarks = true;
|
$scope.loadBookmarks = true;
|
||||||
|
|
||||||
$scope.tags.forEach(function(tag) {
|
$scope.tags.forEach(function(tag) {
|
||||||
|
|
@ -76,8 +77,6 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', 'book
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.delBookmark = function(bookmarkId) {
|
$scope.delBookmark = function(bookmarkId) {
|
||||||
toastr.warning('功能暂未实现。。。', "警告");
|
|
||||||
return;
|
|
||||||
var params = {
|
var params = {
|
||||||
id: bookmarkId
|
id: bookmarkId
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue