| 123456789101112131415161718 |
- import { StatusBar } from "react-native";
- export default {
- state: {
- nowBackground: "#FFC21C",
- },
- actions: ({ model, setState }) => ({
- changeBackground(background) {
- const {nowBackground}=model()
- if (nowBackground !== background) {
- StatusBar.setBackgroundColor(background);
- setState({
- nowBackground:background
- })
- }
- },
- }),
- };
|