官方示例代码测试通过,但是插入的扫码组件只能插入当前页面中,能不能插入某一个view中,以便于调整布局
var pages = getCurrentPages();
var page = pages[pages.length - 1];
var currentWebview = page.$getAppWebview();
var barcode = plus.barcode.create('barcode', [plus.barcode.QR], {
top:'100px',
left:'0px',
width: '300px',
height: '300px',
position: 'static'
});
currentWebview.append(barcode);
0 个回复