0.0.1 • Published 9 months ago

@ray-js/lamp-mutation-sync-utils v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

简体中文 | English

@ray-js/lamp-mutation-sync-utils

latest download

Switch lamp transition toolkit

Installation

$ npm install @ray-js/lamp-mutation-sync-utils
// Or
$ yarn add @ray-js/lamp-mutation-sync-utils

Development

# Real-time compilation of demo code
yarn start:tuya

Usage

Navigate to Functional Page

import { navigateToLampMutationFunctional } from '@ray-js/lamp-mutation-sync-utils';

const jumpUrl = `functional://LampMutationFunctional/home?deviceId=${deviceId || ''}&groupId=${
  groupId || ''
}`;

navigateToLampMutationFunctional(jumpUrl);

Modify Functional Page Style

import { navigateToLampMutationFunctional } from '@ray-js/lamp-mutation-sync-utils';

const jumpUrl = `functional://LampMutationFunctional/home?deviceId=${deviceId || ''}&groupId=${
  groupId || ''
}`;

navigateToLampMutationFunctional(jumpUrl, {
  smartUIThemeVars: {
    stepperBackgroundColor: 'red',
  },
  cardStyle: {
    background: 'red',
  },
  descStyle: {
    background: 'red',
  },
});

API

Method NameParameter DescriptionType
presetLampMutationFunctionalDataStore functional page data as a Promise(url: string, data: LampMutationFunctionalData) => Promise<boolean>
clearLampMutationFunctionalDataClear functional page data(url: string) => Promise<boolean>
navigateToLampMutationFunctionalJump to the feature page(url: string, data?: LampMutationFunctionalData) => void
useLampMutationPresetDataGet stored functional page data() => LampMutationFunctionalData

LampMutationFunctionalData

ParameterParameter DescriptionTypeDefaultRequired
smartUIThemeVarsThe variables of the smart-ui component refer to the themeVars attribute of the ConfigProvider component. The styles of the components that can be modified are: NavBar, StepperSmartConfigProviderProps['themeVars']-Optional
cardStyleStyle of the entire page cardReact.CSSProperties-Optional
descStyleStyle of text line at the bottom of the pageReact.CSSProperties-Optional
0.0.1

9 months ago

0.0.1-beta-3

9 months ago

0.0.1-beta-2

9 months ago

0.0.1-beta-1

9 months ago