StyleSheet api

简单介绍

RN 中 StyleSheet 的 remax 实现

使用说明

import { StyleSheet } from 'react-native';

属性说明

属性名 类型 参数 是否必须 说明
create func object
flatten func array
absoluteFillObject object -
convert func array | object 是否支持缩放
  • StyleSheet
    • [x] create
    • [x] flatten
    • [x] absoluteFillObject
    • [x] convert 转换class和object混合的style
        const { classList, style } = StyleSheet.convert(["index-app-header",{flex:1}]);
        // classList = [ "index-app-header" ]
        // style = { flex:1 }