本文整理汇总了TypeScript中ag-grid-community.Utils.map方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Utils.map方法的具体用法?TypeScript Utils.map怎么用?TypeScript Utils.map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ag-grid-community.Utils
的用法示例。
在下文中一共展示了Utils.map方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: stylesXmlElement
private stylesXmlElement(styles:ExcelStyle[]):XmlElement {
return {
name:'Styles',
children:styles ? Utils.map(styles, (it) => {
return this.styleXmlElement (it);
}): []
};
}
示例2: workbook
private workbook(docProperties: XmlElement, eWorkbook: XmlElement, styles: ExcelStyle[], worksheets: ExcelWorksheet[]) : XmlElement {
const children : XmlElement [] = [
docProperties,
eWorkbook,
this.stylesXmlElement(styles)
].concat(Utils.map(worksheets, (it):XmlElement => worksheet.getTemplate(it)));
return Utils.assign({}, workbook.getTemplate(), {children});
}
示例3: getTemplate
import {XmlElement, Utils} from 'ag-grid-community';
import {ExcelXMLTemplate, ExcelWorksheet} from 'ag-grid-community';
import column from './column';
import row from './row';
const worksheet: ExcelXMLTemplate = {
getTemplate(ws: ExcelWorksheet): XmlElement {
const {table, name} = ws;
const {columns, rows} = table;
const c = Utils.map(columns, (it):XmlElement => column.getTemplate(it));
const r = Utils.map(rows, (it):XmlElement => row.getTemplate(it));
return {
name: "Worksheet",
children:[{
name:"Table",
children: c.concat(r)
}],
properties:{
prefixedAttributes: [{
prefix:"ss:",
map: {
Name: name
}
}]
}
};
}
};
示例4: getTemplate
import {XmlElement, Utils} from 'ag-grid-community';
import {ExcelCell, ExcelRow, ExcelXMLTemplate} from 'ag-grid-community';
import cell from './cell';
const row: ExcelXMLTemplate = {
getTemplate(r: ExcelRow): XmlElement {
const {cells} = r;
return {
name: "Row",
children: Utils.map(cells, (it:ExcelCell):XmlElement => {
return cell.getTemplate(it);
})
};
}
};
export default row;