Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小浣熊撸代码
uni-app
提交
966e08fb
U
uni-app
项目概览
小浣熊撸代码
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
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,发现更多精彩内容 >>
提交
966e08fb
编写于
8月 25, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(mp): onAppLaunch
上级
e0a90007
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
305 addition
and
141 deletion
+305
-141
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+74
-60
packages/uni-mp-alipay/dist/uni.mp.esm.js
packages/uni-mp-alipay/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+32
-18
packages/uni-mp-baidu/dist/uni.mp.esm.js
packages/uni-mp-baidu/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-kuaishou/dist/uni.api.esm.js
packages/uni-mp-kuaishou/dist/uni.api.esm.js
+22
-8
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+22
-8
packages/uni-mp-qq/dist/uni.mp.esm.js
packages/uni-mp-qq/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+33
-19
packages/uni-mp-toutiao/dist/uni.mp.esm.js
packages/uni-mp-toutiao/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+21
-7
packages/uni-mp-weixin/dist/uni.mp.esm.js
packages/uni-mp-weixin/dist/uni.mp.esm.js
+11
-2
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+22
-8
packages/uni-quickapp-webview/dist/uni.mp.esm.js
packages/uni-quickapp-webview/dist/uni.mp.esm.js
+10
-0
packages/vue-cli-plugin-uni/lib/configure-webpack.js
packages/vue-cli-plugin-uni/lib/configure-webpack.js
+3
-1
未找到文件。
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
my
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
my
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
my
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
@@ -882,14 +896,14 @@ function createIntersectionObserver(component, options) {
}
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
,
setStorageSync
:
setStorageSync
,
getStorageSync
:
getStorageSync
,
removeStorageSync
:
removeStorageSync
,
startGyroscope
:
startGyroscope
,
createSelectorQuery
:
createSelectorQuery
,
createIntersectionObserver
:
createIntersectionObserver
__proto__
:
null
,
getProvider
:
getProvider
,
setStorageSync
:
setStorageSync
,
getStorageSync
:
getStorageSync
,
removeStorageSync
:
removeStorageSync
,
startGyroscope
:
startGyroscope
,
createSelectorQuery
:
createSelectorQuery
,
createIntersectionObserver
:
createIntersectionObserver
});
function
handleNetworkInfo
(
fromRes
,
toRes
)
{
...
...
@@ -1315,58 +1329,58 @@ const chooseAddress = {
};
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
returnValue
:
returnValue
,
request
:
request
,
setNavigationBarColor
:
setNavigationBarColor
,
setNavigationBarTitle
:
setNavigationBarTitle
,
showModal
:
showModal
,
showToast
:
showToast
,
showActionSheet
:
showActionSheet
,
showLoading
:
showLoading
,
uploadFile
:
uploadFile
,
downloadFile
:
downloadFile
,
getFileInfo
:
getFileInfo
,
compressImage
:
compressImage
,
chooseVideo
:
chooseVideo
,
connectSocket
:
connectSocket
,
chooseImage
:
chooseImage
,
previewImage
:
previewImage
,
saveFile
:
saveFile
,
getSavedFileInfo
:
getSavedFileInfo
,
getSavedFileList
:
getSavedFileList
,
removeSavedFile
:
removeSavedFile
,
getLocation
:
getLocation
,
openLocation
:
openLocation
,
getNetworkType
:
getNetworkType
,
onNetworkStatusChange
:
onNetworkStatusChange
,
stopAccelerometer
:
stopAccelerometer
,
stopCompass
:
stopCompass
,
scanCode
:
scanCode
,
setClipboardData
:
setClipboardData
,
getClipboardData
:
getClipboardData
,
pageScrollTo
:
pageScrollTo
,
login
:
login
,
getUserInfo
:
getUserInfo
,
requestPayment
:
requestPayment
,
getBLEDeviceServices
:
getBLEDeviceServices
,
createBLEConnection
:
createBLEConnection
,
closeBLEConnection
:
closeBLEConnection
,
onBLEConnectionStateChange
:
onBLEConnectionStateChange
,
makePhoneCall
:
makePhoneCall
,
stopGyroscope
:
stopGyroscope
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
,
canvasToTempFilePath
:
canvasToTempFilePath
,
setScreenBrightness
:
setScreenBrightness
,
getScreenBrightness
:
getScreenBrightness
,
showShareMenu
:
showShareMenu
,
hideHomeButton
:
hideHomeButton
,
saveImageToPhotosAlbum
:
saveImageToPhotosAlbum
,
saveVideoToPhotosAlbum
:
saveVideoToPhotosAlbum
,
chooseAddress
:
chooseAddress
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
__proto__
:
null
,
returnValue
:
returnValue
,
request
:
request
,
setNavigationBarColor
:
setNavigationBarColor
,
setNavigationBarTitle
:
setNavigationBarTitle
,
showModal
:
showModal
,
showToast
:
showToast
,
showActionSheet
:
showActionSheet
,
showLoading
:
showLoading
,
uploadFile
:
uploadFile
,
downloadFile
:
downloadFile
,
getFileInfo
:
getFileInfo
,
compressImage
:
compressImage
,
chooseVideo
:
chooseVideo
,
connectSocket
:
connectSocket
,
chooseImage
:
chooseImage
,
previewImage
:
previewImage
,
saveFile
:
saveFile
,
getSavedFileInfo
:
getSavedFileInfo
,
getSavedFileList
:
getSavedFileList
,
removeSavedFile
:
removeSavedFile
,
getLocation
:
getLocation
,
openLocation
:
openLocation
,
getNetworkType
:
getNetworkType
,
onNetworkStatusChange
:
onNetworkStatusChange
,
stopAccelerometer
:
stopAccelerometer
,
stopCompass
:
stopCompass
,
scanCode
:
scanCode
,
setClipboardData
:
setClipboardData
,
getClipboardData
:
getClipboardData
,
pageScrollTo
:
pageScrollTo
,
login
:
login
,
getUserInfo
:
getUserInfo
,
requestPayment
:
requestPayment
,
getBLEDeviceServices
:
getBLEDeviceServices
,
createBLEConnection
:
createBLEConnection
,
closeBLEConnection
:
closeBLEConnection
,
onBLEConnectionStateChange
:
onBLEConnectionStateChange
,
makePhoneCall
:
makePhoneCall
,
stopGyroscope
:
stopGyroscope
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
,
canvasToTempFilePath
:
canvasToTempFilePath
,
setScreenBrightness
:
setScreenBrightness
,
getScreenBrightness
:
getScreenBrightness
,
showShareMenu
:
showShareMenu
,
hideHomeButton
:
hideHomeButton
,
saveImageToPhotosAlbum
:
saveImageToPhotosAlbum
,
saveVideoToPhotosAlbum
:
saveVideoToPhotosAlbum
,
chooseAddress
:
chooseAddress
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-alipay/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
isArray
,
extend
,
hyphenate
,
isObject
,
hasOwn
,
toNumber
,
capitalize
,
isFunction
,
NOOP
,
EMPTY_OBJ
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -476,7 +476,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -542,6 +542,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook
(
mpOptions
,
hook
,
excludes
));
}
my
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
my
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -566,7 +573,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
swan
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
swan
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
swan
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
@@ -847,9 +861,9 @@ function requestPayment(params) {
}
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
,
requestPayment
:
requestPayment
__proto__
:
null
,
getProvider
:
getProvider
,
requestPayment
:
requestPayment
});
function
createTodoMethod
(
contextName
,
methodName
)
{
...
...
@@ -922,21 +936,21 @@ const getAccountInfoSync = {
};
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
request
:
request
,
connectSocket
:
connectSocket
,
getRecorderManager
:
getRecorderManager
,
getBackgroundAudioManager
:
getBackgroundAudioManager
,
scanCode
:
scanCode
,
navigateToMiniProgram
:
navigateToMiniProgram
,
navigateBackMiniProgram
:
navigateBackMiniProgram
,
showShareMenu
:
showShareMenu
,
getAccountInfoSync
:
getAccountInfoSync
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
__proto__
:
null
,
request
:
request
,
connectSocket
:
connectSocket
,
getRecorderManager
:
getRecorderManager
,
getBackgroundAudioManager
:
getBackgroundAudioManager
,
scanCode
:
scanCode
,
navigateToMiniProgram
:
navigateToMiniProgram
,
navigateBackMiniProgram
:
navigateBackMiniProgram
,
showShareMenu
:
showShareMenu
,
getAccountInfoSync
:
getAccountInfoSync
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-baidu/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -567,6 +567,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
swan
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
swan
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -591,7 +598,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-kuaishou/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
ks
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
ks
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
ks
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
@@ -827,17 +841,17 @@ const getProvider = initGetProvider({
});
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
__proto__
:
null
,
getProvider
:
getProvider
});
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
__proto__
:
null
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -567,6 +567,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
ks
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
ks
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -591,7 +598,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
qq
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
qq
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
qq
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
@@ -827,17 +841,17 @@ const getProvider = initGetProvider({
});
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
__proto__
:
null
,
getProvider
:
getProvider
});
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
__proto__
:
null
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-qq/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -567,6 +567,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
qq
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
qq
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -591,7 +598,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
tt
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
tt
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
tt
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
@@ -809,8 +823,8 @@ const getProvider = initGetProvider({
});
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
__proto__
:
null
,
getProvider
:
getProvider
});
const
chooseImage
=
{
...
...
@@ -886,23 +900,23 @@ const getFileInfo = {
};
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
chooseImage
:
chooseImage
,
connectSocket
:
connectSocket
,
chooseVideo
:
chooseVideo
,
scanCode
:
scanCode
,
startAccelerometer
:
startAccelerometer
,
showToast
:
showToast
,
showLoading
:
showLoading
,
showModal
:
showModal
,
showActionSheet
:
showActionSheet
,
login
:
login
,
getUserInfo
:
getUserInfo
,
requestPayment
:
requestPayment
,
getFileInfo
:
getFileInfo
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
__proto__
:
null
,
chooseImage
:
chooseImage
,
connectSocket
:
connectSocket
,
chooseVideo
:
chooseVideo
,
scanCode
:
scanCode
,
startAccelerometer
:
startAccelerometer
,
showToast
:
showToast
,
showLoading
:
showLoading
,
showModal
:
showModal
,
showActionSheet
:
showActionSheet
,
login
:
login
,
getUserInfo
:
getUserInfo
,
requestPayment
:
requestPayment
,
getFileInfo
:
getFileInfo
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-toutiao/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -570,6 +570,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
tt
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
tt
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -594,7 +601,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
wx
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
wx
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
...
...
@@ -686,6 +699,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
@@ -791,16 +805,16 @@ const getProvider = initGetProvider({
});
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
__proto__
:
null
,
getProvider
:
getProvider
});
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
redirectTo
:
redirectTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
__proto__
:
null
,
redirectTo
:
redirectTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-weixin/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -447,7 +447,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -513,6 +513,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
wx
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
wx
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -537,7 +544,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
qa
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
qa
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
qa
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
@@ -834,17 +848,17 @@ if (qa.canIUse('getVendorPaymentProvider')) {
const
getProvider
=
initGetProvider
(
providers
);
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
__proto__
:
null
,
getProvider
:
getProvider
});
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
__proto__
:
null
,
redirectTo
:
redirectTo
,
navigateTo
:
navigateTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-quickapp-webview/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -497,6 +498,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
qa
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
qa
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -521,7 +529,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/vue-cli-plugin-uni/lib/configure-webpack.js
浏览文件 @
966e08fb
...
...
@@ -307,7 +307,9 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
.
UNI_INPUT_DIR
),
// css中的'@/static/logo.png'会被转换成'./@/static/logo.png'加载
vue
$
:
getPlatformVue
(
vueOptions
),
'
uni-pages
'
:
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
pages.json
'
),
'
@dcloudio/uni-stat
'
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
@dcloudio/uni-stat
'
:
process
.
env
.
UNI_USING_VUE3
?
require
.
resolve
(
'
@dcloudio/vue-cli-plugin-uni/packages/uni-stat
'
)
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
uni-stat-config
'
:
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
pages.json
'
)
+
'
?
'
+
JSON
.
stringify
({
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录