提交 6b4ebb60 编写于 作者: Q qiang

Merge branch 'dev' of github.com:dcloudio/uni-app into dev

......@@ -317,7 +317,8 @@ function wrapper$1 (webview) {
return
}
const maskColor = webview.__uniapp_mask;
const maskWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id);
let maskWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id);
maskWebview = maskWebview.parent() || maskWebview;// 再次检测父
const oldShow = webview.show;
const oldHide = webview.hide;
const oldClose = webview.close;
......
{
"name": "@dcloudio/uni-app-plus",
"version": "0.0.240",
"version": "0.0.241",
"description": "uni-app app-plus",
"main": "dist/index.js",
"scripts": {
......
......@@ -152,6 +152,14 @@ export default {
}
})
Vue.prototype.createSelectorQuery = function createSelectorQuery () {
return uni.createSelectorQuery().in(this)
}
Vue.prototype.createIntersectionObserver = function createIntersectionObserver (args) {
return uni.createIntersectionObserver(this, args)
}
Vue.use(VueRouter)
}
......
import {
findRefById,
invokeVmMethod,
invokeVmMethodWithoutArgs
} from '../util'
class LivePusherContext {
constructor (id, ctx) {
this.id = id
this.ctx = ctx
}
start (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'start', cbs)
}
stop (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'stop', cbs)
}
pause (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'pause', cbs)
}
resume (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'resume', cbs)
}
switchCamera (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'switchCamera', cbs)
}
snapshot (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'snapshot', cbs)
}
toggleTorch (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'toggleTorch', cbs)
}
playBGM (args) {
return invokeVmMethod(this.ctx, 'playBGM', args)
}
stopBGM (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'stopBGM', cbs)
}
pauseBGM (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'pauseBGM', cbs)
}
resumeBGM (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'resumeBGM', cbs)
}
setBGMVolume (cbs) {
return invokeVmMethod(this.ctx, 'setBGMVolume', cbs)
}
startPreview (cbs) {
return invokeVmMethodWithoutArgs(this.ctx, 'startPreview', cbs)
}
stopPreview (args) {
return invokeVmMethodWithoutArgs(this.ctx, 'stopPreview', args)
}
}
export function createLivePusherContext (id, vm) {
const ref = findRefById(id, vm)
if (!ref) {
global.nativeLog('Can not find `' + id + '`', '__WARN')
}
return new LivePusherContext(id, vm.$refs[ref])
}
import {
findRefById,
invokeVmMethod,
invokeVmMethodWithoutArgs
} from '../util'
class VideoContext {
constructor (id, ctx) {
this.id = id
this.ctx = ctx
}
play () {
return invokeVmMethodWithoutArgs(this.ctx, 'play')
}
pause () {
return invokeVmMethodWithoutArgs(this.ctx, 'pause')
}
seek (args) {
return invokeVmMethod(this.ctx, 'seek', args)
}
stop () {
return invokeVmMethodWithoutArgs(this.ctx, 'stop')
}
sendDanmu (args) {
return invokeVmMethod(this.ctx, 'sendDanmu', args)
}
playbackRate (args) {
return invokeVmMethod(this.ctx, 'playbackRate', args)
}
requestFullScreen (args) {
return invokeVmMethod(this.ctx, 'requestFullScreen', args)
}
exitFullScreen () {
return invokeVmMethodWithoutArgs(this.ctx, 'exitFullScreen')
}
showStatusBar () {
return invokeVmMethodWithoutArgs(this.ctx, 'showStatusBar')
}
hideStatusBar () {
return invokeVmMethodWithoutArgs(this.ctx, 'hideStatusBar')
}
}
export function createVideoContext (id, vm) {
const ref = findRefById(id, vm)
if (!ref) {
global.nativeLog('Can not find `' + id + '`', '__WARN')
}
return new VideoContext(id, vm.$refs[ref])
}
......@@ -19,7 +19,8 @@ function wrapper (webview) {
return
}
const maskColor = webview.__uniapp_mask
const maskWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id)
let maskWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id)
maskWebview = maskWebview.parent() || maskWebview// 再次检测父
const oldShow = webview.show
const oldHide = webview.hide
const oldClose = webview.close
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册