Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
97c3a825
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
97c3a825
编写于
7月 21, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: Object.prototype.hasOwnProperty.call => hasOwn
上级
0f19e6d9
变更
8
展开全部
显示空白变更内容
内联
并排
Showing
8 changed file
with
17 addition
and
14 deletion
+17
-14
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-app-plus/dist/uni.runtime.esm.js
packages/uni-app-plus/dist/uni.runtime.esm.js
+1
-1
packages/uni-components/src/vue/canvas/index.tsx
packages/uni-components/src/vue/canvas/index.tsx
+3
-3
packages/uni-components/src/vue/rich-text/nodes-parser.ts
packages/uni-components/src/vue/rich-text/nodes-parser.ts
+1
-1
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+3
-3
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+4
-4
packages/uni-h5/src/view/components/web-view/index.tsx
packages/uni-h5/src/view/components/web-view/index.tsx
+2
-1
pnpm-lock.yaml
pnpm-lock.yaml
+2
-0
未找到文件。
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
97c3a825
此差异已折叠。
点击以展开。
packages/uni-app-plus/dist/uni.runtime.esm.js
浏览文件 @
97c3a825
...
@@ -19530,7 +19530,7 @@ function initKeyboardEvent() {
...
@@ -19530,7 +19530,7 @@ function initKeyboardEvent() {
function onNodeEvent(nodeId, evt, pageNode) {
function onNodeEvent(nodeId, evt, pageNode) {
const type = evt.type;
const type = evt.type;
if (type === 'onFocus' || type === 'onBlur') {
if (type === 'onFocus' || type === 'onBlur') {
hookKeyboardEvent(evt,
evt
=> {
hookKeyboardEvent(evt,
(evt)
=> {
pageNode.fireEvent(nodeId, evt);
pageNode.fireEvent(nodeId, evt);
});
});
}
}
...
...
packages/uni-components/src/vue/canvas/index.tsx
浏览文件 @
97c3a825
import
{
ref
,
computed
,
ExtractPropTypes
,
Ref
,
onMounted
}
from
'
vue
'
import
{
ref
,
computed
,
ExtractPropTypes
,
Ref
,
onMounted
}
from
'
vue
'
import
{
extend
,
isFunction
}
from
'
@vue/shared
'
import
{
extend
,
hasOwn
,
isFunction
}
from
'
@vue/shared
'
import
type
{
Actions
,
OperateCanvasType
}
from
'
@dcloudio/uni-api
'
import
type
{
Actions
,
OperateCanvasType
}
from
'
@dcloudio/uni-api
'
import
{
import
{
useAttrs
,
useAttrs
,
...
@@ -37,8 +37,8 @@ function resolveColor(color: number[]) {
...
@@ -37,8 +37,8 @@ function resolveColor(color: number[]) {
function
processTouches
(
target
:
EventTarget
,
touches
:
TouchEvent
[
'
touches
'
])
{
function
processTouches
(
target
:
EventTarget
,
touches
:
TouchEvent
[
'
touches
'
])
{
const
eventTarget
=
target
as
HTMLElement
const
eventTarget
=
target
as
HTMLElement
return
Array
.
from
(
touches
).
map
((
touch
)
=>
{
let
boundingClientRect
=
eventTarget
.
getBoundingClientRect
()
let
boundingClientRect
=
eventTarget
.
getBoundingClientRect
()
return
Array
.
from
(
touches
).
map
((
touch
)
=>
{
return
{
return
{
identifier
:
touch
.
identifier
,
identifier
:
touch
.
identifier
,
x
:
touch
.
clientX
-
boundingClientRect
.
left
,
x
:
touch
.
clientX
-
boundingClientRect
.
left
,
...
@@ -158,7 +158,7 @@ function useListeners(
...
@@ -158,7 +158,7 @@ function useListeners(
(()
=>
{
(()
=>
{
let
obj
=
{}
let
obj
=
{}
for
(
const
key
in
_$listeners
)
{
for
(
const
key
in
_$listeners
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
_$listeners
,
key
))
{
if
(
hasOwn
(
_$listeners
,
key
))
{
const
event
=
(
_$listeners
as
any
)[
key
]
const
event
=
(
_$listeners
as
any
)[
key
]
;(
obj
as
any
)[
key
]
=
event
;(
obj
as
any
)[
key
]
=
event
}
}
...
...
packages/uni-components/src/vue/rich-text/nodes-parser.ts
浏览文件 @
97c3a825
...
@@ -129,7 +129,7 @@ function processClickEvent(node: Node, triggerItemClick: Function) {
...
@@ -129,7 +129,7 @@ function processClickEvent(node: Node, triggerItemClick: Function) {
function
normalizeAttrs
(
tagName
:
string
,
attrs
:
Data
)
{
function
normalizeAttrs
(
tagName
:
string
,
attrs
:
Data
)
{
if
(
!
isPlainObject
(
attrs
))
return
if
(
!
isPlainObject
(
attrs
))
return
for
(
const
key
in
attrs
)
{
for
(
const
key
in
attrs
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
attrs
,
key
))
{
if
(
hasOwn
(
attrs
,
key
))
{
const
value
=
attrs
[
key
]
const
value
=
attrs
[
key
]
if
(
tagName
===
'
img
'
&&
key
===
'
src
'
)
if
(
tagName
===
'
img
'
&&
key
===
'
src
'
)
attrs
[
key
]
=
getRealPath
(
value
as
string
)
attrs
[
key
]
=
getRealPath
(
value
as
string
)
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
97c3a825
...
@@ -1646,8 +1646,8 @@ function resolveColor(color) {
...
@@ -1646,8 +1646,8 @@ function resolveColor(color) {
}
}
function
processTouches
(
target
,
touches
)
{
function
processTouches
(
target
,
touches
)
{
const
eventTarget
=
target
;
const
eventTarget
=
target
;
return
Array
.
from
(
touches
).
map
((
touch
)
=>
{
let
boundingClientRect
=
eventTarget
.
getBoundingClientRect
();
let
boundingClientRect
=
eventTarget
.
getBoundingClientRect
();
return
Array
.
from
(
touches
).
map
((
touch
)
=>
{
return
{
return
{
identifier
:
touch
.
identifier
,
identifier
:
touch
.
identifier
,
x
:
touch
.
clientX
-
boundingClientRect
.
left
,
x
:
touch
.
clientX
-
boundingClientRect
.
left
,
...
@@ -1743,7 +1743,7 @@ function useListeners(props2, Listeners, trigger) {
...
@@ -1743,7 +1743,7 @@ function useListeners(props2, Listeners, trigger) {
let
$listeners
=
shared
.
extend
({},
(()
=>
{
let
$listeners
=
shared
.
extend
({},
(()
=>
{
let
obj
=
{};
let
obj
=
{};
for
(
const
key
in
_$listeners
)
{
for
(
const
key
in
_$listeners
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
_$listeners
,
key
))
{
if
(
shared
.
hasOwn
(
_$listeners
,
key
))
{
const
event
=
_$listeners
[
key
];
const
event
=
_$listeners
[
key
];
obj
[
key
]
=
event
;
obj
[
key
]
=
event
;
}
}
...
@@ -5104,7 +5104,7 @@ function normalizeAttrs(tagName, attrs) {
...
@@ -5104,7 +5104,7 @@ function normalizeAttrs(tagName, attrs) {
if
(
!
shared
.
isPlainObject
(
attrs
))
if
(
!
shared
.
isPlainObject
(
attrs
))
return
;
return
;
for
(
const
key
in
attrs
)
{
for
(
const
key
in
attrs
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
attrs
,
key
))
{
if
(
shared
.
hasOwn
(
attrs
,
key
))
{
const
value
=
attrs
[
key
];
const
value
=
attrs
[
key
];
if
(
tagName
===
"
img
"
&&
key
===
"
src
"
)
if
(
tagName
===
"
img
"
&&
key
===
"
src
"
)
attrs
[
key
]
=
getRealPath
(
value
);
attrs
[
key
]
=
getRealPath
(
value
);
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
97c3a825
...
@@ -6561,8 +6561,8 @@ function resolveColor(color) {
...
@@ -6561,8 +6561,8 @@ function resolveColor(color) {
}
}
function processTouches(target, touches) {
function processTouches(target, touches) {
const eventTarget = target;
const eventTarget = target;
return Array.from(touches).map((touch) => {
let boundingClientRect = eventTarget.getBoundingClientRect();
let boundingClientRect = eventTarget.getBoundingClientRect();
return Array.from(touches).map((touch) => {
return {
return {
identifier: touch.identifier,
identifier: touch.identifier,
x: touch.clientX - boundingClientRect.left,
x: touch.clientX - boundingClientRect.left,
...
@@ -6661,7 +6661,7 @@ function useListeners(props2, Listeners, trigger) {
...
@@ -6661,7 +6661,7 @@ function useListeners(props2, Listeners, trigger) {
let $listeners = extend({}, (() => {
let $listeners = extend({}, (() => {
let obj = {};
let obj = {};
for (const key in _$listeners) {
for (const key in _$listeners) {
if (
Object.prototype.hasOwnProperty.call
(_$listeners, key)) {
if (
hasOwn
(_$listeners, key)) {
const event = _$listeners[key];
const event = _$listeners[key];
obj[key] = event;
obj[key] = event;
}
}
...
@@ -11822,7 +11822,7 @@ function normalizeAttrs(tagName, attrs2) {
...
@@ -11822,7 +11822,7 @@ function normalizeAttrs(tagName, attrs2) {
if (!isPlainObject(attrs2))
if (!isPlainObject(attrs2))
return;
return;
for (const key in attrs2) {
for (const key in attrs2) {
if (
Object.prototype.hasOwnProperty.call
(attrs2, key)) {
if (
hasOwn
(attrs2, key)) {
const value = attrs2[key];
const value = attrs2[key];
if (tagName === "img" && key === "src")
if (tagName === "img" && key === "src")
attrs2[key] = getRealPath(value);
attrs2[key] = getRealPath(value);
...
@@ -15335,7 +15335,7 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -15335,7 +15335,7 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
const iframe = document.createElement("iframe");
const iframe = document.createElement("iframe");
watchEffect(() => {
watchEffect(() => {
for (const key in $attrs.value) {
for (const key in $attrs.value) {
if (
Object.prototype.hasOwnProperty.call
($attrs.value, key)) {
if (
hasOwn
($attrs.value, key)) {
const attr2 = $attrs.value[key];
const attr2 = $attrs.value[key];
iframe[key] = attr2;
iframe[key] = attr2;
}
}
...
...
packages/uni-h5/src/view/components/web-view/index.tsx
浏览文件 @
97c3a825
...
@@ -7,6 +7,7 @@ import {
...
@@ -7,6 +7,7 @@ import {
watchEffect
,
watchEffect
,
onBeforeUnmount
,
onBeforeUnmount
,
}
from
'
vue
'
}
from
'
vue
'
import
{
hasOwn
}
from
'
@vue/shared
'
import
{
import
{
defineBuiltInComponent
,
defineBuiltInComponent
,
ResizeSensor
,
ResizeSensor
,
...
@@ -50,7 +51,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
...
@@ -50,7 +51,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
const
iframe
=
document
.
createElement
(
'
iframe
'
)
const
iframe
=
document
.
createElement
(
'
iframe
'
)
watchEffect
(()
=>
{
watchEffect
(()
=>
{
for
(
const
key
in
$attrs
.
value
)
{
for
(
const
key
in
$attrs
.
value
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
$attrs
.
value
,
key
))
{
if
(
hasOwn
(
$attrs
.
value
,
key
))
{
const
attr
=
(
$attrs
.
value
as
any
)[
key
]
const
attr
=
(
$attrs
.
value
as
any
)[
key
]
;(
iframe
as
any
)[
key
]
=
attr
;(
iframe
as
any
)[
key
]
=
attr
}
}
...
...
pnpm-lock.yaml
浏览文件 @
97c3a825
...
@@ -797,8 +797,10 @@ importers:
...
@@ -797,8 +797,10 @@ importers:
packages/uni-uts-vite
:
packages/uni-uts-vite
:
specifiers
:
specifiers
:
'
@dcloudio/uni-cli-shared'
:
3.0.0-alpha-3050220220719003
'
@dcloudio/uni-cli-shared'
:
3.0.0-alpha-3050220220719003
'
@dcloudio/uts'
:
3.0.0-alpha-3050220220719003
dependencies
:
dependencies
:
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
'
@dcloudio/uts'
:
link:../uts
packages/uni-vue
:
packages/uni-vue
:
specifiers
:
specifiers
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录