From b2f1743f5a088b69b8cc269ec9c8b8f7d8f688bf Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Fri, 10 Jun 2022 12:11:17 +0800 Subject: [PATCH] chore: build --- packages/uni-app-plus/dist/uni.runtime.esm.js | 15 +++++--- packages/uni-h5/dist/uni-h5.cjs.js | 26 +++++++------- packages/uni-h5/dist/uni-h5.es.js | 36 ++++++++++--------- packages/uni-mp-vue/dist/vue.runtime.esm.js | 28 ++++++++------- 4 files changed, 59 insertions(+), 46 deletions(-) diff --git a/packages/uni-app-plus/dist/uni.runtime.esm.js b/packages/uni-app-plus/dist/uni.runtime.esm.js index 162731d4e..03571ba96 100644 --- a/packages/uni-app-plus/dist/uni.runtime.esm.js +++ b/packages/uni-app-plus/dist/uni.runtime.esm.js @@ -9130,7 +9130,7 @@ const Upx2pxProtocol = [ const EPS = 1e-4; const BASE_DEVICE_WIDTH = 750; -let isIOS$1 = false; +let isIOS = false; let deviceWidth = 0; let deviceDPR = 0; let maxWidth = 960; @@ -9139,7 +9139,7 @@ function checkDeviceWidth() { const { platform, pixelRatio, windowWidth } = getBaseSystemInfo(); deviceWidth = windowWidth; deviceDPR = pixelRatio; - isIOS$1 = platform === 'ios'; + isIOS = platform === 'ios'; } function checkValue(value, defaultValue) { const newValue = Number(value); @@ -9172,7 +9172,7 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => { } result = Math.floor(result + EPS); if (result === 0) { - if (deviceDPR === 1 || !isIOS$1) { + if (deviceDPR === 1 || !isIOS) { result = 1; } else { @@ -13010,7 +13010,6 @@ function deviceId$1 () { return deviceId; } -const isIOS = plus.os.name === 'iOS'; let config; /** * tabbar显示状态 @@ -13185,7 +13184,7 @@ var tabBarInstance = { // tabBar是否遮挡内容区域 get cover() { const array = ['extralight', 'light', 'dark']; - return isIOS && array.indexOf(config.blurEffect) >= 0; + return array.indexOf(config.blurEffect) >= 0; }, setStyle({ mask }) { tabBar.setMask({ @@ -13371,6 +13370,12 @@ function weexGetSystemInfoSync() { return; const { getSystemInfoSync } = weex.requireModule('plus'); systemInfo = getSystemInfoSync(); + if (typeof systemInfo === 'string') { + try { + systemInfo = JSON.parse(systemInfo); + } + catch (error) { } + } } const getDeviceInfo = defineSyncApi('getDeviceInfo', () => { weexGetSystemInfoSync(); diff --git a/packages/uni-h5/dist/uni-h5.cjs.js b/packages/uni-h5/dist/uni-h5.cjs.js index 8f6a4d2a4..71312dbfe 100644 --- a/packages/uni-h5/dist/uni-h5.cjs.js +++ b/packages/uni-h5/dist/uni-h5.cjs.js @@ -6651,17 +6651,19 @@ function applyOptions(options, instance, publicThis) { function set(target, key, val) { return target[key] = val; } -function errorHandler(err, instance, info) { - if (!instance) { - throw err; - } - const app = getApp(); - if (!app || !app.$vm) { - throw err; - } - { - invokeHook(app.$vm, uniShared.ON_ERROR, err); - } +function createErrorHandler(app) { + return function errorHandler(err, instance, _info) { + if (!instance) { + throw err; + } + const appInstance = app._instance; + if (!appInstance || !appInstance.proxy) { + throw err; + } + { + invokeHook(appInstance.proxy.$vm, uniShared.ON_ERROR, err); + } + }; } function mergeAsArray(to, from) { return to ? [...new Set([].concat(to, from))] : from; @@ -6739,7 +6741,7 @@ function uniIdMixin(globalProperties) { function initApp$1(app) { const appConfig = app._context.config; if (shared.isFunction(app._component.onError)) { - appConfig.errorHandler = errorHandler; + appConfig.errorHandler = createErrorHandler(app); } initOptionMergeStrategies(appConfig.optionMergeStrategies); const globalProperties = appConfig.globalProperties; diff --git a/packages/uni-h5/dist/uni-h5.es.js b/packages/uni-h5/dist/uni-h5.es.js index 9a9db86be..560305669 100644 --- a/packages/uni-h5/dist/uni-h5.es.js +++ b/packages/uni-h5/dist/uni-h5.es.js @@ -708,11 +708,13 @@ function getWindowOffset() { const bottom = getWindowOffsetCssVar(style, "--window-bottom"); const left = getWindowOffsetCssVar(style, "--window-left"); const right = getWindowOffsetCssVar(style, "--window-right"); + const topWindowHeight = getWindowOffsetCssVar(style, "--top-window-height"); return { top, bottom: bottom ? bottom + out.bottom : 0, left: left ? left + out.left : 0, - right: right ? right + out.right : 0 + right: right ? right + out.right : 0, + topWindowHeight: topWindowHeight || 0 }; } function updateCssVar(cssVars) { @@ -2097,7 +2099,7 @@ function getRootInfo(fields2) { } function getNodeInfo(el, fields2) { const info = {}; - const { top } = getWindowOffset(); + const { top, topWindowHeight } = getWindowOffset(); if (fields2.id) { info.id = el.id; } @@ -2109,8 +2111,8 @@ function getNodeInfo(el, fields2) { if (fields2.rect) { info.left = rect.left; info.right = rect.right; - info.top = rect.top - top; - info.bottom = rect.bottom - top; + info.top = rect.top - top - topWindowHeight; + info.bottom = rect.bottom - top - topWindowHeight; } if (fields2.size) { info.width = rect.width; @@ -13700,17 +13702,19 @@ function applyOptions(options, instance2, publicThis) { function set(target, key, val) { return target[key] = val; } -function errorHandler(err, instance2, info) { - if (!instance2) { - throw err; - } - const app = getApp(); - if (!app || !app.$vm) { - throw err; - } - { - invokeHook(app.$vm, ON_ERROR, err); - } +function createErrorHandler(app) { + return function errorHandler(err, instance2, _info) { + if (!instance2) { + throw err; + } + const appInstance = app._instance; + if (!appInstance || !appInstance.proxy) { + throw err; + } + { + invokeHook(appInstance.proxy.$vm, ON_ERROR, err); + } + }; } function mergeAsArray(to, from) { return to ? [...new Set([].concat(to, from))] : from; @@ -13788,7 +13792,7 @@ function uniIdMixin(globalProperties) { function initApp$1(app) { const appConfig = app._context.config; if (isFunction(app._component.onError)) { - appConfig.errorHandler = errorHandler; + appConfig.errorHandler = createErrorHandler(app); } initOptionMergeStrategies(appConfig.optionMergeStrategies); const globalProperties = appConfig.globalProperties; diff --git a/packages/uni-mp-vue/dist/vue.runtime.esm.js b/packages/uni-mp-vue/dist/vue.runtime.esm.js index c0bbd6a25..5f196541c 100644 --- a/packages/uni-mp-vue/dist/vue.runtime.esm.js +++ b/packages/uni-mp-vue/dist/vue.runtime.esm.js @@ -4989,7 +4989,7 @@ function componentUpdateScopedSlotsFn() { const diffData = Object.create(null); scopedSlotsData.forEach(({ path, index, data }) => { const oldScopedSlotData = getValueByDataPath(oldData, path); - const diffPath = `${path}[${index}]`; + const diffPath = isString(index) ? `${path}.${index}` : `${path}[${index}]`; if (typeof oldScopedSlotData === 'undefined' || typeof oldScopedSlotData[index] === 'undefined') { diffData[diffPath] = data; @@ -5209,17 +5209,19 @@ function set(target, key, val) { return (target[key] = val); } -function errorHandler(err, instance, info) { - if (!instance) { - throw err; - } - const app = getApp(); - if (!app || !app.$vm) { - throw err; - } - { - app.$vm.$callHook(ON_ERROR, err, info); - } +function createErrorHandler(app) { + return function errorHandler(err, instance, _info) { + if (!instance) { + throw err; + } + const appInstance = app._instance; + if (!appInstance || !appInstance.proxy) { + throw err; + } + { + appInstance.proxy.$vm.$callHook(ON_ERROR, err); + } + }; } function mergeAsArray(to, from) { return to ? [...new Set([].concat(to, from))] : from; @@ -5315,7 +5317,7 @@ function uniIdMixin(globalProperties) { function initApp(app) { const appConfig = app._context.config; if (isFunction(app._component.onError)) { - appConfig.errorHandler = errorHandler; + appConfig.errorHandler = createErrorHandler(app); } initOptionMergeStrategies(appConfig.optionMergeStrategies); const globalProperties = appConfig.globalProperties; -- GitLab