Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Velpro187
uni-app
提交
e1bf432a
U
uni-app
项目概览
Velpro187
/
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,发现更多精彩内容 >>
提交
e1bf432a
编写于
8月 01, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modules.js=>modules.json
上级
b691c1e4
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
321 addition
and
257 deletion
+321
-257
build/manifest.js
build/manifest.js
+2
-1
lib/modules.js
lib/modules.js
+0
-214
lib/modules.json
lib/modules.json
+208
-0
packages/uni-app-plus-nvue/dist/index.js
packages/uni-app-plus-nvue/dist/index.js
+103
-30
packages/uni-app-plus-nvue/dist/index.legacy.js
packages/uni-app-plus-nvue/dist/index.legacy.js
+7
-11
packages/uni-h5/dist/index.umd.min.js
packages/uni-h5/dist/index.umd.min.js
+1
-1
未找到文件。
build/manifest.js
浏览文件 @
e1bf432a
...
...
@@ -76,7 +76,8 @@ function parseApiManifestDeps (manifest, protocol) {
if
(
manifest
[
dep
[
1
]])
{
dep
[
0
]
=
manifest
[
dep
[
1
]][
0
]
}
else
{
console
.
error
(
`依赖模块[
${
dep
[
1
]}
]不存在`
)
console
.
error
(
`依赖模块[
${
dep
[
1
]}
]不存在,删除
${
name
}
接口\n`
)
delete
manifest
[
name
]
}
})
}
...
...
lib/modules.js
已删除
100644 → 0
浏览文件 @
b691c1e4
module
.
exports
=
{
base
:
{
title
:
'
基础
'
,
api
:
[
'
upx2px
'
,
'
base64ToArrayBuffer
'
,
'
arrayBufferToBase64
'
]
},
network
:
{
title
:
'
网络
'
,
api
:
[
'
request
'
,
'
connectSocket
'
,
'
sendSocketMessage
'
,
'
closeSocket
'
,
'
onSocketOpen
'
,
'
onSocketError
'
,
'
onSocketMessage
'
,
'
onSocketClose
'
,
'
downloadFile
'
,
'
uploadFile
'
]
},
route
:
{
title
:
'
路由
'
,
api
:
[
'
navigateTo
'
,
'
redirectTo
'
,
'
reLaunch
'
,
'
switchTab
'
,
'
navigateBack
'
]
},
storage
:
{
title
:
'
数据缓存
'
,
api
:
[
'
setStorage
'
,
'
setStorageSync
'
,
'
getStorage
'
,
'
getStorageSync
'
,
'
removeStorage
'
,
'
removeStorageSync
'
,
'
clearStorage
'
,
'
clearStorageSync
'
,
'
getStorageInfo
'
,
'
getStorageInfoSync
'
,
]
},
location
:
{
title
:
'
位置
'
,
api
:
[
'
getLocation
'
,
'
openLocation
'
,
'
chooseLocation
'
]
},
media
:
{
title
:
'
媒体
'
,
api
:
[
'
chooseImage
'
,
'
previewImage
'
,
'
getImageInfo
'
,
'
saveImageToPhotosAlbum
'
,
'
compressImage
'
,
'
getRecorderManager
'
,
'
getBackgroundAudioManager
'
,
'
createInnerAudioContext
'
,
'
chooseVideo
'
,
'
saveVideoToPhotosAlbum
'
,
'
createVideoContext
'
,
'
createCameraContext
'
,
'
createLivePlayerContext
'
]
},
device
:
{
title
:
'
设备
'
,
api
:
[
'
getSystemInfo
'
,
'
getSystemInfoSync
'
,
'
canIUse
'
,
'
onMemoryWarning
'
,
'
getNetworkType
'
,
'
onNetworkStatusChange
'
,
'
onAccelerometerChange
'
,
'
startAccelerometer
'
,
'
stopAccelerometer
'
,
'
onCompassChange
'
,
'
startCompass
'
,
'
stopCompass
'
,
'
onGyroscopeChange
'
,
'
startGyroscope
'
,
'
stopGyroscope
'
,
'
makePhoneCall
'
,
'
scanCode
'
,
'
setClipboardData
'
,
'
getClipboardData
'
,
'
setScreenBrightness
'
,
'
getScreenBrightness
'
,
'
setKeepScreenOn
'
,
'
onUserCaptureScreen
'
,
'
vibrateLong
'
,
'
vibrateShort
'
,
'
addPhoneContact
'
,
'
openBluetoothAdapter
'
,
'
startBluetoothDevicesDiscovery
'
,
'
onBluetoothDeviceFound
'
,
'
stopBluetoothDevicesDiscovery
'
,
'
onBluetoothAdapterStateChange
'
,
'
getConnectedBluetoothDevices
'
,
'
getBluetoothDevices
'
,
'
getBluetoothAdapterState
'
,
'
closeBluetoothAdapter
'
,
'
writeBLECharacteristicValue
'
,
'
readBLECharacteristicValue
'
,
'
onBLEConnectionStateChange
'
,
'
onBLECharacteristicValueChange
'
,
'
notifyBLECharacteristicValueChange
'
,
'
getBLEDeviceServices
'
,
'
getBLEDeviceCharacteristics
'
,
'
createBLEConnection
'
,
'
closeBLEConnection
'
,
'
onBeaconServiceChange
'
,
'
onBeaconUpdate
'
,
'
getBeacons
'
,
'
startBeaconDiscovery
'
,
'
stopBeaconDiscovery
'
]
},
ui
:
{
title
:
'
界面
'
,
api
:
[
'
showToast
'
,
'
hideToast
'
,
'
showLoading
'
,
'
hideLoading
'
,
'
showModal
'
,
'
showActionSheet
'
,
'
setNavigationBarTitle
'
,
'
setNavigationBarColor
'
,
'
showNavigationBarLoading
'
,
'
hideNavigationBarLoading
'
,
'
setTabBarItem
'
,
'
setTabBarStyle
'
,
'
hideTabBar
'
,
'
showTabBar
'
,
'
setTabBarBadge
'
,
'
removeTabBarBadge
'
,
'
showTabBarRedDot
'
,
'
hideTabBarRedDot
'
,
'
setBackgroundColor
'
,
'
setBackgroundTextStyle
'
,
'
createAnimation
'
,
'
pageScrollTo
'
,
'
onWindowResize
'
,
'
offWindowResize
'
,
'
loadFontFace
'
,
'
startPullDownRefresh
'
,
'
stopPullDownRefresh
'
,
'
createSelectorQuery
'
,
'
createIntersectionObserver
'
,
'
hideKeyboard
'
]
},
event
:
{
title
:
'
页面通讯
'
,
api
:
[
'
$emit
'
,
'
$on
'
,
'
$once
'
,
'
$off
'
]
},
file
:
{
title
:
'
文件
'
,
api
:
[
'
saveFile
'
,
'
getSavedFileList
'
,
'
getSavedFileInfo
'
,
'
removeSavedFile
'
,
'
getFileInfo
'
,
'
openDocument
'
,
'
getFileSystemManager
'
]
},
canvas
:
{
title
:
'
绘画
'
,
api
:
[
'
createOffscreenCanvas
'
,
'
createCanvasContext
'
,
'
canvasToTempFilePath
'
,
'
canvasPutImageData
'
,
'
canvasGetImageData
'
]
},
third
:
{
title
:
'
第三方服务
'
,
api
:
[
'
getProvider
'
,
'
login
'
,
'
checkSession
'
,
'
getUserInfo
'
,
'
share
'
,
'
showShareMenu
'
,
'
hideShareMenu
'
,
'
requestPayment
'
,
'
subscribePush
'
,
'
unsubscribePush
'
,
'
onPush
'
,
'
offPush
'
,
'
requireNativePlugin
'
]
}
}
lib/modules.json
0 → 100644
浏览文件 @
e1bf432a
[{
"name"
:
"base"
,
"title"
:
"基础"
,
"apiList"
:
{
"uni.getSystemInfo"
:
true
,
"uni.getSystemInfoSync"
:
true
,
"uni.canIUse"
:
true
,
"uni.upx2px"
:
true
,
"uni.navigateTo"
:
true
,
"uni.redirectTo"
:
true
,
"uni.switchTab"
:
true
,
"uni.reLaunch"
:
true
,
"uni.navigateBack"
:
true
}
},
{
"name"
:
"network"
,
"title"
:
"网络"
,
"apiList"
:
{
"uni.request"
:
true
,
"uni.connectSocket"
:
true
,
"uni.sendSocketMessage"
:
true
,
"uni.closeSocket"
:
true
,
"uni.onSocketOpen"
:
true
,
"uni.onSocketError"
:
true
,
"uni.onSocketMessage"
:
true
,
"uni.onSocketClose"
:
true
,
"uni.downloadFile"
:
true
,
"uni.uploadFile"
:
true
}
},
{
"name"
:
"storage"
,
"title"
:
"数据缓存"
,
"apiList"
:
{
"uni.setStorage"
:
true
,
"uni.setStorageSync"
:
true
,
"uni.getStorage"
:
true
,
"uni.getStorageSync"
:
true
,
"uni.removeStorage"
:
true
,
"uni.removeStorageSync"
:
true
,
"uni.clearStorage"
:
true
,
"uni.clearStorageSync"
:
true
,
"uni.getStorageInfo"
:
true
,
"uni.getStorageInfoSync"
:
true
}
},
{
"name"
:
"location"
,
"title"
:
"位置"
,
"apiList"
:
{
"uni.getLocation"
:
true
,
"uni.openLocation"
:
true
,
"uni.chooseLocation"
:
true
}
},
{
"name"
:
"media"
,
"title"
:
"媒体"
,
"apiList"
:
{
"uni.chooseImage"
:
true
,
"uni.previewImage"
:
true
,
"uni.getImageInfo"
:
true
,
"uni.saveImageToPhotosAlbum"
:
true
,
"uni.compressImage"
:
true
,
"uni.getRecorderManager"
:
true
,
"uni.getBackgroundAudioManager"
:
true
,
"uni.createInnerAudioContext"
:
true
,
"uni.chooseVideo"
:
true
,
"uni.saveVideoToPhotosAlbum"
:
true
,
"uni.createVideoContext"
:
true
,
"uni.createCameraContext"
:
true
,
"uni.createLivePlayerContext"
:
true
}
},
{
"name"
:
"device"
,
"title"
:
"设备"
,
"apiList"
:
{
"uni.onMemoryWarning"
:
true
,
"uni.getNetworkType"
:
true
,
"uni.onNetworkStatusChange"
:
true
,
"uni.onAccelerometerChange"
:
true
,
"uni.startAccelerometer"
:
true
,
"uni.stopAccelerometer"
:
true
,
"uni.onCompassChange"
:
true
,
"uni.startCompass"
:
true
,
"uni.stopCompass"
:
true
,
"uni.onGyroscopeChange"
:
true
,
"uni.startGyroscope"
:
true
,
"uni.stopGyroscope"
:
true
,
"uni.makePhoneCall"
:
true
,
"uni.scanCode"
:
true
,
"uni.setClipboardData"
:
true
,
"uni.getClipboardData"
:
true
,
"uni.setScreenBrightness"
:
true
,
"uni.getScreenBrightness"
:
true
,
"uni.setKeepScreenOn"
:
true
,
"uni.onUserCaptureScreen"
:
true
,
"uni.vibrateLong"
:
true
,
"uni.vibrateShort"
:
true
,
"uni.addPhoneContact"
:
true
,
"uni.openBluetoothAdapter"
:
true
,
"uni.startBluetoothDevicesDiscovery"
:
true
,
"uni.onBluetoothDeviceFound"
:
true
,
"uni.stopBluetoothDevicesDiscovery"
:
true
,
"uni.onBluetoothAdapterStateChange"
:
true
,
"uni.getConnectedBluetoothDevices"
:
true
,
"uni.getBluetoothDevices"
:
true
,
"uni.getBluetoothAdapterState"
:
true
,
"uni.closeBluetoothAdapter"
:
true
,
"uni.writeBLECharacteristicValue"
:
true
,
"uni.readBLECharacteristicValue"
:
true
,
"uni.onBLEConnectionStateChange"
:
true
,
"uni.onBLECharacteristicValueChange"
:
true
,
"uni.notifyBLECharacteristicValueChange"
:
true
,
"uni.getBLEDeviceServices"
:
true
,
"uni.getBLEDeviceCharacteristics"
:
true
,
"uni.createBLEConnection"
:
true
,
"uni.closeBLEConnection"
:
true
,
"uni.onBeaconServiceChange"
:
true
,
"uni.onBeaconUpdate"
:
true
,
"uni.getBeacons"
:
true
,
"uni.startBeaconDiscovery"
:
true
,
"uni.stopBeaconDiscovery"
:
true
}
},
{
"name"
:
"ui"
,
"title"
:
"界面"
,
"apiList"
:
{
"uni.showToast"
:
true
,
"uni.hideToast"
:
true
,
"uni.showLoading"
:
true
,
"uni.hideLoading"
:
true
,
"uni.showModal"
:
true
,
"uni.showActionSheet"
:
true
,
"uni.setNavigationBarTitle"
:
true
,
"uni.setNavigationBarColor"
:
true
,
"uni.showNavigationBarLoading"
:
true
,
"uni.hideNavigationBarLoading"
:
true
,
"uni.setTabBarItem"
:
true
,
"uni.setTabBarStyle"
:
true
,
"uni.hideTabBar"
:
true
,
"uni.showTabBar"
:
true
,
"uni.setTabBarBadge"
:
true
,
"uni.removeTabBarBadge"
:
true
,
"uni.showTabBarRedDot"
:
true
,
"uni.hideTabBarRedDot"
:
true
,
"uni.setBackgroundColor"
:
true
,
"uni.setBackgroundTextStyle"
:
true
,
"uni.createAnimation"
:
true
,
"uni.pageScrollTo"
:
true
,
"uni.onWindowResize"
:
true
,
"uni.offWindowResize"
:
true
,
"uni.loadFontFace"
:
true
,
"uni.startPullDownRefresh"
:
true
,
"uni.stopPullDownRefresh"
:
true
,
"uni.createSelectorQuery"
:
true
,
"uni.createIntersectionObserver"
:
true
,
"uni.hideKeyboard"
:
true
}
},
{
"name"
:
"event"
,
"title"
:
"页面通讯"
,
"apiList"
:
{
"uni.$emit"
:
true
,
"uni.$on"
:
true
,
"uni.$once"
:
true
,
"uni.$off"
:
true
}
},
{
"name"
:
"file"
,
"title"
:
"文件"
,
"apiList"
:
{
"uni.saveFile"
:
true
,
"uni.getSavedFileList"
:
true
,
"uni.getSavedFileInfo"
:
true
,
"uni.removeSavedFile"
:
true
,
"uni.getFileInfo"
:
true
,
"uni.openDocument"
:
true
,
"uni.getFileSystemManager"
:
true
}
},
{
"name"
:
"canvas"
,
"title"
:
"绘画"
,
"apiList"
:
{
"uni.createOffscreenCanvas"
:
true
,
"uni.createCanvasContext"
:
true
,
"uni.canvasToTempFilePath"
:
true
,
"uni.canvasPutImageData"
:
true
,
"uni.canvasGetImageData"
:
true
}
},
{
"name"
:
"third"
,
"title"
:
"第三方服务"
,
"apiList"
:
{
"uni.getProvider"
:
true
,
"uni.login"
:
true
,
"uni.checkSession"
:
true
,
"uni.getUserInfo"
:
true
,
"uni.share"
:
true
,
"uni.showShareMenu"
:
true
,
"uni.hideShareMenu"
:
true
,
"uni.requestPayment"
:
true
,
"uni.subscribePush"
:
true
,
"uni.unsubscribePush"
:
true
,
"uni.onPush"
:
true
,
"uni.offPush"
:
true
,
"uni.requireNativePlugin"
:
true
,
"uni.base64ToArrayBuffer"
:
true
,
"uni.arrayBufferToBase64"
:
true
}
}]
packages/uni-app-plus-nvue/dist/index.js
浏览文件 @
e1bf432a
...
...
@@ -7249,6 +7249,82 @@ var serviceContext = (function () {
stopCompass
:
stopCompass
});
const
callbacks$3
=
{
pause
:
[],
resume
:
[],
start
:
[],
stop
:
[]
};
class
RecorderManager
{
constructor
()
{
onMethod
(
'
onRecorderStateChange
'
,
res
=>
{
const
state
=
res
.
state
;
delete
res
.
state
;
delete
res
.
errMsg
;
callbacks$3
[
state
].
forEach
(
callback
=>
{
if
(
typeof
callback
===
'
function
'
)
{
callback
(
res
);
}
});
});
}
onError
(
callback
)
{
callbacks$3
.
error
.
push
(
callback
);
}
onFrameRecorded
(
callback
)
{
}
onInterruptionBegin
(
callback
)
{
}
onInterruptionEnd
(
callback
)
{
}
onPause
(
callback
)
{
callbacks$3
.
pause
.
push
(
callback
);
}
onResume
(
callback
)
{
callbacks$3
.
resume
.
push
(
callback
);
}
onStart
(
callback
)
{
callbacks$3
.
start
.
push
(
callback
);
}
onStop
(
callback
)
{
callbacks$3
.
stop
.
push
(
callback
);
}
pause
()
{
invokeMethod
(
'
operateRecorder
'
,
{
operationType
:
'
pause
'
});
}
resume
()
{
invokeMethod
(
'
operateRecorder
'
,
{
operationType
:
'
resume
'
});
}
start
(
options
)
{
invokeMethod
(
'
operateRecorder
'
,
Object
.
assign
({},
options
,
{
operationType
:
'
start
'
}));
}
stop
()
{
invokeMethod
(
'
operateRecorder
'
,
{
operationType
:
'
stop
'
});
}
}
let
recorderManager
;
function
getRecorderManager
()
{
return
recorderManager
||
(
recorderManager
=
new
RecorderManager
())
}
var
require_context_module_1_7
=
/*#__PURE__*/
Object
.
freeze
({
getRecorderManager
:
getRecorderManager
});
class
DownloadTask
{
constructor
(
downloadTaskId
,
callbackId
)
{
this
.
id
=
downloadTaskId
;
...
...
@@ -7333,7 +7409,7 @@ var serviceContext = (function () {
return
task
}
var
require_context_module_1_
7
=
/*#__PURE__*/
Object
.
freeze
({
var
require_context_module_1_
8
=
/*#__PURE__*/
Object
.
freeze
({
downloadFile
:
downloadFile$1
});
...
...
@@ -7438,7 +7514,7 @@ var serviceContext = (function () {
return
new
RequestTask
(
requestTaskId
)
}
var
require_context_module_1_
8
=
/*#__PURE__*/
Object
.
freeze
({
var
require_context_module_1_
9
=
/*#__PURE__*/
Object
.
freeze
({
request
:
request$1
});
...
...
@@ -7516,7 +7592,7 @@ var serviceContext = (function () {
const
socketTasks$1
=
Object
.
create
(
null
);
const
socketTasksArray
=
[];
const
callbacks$
3
=
Object
.
create
(
null
);
const
callbacks$
4
=
Object
.
create
(
null
);
onMethod
(
'
onSocketTaskStateChange
'
,
({
socketTaskId
,
state
,
...
...
@@ -7537,8 +7613,8 @@ var serviceContext = (function () {
if
(
state
===
'
open
'
)
{
socketTask
.
readyState
=
socketTask
.
OPEN
;
}
if
(
socketTask
===
socketTasksArray
[
0
]
&&
callbacks$
3
[
state
])
{
invoke
(
callbacks$
3
[
state
],
state
===
'
message
'
?
{
if
(
socketTask
===
socketTasksArray
[
0
]
&&
callbacks$
4
[
state
])
{
invoke
(
callbacks$
4
[
state
],
state
===
'
message
'
?
{
data
}
:
{});
}
...
...
@@ -7597,22 +7673,22 @@ var serviceContext = (function () {
}
function
onSocketOpen
(
callbackId
)
{
callbacks$
3
.
open
=
callbackId
;
callbacks$
4
.
open
=
callbackId
;
}
function
onSocketError
(
callbackId
)
{
callbacks$
3
.
error
=
callbackId
;
callbacks$
4
.
error
=
callbackId
;
}
function
onSocketMessage
(
callbackId
)
{
callbacks$
3
.
message
=
callbackId
;
callbacks$
4
.
message
=
callbackId
;
}
function
onSocketClose
(
callbackId
)
{
callbacks$
3
.
close
=
callbackId
;
callbacks$
4
.
close
=
callbackId
;
}
var
require_context_module_1_
9
=
/*#__PURE__*/
Object
.
freeze
({
var
require_context_module_1_
10
=
/*#__PURE__*/
Object
.
freeze
({
connectSocket
:
connectSocket$1
,
sendSocketMessage
:
sendSocketMessage$1
,
closeSocket
:
closeSocket$1
,
...
...
@@ -7706,7 +7782,7 @@ var serviceContext = (function () {
return
task
}
var
require_context_module_1_1
0
=
/*#__PURE__*/
Object
.
freeze
({
var
require_context_module_1_1
1
=
/*#__PURE__*/
Object
.
freeze
({
uploadFile
:
uploadFile$1
});
...
...
@@ -7815,7 +7891,7 @@ var serviceContext = (function () {
return
res
}
var
require_context_module_1_1
1
=
/*#__PURE__*/
Object
.
freeze
({
var
require_context_module_1_1
2
=
/*#__PURE__*/
Object
.
freeze
({
setStorage
:
setStorage$1
,
setStorageSync
:
setStorageSync$1
,
getStorage
:
getStorage$1
,
...
...
@@ -7836,7 +7912,7 @@ var serviceContext = (function () {
return
{}
}
var
require_context_module_1_1
2
=
/*#__PURE__*/
Object
.
freeze
({
var
require_context_module_1_1
3
=
/*#__PURE__*/
Object
.
freeze
({
pageScrollTo
:
pageScrollTo$1
});
...
...
@@ -7852,12 +7928,13 @@ var serviceContext = (function () {
'
./device/accelerometer.js
'
:
require_context_module_1_4
,
'
./device/bluetooth.js
'
:
require_context_module_1_5
,
'
./device/compass.js
'
:
require_context_module_1_6
,
'
./network/download-file.js
'
:
require_context_module_1_7
,
'
./network/request.js
'
:
require_context_module_1_8
,
'
./network/socket.js
'
:
require_context_module_1_9
,
'
./network/upload-file.js
'
:
require_context_module_1_10
,
'
./storage/storage.js
'
:
require_context_module_1_11
,
'
./ui/page-scroll-to.js
'
:
require_context_module_1_12
,
'
./media/recorder.js
'
:
require_context_module_1_7
,
'
./network/download-file.js
'
:
require_context_module_1_8
,
'
./network/request.js
'
:
require_context_module_1_9
,
'
./network/socket.js
'
:
require_context_module_1_10
,
'
./network/upload-file.js
'
:
require_context_module_1_11
,
'
./storage/storage.js
'
:
require_context_module_1_12
,
'
./ui/page-scroll-to.js
'
:
require_context_module_1_13
,
};
var
req
=
function
req
(
key
)
{
...
...
@@ -7918,26 +7995,22 @@ var serviceContext = (function () {
}
function
findElmById
(
id
,
vm
)
{
return
find
ElmByVNode
(
id
,
vm
.
_vnode
)
return
find
RefByElm
(
id
,
vm
.
$el
)
}
function
find
ElmByVNode
(
id
,
vnode
)
{
if
(
!
id
||
!
vnode
)
{
function
find
RefByElm
(
id
,
elm
)
{
if
(
!
id
||
!
elm
)
{
return
}
if
(
vnode
.
data
&&
vnode
.
data
.
attrs
&&
vnode
.
data
.
attrs
.
id
===
id
)
{
return
vnode
.
elm
if
(
elm
.
attr
.
id
===
id
)
{
return
elm
}
const
children
=
vnode
.
children
;
const
children
=
elm
.
children
;
if
(
!
children
)
{
return
}
for
(
let
i
=
0
,
len
=
children
.
length
;
i
<
len
;
i
++
)
{
const
elm
=
find
ElmByVNode
(
id
,
children
[
i
]);
const
elm
=
find
RefByElm
(
id
,
children
[
i
]);
if
(
elm
)
{
return
elm
}
...
...
packages/uni-app-plus-nvue/dist/index.legacy.js
浏览文件 @
e1bf432a
...
...
@@ -429,26 +429,22 @@ function invokeVmMethod (vm, method, args, extras) {
}
function
findElmById
(
id
,
vm
)
{
return
find
ElmByVNode
(
id
,
vm
.
_vnode
)
return
find
RefByElm
(
id
,
vm
.
$el
)
}
function
find
ElmByVNode
(
id
,
vnode
)
{
if
(
!
id
||
!
vnode
)
{
function
find
RefByElm
(
id
,
elm
)
{
if
(
!
id
||
!
elm
)
{
return
}
if
(
vnode
.
data
&&
vnode
.
data
.
attrs
&&
vnode
.
data
.
attrs
.
id
===
id
)
{
return
vnode
.
elm
if
(
elm
.
attr
.
id
===
id
)
{
return
elm
}
const
children
=
vnode
.
children
;
const
children
=
elm
.
children
;
if
(
!
children
)
{
return
}
for
(
let
i
=
0
,
len
=
children
.
length
;
i
<
len
;
i
++
)
{
const
elm
=
find
ElmByVNode
(
id
,
children
[
i
]);
const
elm
=
find
RefByElm
(
id
,
children
[
i
]);
if
(
elm
)
{
return
elm
}
...
...
packages/uni-h5/dist/index.umd.min.js
浏览文件 @
e1bf432a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录