当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript builder.parse函数代码示例

本文整理汇总了TypeScript中tns-core-modules/ui/builder.parse函数的典型用法代码示例。如果您正苦于以下问题:TypeScript parse函数的具体用法?TypeScript parse怎么用?TypeScript parse使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了parse函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: getViews

 private getViews(template: string) {
     let root = parse(template);
     return {
         root,
         list: root.getViewById("repeater") as Repeater
     };
 };
开发者ID:m-abs,项目名称:NativeScript,代码行数:7,代码来源:repeater-safe-area-tests.ts

示例2: getViews

 private getViews(template: string) {
     let root = parse(template);
     return {
         root,
         list: root.getViewById("webview") as WebView
     };
 };
开发者ID:m-abs,项目名称:NativeScript,代码行数:7,代码来源:web-view-safe-area-tests.ts

示例3: test_MultiParserTemplate

export function test_MultiParserTemplate() {
    const file = fs.File.fromPath(fs.path.join(__dirname, "itemTemplates.xml"));
    const xml = file.readTextSync();

    const view: any = builder.parse(xml);
    TKUnit.assertNotNull(view.items)
    TKUnit.assertEqual(view.items.length, 1);
}
开发者ID:triniwiz,项目名称:NativeScript,代码行数:8,代码来源:xml-parser-tests.ts

示例4: getViews

 private getViews(template: string) {
     let root = parse(template);
     return {
         root,
         list: root.getViewById("list") as ListView,
         cells: [
             [root.getViewById("cell00") as ListView, root.getViewById("cell01") as ListView, root.getViewById("cell02") as ListView],
             [root.getViewById("cell10") as ListView, root.getViewById("cell11") as ListView, root.getViewById("cell12") as ListView],
             [root.getViewById("cell20") as ListView, root.getViewById("cell21") as ListView, root.getViewById("cell22") as ListView]
         ]
     };
 };
开发者ID:m-abs,项目名称:NativeScript,代码行数:12,代码来源:list-view-safe-area-tests.ts

示例5: getViews

 private getViews(template: string) {
     let root = parse(template);
     return {
         root,
         grid: root.getViewById("grid") as GridLayout,
         stack: root.getViewById("stack") as GridLayout,
         childFirst: root.getViewById("childFirst") as view.View,
         cells: [
             [root.getViewById("cell00") as view.View, root.getViewById("cell01") as view.View, root.getViewById("cell02") as view.View],
             [root.getViewById("cell10") as view.View, root.getViewById("cell11") as view.View, root.getViewById("cell12") as view.View],
             [root.getViewById("cell20") as view.View, root.getViewById("cell21") as view.View, root.getViewById("cell22") as view.View]
         ]
     };
 };
开发者ID:vchimev,项目名称:NativeScript,代码行数:14,代码来源:scroll-view-safe-area-tests.ts


注:本文中的tns-core-modules/ui/builder.parse函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。