Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
d2e80217
U
uni-app
项目概览
DCloud
/
uni-app
2 个月 前同步成功
通知
716
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d2e80217
编写于
8月 16, 2022
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into alpha
上级
6755694c
a5d4f6c5
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
163 addition
and
58 deletion
+163
-58
packages/uni-mp-alipay/lib/uni.config.js
packages/uni-mp-alipay/lib/uni.config.js
+1
-1
packages/uni-mp-baidu/lib/uni.config.js
packages/uni-mp-baidu/lib/uni.config.js
+2
-2
packages/uni-mp-kuaishou/lib/uni.config.js
packages/uni-mp-kuaishou/lib/uni.config.js
+2
-2
packages/uni-mp-toutiao/lib/uni.config.js
packages/uni-mp-toutiao/lib/uni.config.js
+1
-1
packages/vue-cli-plugin-uni/lib/configure-webpack.js
packages/vue-cli-plugin-uni/lib/configure-webpack.js
+17
-8
packages/vue-cli-plugin-uni/lib/mp/index.js
packages/vue-cli-plugin-uni/lib/mp/index.js
+9
-0
packages/webpack-uni-mp-loader/lib/babel/plugin-create-app.js
...ages/webpack-uni-mp-loader/lib/babel/plugin-create-app.js
+0
-2
packages/webpack-uni-mp-loader/lib/main-new.js
packages/webpack-uni-mp-loader/lib/main-new.js
+11
-2
packages/webpack-uni-mp-loader/lib/plugin/generate-component.js
...es/webpack-uni-mp-loader/lib/plugin/generate-component.js
+5
-1
src/core/runtime/wrapper/util.js
src/core/runtime/wrapper/util.js
+29
-0
src/core/service/plugins/page/create-page.js
src/core/service/plugins/page/create-page.js
+5
-1
src/platforms/app-plus/service/api/device/system.js
src/platforms/app-plus/service/api/device/system.js
+3
-1
src/platforms/h5/view/components/map/index.vue
src/platforms/h5/view/components/map/index.vue
+5
-0
src/platforms/h5/view/components/map/map-marker.js
src/platforms/h5/view/components/map/map-marker.js
+52
-25
src/platforms/h5/view/components/map/maps/callout.js
src/platforms/h5/view/components/map/maps/callout.js
+12
-5
src/platforms/mp-alipay/runtime/api/protocols.js
src/platforms/mp-alipay/runtime/api/protocols.js
+0
-6
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
+2
-0
src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js
src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js
+2
-0
src/platforms/mp-weixin/runtime/wrapper/page-base-parser.js
src/platforms/mp-weixin/runtime/wrapper/page-base-parser.js
+3
-1
src/platforms/mp-xhs/runtime/wrapper/page-parser.js
src/platforms/mp-xhs/runtime/wrapper/page-parser.js
+2
-0
未找到文件。
packages/uni-mp-alipay/lib/uni.config.js
浏览文件 @
d2e80217
...
...
@@ -20,7 +20,7 @@ module.exports = {
subPackages
:
true
},
copyWebpackOptions
(
platformOptions
,
vueOptions
)
{
const
copyOptions
=
[
'
mycomponents
'
,
'
customize-tab-bar
'
]
const
copyOptions
=
[
'
mycomponents
'
,
'
customize-tab-bar
'
,
'
ext.json
'
]
global
.
uniModules
.
forEach
(
module
=>
{
copyOptions
.
push
(
'
uni_modules/
'
+
module
+
'
/mycomponents
'
)
...
...
packages/uni-mp-baidu/lib/uni.config.js
浏览文件 @
d2e80217
...
...
@@ -17,10 +17,10 @@ module.exports = {
subPackages
:
true
},
copyWebpackOptions
(
platformOptions
,
vueOptions
)
{
const
copyOptions
=
[
'
swancomponents
'
]
const
copyOptions
=
[
'
swancomponents
'
,
'
ext.json
'
]
global
.
uniModules
.
forEach
(
module
=>
{
copyOptions
.
push
(
'
uni_modules/
'
+
module
+
'
/swancomponents
'
)
})
return
copyOptions
}
}
}
packages/uni-mp-kuaishou/lib/uni.config.js
浏览文件 @
d2e80217
...
...
@@ -14,10 +14,10 @@ module.exports = {
project
:
'
project.ks.json
'
},
copyWebpackOptions
(
platformOptions
,
vueOptions
)
{
const
copyOptions
=
[
'
kscomponents
'
]
const
copyOptions
=
[
'
kscomponents
'
,
'
ext.json
'
]
global
.
uniModules
.
forEach
(
module
=>
{
copyOptions
.
push
(
'
uni_modules/
'
+
module
+
'
/kscomponents
'
)
})
return
copyOptions
}
}
}
packages/uni-mp-toutiao/lib/uni.config.js
浏览文件 @
d2e80217
...
...
@@ -15,7 +15,7 @@ module.exports = {
project
:
'
project.tt.json
'
},
copyWebpackOptions
(
platformOptions
,
vueOptions
)
{
const
copyOptions
=
[
'
ttcomponents
'
]
const
copyOptions
=
[
'
ttcomponents
'
,
'
ext.json
'
]
global
.
uniModules
.
forEach
(
module
=>
{
copyOptions
.
push
(
'
uni_modules/
'
+
module
+
'
/ttcomponents
'
)
})
...
...
packages/vue-cli-plugin-uni/lib/configure-webpack.js
浏览文件 @
d2e80217
...
...
@@ -182,16 +182,25 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
for
(
let
i
=
rawRules
.
length
-
1
;
i
>=
0
;
i
--
)
{
const
uses
=
rawRules
[
i
].
use
if
(
Array
.
isArray
(
uses
))
{
if
(
uses
.
find
(
use
=>
babelLoaderRe
.
test
(
use
.
loader
)))
{
const
index
=
uses
.
findIndex
(
use
=>
cacheLoaderRe
.
test
(
use
.
loader
))
if
(
index
>=
0
)
{
const
babelLoader
=
uses
.
find
(
use
=>
babelLoaderRe
.
test
(
use
.
loader
))
if
(
babelLoader
)
{
const
options
=
api
.
genCacheConfig
(
'
babel-loader/
'
+
process
.
env
.
UNI_PLATFORM
,
getPartialIdentifier
())
if
(
webpack
.
version
[
0
]
>
4
)
{
if
(
process
.
env
.
UNI_USING_CACHE
)
{
Object
.
assign
(
uses
[
index
].
options
,
api
.
genCacheConfig
(
'
babel-loader/
'
+
process
.
env
.
UNI_PLATFORM
,
getPartialIdentifier
()
))
Object
.
assign
(
babelLoader
.
options
,
options
)
}
else
{
uses
.
splice
(
index
,
1
)
Object
.
assign
(
babelLoader
.
options
,
{
cacheDirectory
:
false
})
}
}
else
{
const
index
=
uses
.
findIndex
(
use
=>
cacheLoaderRe
.
test
(
use
.
loader
))
if
(
index
>=
0
)
{
if
(
process
.
env
.
UNI_USING_CACHE
)
{
Object
.
assign
(
uses
[
index
].
options
,
options
)
}
else
{
uses
.
splice
(
index
,
1
)
}
}
}
}
...
...
packages/vue-cli-plugin-uni/lib/mp/index.js
浏览文件 @
d2e80217
...
...
@@ -169,6 +169,10 @@ module.exports = {
webpackConfig
.
optimization
.
splitChunks
=
require
(
'
../split-chunks
'
)()
if
(
webpack
.
version
[
0
]
>
4
)
{
webpackConfig
.
optimization
.
chunkIds
=
'
named
'
}
parseEntry
()
const
statCode
=
getPlatformStat
()
...
...
@@ -330,6 +334,11 @@ ${globalEnv}.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;`
}
}
if
(
process
.
env
.
NODE_ENV
===
'
production
'
&&
webpack
.
version
[
0
]
>
4
)
{
// 暂时禁用,否则导致 provide 被压缩和裁剪
webpackConfig
.
optimization
.
usedExports
(
false
)
}
if
(
process
.
env
.
UNI_SUBPACKGE
||
process
.
env
.
UNI_MP_PLUGIN
)
{
initSubpackageConfig
(
webpackConfig
,
vueOptions
)
}
...
...
packages/webpack-uni-mp-loader/lib/babel/plugin-create-app.js
浏览文件 @
d2e80217
...
...
@@ -5,8 +5,6 @@ module.exports = function ({
visitor
:
{
MemberExpression
(
path
,
state
)
{
if
(
// main.js main.ts
state
.
filename
.
startsWith
(
require
(
'
path
'
).
join
(
process
.
env
.
UNI_INPUT_DIR
,
'
main.
'
))
&&
t
.
isIdentifier
(
path
.
node
.
property
)
&&
path
.
node
.
property
.
name
===
'
$mount
'
&&
!
path
.
node
.
$createApp
...
...
packages/webpack-uni-mp-loader/lib/main-new.js
浏览文件 @
d2e80217
...
...
@@ -96,12 +96,21 @@ createPage(Page)
components
:
[]
})
cons
t
babelLoader
=
findBabelLoader
(
this
.
loaders
)
le
t
babelLoader
=
findBabelLoader
(
this
.
loaders
)
if
(
!
babelLoader
)
{
throw
new
Error
(
uniI18n
.
__
(
'
mpLoader.findFail
'
,
{
0
:
'
babel-loader
'
}))
}
else
{
const
webpack
=
require
(
'
webpack
'
)
if
(
webpack
.
version
[
0
]
>
4
)
{
// clone babelLoader and options
const
index
=
this
.
loaders
.
indexOf
(
babelLoader
)
const
newBabelLoader
=
Object
.
assign
({},
babelLoader
)
Object
.
assign
(
newBabelLoader
,
{
options
:
Object
.
assign
({},
babelLoader
.
options
)
})
this
.
loaders
.
splice
(
index
,
1
,
newBabelLoader
)
babelLoader
=
newBabelLoader
}
addCreateApp
(
babelLoader
)
}
...
...
@@ -147,4 +156,4 @@ createPage(Page)
callback
(
err
,
content
,
map
)
})
}
}
}
packages/webpack-uni-mp-loader/lib/plugin/generate-component.js
浏览文件 @
d2e80217
...
...
@@ -70,7 +70,11 @@ module.exports = function generateComponent (compilation, jsonpFunction = 'webpa
const
modules
=
compilation
.
modules
const
concatenatedModules
=
modules
.
filter
(
module
=>
module
.
modules
)
const
uniModuleId
=
modules
.
find
(
module
=>
module
.
resource
&&
normalizePath
(
module
.
resource
)
===
uniPath
).
id
let
uniModule
=
modules
.
find
(
module
=>
module
.
resource
&&
normalizePath
(
module
.
resource
)
===
uniPath
)
if
(
!
uniModule
&&
webpack
.
version
[
0
]
>
4
)
{
uniModule
=
modules
.
find
(
module
=>
module
.
rootModule
&&
module
.
rootModule
.
resource
&&
normalizePath
(
module
.
rootModule
.
resource
)
===
uniPath
)
}
const
uniModuleId
=
uniModule
.
id
const
styleImports
=
{}
const
fixSlots
=
{}
const
vueOuterComponentSting
=
'
vueOuterComponents
'
...
...
src/core/runtime/wrapper/util.js
浏览文件 @
d2e80217
...
...
@@ -69,6 +69,35 @@ export function initHooks (mpOptions, hooks, vueOptions) {
})
}
export
function
initUnknownHooks
(
mpOptions
,
vueOptions
,
excludes
=
[])
{
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook
(
mpOptions
,
hook
,
excludes
))
}
function
findHooks
(
vueOptions
,
hooks
=
[])
{
if
(
vueOptions
)
{
Object
.
keys
(
vueOptions
).
forEach
((
name
)
=>
{
if
(
name
.
indexOf
(
'
on
'
)
===
0
&&
isFn
(
vueOptions
[
name
]))
{
hooks
.
push
(
name
)
}
})
}
return
hooks
}
function
initHook
(
mpOptions
,
hook
,
excludes
)
{
if
(
excludes
.
indexOf
(
hook
)
===
-
1
&&
!
hasOwn
(
mpOptions
,
hook
))
{
mpOptions
[
hook
]
=
function
(
args
)
{
if
(
(
__PLATFORM__
===
'
mp-toutiao
'
||
__PLATFORM__
===
'
mp-lark
'
)
&&
hook
===
'
onError
'
)
{
return
getApp
().
$vm
.
$callHook
(
hook
,
args
)
}
return
this
.
$vm
&&
this
.
$vm
.
__call_hook
(
hook
,
args
)
}
}
}
export
function
initVueComponent
(
Vue
,
vueOptions
)
{
vueOptions
=
vueOptions
.
default
||
vueOptions
let
VueComponent
...
...
src/core/service/plugins/page/create-page.js
浏览文件 @
d2e80217
...
...
@@ -12,11 +12,15 @@ export default function createPage (pageVm, options) {
}
const
id
=
hasOwn
(
$route
.
params
,
'
__id__
'
)
?
$route
.
params
.
__id__
:
$route
.
meta
.
id
let
fullPath
=
$route
.
fullPath
if
(
$route
.
meta
.
isEntry
&&
fullPath
.
indexOf
(
$route
.
meta
.
pagePath
)
===
-
1
)
{
fullPath
=
'
/
'
+
$route
.
meta
.
pagePath
+
fullPath
.
replace
(
'
/
'
,
''
)
}
pageVm
.
__page__
=
{
id
,
path
:
$route
.
path
,
route
:
$route
.
meta
.
pagePath
,
fullPath
:
$route
.
meta
.
isEntry
?
$route
.
meta
.
pagePath
:
$route
.
fullPath
,
fullPath
,
options
:
options
,
meta
:
Object
.
assign
({},
$route
.
meta
)
}
...
...
src/platforms/app-plus/service/api/device/system.js
浏览文件 @
d2e80217
...
...
@@ -46,7 +46,8 @@ export function getAppBaseInfo () {
const
{
hostPackageName
,
hostName
,
osLanguage
,
hostVersion
,
hostLanguage
,
hostTheme
,
appId
,
appName
,
appVersion
,
appVersionCode
appId
,
appName
,
appVersion
,
appVersionCode
,
appWgtVersion
}
=
systemInfo
const
appLanguage
=
uni
...
...
@@ -60,6 +61,7 @@ export function getAppBaseInfo () {
appName
,
appVersion
,
appVersionCode
,
appWgtVersion
,
appLanguage
,
enableDebug
:
false
,
hostSDKVersion
:
undefined
,
...
...
src/platforms/h5/view/components/map/index.vue
浏览文件 @
d2e80217
...
...
@@ -229,6 +229,10 @@ export default {
methods
:
{
handleAMapClick
(
e
)
{
if
(
IS_AMAP
)
{
// The mobile terminal prevent not map click event trigger map click
if
(
e
.
target
.
nodeName
!==
'
CANVAS
'
)
{
return
}
const
{
pageX
,
pageY
}
=
e
.
changedTouches
[
0
]
this
.
$trigger
(
'
click
'
,
{
x
:
pageX
,
y
:
pageY
},
{})
this
.
$trigger
(
'
tap
'
,
{
x
:
pageX
,
y
:
pageY
},
{})
...
...
@@ -611,6 +615,7 @@ export default {
style
.
height
=
0
style
.
top
=
0
style
.
left
=
0
style
.
zIndex
=
999
img
.
onload
=
()
=>
{
if
(
option
.
position
.
width
)
{
img
.
width
=
option
.
position
.
width
...
...
src/platforms/h5/view/components/map/map-marker.js
浏览文件 @
d2e80217
...
...
@@ -96,17 +96,18 @@ export default {
})
this
.
$parent
.
_markers
[
this
.
idString
]
=
marker
this
.
updateMarker
(
props
)
maps
.
event
.
addListener
(
marker
,
'
click
'
,
(
e
)
=>
{
const
callout
=
marker
.
callout
if
(
callout
&&
!
callout
.
alwaysVisible
)
{
if
(
IS_AMAP
)
{
callout
.
visible
=
!
callout
.
visible
if
(
callout
.
visible
)
{
marker
.
callout
.
createAMapText
()
}
else
{
marker
.
callout
.
removeAMapText
()
}
}
else
{
if
(
IS_AMAP
)
{
// 不通过 addListener 方式绑定事件,为了规避高德地图覆盖物点击触发map点击问题
marker
.
dom
.
addEventListener
(
'
click
'
,
e
=>
{
this
.
handleAMapMarkerClick
(
e
,
marker
)
})
marker
.
dom
.
addEventListener
(
'
touchend
'
,
e
=>
{
this
.
handleAMapMarkerClick
(
e
,
marker
)
})
}
else
{
maps
.
event
.
addListener
(
marker
,
'
click
'
,
(
e
)
=>
{
const
callout
=
marker
.
callout
if
(
callout
&&
!
callout
.
alwaysVisible
)
{
callout
.
set
(
'
visible
'
,
!
callout
.
visible
)
if
(
callout
.
visible
)
{
const
div
=
callout
.
div
...
...
@@ -115,19 +116,26 @@ export default {
parent
.
appendChild
(
div
)
}
}
}
if
(
this
.
idString
)
{
const
{
latitude
,
longitude
}
=
this
.
getMarkerLatitudeLongitude
(
e
)
this
.
$parent
.
$trigger
(
'
markertap
'
,
{},
{
markerId
:
Number
(
this
.
idString
),
latitude
,
longitude
})
}
const
event
=
e
.
event
||
e
.
domEvent
||
e
.
originEvent
event
.
stopPropagation
()
})
const
event
=
e
.
event
||
e
.
domEvent
if
(
this
.
idString
)
{
const
{
latitude
,
longitude
}
=
this
.
getMarkerLatitudeLongitude
(
e
)
this
.
$parent
.
$trigger
(
'
markertap
'
,
event
,
{
markerId
:
Number
(
this
.
idString
),
latitude
,
longitude
})
}
event
.
stopPropagation
()
})
// 处理 google H5移动端 maker 点击触发 map 点击问题
maps
.
event
.
addListener
(
marker
,
'
mousedown
'
,
(
e
)
=>
{
if
(
e
.
domEvent
)
{
e
.
domEvent
.
stopPropagation
()
}
})
}
},
updateMarker
(
option
)
{
const
map
=
this
.
_map
...
...
@@ -274,9 +282,9 @@ export default {
callout
.
setOption
(
calloutStyle
)
}
else
{
if
(
IS_AMAP
)
{
const
callback
=
(
self
)
=>
{
const
callback
=
(
$event
,
self
)
=>
{
if
(
self
.
idString
)
{
self
.
$parent
.
$trigger
(
'
callouttap
'
,
{}
,
{
self
.
$parent
.
$trigger
(
'
callouttap
'
,
$event
,
{
markerId
:
Number
(
self
.
idString
)
})
}
...
...
@@ -308,6 +316,25 @@ export default {
console
.
error
(
'
Marker.iconPath is required.
'
)
}
},
handleAMapMarkerClick
(
e
,
marker
)
{
const
callout
=
marker
.
callout
if
(
callout
&&
!
callout
.
alwaysVisible
)
{
callout
.
visible
=
!
callout
.
visible
if
(
callout
.
visible
)
{
marker
.
callout
.
createAMapText
()
}
else
{
marker
.
callout
.
removeAMapText
()
}
}
if
(
this
.
idString
)
{
this
.
$parent
.
$trigger
(
'
markertap
'
,
e
,
{
markerId
:
Number
(
this
.
idString
),
latitude
:
marker
.
_position
.
lat
,
longitude
:
marker
.
_position
.
lng
})
}
e
.
stopPropagation
()
},
updateMarkerLabelStyle
(
id
,
style
)
{
const
className
=
'
uni-map-marker-label-
'
+
id
let
styleEl
=
document
.
getElementById
(
className
)
...
...
src/platforms/h5/view/components/map/maps/callout.js
浏览文件 @
d2e80217
...
...
@@ -18,9 +18,8 @@ export function createCallout (maps) {
this
.
Text
=
new
maps
.
Text
({
text
:
option
.
content
,
anchor
:
'
bottom-center
'
,
// 设置文本标记锚点
offset
:
new
maps
.
Pixel
(
0
,
option
.
offsetY
),
offset
:
new
maps
.
Pixel
(
0
,
option
.
offsetY
-
16
),
style
:
{
'
margin-bottom
'
:
'
1rem
'
,
padding
:
(
option
.
padding
||
8
)
+
'
px
'
,
'
line-height
'
:
(
option
.
fontSize
||
14
)
+
'
px
'
,
'
border-radius
'
:
(
option
.
borderRadius
||
0
)
+
'
px
'
,
...
...
@@ -33,14 +32,22 @@ export function createCallout (maps) {
},
position
:
option
.
position
})
maps
.
event
.
addListener
(
this
.
Text
,
'
click
'
,
()
=>
{
this
.
callback
(
this
.
parent
)
// 不通过 addListener 方式绑定事件,为了规避高德地图覆盖物点击触发map点击问题
this
.
Text
.
dom
.
addEventListener
(
'
click
'
,
e
=>
{
handleAMapTextClick
(
this
,
e
)
})
this
.
Text
.
dom
.
addEventListener
(
'
touchend
'
,
e
=>
{
handleAMapTextClick
(
this
,
e
)
})
this
.
Text
.
setMap
(
option
.
map
)
}
function
handleAMapTextClick
(
self
,
e
)
{
self
.
callback
(
e
,
self
.
parent
)
e
.
stopPropagation
()
}
function
removeAMapText
()
{
if
(
this
.
Text
)
{
this
.
option
.
map
.
remove
(
this
.
Text
)
...
...
src/platforms/mp-alipay/runtime/api/protocols.js
浏览文件 @
d2e80217
...
...
@@ -466,12 +466,6 @@ const protocols = { // 需要做转换的 API 列表
hideHomeButton
:
{
name
:
'
hideBackHome
'
},
saveImageToPhotosAlbum
:
{
name
:
'
saveImage
'
,
args
:
{
filePath
:
'
url
'
}
},
saveVideoToPhotosAlbum
:
{
args
:
{
filePath
:
'
src
'
...
...
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
浏览文件 @
d2e80217
...
...
@@ -7,6 +7,7 @@ import {
import
{
initData
,
initHooks
,
initUnknownHooks
,
handleEvent
,
initBehaviors
,
initVueComponent
,
...
...
@@ -93,6 +94,7 @@ export default function parsePage (vuePageOptions) {
}
initHooks
(
pageOptions
,
hooks
,
vuePageOptions
)
initUnknownHooks
(
pageOptions
,
vuePageOptions
)
if
(
Array
.
isArray
(
vueOptions
.
wxsCallMethods
))
{
vueOptions
.
wxsCallMethods
.
forEach
(
callMethod
=>
{
...
...
src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js
浏览文件 @
d2e80217
...
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
{
initHooks
,
initUnknownHooks
,
initMocks
}
from
'
uni-wrapper/util
'
...
...
@@ -190,6 +191,7 @@ export default function parseBaseApp (vm, {
initAppLocale
(
Vue
,
vm
,
normalizeLocale
(
__GLOBAL__
.
getSystemInfoSync
().
language
)
||
LOCALE_EN
)
initHooks
(
appOptions
,
hooks
)
initUnknownHooks
(
appOptions
,
vm
.
$options
)
return
appOptions
}
src/platforms/mp-weixin/runtime/wrapper/page-base-parser.js
浏览文件 @
d2e80217
...
...
@@ -4,6 +4,7 @@ import {
import
{
initHooks
,
initUnknownHooks
,
PAGE_EVENT_HOOKS
}
from
'
uni-wrapper/util
'
...
...
@@ -27,6 +28,7 @@ export default function parseBasePage (vuePageOptions, {
})
initHooks
(
pageOptions
.
methods
,
hooks
,
vuePageOptions
)
initUnknownHooks
(
pageOptions
.
methods
,
vuePageOptions
)
pageOptions
.
methods
.
onLoad
=
function
(
query
)
{
this
.
options
=
query
...
...
@@ -40,4 +42,4 @@ export default function parseBasePage (vuePageOptions, {
}
return
pageOptions
}
}
src/platforms/mp-xhs/runtime/wrapper/page-parser.js
浏览文件 @
d2e80217
...
...
@@ -7,6 +7,7 @@ import {
import
{
initData
,
initHooks
,
initUnknownHooks
,
handleEvent
,
initBehaviors
,
initVueComponent
,
...
...
@@ -80,6 +81,7 @@ export default function parsePage (vuePageOptions) {
}
initHooks
(
pageOptions
,
hooks
,
vuePageOptions
)
initUnknownHooks
(
pageOptions
,
vuePageOptions
)
if
(
Array
.
isArray
(
vueOptions
.
wxsCallMethods
))
{
vueOptions
.
wxsCallMethods
.
forEach
(
callMethod
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录