Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qianlong66
uni-app
提交
f3a56d62
U
uni-app
项目概览
qianlong66
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f3a56d62
编写于
7月 14, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(app): uni-app-plus
上级
fc52a68e
变更
8
展开全部
显示空白变更内容
内联
并排
Showing
8 changed file
with
14094 addition
and
5526 deletion
+14094
-5526
packages/uni-app-plus/dist/uni-app-service.es.js
packages/uni-app-plus/dist/uni-app-service.es.js
+14042
-5497
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+7
-1
packages/uni-app-plus/src/service/api/index.ts
packages/uni-app-plus/src/service/api/index.ts
+24
-25
packages/uni-app-plus/src/service/api/ui/requestComponentInfo.ts
...s/uni-app-plus/src/service/api/ui/requestComponentInfo.ts
+6
-1
packages/uni-app-plus/src/service/framework/page/setup.ts
packages/uni-app-plus/src/service/framework/page/setup.ts
+1
-0
packages/uni-app-plus/src/view/index.ts
packages/uni-app-plus/src/view/index.ts
+2
-0
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+4
-1
packages/uni-h5/src/service/api/ui/requestComponentInfo.ts
packages/uni-h5/src/service/api/ui/requestComponentInfo.ts
+8
-1
未找到文件。
packages/uni-app-plus/dist/uni-app-service.es.js
浏览文件 @
f3a56d62
此差异已折叠。
点击以展开。
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
f3a56d62
...
...
@@ -15494,7 +15494,12 @@
return info;
}
function findElm(component, pageVm2) {
return component ? component.$el : pageVm2.$el;
if (!component) {
return pageVm2.$el;
}
{
return window.__$__(component).$;
}
}
function getNodesInfo(pageVm2, component, selector, single, fields) {
const parentElement = findElm(component, pageVm2).parentElement;
...
...
@@ -15551,6 +15556,7 @@
window.uni = uni$1;
window.UniViewJSBridge = UniViewJSBridge$1;
window.rpx2px = upx2px;
window.__$__ = $;
function onWebviewReady() {
initView();
initSubscribeHandlers();
...
...
packages/uni-app-plus/src/service/api/index.ts
浏览文件 @
f3a56d62
...
...
@@ -55,28 +55,27 @@ export * from './ad/interactiveAd'
export
*
from
'
./route/navigateTo
'
export
*
from
'
./route/navigateBack
'
// TODO
// export {
// upx2px,
// addInterceptor,
// removeInterceptor,
// promiseInterceptor,
// arrayBufferToBase64,
// base64ToArrayBuffer,
// createIntersectionObserver,
// createMediaQueryObserver,
// createSelectorQuery,
// createVideoContext,
// createMapContext,
// createAnimation,
// onTabBarMidButtonTap,
// createCanvasContext,
// canvasGetImageData,
// canvasPutImageData,
// canvasToTempFilePath,
// getSelectedTextRange,
// $on,
// $off,
// $once,
// $emit,
// } from '@dcloudio/uni-api'
export
{
upx2px
,
addInterceptor
,
removeInterceptor
,
promiseInterceptor
,
arrayBufferToBase64
,
base64ToArrayBuffer
,
createIntersectionObserver
,
createMediaQueryObserver
,
createSelectorQuery
,
createVideoContext
,
createMapContext
,
createAnimation
,
onTabBarMidButtonTap
,
createCanvasContext
,
canvasGetImageData
,
canvasPutImageData
,
canvasToTempFilePath
,
getSelectedTextRange
,
$on
,
$off
,
$once
,
$emit
,
}
from
'
@dcloudio/uni-api
'
packages/uni-app-plus/src/service/api/ui/requestComponentInfo.ts
浏览文件 @
f3a56d62
...
...
@@ -9,7 +9,12 @@ export function requestComponentInfo(
UniServiceJSBridge
.
invokeViewMethod
(
'
requestComponentInfo
'
,
{
reqs
,
reqs
:
reqs
.
map
((
req
)
=>
{
if
(
req
.
component
)
{
req
.
component
=
req
.
component
.
$el
.
nodeId
}
return
req
}),
},
callback
,
page
.
$page
.
id
...
...
packages/uni-app-plus/src/service/framework/page/setup.ts
浏览文件 @
f3a56d62
...
...
@@ -16,6 +16,7 @@ export function setupPage(component: VuePageComponent) {
const
instance
=
getCurrentInstance
()
!
const
pageVm
=
instance
.
proxy
!
pageVm
.
$page
=
__pageInstance
as
Page
.
PageInstance
[
'
$page
'
]
pageVm
.
$vm
=
pageVm
addCurrentPage
(
initScope
(
__pageId
as
number
,
pageVm
))
if
(
oldSetup
)
{
return
oldSetup
(
__pageQuery
as
any
,
ctx
)
...
...
packages/uni-app-plus/src/view/index.ts
浏览文件 @
f3a56d62
...
...
@@ -6,9 +6,11 @@ import { UniViewJSBridge } from './bridge'
import
*
as
uni
from
'
./api
'
import
{
preventDoubleTap
}
from
'
./framework/gesture
'
import
{
initSubscribeHandlers
}
from
'
./framework/subscriber
'
import
{
$
}
from
'
./framework/dom/page
'
;(
window
as
any
).
uni
=
uni
;(
window
as
any
).
UniViewJSBridge
=
UniViewJSBridge
;(
window
as
any
).
rpx2px
=
uni
.
upx2px
;(
window
as
any
).
__$__
=
$
function
onWebviewReady
()
{
initView
()
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
f3a56d62
...
...
@@ -2047,7 +2047,10 @@ function getNodeInfo(el, fields2) {
return info;
}
function findElm(component, pageVm) {
return component ? component.$el : pageVm.$el;
if (!component) {
return pageVm.$el;
}
return component.$el;
}
function getNodesInfo(pageVm, component, selector, single, fields2) {
const parentElement = findElm(component, pageVm).parentElement;
...
...
packages/uni-h5/src/service/api/ui/requestComponentInfo.ts
浏览文件 @
f3a56d62
...
...
@@ -100,7 +100,14 @@ export function findElm(
component
:
ComponentPublicInstance
|
undefined
|
null
,
pageVm
:
ComponentPublicInstance
):
HTMLElement
{
return
component
?
component
.
$el
:
pageVm
.
$el
if
(
!
component
)
{
return
pageVm
.
$el
}
if
(
__APP_VIEW__
)
{
// App 端,传入的是 nodeId
return
(
window
as
any
).
__$__
(
component
).
$
}
return
component
.
$el
}
function
getNodesInfo
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录