【发布时间】:2018-11-27 15:23:23
【问题描述】:
我在我的应用程序中使用了 gridview 插件。 (https://market.nativescript.org/plugins/nativescript-grid-view)
在我的引用中添加以下行后,我遇到了一个错误:
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
错误:
file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:58:124: JS ERROR 错误: onMeasure() 没有通过调用 setMeasuredDimension() 设置测量尺寸标签(174)
这里是代码sn-p
<GridLayout class="page">
<GridView [items]="watches" colWidth="49%" rowHeight="280">
<ng-template let-item="item">
<FlexboxLayout class="watch-item">
<Label text="Hi"></Label>
</FlexboxLayout>
</ng-template>
</GridView>
</GridLayout>
我尝试了不同的布局,但错误是一样的。
我想知道如何解决这个问题?
谢谢
【问题讨论】:
-
是 iOS / Android 的问题吗?
-
是iOS的,我还没查过android
标签: nativescript nativescript-angular