W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
我們通過添加一系列接口讓 Weex 使用者可以控制排版參數。
const meta = weex.requireModule('meta');
meta.setViewport({
width: 800
});
WXSDKInstance* instance = [[WXSDKInstance alloc] init];
[instance setViewportWidth:800.f];
WXSDKInstance instance = new WXSDKInstance(mContext);
instance.setInstanceViewPortWidth(800);
Android暫不支持
const meta = weex.requireModule('meta');
meta.setViewport({
deviceWidth: 375,
deviceHeight: 800
});
WXSDKInstance* instance = [[WXSDKInstance alloc] init];
[instance setPageRequiredWidth:375.f height:800.f];
[WXSDKEngine setGlobalDeviceSize:CGSizeMake([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
const meta = weex.requireModule('meta');
meta.setViewport({
reserveCssStyles: true
});
WXSDKInstance* instance = [[WXSDKInstance alloc] init];
[instance setPageKeepRawCssStyles];
WXSDKInstance instance = new WXSDKInstance(mContext);
instance.setPageKeepRawCssStyles();
[instance reloadLayout];
instance.reloadPageLayout();
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯系方式:
更多建議: