提交 b20b1709 编写于 作者: fxy060608's avatar fxy060608

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

......@@ -4037,7 +4037,6 @@ var serviceContext = (function () {
var onBluetoothAdapterStateChange;
var onBluetoothDeviceFound;
var onBLEConnectionStateChange;
var onBLEConnectionStateChanged;
var onBLECharacteristicValueChange;
function openBluetoothAdapter (data, callbackId) {
......@@ -4072,7 +4071,6 @@ var serviceContext = (function () {
function createBLEConnection (data, callbackId) {
onBLEConnectionStateChange = onBLEConnectionStateChange || bluetoothOn('onBLEConnectionStateChange');
onBLEConnectionStateChanged = onBLEConnectionStateChanged || bluetoothOn('onBLEConnectionStateChanged');
bluetoothExec('createBLEConnection', callbackId, data);
}
......@@ -5925,7 +5923,8 @@ var serviceContext = (function () {
const camera = plus.camera.getCamera();
camera.captureImage(e => invokeChooseImage(callbackId, 'ok', sizeType, [e]),
e => invokeChooseImage(callbackId, 'fail', 1), {
filename: TEMP_PATH + '/camera/'
filename: TEMP_PATH + '/camera/',
resolution: 'high'
});
};
const openAlbum = function (callbackId, sizeType, count) {
......@@ -13016,6 +13015,17 @@ var serviceContext = (function () {
};
}
/**
* mpvue event
*/
function wrapperMPEvent (event) {
event.mp = Object.assign({
'@warning': 'mp is deprecated'
}, event);
event._processed = true;
return event
}
const isAndroid = plus.os.name.toLowerCase() === 'android';
const FOCUS_TIMEOUT = isAndroid ? 300 : 700;
const HIDE_TIMEOUT = isAndroid ? 800 : 300;
......@@ -13105,10 +13115,7 @@ var serviceContext = (function () {
parseTargets(event);
event.preventDefault = noop;
event.stopPropagation = noop;
event.mp = event;
return Object.assign({
mp: event // mpvue
}, event)
return wrapperMPEvent(event)
}
const handleVdData = {
......
......@@ -56,7 +56,8 @@ const {
htmlPreprocessOptions,
nvueJsPreprocessOptions,
nvueCssPreprocessOptions,
nvueHtmlPreprocessOptions
nvueHtmlPreprocessOptions,
getPlatformGlobal
} = require('./platform')
module.exports = {
......@@ -104,5 +105,6 @@ module.exports = {
htmlPreprocessOptions,
nvueJsPreprocessOptions,
nvueCssPreprocessOptions,
nvueHtmlPreprocessOptions
nvueHtmlPreprocessOptions,
getPlatformGlobal
}
此差异已折叠。
......@@ -6,10 +6,11 @@ import {
* mpvue event
*/
export function wrapperMPEvent (event) {
return Object.assign({
mp: event,
_processed: true
event.mp = Object.assign({
'@warning': 'mp is deprecated'
}, event)
event._processed = true
return event
}
/**
* app-plus titleNView
......
......@@ -291,6 +291,10 @@ function wrapper (event) {
event.detail = {}
}
if (!('markerId' in event.detail) && 'markerId' in event) {
event.detail.markerId = event.markerId
}
if (__PLATFORM__ === 'mp-baidu') { // mp-baidu,checked=>value
if (
isPlainObject(event.detail) &&
......
......@@ -54,7 +54,6 @@ function bluetoothOn (method, beforeSuccess) {
var onBluetoothAdapterStateChange
var onBluetoothDeviceFound
var onBLEConnectionStateChange
var onBLEConnectionStateChanged
var onBLECharacteristicValueChange
export function openBluetoothAdapter (data, callbackId) {
......@@ -89,7 +88,6 @@ export function getConnectedBluetoothDevices (data, callbackId) {
export function createBLEConnection (data, callbackId) {
onBLEConnectionStateChange = onBLEConnectionStateChange || bluetoothOn('onBLEConnectionStateChange')
onBLEConnectionStateChanged = onBLEConnectionStateChanged || bluetoothOn('onBLEConnectionStateChanged')
bluetoothExec('createBLEConnection', callbackId, data)
}
......
......@@ -97,7 +97,8 @@ const openCamera = function (callbackId, sizeType) {
const camera = plus.camera.getCamera()
camera.captureImage(e => invokeChooseImage(callbackId, 'ok', sizeType, [e]),
e => invokeChooseImage(callbackId, 'fail', 1), {
filename: TEMP_PATH + '/camera/'
filename: TEMP_PATH + '/camera/',
resolution: 'high'
})
}
const openAlbum = function (callbackId, sizeType, count) {
......
......@@ -3,6 +3,10 @@ import {
noop
} from 'uni-shared'
import {
wrapperMPEvent
} from 'uni-helpers/patch'
import {
VD_SYNC,
UI_EVENT,
......@@ -55,10 +59,7 @@ function wrapperEvent (event) {
parseTargets(event)
event.preventDefault = noop
event.stopPropagation = noop
event.mp = event
return Object.assign({
mp: event // mpvue
}, event)
return wrapperMPEvent(event)
}
const handleVdData = {
......
import {
isFn,
cached,
camelize
camelize,
hasOwn
} from 'uni-shared'
import {
......@@ -58,6 +59,12 @@ export function initSpecialMethods (mpInstance) {
specialMethods.forEach(method => {
if (isFn(mpInstance.$vm[method])) {
mpInstance[method] = function (event) {
if (!hasOwn(event, 'detail')) {
event.detail = {}
}
if (!('markerId' in event.detail) && 'markerId' in event) {
event.detail.markerId = event.markerId
}
// TODO normalizeEvent
mpInstance.$vm[method](event)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册