Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yangkaifeng
uni-app
提交
b2f1743f
U
uni-app
项目概览
yangkaifeng
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b2f1743f
编写于
6月 10, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
eab35ad4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
59 addition
and
46 deletion
+59
-46
packages/uni-app-plus/dist/uni.runtime.esm.js
packages/uni-app-plus/dist/uni.runtime.esm.js
+10
-5
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+14
-12
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+20
-16
packages/uni-mp-vue/dist/vue.runtime.esm.js
packages/uni-mp-vue/dist/vue.runtime.esm.js
+15
-13
未找到文件。
packages/uni-app-plus/dist/uni.runtime.esm.js
浏览文件 @
b2f1743f
...
@@ -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();
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
b2f1743f
...
@@ -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
;
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
b2f1743f
...
@@ -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;
...
...
packages/uni-mp-vue/dist/vue.runtime.esm.js
浏览文件 @
b2f1743f
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录