Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
23053d7f
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
23053d7f
编写于
2月 07, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
67ffea48
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
65 addition
and
65 deletion
+65
-65
packages/uni-app-plus/dist/uni-app-service.es.js
packages/uni-app-plus/dist/uni-app-service.es.js
+62
-62
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-app-plus/src/service/api/index.ts
packages/uni-app-plus/src/service/api/index.ts
+2
-1
packages/uni-app-plus/src/service/api/internal/global.ts
packages/uni-app-plus/src/service/api/internal/global.ts
+0
-0
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+0
-1
未找到文件。
packages/uni-app-plus/dist/uni-app-service.es.js
浏览文件 @
23053d7f
...
...
@@ -16612,6 +16612,67 @@ var serviceContext = (function (vue) {
return new SubNvue(id, isSub);
};
let lastStatusBarStyle;
let oldSetStatusBarStyle = plus.navigator.setStatusBarStyle;
function restoreOldSetStatusBarStyle(setStatusBarStyle) {
oldSetStatusBarStyle = setStatusBarStyle;
}
function newSetStatusBarStyle(style) {
lastStatusBarStyle = style;
oldSetStatusBarStyle(style);
}
plus.navigator.setStatusBarStyle = newSetStatusBarStyle;
function setStatusBarStyle(statusBarStyle) {
if (!statusBarStyle) {
const page = getCurrentPage();
if (!page) {
return;
}
statusBarStyle = page.$page.statusBarStyle;
if (!statusBarStyle || statusBarStyle === lastStatusBarStyle) {
return;
}
}
if (statusBarStyle === lastStatusBarStyle) {
return;
}
if ((process.env.NODE_ENV !== 'production')) {
console.log(formatLog('setStatusBarStyle', statusBarStyle));
}
lastStatusBarStyle = statusBarStyle;
plus.navigator.setStatusBarStyle(statusBarStyle);
}
function restoreGlobal(newVue, newWeex, newPlus, newSetTimeout, newClearTimeout, newSetInterval, newClearInterval) {
// 确保部分全局变量 是 app-service 中的
// 若首页 nvue 初始化比 app-service 快,导致框架处于该 nvue 环境下
// plus 如果不用 app-service,资源路径会出问题
// 若首页 nvue 被销毁,如 redirectTo 或 reLaunch,则这些全局功能会损坏
// 设置 vue3
// @ts-ignore 最终vue会被替换为vue
vue = newVue;
if (plus !== newPlus) {
if ((process.env.NODE_ENV !== 'production')) {
console.log(`[restoreGlobal][${Date.now()}]`);
}
weex = newWeex;
// @ts-ignore
plus = newPlus;
restoreOldSetStatusBarStyle(plus.navigator.setStatusBarStyle);
plus.navigator.setStatusBarStyle = newSetStatusBarStyle;
/* eslint-disable no-global-assign */
// @ts-ignore
setTimeout = newSetTimeout;
// @ts-ignore
clearTimeout = newClearTimeout;
// @ts-ignore
setInterval = newSetInterval;
// @ts-ignore
clearInterval = newClearInterval;
}
__uniConfig.serviceReady = true;
}
const providers = {
oauth(callback) {
plus.oauth.getServices((services) => {
...
...
@@ -17935,37 +17996,6 @@ var serviceContext = (function (vue) {
});
}
let lastStatusBarStyle;
let oldSetStatusBarStyle = plus.navigator.setStatusBarStyle;
function restoreOldSetStatusBarStyle(setStatusBarStyle) {
oldSetStatusBarStyle = setStatusBarStyle;
}
function newSetStatusBarStyle(style) {
lastStatusBarStyle = style;
oldSetStatusBarStyle(style);
}
plus.navigator.setStatusBarStyle = newSetStatusBarStyle;
function setStatusBarStyle(statusBarStyle) {
if (!statusBarStyle) {
const page = getCurrentPage();
if (!page) {
return;
}
statusBarStyle = page.$page.statusBarStyle;
if (!statusBarStyle || statusBarStyle === lastStatusBarStyle) {
return;
}
}
if (statusBarStyle === lastStatusBarStyle) {
return;
}
if ((process.env.NODE_ENV !== 'production')) {
console.log(formatLog('setStatusBarStyle', statusBarStyle));
}
lastStatusBarStyle = statusBarStyle;
plus.navigator.setStatusBarStyle(statusBarStyle);
}
function onWebviewPopGesture(webview) {
let popStartStatusBarStyle;
webview.addEventListener('popGesture', (e) => {
...
...
@@ -19226,36 +19256,6 @@ var serviceContext = (function (vue) {
};
}
function restoreGlobal(newVue, newWeex, newPlus, newSetTimeout, newClearTimeout, newSetInterval, newClearInterval) {
// 确保部分全局变量 是 app-service 中的
// 若首页 nvue 初始化比 app-service 快,导致框架处于该 nvue 环境下
// plus 如果不用 app-service,资源路径会出问题
// 若首页 nvue 被销毁,如 redirectTo 或 reLaunch,则这些全局功能会损坏
// 设置 vue3
// @ts-ignore 最终vue会被替换为vue
vue = newVue;
if (plus !== newPlus) {
if ((process.env.NODE_ENV !== 'production')) {
console.log(`[restoreGlobal][${Date.now()}]`);
}
weex = newWeex;
// @ts-ignore
plus = newPlus;
restoreOldSetStatusBarStyle(plus.navigator.setStatusBarStyle);
plus.navigator.setStatusBarStyle = newSetStatusBarStyle;
/* eslint-disable no-global-assign */
// @ts-ignore
setTimeout = newSetTimeout;
// @ts-ignore
clearTimeout = newClearTimeout;
// @ts-ignore
setInterval = newSetInterval;
// @ts-ignore
clearInterval = newClearInterval;
}
__uniConfig.serviceReady = true;
}
const EventType = {
load: 'load',
close: 'close',
...
...
@@ -20009,6 +20009,7 @@ var serviceContext = (function (vue) {
removeTabBarBadge: removeTabBarBadge,
hideTabBarRedDot: hideTabBarRedDot,
getSubNVueById: getSubNVueById,
restoreGlobal: restoreGlobal,
getProvider: getProvider,
login: login,
getUserInfo: getUserInfo,
...
...
@@ -20024,7 +20025,6 @@ var serviceContext = (function (vue) {
requireNativePlugin: requireNativePlugin,
sendNativeEvent: sendNativeEvent,
__vuePlugin: index$1,
restoreGlobal: restoreGlobal,
createRewardedVideoAd: createRewardedVideoAd,
createFullScreenVideoAd: createFullScreenVideoAd,
createInterstitialAd: createInterstitialAd,
...
...
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
23053d7f
此差异已折叠。
点击以展开。
packages/uni-app-plus/src/service/api/index.ts
浏览文件 @
23053d7f
...
...
@@ -55,6 +55,8 @@ export * from './ui/navigationBar'
export
*
from
'
./ui/tabBar
'
export
*
from
'
./ui/subNVue
'
export
*
from
'
./internal/global
'
export
*
from
'
./plugin/getProvider
'
export
*
from
'
./plugin/oauth
'
export
*
from
'
./plugin/registerRuntime
'
...
...
@@ -62,7 +64,6 @@ export * from './plugin/share'
export
*
from
'
./plugin/requestPayment
'
export
*
from
'
./plugin/requireNativePlugin
'
export
*
from
'
./plugin/vuePlugin
'
export
*
from
'
./plugin/restoreGlobal
'
export
{
sendHostEvent
,
navigateToMiniProgram
,
...
...
packages/uni-app-plus/src/service/api/
plugin/restoreG
lobal.ts
→
packages/uni-app-plus/src/service/api/
internal/g
lobal.ts
浏览文件 @
23053d7f
文件已移动
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
23053d7f
...
...
@@ -9666,7 +9666,6 @@ function useMovableViewState(props2, trigger, rootRef) {
}
}
function __handleTouchMove(event) {
event.stopPropagation();
if (!_isScaling && !props2.disabled && _isTouching) {
let x = _translateX;
let y = _translateY;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录