Nativescript-vue:如何使用默认 app.scss 应用新主题?

Nativescript-vue: how to apply a new theme using default app.scss?

我使用

初始化了一个新项目
tns create <project_name> --vue

所以我有文件 ~/App/app.scss

// Import app variables
@import 'app-variables';

// Import the theme’s main ruleset - both index and platform specific.
@import '~nativescript-theme-core/scss/index';
@import '~nativescript-theme-core/scss/platforms/index.android';

// Import common styles
@import 'app-common';

我想尝试其中一个主题,例如 'aqua' 或 'brown'。

我必须添加哪些 and/or 更改?

打开_app-variables.scss我在开始时找到了这个

@import '~nativescript-theme-core/scss/light';

我改成了

@import '~nativescript-theme-core/scss/brown';

然后评论所有变量的覆盖。

然后在我的Home.vue中,在style部分,我评论了$dark_accent的使用。

这样我就可以简单地使用_app-variables.scss

的第一行来切换主题