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

chore: build

上级 eab35ad4
...@@ -9130,7 +9130,7 @@ const Upx2pxProtocol = [ ...@@ -9130,7 +9130,7 @@ const Upx2pxProtocol = [
const EPS = 1e-4; const EPS = 1e-4;
const BASE_DEVICE_WIDTH = 750; const BASE_DEVICE_WIDTH = 750;
let isIOS$1 = false; let isIOS = false;
let deviceWidth = 0; let deviceWidth = 0;
let deviceDPR = 0; let deviceDPR = 0;
let maxWidth = 960; let maxWidth = 960;
...@@ -9139,7 +9139,7 @@ function checkDeviceWidth() { ...@@ -9139,7 +9139,7 @@ function checkDeviceWidth() {
const { platform, pixelRatio, windowWidth } = getBaseSystemInfo(); const { platform, pixelRatio, windowWidth } = getBaseSystemInfo();
deviceWidth = windowWidth; deviceWidth = windowWidth;
deviceDPR = pixelRatio; deviceDPR = pixelRatio;
isIOS$1 = platform === 'ios'; isIOS = platform === 'ios';
} }
function checkValue(value, defaultValue) { function checkValue(value, defaultValue) {
const newValue = Number(value); const newValue = Number(value);
...@@ -9172,7 +9172,7 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => { ...@@ -9172,7 +9172,7 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
} }
result = Math.floor(result + EPS); result = Math.floor(result + EPS);
if (result === 0) { if (result === 0) {
if (deviceDPR === 1 || !isIOS$1) { if (deviceDPR === 1 || !isIOS) {
result = 1; result = 1;
} }
else { else {
...@@ -13010,7 +13010,6 @@ function deviceId$1 () { ...@@ -13010,7 +13010,6 @@ function deviceId$1 () {
return deviceId; return deviceId;
} }
const isIOS = plus.os.name === 'iOS';
let config; let config;
/** /**
* tabbar显示状态 * tabbar显示状态
...@@ -13185,7 +13184,7 @@ var tabBarInstance = { ...@@ -13185,7 +13184,7 @@ var tabBarInstance = {
// tabBar是否遮挡内容区域 // tabBar是否遮挡内容区域
get cover() { get cover() {
const array = ['extralight', 'light', 'dark']; const array = ['extralight', 'light', 'dark'];
return isIOS && array.indexOf(config.blurEffect) >= 0; return array.indexOf(config.blurEffect) >= 0;
}, },
setStyle({ mask }) { setStyle({ mask }) {
tabBar.setMask({ tabBar.setMask({
...@@ -13371,6 +13370,12 @@ function weexGetSystemInfoSync() { ...@@ -13371,6 +13370,12 @@ function weexGetSystemInfoSync() {
return; return;
const { getSystemInfoSync } = weex.requireModule('plus'); const { getSystemInfoSync } = weex.requireModule('plus');
systemInfo = getSystemInfoSync(); systemInfo = getSystemInfoSync();
if (typeof systemInfo === 'string') {
try {
systemInfo = JSON.parse(systemInfo);
}
catch (error) { }
}
} }
const getDeviceInfo = defineSyncApi('getDeviceInfo', () => { const getDeviceInfo = defineSyncApi('getDeviceInfo', () => {
weexGetSystemInfoSync(); weexGetSystemInfoSync();
......
...@@ -6651,17 +6651,19 @@ function applyOptions(options, instance, publicThis) { ...@@ -6651,17 +6651,19 @@ function applyOptions(options, instance, publicThis) {
function set(target, key, val) { function set(target, key, val) {
return target[key] = val; return target[key] = val;
} }
function errorHandler(err, instance, info) { function createErrorHandler(app) {
if (!instance) { return function errorHandler(err, instance, _info) {
throw err; if (!instance) {
} throw err;
const app = getApp(); }
if (!app || !app.$vm) { const appInstance = app._instance;
throw err; if (!appInstance || !appInstance.proxy) {
} throw err;
{ }
invokeHook(app.$vm, uniShared.ON_ERROR, err); {
} invokeHook(appInstance.proxy.$vm, uniShared.ON_ERROR, err);
}
};
} }
function mergeAsArray(to, from) { function mergeAsArray(to, from) {
return to ? [...new Set([].concat(to, from))] : from; return to ? [...new Set([].concat(to, from))] : from;
...@@ -6739,7 +6741,7 @@ function uniIdMixin(globalProperties) { ...@@ -6739,7 +6741,7 @@ function uniIdMixin(globalProperties) {
function initApp$1(app) { function initApp$1(app) {
const appConfig = app._context.config; const appConfig = app._context.config;
if (shared.isFunction(app._component.onError)) { if (shared.isFunction(app._component.onError)) {
appConfig.errorHandler = errorHandler; appConfig.errorHandler = createErrorHandler(app);
} }
initOptionMergeStrategies(appConfig.optionMergeStrategies); initOptionMergeStrategies(appConfig.optionMergeStrategies);
const globalProperties = appConfig.globalProperties; const globalProperties = appConfig.globalProperties;
......
...@@ -708,11 +708,13 @@ function getWindowOffset() { ...@@ -708,11 +708,13 @@ function getWindowOffset() {
const bottom = getWindowOffsetCssVar(style, "--window-bottom"); const bottom = getWindowOffsetCssVar(style, "--window-bottom");
const left = getWindowOffsetCssVar(style, "--window-left"); const left = getWindowOffsetCssVar(style, "--window-left");
const right = getWindowOffsetCssVar(style, "--window-right"); const right = getWindowOffsetCssVar(style, "--window-right");
const topWindowHeight = getWindowOffsetCssVar(style, "--top-window-height");
return { return {
top, top,
bottom: bottom ? bottom + out.bottom : 0, bottom: bottom ? bottom + out.bottom : 0,
left: left ? left + out.left : 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) { function updateCssVar(cssVars) {
...@@ -2097,7 +2099,7 @@ function getRootInfo(fields2) { ...@@ -2097,7 +2099,7 @@ function getRootInfo(fields2) {
} }
function getNodeInfo(el, fields2) { function getNodeInfo(el, fields2) {
const info = {}; const info = {};
const { top } = getWindowOffset(); const { top, topWindowHeight } = getWindowOffset();
if (fields2.id) { if (fields2.id) {
info.id = el.id; info.id = el.id;
} }
...@@ -2109,8 +2111,8 @@ function getNodeInfo(el, fields2) { ...@@ -2109,8 +2111,8 @@ function getNodeInfo(el, fields2) {
if (fields2.rect) { if (fields2.rect) {
info.left = rect.left; info.left = rect.left;
info.right = rect.right; info.right = rect.right;
info.top = rect.top - top; info.top = rect.top - top - topWindowHeight;
info.bottom = rect.bottom - top; info.bottom = rect.bottom - top - topWindowHeight;
} }
if (fields2.size) { if (fields2.size) {
info.width = rect.width; info.width = rect.width;
...@@ -13700,17 +13702,19 @@ function applyOptions(options, instance2, publicThis) { ...@@ -13700,17 +13702,19 @@ function applyOptions(options, instance2, publicThis) {
function set(target, key, val) { function set(target, key, val) {
return target[key] = val; return target[key] = val;
} }
function errorHandler(err, instance2, info) { function createErrorHandler(app) {
if (!instance2) { return function errorHandler(err, instance2, _info) {
throw err; if (!instance2) {
} throw err;
const app = getApp(); }
if (!app || !app.$vm) { const appInstance = app._instance;
throw err; if (!appInstance || !appInstance.proxy) {
} throw err;
{ }
invokeHook(app.$vm, ON_ERROR, err); {
} invokeHook(appInstance.proxy.$vm, ON_ERROR, err);
}
};
} }
function mergeAsArray(to, from) { function mergeAsArray(to, from) {
return to ? [...new Set([].concat(to, from))] : from; return to ? [...new Set([].concat(to, from))] : from;
...@@ -13788,7 +13792,7 @@ function uniIdMixin(globalProperties) { ...@@ -13788,7 +13792,7 @@ function uniIdMixin(globalProperties) {
function initApp$1(app) { function initApp$1(app) {
const appConfig = app._context.config; const appConfig = app._context.config;
if (isFunction(app._component.onError)) { if (isFunction(app._component.onError)) {
appConfig.errorHandler = errorHandler; appConfig.errorHandler = createErrorHandler(app);
} }
initOptionMergeStrategies(appConfig.optionMergeStrategies); initOptionMergeStrategies(appConfig.optionMergeStrategies);
const globalProperties = appConfig.globalProperties; const globalProperties = appConfig.globalProperties;
......
...@@ -4989,7 +4989,7 @@ function componentUpdateScopedSlotsFn() { ...@@ -4989,7 +4989,7 @@ function componentUpdateScopedSlotsFn() {
const diffData = Object.create(null); const diffData = Object.create(null);
scopedSlotsData.forEach(({ path, index, data }) => { scopedSlotsData.forEach(({ path, index, data }) => {
const oldScopedSlotData = getValueByDataPath(oldData, path); const oldScopedSlotData = getValueByDataPath(oldData, path);
const diffPath = `${path}[${index}]`; const diffPath = isString(index) ? `${path}.${index}` : `${path}[${index}]`;
if (typeof oldScopedSlotData === 'undefined' || if (typeof oldScopedSlotData === 'undefined' ||
typeof oldScopedSlotData[index] === 'undefined') { typeof oldScopedSlotData[index] === 'undefined') {
diffData[diffPath] = data; diffData[diffPath] = data;
...@@ -5209,17 +5209,19 @@ function set(target, key, val) { ...@@ -5209,17 +5209,19 @@ function set(target, key, val) {
return (target[key] = val); return (target[key] = val);
} }
function errorHandler(err, instance, info) { function createErrorHandler(app) {
if (!instance) { return function errorHandler(err, instance, _info) {
throw err; if (!instance) {
} throw err;
const app = getApp(); }
if (!app || !app.$vm) { const appInstance = app._instance;
throw err; if (!appInstance || !appInstance.proxy) {
} throw err;
{ }
app.$vm.$callHook(ON_ERROR, err, info); {
} appInstance.proxy.$vm.$callHook(ON_ERROR, err);
}
};
} }
function mergeAsArray(to, from) { function mergeAsArray(to, from) {
return to ? [...new Set([].concat(to, from))] : from; return to ? [...new Set([].concat(to, from))] : from;
...@@ -5315,7 +5317,7 @@ function uniIdMixin(globalProperties) { ...@@ -5315,7 +5317,7 @@ function uniIdMixin(globalProperties) {
function initApp(app) { function initApp(app) {
const appConfig = app._context.config; const appConfig = app._context.config;
if (isFunction(app._component.onError)) { if (isFunction(app._component.onError)) {
appConfig.errorHandler = errorHandler; appConfig.errorHandler = createErrorHandler(app);
} }
initOptionMergeStrategies(appConfig.optionMergeStrategies); initOptionMergeStrategies(appConfig.optionMergeStrategies);
const globalProperties = appConfig.globalProperties; const globalProperties = appConfig.globalProperties;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册