NativeScript 6.2 发布,黑暗模式和新的 npm 包

NativeScript 6.2 已经发布,主要内容如下:

Dark Mode

该版本引入黑暗模式:

  • 更新主题,最新版本支持黑暗模式的开箱即用
  • 拥有自己实现黑暗模式所需的扩展点
  • 可以选择从操作系统继承暗模式设置,也可以在应用程序中实现自定义控件
  • 大多数 “Pro” NativeScript 组件,如日历、图表和 DataFrom,已经提供了黑暗模式外观

Scoped NPM Packages

该版本在单个 NPM 范围内提供所有 NativeScript NPM 包,包括新的:

  • @nativescript/core
  • @nativescript/angular
  • @nativescript/theme

Kotlin 的扩展函数/属性支持 

现在能够在 NativeScript 中调用用 Kotlin 写成的 ArrayList 扩展函数:

fun ArrayList<String>.bubbleSort() { // Implementation of a bubble sort }

然后,在 NativeScript 应用程序中,调用此函数:

let arrayList = new java.util.ArrayList();
arrayList.bubbleSort();

详细内容请见发布说明:

https://www.nativescript.org/blog/nativescript-6.2-the-darkest-release-ever

猜你喜欢

转载自www.oschina.net/news/111215/nativescript-6-2-released
今日推荐