本文整理汇总了TypeScript中entcore._.reject方法的典型用法代码示例。如果您正苦于以下问题:TypeScript _.reject方法的具体用法?TypeScript _.reject怎么用?TypeScript _.reject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entcore._
的用法示例。
在下文中一共展示了_.reject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: async
page: async (params) => {
await sniplets.load();
$scope.sniplets = _.reject(sniplets.sniplets, (s) => s.sniplet.hidden);
Autosave.unwatchAll();
openSite(params);
applyIfNeeded();
},
示例2: function
init: function(){
var source = this.source;
this.me = model.me;
this.lang = lang;
if(source.customLinks){
this.links = source.customLinks;
this.custom = true;
this.snipletDisplay = {};
return;
}
this.source.landingPage = this.snipletResource.landingPage;
this.source._id = this.snipletResource._id;
this.links = _.map(this.snipletResource.pages.all, (page) => {
let href = '#/website/' + this.source._id + '/' + page.titleLink;
if (window.location.hash.startsWith('#/preview/')) {
href = '#/preview/' + this.source._id + '/' + page.titleLink;
}
return {
title: page.title,
href: href,
published: page.published,
index: page.index
}
});
console.log(this.links);
this.links = _.reject(this.links, (l) => l.published === false);
model.one('refresh-nav', () => this.init());
this.$apply('links')
},
示例3: function
function (excludes) {
scope.close();
scope.toasterDisplayed.main = false;
scope.selectedSubjectScheduled.scheduled_at.exclude = scope.selectedSubjectScheduled.scheduled_at.exclude.concat(excludes);
scope.subjectCopyList = _.reject(scope.subjectCopyList, (copy) => {
return copy.selected;
});
},
示例4: async
scope.deleteItem = async (item) => {
scope.ngModel = _.reject(scope.ngModel, function (i) { return i === item; });
scope.$apply('ngModel');
scope.$eval(scope.ngChange);
if (scope.itemsFound.length > 0) {
setTimeout(async function () {
await scope.doSearch();
}, 0);
}
};
示例5: route
//.........这里部分代码省略.........
$scope.hasWorkflowZimbraExpert = () => {
return model.me.hasWorkflow('fr.openent.zimbra.controllers.ZimbraController|preauth');
};
async function init(){
await directory.account.open();
await directory.account.loadChildren();
await directory.account.load();
$scope.me = model.me;
directory.account.on('change', function(){
$scope.$apply();
});
$scope.account = directory.account;
$scope.previousMood = directory.account.mood.id;
$scope.currentMotto = directory.account.motto;
$scope.motto = {
published: true,
activated: false
}
loadThemeConf();
}
$scope.display = {};
$scope.lang = lang;
$scope.openView = function (view, name) {
template.open(name, view);
};
$scope.containsView = function (name, view) {
return template.contains(name, view);
};
$scope.moods = directory.User.prototype.moods;
var moods = _.reject($scope.moods, function(mood){
return mood.id === 'default';
});
moods.unshift({ id: "default", icon: "none", text:"userBook.mood.default" });
$scope.availableMoods = moods;
$scope.resetPasswordPath = '/auth/reset/password';
$scope.birthDate = function(birthDate){
if(birthDate){
return moment(birthDate).format('D MMMM YYYY');
}
return '';
};
$scope.setThemePreferences = (themeName: string) => {
const addedThemes = [];
for(let name in $scope.account.themes){
if($scope.account.themes[name]){
addedThemes.push(name);
}
}
if(addedThemes.length > 1){
const keptTheme = $scope.themes.find(t => t.parent === 'theme-open-ent').child;
http().put('/userbook/preference/theme', keptTheme);
}
else{
http().put('/userbook/preference/theme', addedThemes[0]);
}
};
$scope.translate = function(label){
示例6: function
directory.User.prototype.removeRelative = function(relative){
this.relatives = _.reject(this.relatives, function(user){
return user.id === relative.id;
});
};