Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.formatFormField(data);
this.$set(this.formGrid.form, 'data', data)
if (type === 'view') {
this.modal.viewModal = true;
} else {
this.modal.editModal = true;
}
this.$forceUpdate();
}).catch(response => {
this.noticeError('获取数据失败', response.body);
this.$forceUpdate();
return false;
});
} else {
Log.d('get data :%o', row);
let rowData = deepExtend({}, row);
this.formatFormField(rowData);
let keys = Object.keys(rowData)
keys.forEach((k) => {
this.$set(this.formGrid.form.data, k, rowData[k])
})
this.$nextTick(() => {
if (type === 'view') {
this.modal.viewModal = true;
} else {
this.modal.editModal = true;
}
})
}
},
// 操作查看按钮
// This should only happen if dest is the first plugin, since invocations after that will ensure its an array
if(!Array.isArray(action)) {
action = [action]
wrapActions[actionName] = action // Put the value inside an array
}
if(src && src.statePlugins && src.statePlugins[namespace] && src.statePlugins[namespace].wrapActions && src.statePlugins[namespace].wrapActions[actionName]) {
src.statePlugins[namespace].wrapActions[actionName] = wrapActions[actionName].concat(src.statePlugins[namespace].wrapActions[actionName])
}
}
}
}
return deepExtend(dest, src)
}
room: Match.Maybe(String), // the current room
contacts: Match.Maybe([Match.Any]), // include contacts
});
const userProjection = {
fields: { profile: 1, history: 1, status: 1, services: 1 },
};
if (Roles.userIsInRole(this.userId, MANAGER_ROLES)) {
return Meteor.users.find({}, userProjection);
}
const res = [];
res.push(Meteor.users.find(this.userId, userProjection));
if (opts.room) {
res.push(Roles.getUsersInRole(opts.room, Roles.GLOBAL_GROUP, deepExtend({
fields: {
'roles.__global_roles__.$': 1,
},
}, userProjection)));
}
if (opts.contacts) {
res.push(Meteor.users.find({
'services.google.email': { $in: _.pluck(opts.contacts, 'email') },
}, {
fields: {
profile: 1,
status: 1,
},
}));
}
}
// which files do we look at?
if (!win)
[join(etc, name, 'config'),
join(etc, name + 'rc')].forEach(addConfigFile)
if (home)
[join(home, '.config', name, 'config'),
join(home, '.config', name),
join(home, '.' + name, 'config'),
join(home, '.' + name + 'rc')].forEach(addConfigFile)
addConfigFile(cc.find('.'+name+'rc'))
if (env.config) addConfigFile(env.config)
if (argv.config) addConfigFile(argv.config)
return deepExtend.apply(null, configs.concat([
env,
argv,
configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : null,
]))
}
}
// which files do we look at?
if (!win)
[join(etc, name, 'config'),
join(etc, name + 'rc')].forEach(addConfigFile)
if (home)
[join(home, '.config', name, 'config'),
join(home, '.config', name),
join(home, '.' + name, 'config'),
join(home, '.' + name + 'rc')].forEach(addConfigFile)
addConfigFile(cc.find('.'+name+'rc'))
if (env.config) addConfigFile(env.config)
if (argv.config) addConfigFile(argv.config)
return deepExtend.apply(null, configs.concat([
env,
argv,
configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined,
]))
}
}
// which files do we look at?
if (!win)
[join(etc, name, 'config'),
join(etc, name + 'rc')].forEach(addConfigFile)
if (home)
[join(home, '.config', name, 'config'),
join(home, '.config', name),
join(home, '.' + name, 'config'),
join(home, '.' + name + 'rc')].forEach(addConfigFile)
addConfigFile(cc.find('.'+name+'rc'))
if (env.config) addConfigFile(env.config)
if (argv.config) addConfigFile(argv.config)
return deepExtend.apply(null, configs.concat([
env,
argv,
configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined,
]))
}
}
// which files do we look at?
if (!win)
[join(etc, name, 'config'),
join(etc, name + 'rc')].forEach(addConfigFile)
if (home)
[join(home, '.config', name, 'config'),
join(home, '.config', name),
join(home, '.' + name, 'config'),
join(home, '.' + name + 'rc')].forEach(addConfigFile)
addConfigFile(cc.find('.'+name+'rc'))
if (env.config) addConfigFile(env.config)
if (argv.config) addConfigFile(argv.config)
return deepExtend.apply(null, configs.concat([
env,
argv,
configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined,
]))
}
let l10nFiles;
try {
l10nFiles = lsSync(this.config.l10n, 0);
} catch (e) {
logger.fatal(`Unable to find the localization data file ${this.config.l10nFile}`);
return this;
}
l10nFiles.forEach(filepath => {
l10nData.push(loadYaml(filepath));
});
// Merge the objects in reverse order so that the first one loaded wins.
this._l10nData = deepExtend.apply(deepExtend, l10nData.reverse());
this._l10nFormatter = new MessageFormat(this.locale).compile(this._l10nData);
return this;
}
}
// which files do we look at?
if (!win)
[join(etc, name, 'config'),
join(etc, name + 'rc')].forEach(addConfigFile)
if (home)
[join(home, '.config', name, 'config'),
join(home, '.config', name),
join(home, '.' + name, 'config'),
join(home, '.' + name + 'rc')].forEach(addConfigFile)
addConfigFile(cc.find('.'+name+'rc'))
if (env.config) addConfigFile(env.config)
if (argv.config) addConfigFile(argv.config)
return deepExtend.apply(null, configs.concat([
env,
argv,
configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined,
]))
}
_emitEventGeneral(event, hub = false) {
const state = event.state;
this.eventsState = deepExtend((this.eventsState || {}), {[event.name]: state});
if (!this.listenerCount()) {
this.emit('log', event);
this.emit(event.name, state);
hub && this.emit('eventHub', event);
}
}