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

chore: build

上级 eab35ad4
......@@ -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();
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册