本文整理匯總了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;