我使用 Vue Native,我正在尝试更改主题。但是 StyleProvider 没有采用主题,并抛出警告“道具类型失败:提供给 StyleProvider 的类型数组的道具样式无效,预期对象。” 我做错了什么?
<template>
<nb-style-provider v-bind:style="getTheme(material)">
<nb-container>
<nb-text>Contact</nb-text>
</nb-container>
</nb-style-provider>
</template>
<script>
import Vue from "vue-native-core";
import {VueNativeBase} from "native-base";
import getTheme from './native-base-theme/components';
import material from './native-base-theme/variables/material';
Vue.use(VueNativeBase);
export default {
data: function() {
return {
getTheme: getTheme,
material: material,
};
},
};
</script>