From e4c2fcd561cd21ed189bc8388cfccf980f0b3e70 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Mon, 24 Apr 2017 09:46:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B9=A6=E7=AD=BE=E5=88=86?= =?UTF-8?q?=E7=B1=BB=EF=BC=8C=E5=81=9A=E9=99=90=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/scripts/controllers/tags-controller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/controllers/tags-controller.js b/public/scripts/controllers/tags-controller.js index 8dd3a8b..5c487d5 100644 --- a/public/scripts/controllers/tags-controller.js +++ b/public/scripts/controllers/tags-controller.js @@ -326,6 +326,10 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim $scope.addTag = function(tag) { console.log(tag); + if($scope.tags.length >= 30){ + toastr.error('标签个数总数不能超过30个!不允许再添加新分类,如有需求,请联系管理员。', "提示"); + return; + } tag = tag.replace(/(^\s*)|(\s*$)/g, '').replace(/\s+/g, ' '); // 去除前后空格,多个空格转为一个空格; if (tag) { ngDialog.close(dialog);