Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tomleePHP
uni-app
提交
c3d71c95
U
uni-app
项目概览
tomleePHP
/
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,发现更多精彩内容 >>
提交
c3d71c95
编写于
7月 29, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(Tree Shaking)
上级
87cb11e3
变更
20
展开全部
隐藏空白更改
内联
并排
Showing
20 changed file
with
868 addition
and
55 deletion
+868
-55
build/manifest.js
build/manifest.js
+15
-5
build/rollup.config.app.js
build/rollup.config.app.js
+11
-7
build/webpack.config.js
build/webpack.config.js
+8
-1
build/webpack.config.test.js
build/webpack.config.test.js
+9
-1
packages/uni-app-plus-nvue/dist/index.js
packages/uni-app-plus-nvue/dist/index.js
+12
-5
packages/uni-h5/dist/index.umd.min.js
packages/uni-h5/dist/index.umd.min.js
+1
-1
packages/uni-h5/manifest.json
packages/uni-h5/manifest.json
+753
-0
src/core/helpers/api.js
src/core/helpers/api.js
+1
-1
src/core/service/platform-api.js
src/core/service/platform-api.js
+4
-0
src/core/service/uni.js
src/core/service/uni.js
+1
-4
src/core/view/bridge/subscribe/api/index.js
src/core/view/bridge/subscribe/api/index.js
+14
-0
src/core/view/bridge/subscribe/api/request-component-info.js
src/core/view/bridge/subscribe/api/request-component-info.js
+1
-1
src/core/view/bridge/subscribe/api/request-component-observer.js
...e/view/bridge/subscribe/api/request-component-observer.js
+0
-0
src/core/view/bridge/subscribe/index.js
src/core/view/bridge/subscribe/index.js
+7
-13
src/platforms/h5/components/app/components.js
src/platforms/h5/components/app/components.js
+2
-8
src/platforms/h5/components/app/index.vue
src/platforms/h5/components/app/index.vue
+1
-1
src/platforms/h5/components/app/popup/index.js
src/platforms/h5/components/app/popup/index.js
+11
-0
src/platforms/h5/components/index.js
src/platforms/h5/components/index.js
+7
-6
src/platforms/h5/components/system-routes/index.js
src/platforms/h5/components/system-routes/index.js
+9
-0
src/platforms/h5/service/index.js
src/platforms/h5/service/index.js
+1
-1
未找到文件。
build/manifest.js
浏览文件 @
c3d71c95
...
...
@@ -44,6 +44,16 @@ const DEPS = {
'
showActionSheet
'
:
[
[
'
/platforms/h5/components/app/popup/actionSheet.vue
'
,
'
Modal
'
],
[
'
/platforms/h5/components/app/popup/mixins/action-sheet.js
'
,
'
ActionSheetMixin
'
]
],
'
createSelectorQuery
'
:
[
[
'
/core/view/bridge/subscribe/api/request-component-info.js
'
,
'
requestComponentInfo
'
]
],
'
createIntersectionObserver
'
:
[
[
'
/core/view/bridge/subscribe/api/request-component-observer.js
'
,
'
requestComponentObserver
'
,
'
destroyComponentObserver
'
]
]
}
...
...
@@ -55,7 +65,7 @@ Object.keys(DEPS).reduce(function (depFiles, name) {
return
depFiles
},
new
Set
()).
forEach
(
file
=>
{
if
(
!
fs
.
existsSync
(
path
.
join
(
__dirname
,
'
../src
'
,
file
)))
{
console
.
warn
(
file
+
'
不存在
'
)
console
.
error
(
file
+
'
不存在
'
)
process
.
exit
(
0
)
}
})
...
...
@@ -69,7 +79,7 @@ function parseApiManifestDeps (manifest, protocol) {
if
(
manifest
[
dep
[
1
]])
{
dep
[
0
]
=
manifest
[
dep
[
1
]][
0
]
}
else
{
console
.
warn
(
`依赖模块[
${
dep
[
1
]}
]不存在`
)
console
.
error
(
`依赖模块[
${
dep
[
1
]}
]不存在`
)
}
})
}
...
...
@@ -88,7 +98,7 @@ function parseApiManifestDeps (manifest, protocol) {
if
(
manifest
[
name
])
{
manifest
[
name
][
1
].
push
(...
DEPS
[
name
])
}
else
{
console
.
warn
(
`缺少
${
name
}
`
)
console
.
error
(
`缺少
${
name
}
`
)
}
})
// 设置自动加载标记
...
...
@@ -96,7 +106,7 @@ function parseApiManifestDeps (manifest, protocol) {
if
(
manifest
[
name
])
{
manifest
[
name
][
2
]
=
true
}
else
{
console
.
warn
(
`缺少
${
name
}
`
)
console
.
error
(
`缺少
${
name
}
`
)
}
})
}
...
...
@@ -117,7 +127,7 @@ module.exports = {
if
(
todoApis
.
length
)
{
console
.
log
(
'
\n
'
)
console
.
warn
(
`
${
process
.
env
.
UNI_PLATFORM
}
平台缺少以下 API 实现`
)
console
.
warn
(
`
${
process
.
env
.
UNI_PLATFORM
}
平台缺少以下 API 实现
(共
${
todoApis
.
length
}
个)
`
)
todoApis
.
forEach
(
name
=>
{
console
.
warn
(
name
)
})
...
...
build/rollup.config.app.js
浏览文件 @
c3d71c95
const
path
=
require
(
'
path
'
)
const
alias
=
require
(
'
rollup-plugin-alias
'
)
const
replace
=
require
(
'
rollup-plugin-replace
'
)
const
r
esolve
=
require
(
'
rollup-plugin-node-resolve
'
)
const
nodeR
esolve
=
require
(
'
rollup-plugin-node-resolve
'
)
const
commonjs
=
require
(
'
rollup-plugin-commonjs
'
)
const
requireContext
=
require
(
'
../lib/rollup-plugin-require-context
'
)
...
...
@@ -40,19 +40,23 @@ return serviceContext \n}
`
}
const
resolve
=
dir
=>
path
.
resolve
(
__dirname
,
'
../
'
,
dir
)
module
.
exports
=
{
input
,
output
,
plugins
:
[
r
esolve
(),
nodeR
esolve
(),
commonjs
(),
requireContext
(),
alias
({
'
uni-core
'
:
path
.
resolve
(
__dirname
,
'
../src/core
'
),
'
uni-platform
'
:
path
.
resolve
(
__dirname
,
'
../src/platforms/
'
+
process
.
env
.
UNI_PLATFORM
),
'
uni-platforms
'
:
path
.
resolve
(
__dirname
,
'
../src/platforms
'
),
'
uni-shared
'
:
path
.
resolve
(
__dirname
,
'
../src/shared/index.js
'
),
'
uni-helpers
'
:
path
.
resolve
(
__dirname
,
'
../src/core/helpers
'
)
'
uni-core
'
:
resolve
(
'
src/core
'
),
'
uni-platform
'
:
resolve
(
'
src/platforms/
'
+
process
.
env
.
UNI_PLATFORM
),
'
uni-platforms
'
:
resolve
(
'
src/platforms
'
),
'
uni-shared
'
:
resolve
(
'
src/shared/index.js
'
),
'
uni-helpers
'
:
resolve
(
'
src/core/helpers
'
),
'
uni-service-api
'
:
resolve
(
'
src/core/service/platform-api
'
),
'
uni-api-protocol
'
:
resolve
(
'
src/core/helpers/protocol
'
)
}),
replace
({
__GLOBAL__
:
'
getGlobalUni()
'
,
...
...
build/webpack.config.js
浏览文件 @
c3d71c95
...
...
@@ -29,8 +29,15 @@ module.exports = {
'
uni-mixins
'
:
resolve
(
'
src/core/view/mixins
'
),
'
uni-helpers
'
:
resolve
(
'
src/core/helpers
'
),
'
uni-platform
'
:
resolve
(
'
src/platforms/
'
+
process
.
env
.
UNI_PLATFORM
),
// tree shaking
'
uni-components
'
:
resolve
(
'
src/core/view/components
'
),
'
uni-service-api
'
:
resolve
(
'
src/core/service/uni
'
)
'
uni-service-api
'
:
resolve
(
'
src/core/service/platform-api
'
),
'
uni-api-protocol
'
:
resolve
(
'
src/core/helpers/protocol
'
),
'
uni-api-subscribe
'
:
resolve
(
'
src/core/view/bridge/subscribe/api/index
'
),
// h5 components
'
uni-h5-app-components
'
:
resolve
(
'
src/platforms/h5/components/app/popup/index
'
),
'
uni-h5-app-mixins
'
:
resolve
(
'
src/platforms/h5/components/app/popup/mixins/index
'
),
'
uni-h5-system-routes
'
:
resolve
(
'
src/platforms/h5/components/system-routes/index
'
)
}
},
module
:
{
...
...
build/webpack.config.test.js
浏览文件 @
c3d71c95
...
...
@@ -23,7 +23,15 @@ config.resolve.alias = {
'
uni-mixins
'
:
resolve
(
'
src/core/view/mixins
'
),
'
uni-helpers
'
:
resolve
(
'
src/core/helpers
'
),
'
uni-platform
'
:
resolve
(
'
src/platforms/
'
+
process
.
env
.
UNI_PLATFORM
),
'
uni-components
'
:
resolve
(
'
src/core/view/components
'
)
// tree shaking
'
uni-components
'
:
resolve
(
'
src/core/view/components
'
),
'
uni-service-api
'
:
resolve
(
'
src/core/service/platform-api
'
),
'
uni-api-protocol
'
:
resolve
(
'
src/core/helpers/protocol
'
),
'
uni-api-subscribe
'
:
resolve
(
'
src/core/view/bridge/subscribe/api/index
'
),
// h5 components
'
uni-h5-app-components
'
:
resolve
(
'
src/platforms/h5/components/app/popup/index
'
),
'
uni-h5-app-mixins
'
:
resolve
(
'
src/platforms/h5/components/app/popup/mixins/index
'
),
'
uni-h5-system-routes
'
:
resolve
(
'
src/platforms/h5/components/system-routes/index
'
)
}
const
isEslintLoader
=
config
.
module
.
rules
[
config
.
module
.
rules
.
length
-
1
].
enforce
...
...
packages/uni-app-plus-nvue/dist/index.js
浏览文件 @
c3d71c95
...
...
@@ -1369,7 +1369,9 @@ var serviceContext = (function () {
const
base
=
[
'
base64ToArrayBuffer
'
,
'
arrayBufferToBase64
'
'
arrayBufferToBase64
'
,
'
addInterceptor
'
,
'
removeInterceptor
'
];
const
network
=
[
...
...
@@ -3630,8 +3632,13 @@ var serviceContext = (function () {
var
base64Arraybuffer_1
=
base64Arraybuffer
.
encode
;
var
base64Arraybuffer_2
=
base64Arraybuffer
.
decode
;
const
base64ToArrayBuffer$1
=
base64Arraybuffer_2
;
const
arrayBufferToBase64$1
=
base64Arraybuffer_1
;
function
base64ToArrayBuffer$1
(
str
)
{
return
base64Arraybuffer_2
(
str
)
}
function
arrayBufferToBase64$1
(
buffer
)
{
return
base64Arraybuffer_1
(
buffer
)
}
var
require_context_module_1_0
=
/*#__PURE__*/
Object
.
freeze
({
base64ToArrayBuffer
:
base64ToArrayBuffer$1
,
...
...
@@ -8006,8 +8013,8 @@ var serviceContext = (function () {
Object
.
assign
(
api
,
modules$1
(
key
));
});
const
api$1
=
Object
.
assign
(
Object
.
create
(
null
),
api
,
platformApi
);
var
api$1
=
Object
.
assign
(
Object
.
create
(
null
),
api
,
platformApi
);
const
uni$1
=
Object
.
create
(
null
);
apis_1
.
forEach
(
name
=>
{
...
...
packages/uni-h5/dist/index.umd.min.js
浏览文件 @
c3d71c95
此差异已折叠。
点击以展开。
packages/uni-h5/manifest.json
0 → 100644
浏览文件 @
c3d71c95
{
"base64ToArrayBuffer"
:
[
"/core/service/api/base/base64.js"
,
[
[
"/core/helpers/protocol/base/base64.js"
,
"base64ToArrayBuffer"
]
]
],
"arrayBufferToBase64"
:
[
"/core/service/api/base/base64.js"
,
[
[
"/core/helpers/protocol/base/base64.js"
,
"arrayBufferToBase64"
]
]
],
"addInterceptor"
:
[
"/core/service/api/base/interceptor.js"
,
[
[
"/core/helpers/protocol/base/interceptor.js"
,
"addInterceptor"
]
]
],
"removeInterceptor"
:
[
"/core/service/api/base/interceptor.js"
,
[
[
"/core/helpers/protocol/base/interceptor.js"
,
"removeInterceptor"
]
]
],
"request"
:
[
"/platforms/h5/service/api/network/request.js"
,
[
[
"/core/helpers/protocol/network/request.js"
,
"request"
]
]
],
"uploadFile"
:
[
"/platforms/h5/service/api/network/upload-file.js"
,
[
[
"/core/helpers/protocol/network/upload-file.js"
,
"uploadFile"
]
]
],
"downloadFile"
:
[
"/platforms/h5/service/api/network/download-file.js"
,
[
[
"/core/helpers/protocol/network/download-file.js"
,
"downloadFile"
]
]
],
"connectSocket"
:
[
"/platforms/h5/service/api/network/socket.js"
,
[
[
"/core/helpers/protocol/network/socket.js"
,
"connectSocket"
]
]
],
"onSocketOpen"
:
[
"/platforms/h5/service/api/network/socket.js"
,
[]
],
"onSocketError"
:
[
"/platforms/h5/service/api/network/socket.js"
,
[]
],
"sendSocketMessage"
:
[
"/platforms/h5/service/api/network/socket.js"
,
[
[
"/core/helpers/protocol/network/socket.js"
,
"sendSocketMessage"
]
]
],
"onSocketMessage"
:
[
"/platforms/h5/service/api/network/socket.js"
,
[]
],
"closeSocket"
:
[
"/platforms/h5/service/api/network/socket.js"
,
[
[
"/core/helpers/protocol/network/socket.js"
,
"closeSocket"
]
]
],
"onSocketClose"
:
[
"/platforms/h5/service/api/network/socket.js"
,
[]
],
"navigateTo"
:
[
"/platforms/h5/service/api/route/route.js"
,
[
[
"/core/helpers/protocol/route/route.js"
,
"navigateTo"
]
],
true
],
"redirectTo"
:
[
"/platforms/h5/service/api/route/route.js"
,
[
[
"/core/helpers/protocol/route/route.js"
,
"redirectTo"
]
],
true
],
"reLaunch"
:
[
"/platforms/h5/service/api/route/route.js"
,
[
[
"/core/helpers/protocol/route/route.js"
,
"reLaunch"
]
],
true
],
"switchTab"
:
[
"/platforms/h5/service/api/route/route.js"
,
[
[
"/core/helpers/protocol/route/route.js"
,
"switchTab"
]
],
true
],
"navigateBack"
:
[
"/platforms/h5/service/api/route/route.js"
,
[
[
"/core/helpers/protocol/route/route.js"
,
"navigateBack"
]
],
true
],
"setStorage"
:
[
"/core/service/api/storage/storage.js"
,
[
[
"/core/helpers/protocol/storage/storage.js"
,
"setStorage"
]
]
],
"setStorageSync"
:
[
"/core/service/api/storage/storage.js"
,
[
[
"/core/helpers/protocol/storage/storage.js"
,
"setStorageSync"
]
]
],
"getStorage"
:
[
"/core/service/api/storage/storage.js"
,
[
[
"/core/helpers/protocol/storage/storage.js"
,
"getStorage"
]
]
],
"getStorageSync"
:
[
"/core/service/api/storage/storage.js"
,
[
[
"/core/helpers/protocol/storage/storage.js"
,
"getStorageSync"
]
]
],
"getStorageInfo"
:
[
"/core/service/api/storage/storage.js"
,
[]
],
"getStorageInfoSync"
:
[
"/core/service/api/storage/storage.js"
,
[]
],
"removeStorage"
:
[
"/core/service/api/storage/storage.js"
,
[
[
"/core/helpers/protocol/storage/storage.js"
,
"removeStorage"
]
]
],
"removeStorageSync"
:
[
"/core/service/api/storage/storage.js"
,
[
[
"/core/helpers/protocol/storage/storage.js"
,
"removeStorageSync"
]
]
],
"clearStorage"
:
[
"/core/service/api/storage/storage.js"
,
[]
],
"clearStorageSync"
:
[
"/core/service/api/storage/storage.js"
,
[]
],
"getLocation"
:
[
"/platforms/h5/service/api/location/get-location.js"
,
[
[
"/core/helpers/protocol/location/get-location.js"
,
"getLocation"
]
]
],
"chooseLocation"
:
[
"/platforms/h5/service/api/location/choose-location.js"
,
[
[
"/core/helpers/protocol/location/choose-location.js"
,
"chooseLocation"
],
[
"/platforms/h5/components/system-routes/choose-location/index.vue"
,
"ChooseLocation"
]
]
],
"openLocation"
:
[
"/platforms/h5/service/api/location/open-location.js"
,
[
[
"/core/helpers/protocol/location/open-location.js"
,
"openLocation"
],
[
"/platforms/h5/components/system-routes/open-location/index.vue"
,
"OpenLocation"
]
]
],
"createMapContext"
:
[
"/platforms/h5/service/api/context/map.js"
,
[
[
"/core/helpers/protocol/context/context.js"
,
"createMapContext"
]
]
],
"chooseImage"
:
[
"/platforms/h5/service/api/media/choose-image.js"
,
[
[
"/core/helpers/protocol/media/choose-image.js"
,
"chooseImage"
]
]
],
"previewImage"
:
[
"/platforms/h5/service/api/media/preview-image.js"
,
[
[
"/core/helpers/protocol/media/preview-image.js"
,
"previewImage"
],
[
"/platforms/h5/components/system-routes/preview-image/index.vue"
,
"PreviewImage"
]
]
],
"getImageInfo"
:
[
"/platforms/h5/service/api/media/get-image-info.js"
,
[
[
"/core/helpers/protocol/media/get-image-info.js"
,
"getImageInfo"
]
]
],
"createInnerAudioContext"
:
[
"/platforms/h5/service/api/context/inner-audio.js"
,
[]
],
"chooseVideo"
:
[
"/platforms/h5/service/api/media/choose-video.js"
,
[
[
"/core/helpers/protocol/media/choose-video.js"
,
"chooseVideo"
]
]
],
"createVideoContext"
:
[
"/platforms/h5/service/api/context/video.js"
,
[
[
"/core/helpers/protocol/context/context.js"
,
"createVideoContext"
]
]
],
"getSystemInfo"
:
[
"/platforms/h5/service/api/device/get-system-info.js"
,
[],
true
],
"getSystemInfoSync"
:
[
"/platforms/h5/service/api/device/get-system-info.js"
,
[],
true
],
"canIUse"
:
[
"/core/service/api/base/can-i-use.js"
,
[
[
"/core/helpers/protocol/base/can-i-use.js"
,
"canIUse"
]
],
true
],
"getNetworkType"
:
[
"/platforms/h5/service/api/device/network-info.js"
,
[]
],
"onNetworkStatusChange"
:
[
"/platforms/h5/service/api/device/network-info.js"
,
[]
],
"onAccelerometerChange"
:
[
"/core/service/api/device/accelerometer.js"
,
[
[
"/platforms/h5/service/api/device/accelerometer.js"
,
"enableAccelerometer"
]
]
],
"startAccelerometer"
:
[
"/core/service/api/device/accelerometer.js"
,
[
[
"/platforms/h5/service/api/device/accelerometer.js"
,
"enableAccelerometer"
]
]
],
"stopAccelerometer"
:
[
"/core/service/api/device/accelerometer.js"
,
[
[
"/platforms/h5/service/api/device/accelerometer.js"
,
"enableAccelerometer"
]
]
],
"onCompassChange"
:
[
"/platforms/h5/service/api/device/compass.js"
,
[]
],
"startCompass"
:
[
"/platforms/h5/service/api/device/compass.js"
,
[]
],
"stopCompass"
:
[
"/platforms/h5/service/api/device/compass.js"
,
[]
],
"makePhoneCall"
:
[
"/platforms/h5/service/api/device/make-phone-call.js"
,
[
[
"/core/helpers/protocol/device/make-phone-call.js"
,
"makePhoneCall"
]
]
],
"vibrateLong"
:
[
"/platforms/h5/service/api/device/vibrate.js"
,
[]
],
"vibrateShort"
:
[
"/platforms/h5/service/api/device/vibrate.js"
,
[]
],
"hideKeyboard"
:
[
"/platforms/h5/service/api/device/hide-keyboard.js"
,
[]
],
"showToast"
:
[
"/platforms/h5/service/api/ui/popup.js"
,
[
[
"/core/helpers/protocol/ui/popup.js"
,
"showToast"
],
[
"/platforms/h5/components/app/popup/toast.vue"
,
"Toast"
],
[
"/platforms/h5/components/app/popup/mixins/toast.js"
,
"ToastMixin"
]
]
],
"hideToast"
:
[
"/platforms/h5/service/api/ui/popup.js"
,
[
[
"/platforms/h5/components/app/popup/toast.vue"
,
"Toast"
],
[
"/platforms/h5/components/app/popup/mixins/toast.js"
,
"ToastMixin"
]
]
],
"showLoading"
:
[
"/platforms/h5/service/api/ui/popup.js"
,
[
[
"/core/helpers/protocol/ui/popup.js"
,
"showLoading"
],
[
"/platforms/h5/components/app/popup/toast.vue"
,
"Toast"
],
[
"/platforms/h5/components/app/popup/mixins/toast.js"
,
"ToastMixin"
]
]
],
"hideLoading"
:
[
"/platforms/h5/service/api/ui/popup.js"
,
[
[
"/platforms/h5/components/app/popup/toast.vue"
,
"Toast"
],
[
"/platforms/h5/components/app/popup/mixins/toast.js"
,
"ToastMixin"
]
]
],
"showModal"
:
[
"/platforms/h5/service/api/ui/popup.js"
,
[
[
"/core/helpers/protocol/ui/popup.js"
,
"showModal"
],
[
"/platforms/h5/components/app/popup/modal.vue"
,
"Modal"
],
[
"/platforms/h5/components/app/popup/mixins/modal.js"
,
"ModalMixin"
]
]
],
"showActionSheet"
:
[
"/platforms/h5/service/api/ui/popup.js"
,
[
[
"/core/helpers/protocol/ui/popup.js"
,
"showActionSheet"
],
[
"/platforms/h5/components/app/popup/actionSheet.vue"
,
"Modal"
],
[
"/platforms/h5/components/app/popup/mixins/action-sheet.js"
,
"ActionSheetMixin"
]
]
],
"setNavigationBarTitle"
:
[
"/platforms/h5/service/api/ui/navigation-bar.js"
,
[
[
"/core/helpers/protocol/ui/navigation-bar.js"
,
"setNavigationBarTitle"
]
]
],
"setNavigationBarColor"
:
[
"/platforms/h5/service/api/ui/navigation-bar.js"
,
[
[
"/core/helpers/protocol/ui/navigation-bar.js"
,
"setNavigationBarColor"
]
]
],
"showNavigationBarLoading"
:
[
"/platforms/h5/service/api/ui/navigation-bar.js"
,
[]
],
"hideNavigationBarLoading"
:
[
"/platforms/h5/service/api/ui/navigation-bar.js"
,
[]
],
"setTabBarItem"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"setTabBarItem"
]
]
],
"setTabBarStyle"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"setTabBarStyle"
]
]
],
"hideTabBar"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"hideTabBar"
]
]
],
"showTabBar"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"showTabBar"
]
]
],
"setTabBarBadge"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"setTabBarBadge"
]
]
],
"removeTabBarBadge"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"removeTabBarBadge"
]
]
],
"showTabBarRedDot"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"showTabBarRedDot"
]
]
],
"hideTabBarRedDot"
:
[
"/platforms/h5/service/api/ui/tab-bar.js"
,
[
[
"/core/helpers/protocol/ui/tab-bar.js"
,
"hideTabBarRedDot"
]
]
],
"createAnimation"
:
[
"/platforms/h5/service/api/ui/create-animation.js"
,
[]
],
"pageScrollTo"
:
[
"/core/service/api/ui/page-scroll-to.js"
,
[
[
"/core/helpers/protocol/ui/page-scroll-to.js"
,
"pageScrollTo"
]
]
],
"onWindowResize"
:
[
"/platforms/h5/service/api/ui/window.js"
,
[]
],
"offWindowResize"
:
[
"/platforms/h5/service/api/ui/window.js"
,
[]
],
"startPullDownRefresh"
:
[
"/platforms/h5/service/api/ui/pull-down-refresh.js"
,
[]
],
"stopPullDownRefresh"
:
[
"/platforms/h5/service/api/ui/pull-down-refresh.js"
,
[]
],
"createSelectorQuery"
:
[
"/platforms/h5/service/api/ui/create-selector-query.js"
,
[
[
"/core/view/bridge/subscribe/api/request-component-info.js"
,
"requestComponentInfo"
]
]
],
"createIntersectionObserver"
:
[
"/platforms/h5/service/api/ui/create-intersection-observer.js"
,
[
[
"/core/view/bridge/subscribe/api/request-component-observer.js"
,
"requestComponentObserver"
,
"destroyComponentObserver"
]
]
],
"$emit"
:
[
"/platforms/h5/service/api/base/event-bus.js"
,
[
[
"/core/helpers/protocol/base/event-bus.js"
,
"$emit"
]
]
],
"$on"
:
[
"/platforms/h5/service/api/base/event-bus.js"
,
[
[
"/core/helpers/protocol/base/event-bus.js"
,
"$on"
]
]
],
"$once"
:
[
"/platforms/h5/service/api/base/event-bus.js"
,
[
[
"/core/helpers/protocol/base/event-bus.js"
,
"$once"
]
]
],
"$off"
:
[
"/platforms/h5/service/api/base/event-bus.js"
,
[
[
"/core/helpers/protocol/base/event-bus.js"
,
"$off"
]
]
],
"openDocument"
:
[
"/platforms/h5/service/api/file/open-document.js"
,
[
[
"/core/helpers/protocol/file/open-document.js"
,
"openDocument"
]
]
],
"createCanvasContext"
:
[
"/platforms/h5/service/api/context/canvas.js"
,
[
[
"/core/helpers/protocol/context/context.js"
,
"createCanvasContext"
]
]
],
"canvasToTempFilePath"
:
[
"/platforms/h5/service/api/context/canvas.js"
,
[
[
"/core/helpers/protocol/context/canvas.js"
,
"canvasToTempFilePath"
]
]
],
"canvasPutImageData"
:
[
"/platforms/h5/service/api/context/canvas.js"
,
[
[
"/core/helpers/protocol/context/canvas.js"
,
"canvasPutImageData"
]
]
],
"canvasGetImageData"
:
[
"/platforms/h5/service/api/context/canvas.js"
,
[
[
"/core/helpers/protocol/context/canvas.js"
,
"canvasGetImageData"
]
]
],
"getProvider"
:
[
"/platforms/h5/service/api/plugin/get-provider.js"
,
[
[
"/core/helpers/protocol/plugin/get-provider.js"
,
"getProvider"
]
]
],
"upx2px"
:
[
"/core/service/api/base/upx2px.js"
,
[
[
"/core/helpers/protocol/base/upx2px.js"
,
"upx2px"
]
],
true
]
}
\ No newline at end of file
src/core/helpers/api.js
浏览文件 @
c3d71c95
...
...
@@ -14,7 +14,7 @@ import {
isCallbackApi
}
from
'
./promise
'
import
protocol
from
'
./
protocol
'
import
protocol
from
'
uni-api-
protocol
'
import
validateParam
from
'
./params
'
...
...
src/core/service/platform-api.js
0 → 100644
浏览文件 @
c3d71c95
import
baseApi
from
'
uni-core/service/api
'
import
platformApi
from
'
uni-platform/service/api
'
export
default
Object
.
assign
(
Object
.
create
(
null
),
baseApi
,
platformApi
)
src/core/service/uni.js
浏览文件 @
c3d71c95
...
...
@@ -7,10 +7,7 @@ import {
promisify
}
from
'
uni-helpers/promise
'
import
baseApi
from
'
uni-core/service/api
'
import
platformApi
from
'
uni-platform/service/api
'
const
api
=
Object
.
assign
(
Object
.
create
(
null
),
baseApi
,
platformApi
)
import
api
from
'
uni-service-api
'
export
const
uni
=
Object
.
create
(
null
)
...
...
src/core/view/bridge/subscribe/api/index.js
0 → 100644
浏览文件 @
c3d71c95
import
{
requestComponentInfo
}
from
'
./request-component-info
'
import
{
requestComponentObserver
,
destroyComponentObserver
}
from
'
./request-component-observer
'
export
default
{
requestComponentInfo
,
requestComponentObserver
,
destroyComponentObserver
}
src/core/view/bridge/subscribe/request-component-info.js
→
src/core/view/bridge/subscribe/
api/
request-component-info.js
浏览文件 @
c3d71c95
...
...
@@ -99,7 +99,7 @@ function getNodesInfo (pageVm, component, selector, single, fields) {
}
}
export
default
function
requestComponentInfo
({
export
function
requestComponentInfo
({
reqId
,
reqs
},
pageId
)
{
...
...
src/core/view/bridge/subscribe/request-component-observer.js
→
src/core/view/bridge/subscribe/
api/
request-component-observer.js
浏览文件 @
c3d71c95
文件已移动
src/core/view/bridge/subscribe/index.js
浏览文件 @
c3d71c95
...
...
@@ -18,12 +18,7 @@ import {
createScrollListener
}
from
'
./scroll
'
import
requestComponentInfo
from
'
./request-component-info
'
import
{
requestComponentObserver
,
destroyComponentObserver
}
from
'
./request-component-observer
'
import
subscribeApis
from
'
uni-api-subscribe
'
const
passiveOptions
=
supportsPassive
?
{
passive
:
false
...
...
@@ -33,7 +28,7 @@ function updateCssVar (vm) {
if
(
uni
.
canIUse
(
'
css.var
'
))
{
const
pageVm
=
vm
.
$parent
.
$parent
const
windowTop
=
pageVm
.
showNavigationBar
&&
pageVm
.
navigationBar
.
type
!==
'
transparent
'
?
(
NAVBAR_HEIGHT
+
'
px
'
)
'
px
'
)
:
'
0px
'
const
windowBottom
=
getApp
().
$children
[
0
].
showTabBar
?
(
TABBAR_HEIGHT
+
'
px
'
)
:
'
0px
'
const
style
=
document
.
documentElement
.
style
...
...
@@ -44,14 +39,13 @@ function updateCssVar (vm) {
}
}
export
default
function
initSubscribe
(
subscribe
)
{
subscribe
(
'
requestComponentInfo
'
,
requestComponentInfo
)
export
default
function
initSubscribe
(
subscribe
)
{
Object
.
keys
(
subscribeApis
).
forEach
(
name
=>
{
subscribe
(
name
,
subscribeApis
[
name
])
})
subscribe
(
'
pageScrollTo
'
,
pageScrollTo
)
subscribe
(
'
requestComponentObserver
'
,
requestComponentObserver
)
subscribe
(
'
destroyComponentObserver
'
,
destroyComponentObserver
)
if
(
__PLATFORM__
===
'
h5
'
)
{
let
scrollListener
=
false
let
disableScrollListener
=
false
...
...
@@ -81,7 +75,7 @@ export default function initSubscribe (subscribe) {
const
onReachBottomDistance
=
pageVm
.
onReachBottomDistance
const
enableTransparentTitleNView
=
isPlainObject
(
pageVm
.
titleNView
)
&&
pageVm
.
titleNView
.
type
===
'
transparent
'
'
transparent
'
if
(
scrollListener
)
{
document
.
removeEventListener
(
'
scroll
'
,
scrollListener
)
...
...
src/platforms/h5/components/app/components.js
浏览文件 @
c3d71c95
import
TabBar
from
'
./tabBar
'
import
Toast
from
'
./popup/toast
'
import
Modal
from
'
./popup/modal
'
import
Picker
from
'
./popup/picker
'
import
ActionSheet
from
'
./popup/actionSheet
'
import
Components
from
'
uni-h5-app-components
'
export
default
{
TabBar
,
Toast
,
Modal
,
Picker
,
ActionSheet
...
Components
}
src/platforms/h5/components/app/index.vue
浏览文件 @
c3d71c95
...
...
@@ -34,7 +34,7 @@ import {
import
components
from
'
./components
'
import
mixins
from
'
./popup/
mixins
'
import
mixins
from
'
uni-h5-app-
mixins
'
export
default
{
name
:
'
App
'
,
...
...
src/platforms/h5/components/app/popup/index.js
0 → 100644
浏览文件 @
c3d71c95
import
Toast
from
'
./toast
'
import
Modal
from
'
./modal
'
import
Picker
from
'
./picker
'
import
ActionSheet
from
'
./actionSheet
'
export
default
{
Toast
,
Modal
,
Picker
,
ActionSheet
}
src/platforms/h5/components/index.js
浏览文件 @
c3d71c95
...
...
@@ -4,14 +4,15 @@ import App from './app'
import
Page
from
'
./page
'
import
AsyncError
from
'
./async-error
'
import
AsyncLoading
from
'
./async-loading
'
import
ChooseLocation
from
'
./system-routes/choose-location
'
import
OpenLocation
from
'
./system-routes/open-location
'
import
PreviewImage
from
'
./system-routes/preview-image
'
import
SystemRouteComponents
from
'
uni-h5-system-routes
'
Vue
.
component
(
App
.
name
,
App
)
Vue
.
component
(
Page
.
name
,
Page
)
Vue
.
component
(
AsyncError
.
name
,
AsyncError
)
Vue
.
component
(
AsyncLoading
.
name
,
AsyncLoading
)
Vue
.
component
(
ChooseLocation
.
name
,
ChooseLocation
)
Vue
.
component
(
OpenLocation
.
name
,
OpenLocation
)
Vue
.
component
(
PreviewImage
.
name
,
PreviewImage
)
Object
.
keys
(
SystemRouteComponents
).
forEach
(
name
=>
{
const
Component
=
SystemRouteComponents
[
name
]
Vue
.
component
(
Component
.
name
,
Component
)
})
src/platforms/h5/components/system-routes/index.js
0 → 100644
浏览文件 @
c3d71c95
import
ChooseLocation
from
'
./choose-location
'
import
OpenLocation
from
'
./open-location
'
import
PreviewImage
from
'
./preview-image
'
export
default
{
ChooseLocation
,
OpenLocation
,
PreviewImage
}
src/platforms/h5/service/index.js
浏览文件 @
c3d71c95
...
...
@@ -3,7 +3,7 @@ import initSubscribe from 'uni-core/service/bridge/subscribe'
import
{
uni
}
from
'
uni-
service-ap
i
'
}
from
'
uni-
core/service/un
i
'
import
{
getApp
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录