feat:fix iOS render weight prop

This commit is contained in:
pengfei.zhou
2019-11-16 16:49:42 +08:00
parent 3f4b336205
commit 1b08c227ef
4 changed files with 16 additions and 30 deletions

View File

@@ -20,6 +20,10 @@ import { IList, List } from './listview'
export function text(config: IText) {
const ret = new Text
ret.layoutConfig = {
widthSpec: LayoutSpec.WRAP_CONTENT,
heightSpec: LayoutSpec.WRAP_CONTENT,
}
for (let key in config) {
Reflect.set(ret, key, Reflect.get(config, key, config), ret)
}
@@ -28,6 +32,10 @@ export function text(config: IText) {
export function image(config: IImage) {
const ret = new Image
ret.layoutConfig = {
widthSpec: LayoutSpec.WRAP_CONTENT,
heightSpec: LayoutSpec.WRAP_CONTENT,
}
for (let key in config) {
Reflect.set(ret, key, Reflect.get(config, key, config), ret)
}