Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { record, indentSize, clsPrefix, indent,
index, expandIcon, column ,fixed,showSum, bodyDisplayInRow,lazyStartIndex,lazyEndIndex} = this.props;
const { dataIndex, render, fieldType, linkConfig, fontColor, bgColor } = column;
let {className = ''} = column;
let text = objectPath.get(record, dataIndex);
let tdProps;
let colSpan;
let rowSpan,title;
if (render && !showSum) {
text = render(text, record, index);
if (this.isInvalidRenderCellText(text)) {
tdProps = text.props || {};
rowSpan = (tdProps.rowSpan>lazyEndIndex && lazyEndIndex>5)?lazyEndIndex-index:tdProps.rowSpan;
colSpan = tdProps.colSpan;
text = text.children;
}
}
let colMenu = this.renderColumnMenu(column.cellMenu, text, record, index);
// 根据 fieldType 来渲染数据
});
if (output.redux === false) {
Object.entries(input).forEach(([key, val]) => {
switch (String(key).toLowerCase()) {
case 'actions':
case 'actiontypes':
case 'reducers':
case 'services':
output[key] = false;
break;
}
});
}
output.ID = op.get(output, 'ID', output.name);
output.ID = decamelize(output.ID).toUpperCase();
const dir = path.basename(output.destination).toLowerCase();
if (dir !== output.name.toLowerCase()) {
output.destination = path.join(output.destination, output.name);
}
// Set the style import statement
if (output.stylesheet === true) {
const stylesheetFile = path.normalize(
path.join(output.destination, '_style.scss'),
);
const importString = output.inject.map(filepath =>
path
.relative(filepath, stylesheetFile)
opsInterval: 1000 * 30,
reporters: [{
reporter: require('good-console'),
args:[{ log: '*', request: '*', error: '*', ops: '*' }]
}],
}
}, {
register: require("./index"),
options: { config: config },
}
];
server.connection({
host: Lookup.get(config, "services.run.public.host", "localhost"),
address: "0.0.0.0",
port: Lookup.get(config, "services.run.local.port", 8080),
labels: ["run"],
});
server.register(plugins, function (err) {
if (err) {
server.log("error", "Error registering plugins: " + err.message, err);
process.exit(1);
}
server.start(function (err) {
if (err) {
server.log("error", "Error starting server: " + err.message, err);
process.exit(1);
}
server.log("info", "Server running at: " + server.info.uri);
getRepresentation(row) {
if (this.representedAs && typeof this.representedAs === 'function'){
return this.representedAs(row);
}
return get(row, this.field);
}
componentWillReceiveProps (nextProps) {
const nextId = objectPath.get(nextProps, 'project.id')
const id = objectPath.get(this.props, 'project.id')
if (nextId && nextId !== id && !nextProps.project.feedSources) {
this.props.fetchProjectFeeds(nextProps.project.id)
}
}
componentWillUnmount () {
export function queueStoppingLog([type]: any[]) {
log(
`%c${String.fromCharCode(8226)} (${type}) -> ${obj.get(logEvents, 'queue.stopping')}`,
'color: #ff7f94;font-weight: bold;',
);
}
.catch(err => {
prompt.stop();
message(op.get(err, 'message', CANCELED));
});
};
result = result.sort((a, b) => {
let r = 0;
for (const field in options.sort) {
if (options.sort.hasOwnProperty(field)) {
const direction = options.sort[field];
let valueA;
let valueB;
if (field.indexOf('.') > -1) {
valueA = objectPath.get(a, field);
valueB = objectPath.get(b, field);
} else {
valueA = a[field];
valueB = b[field];
}
if (valueA > valueB) {
r = direction;
break;
}
if (valueA < valueB) {
r = -direction;
break;
}
}
}
return r;
traverseObject(newObj, (obj, path) => {
let joinedPath = path.join('.')
let baseValue = objectPath.get(base, joinedPath)
if (typeof baseValue === 'undefined') {
objectPath.set(base, joinedPath, [])
baseValue = objectPath.get(base, joinedPath)
}
baseValue.push(obj)
})
}
options.url = true;
}
if (runDefaults) {
var invalidTypeValue = p.generateInvalidTypeValue();
if (invalidTypeValue) {
processValue(fullName + " - invalid datatype(" + invalidTypeValue + ")",
fullName, invalidTypeValue);
}
p.rules.forEach(function(r) {
var data = r.generateBadRequest(fullName, params, options);
if (data) {
doIt(fullName + " - " + r.name + "(" + objectPath.get(data, fullName) + ")", data);
}
});
}
var optionValue = objectPath.get(optionParams, fullName);
if (optionValue) {
if (util.isArray(optionValue)) {
optionValue.forEach(function(v) {
processValue(fullName + " - " + v, fullName, v);
});
} else {
processValue(fullName + " - " + optionValue, fullName, optionValue);
}
}
process(fullName, p.childParams());
});
}