Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ChenYFan_OHHH
uni-app
提交
fbf930ca
U
uni-app
项目概览
ChenYFan_OHHH
/
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,发现更多精彩内容 >>
提交
fbf930ca
编写于
5月 25, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build(deps): bump vue from 3.1.0-beta.3 to 3.1.0-beta.4
上级
2efa2ca2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
202 addition
and
78 deletion
+202
-78
packages/uni-h5-vue/dist/vue.runtime.cjs.js
packages/uni-h5-vue/dist/vue.runtime.cjs.js
+48
-18
packages/uni-h5-vue/dist/vue.runtime.compat.cjs.js
packages/uni-h5-vue/dist/vue.runtime.compat.cjs.js
+53
-21
packages/uni-h5-vue/dist/vue.runtime.compat.esm.js
packages/uni-h5-vue/dist/vue.runtime.compat.esm.js
+53
-21
packages/uni-h5-vue/dist/vue.runtime.esm.js
packages/uni-h5-vue/dist/vue.runtime.esm.js
+48
-18
未找到文件。
packages/uni-h5-vue/dist/vue.runtime.cjs.js
浏览文件 @
fbf930ca
...
...
@@ -1460,6 +1460,15 @@ function createDevtoolsComponentHook(hook) {
exports
.
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
.
parent
?
component
.
parent
.
uid
:
undefined
,
component
);
};
}
const
devtoolsPerfStart
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:start
"
/* PERFORMANCE_START */
);
const
devtoolsPerfEnd
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:end
"
/* PERFORMANCE_END */
);
function
createDevtoolsPerformanceHook
(
hook
)
{
return
(
component
,
type
,
time
)
=>
{
if
(
!
exports
.
devtools
)
return
;
exports
.
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
,
type
,
time
);
};
}
function
devtoolsComponentEmit
(
component
,
event
,
params
)
{
if
(
!
exports
.
devtools
)
return
;
...
...
@@ -2029,12 +2038,16 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false on
if
(
!
isRenderingCompiledSlot
)
{
closeBlock
();
}
{
devtoolsComponentUpdated
(
ctx
);
}
return
res
;
};
// mark this as a compiled slot function.
// this is used in vnode.ts -> normalizeChildren() to set the slot
// rendering flag.
renderFnWithContext
.
_c
=
true
;
// also used to cache the normalized results to avoid repeated normalization
renderFnWithContext
.
_c
=
renderFnWithContext
;
return
renderFnWithContext
;
}
...
...
@@ -3880,7 +3893,8 @@ function applyOptions(instance, options, deferredData = [], deferredWatch = [],
instance
.
render
=
render
;
}
// fixed by xxxxxx
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
if
(
customApplyOptions
)
{
customApplyOptions
(
options
,
instance
,
publicThis
);
}
...
...
@@ -4284,7 +4298,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
}
else
{
const
camelizedKey
=
shared
.
camelize
(
key
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
,
false
/* isAbsent */
);
}
}
else
{
...
...
@@ -4317,7 +4331,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
(
rawPrevProps
[
key
]
!==
undefined
||
// for kebab-case
rawPrevProps
[
kebabKey
]
!==
undefined
))
{
props
[
key
]
=
resolvePropValue
(
options
,
raw
Props
||
shared
.
EMPTY_OBJ
,
key
,
undefined
,
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
raw
CurrentProps
,
key
,
undefined
,
instance
,
true
/* isAbsent */
);
}
}
else
{
...
...
@@ -4347,6 +4361,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
function
setFullProps
(
instance
,
rawProps
,
props
,
attrs
)
{
const
[
options
,
needCastKeys
]
=
instance
.
propsOptions
;
let
hasAttrsChanged
=
false
;
let
rawCastValues
;
if
(
rawProps
)
{
for
(
let
key
in
rawProps
)
{
// key, ref are reserved and never passed down
...
...
@@ -4358,7 +4373,12 @@ function setFullProps(instance, rawProps, props, attrs) {
// kebab -> camel conversion here we need to camelize the key.
let
camelKey
;
if
(
options
&&
shared
.
hasOwn
(
options
,
(
camelKey
=
shared
.
camelize
(
key
))))
{
props
[
camelKey
]
=
value
;
if
(
!
needCastKeys
||
!
needCastKeys
.
includes
(
camelKey
))
{
props
[
camelKey
]
=
value
;
}
else
{
(
rawCastValues
||
(
rawCastValues
=
{}))[
camelKey
]
=
value
;
}
}
else
if
(
!
isEmitListener
(
instance
.
emitsOptions
,
key
))
{
if
(
value
!==
attrs
[
key
])
{
...
...
@@ -4370,14 +4390,15 @@ function setFullProps(instance, rawProps, props, attrs) {
}
if
(
needCastKeys
)
{
const
rawCurrentProps
=
toRaw
(
props
);
const
castValues
=
rawCastValues
||
shared
.
EMPTY_OBJ
;
for
(
let
i
=
0
;
i
<
needCastKeys
.
length
;
i
++
)
{
const
key
=
needCastKeys
[
i
];
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
rawCurrentProps
[
key
],
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
castValues
[
key
],
instance
,
!
shared
.
hasOwn
(
castValues
,
key
)
);
}
}
return
hasAttrsChanged
;
}
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
)
{
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
,
isAbsent
)
{
const
opt
=
options
[
key
];
if
(
opt
!=
null
)
{
const
hasDefault
=
shared
.
hasOwn
(
opt
,
'
default
'
);
...
...
@@ -4401,7 +4422,7 @@ function resolvePropValue(options, props, key, value, instance) {
}
// boolean casting
if
(
opt
[
0
/* shouldCast */
])
{
if
(
!
shared
.
hasOwn
(
props
,
key
)
&&
!
hasDefault
)
{
if
(
isAbsent
&&
!
hasDefault
)
{
value
=
false
;
}
else
if
(
opt
[
1
/* shouldCastTrue */
]
&&
...
...
@@ -4638,14 +4659,15 @@ const isInternalKey = (key) => key[0] === '_' || key === '$stable';
const
normalizeSlotValue
=
(
value
)
=>
shared
.
isArray
(
value
)
?
value
.
map
(
normalizeVNode
)
:
[
normalizeVNode
(
value
)];
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
withCtx
((
props
)
=>
{
if
(
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
rawSlot
.
_c
||
withCtx
((
props
)
=>
{
if
(
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeObjectSlots
=
(
rawSlots
,
slots
,
instance
)
=>
{
const
ctx
=
rawSlots
.
_ctx
;
for
(
const
key
in
rawSlots
)
{
...
...
@@ -4678,7 +4700,9 @@ const initSlots = (instance, children) => {
if
(
instance
.
vnode
.
shapeFlag
&
32
/* SLOTS_CHILDREN */
)
{
const
type
=
children
.
_
;
if
(
type
)
{
instance
.
slots
=
children
;
// users can get the shallow readonly version of the slots object through `this.$slots`,
// we should avoid the proxy object polluting the slots of the internal instance
instance
.
slots
=
toRaw
(
children
);
// make compiler marker non-enumerable
shared
.
def
(
children
,
'
_
'
,
type
);
}
...
...
@@ -5282,6 +5306,9 @@ function startMeasure(instance, type) {
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
perf
.
mark
(
`vue-
${
type
}
-
${
instance
.
uid
}
`
);
}
{
devtoolsPerfStart
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
endMeasure
(
instance
,
type
)
{
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
...
...
@@ -5292,6 +5319,9 @@ function endMeasure(instance, type) {
perf
.
clearMarks
(
startTag
);
perf
.
clearMarks
(
endTag
);
}
{
devtoolsPerfEnd
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
isSupported
()
{
if
(
supported
!==
undefined
)
{
...
...
@@ -8388,7 +8418,7 @@ function initCustomFormatter() {
}
// Core API ------------------------------------------------------------------
const
version
=
"
3.1.0-beta.
3
"
;
const
version
=
"
3.1.0-beta.
4
"
;
const
_ssrUtils
=
{
createComponentInstance
,
setupComponent
,
...
...
packages/uni-h5-vue/dist/vue.runtime.compat.cjs.js
浏览文件 @
fbf930ca
...
...
@@ -1759,6 +1759,15 @@ function createDevtoolsComponentHook(hook) {
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
.
parent
?
component
.
parent
.
uid
:
undefined
,
component
);
};
}
const
devtoolsPerfStart
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:start
"
/* PERFORMANCE_START */
);
const
devtoolsPerfEnd
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:end
"
/* PERFORMANCE_END */
);
function
createDevtoolsPerformanceHook
(
hook
)
{
return
(
component
,
type
,
time
)
=>
{
if
(
!
devtools
)
return
;
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
,
type
,
time
);
};
}
function
devtoolsComponentEmit
(
component
,
event
,
params
)
{
if
(
!
devtools
)
return
;
...
...
@@ -2250,8 +2259,10 @@ function convertLegacyVModelProps(vnode) {
// modelValue -> value
// onUpdate:modelValue -> onModelCompat:input
const
{
prop
=
'
value
'
,
event
=
'
input
'
}
=
type
.
model
||
{};
props
[
prop
]
=
props
.
modelValue
;
delete
props
.
modelValue
;
if
(
prop
!==
'
modelValue
'
)
{
props
[
prop
]
=
props
.
modelValue
;
delete
props
.
modelValue
;
}
// important: update dynamic props
if
(
dynamicProps
)
{
dynamicProps
[
dynamicProps
.
indexOf
(
'
modelValue
'
)]
=
prop
;
...
...
@@ -2517,12 +2528,16 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // true onl
if
(
!
isRenderingCompiledSlot
)
{
closeBlock
();
}
{
devtoolsComponentUpdated
(
ctx
);
}
return
res
;
};
// mark this as a compiled slot function.
// this is used in vnode.ts -> normalizeChildren() to set the slot
// rendering flag.
renderFnWithContext
.
_c
=
true
;
// also used to cache the normalized results to avoid repeated normalization
renderFnWithContext
.
_c
=
renderFnWithContext
;
if
(
isNonScopedSlot
)
{
renderFnWithContext
.
_nonScoped
=
true
;
}
...
...
@@ -4437,7 +4452,8 @@ function applyOptions(instance, options, deferredData = [], deferredWatch = [],
instance
.
render
=
render
;
}
// fixed by xxxxxx
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
if
(
customApplyOptions
)
{
customApplyOptions
(
options
,
instance
,
publicThis
);
}
...
...
@@ -4912,7 +4928,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
}
else
{
const
camelizedKey
=
camelize
(
key
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
,
false
/* isAbsent */
);
}
}
else
{
...
...
@@ -4953,7 +4969,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
(
rawPrevProps
[
key
]
!==
undefined
||
// for kebab-case
rawPrevProps
[
kebabKey
]
!==
undefined
))
{
props
[
key
]
=
resolvePropValue
(
options
,
raw
Props
||
EMPTY_OBJ
,
key
,
undefined
,
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
raw
CurrentProps
,
key
,
undefined
,
instance
,
true
/* isAbsent */
);
}
}
else
{
...
...
@@ -4983,6 +4999,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
function
setFullProps
(
instance
,
rawProps
,
props
,
attrs
)
{
const
[
options
,
needCastKeys
]
=
instance
.
propsOptions
;
let
hasAttrsChanged
=
false
;
let
rawCastValues
;
if
(
rawProps
)
{
for
(
let
key
in
rawProps
)
{
// key, ref are reserved and never passed down
...
...
@@ -5002,7 +5019,12 @@ function setFullProps(instance, rawProps, props, attrs) {
// kebab -> camel conversion here we need to camelize the key.
let
camelKey
;
if
(
options
&&
hasOwn
(
options
,
(
camelKey
=
camelize
(
key
))))
{
props
[
camelKey
]
=
value
;
if
(
!
needCastKeys
||
!
needCastKeys
.
includes
(
camelKey
))
{
props
[
camelKey
]
=
value
;
}
else
{
(
rawCastValues
||
(
rawCastValues
=
{}))[
camelKey
]
=
value
;
}
}
else
if
(
!
isEmitListener
(
instance
.
emitsOptions
,
key
))
{
// Any non-declared (either as a prop or an emitted event) props are put
...
...
@@ -5025,14 +5047,15 @@ function setFullProps(instance, rawProps, props, attrs) {
}
if
(
needCastKeys
)
{
const
rawCurrentProps
=
toRaw
(
props
);
const
castValues
=
rawCastValues
||
EMPTY_OBJ
;
for
(
let
i
=
0
;
i
<
needCastKeys
.
length
;
i
++
)
{
const
key
=
needCastKeys
[
i
];
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
rawCurrentProps
[
key
],
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
castValues
[
key
],
instance
,
!
hasOwn
(
castValues
,
key
)
);
}
}
return
hasAttrsChanged
;
}
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
)
{
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
,
isAbsent
)
{
const
opt
=
options
[
key
];
if
(
opt
!=
null
)
{
const
hasDefault
=
hasOwn
(
opt
,
'
default
'
);
...
...
@@ -5058,7 +5081,7 @@ function resolvePropValue(options, props, key, value, instance) {
}
// boolean casting
if
(
opt
[
0
/* shouldCast */
])
{
if
(
!
hasOwn
(
props
,
key
)
&&
!
hasDefault
)
{
if
(
isAbsent
&&
!
hasDefault
)
{
value
=
false
;
}
else
if
(
opt
[
1
/* shouldCastTrue */
]
&&
...
...
@@ -5298,14 +5321,15 @@ const isInternalKey = (key) => key[0] === '_' || key === '$stable';
const
normalizeSlotValue
=
(
value
)
=>
isArray
(
value
)
?
value
.
map
(
normalizeVNode
)
:
[
normalizeVNode
(
value
)];
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
withCtx
((
props
)
=>
{
if
(
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
rawSlot
.
_c
||
withCtx
((
props
)
=>
{
if
(
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeObjectSlots
=
(
rawSlots
,
slots
,
instance
)
=>
{
const
ctx
=
rawSlots
.
_ctx
;
for
(
const
key
in
rawSlots
)
{
...
...
@@ -5338,7 +5362,9 @@ const initSlots = (instance, children) => {
if
(
instance
.
vnode
.
shapeFlag
&
32
/* SLOTS_CHILDREN */
)
{
const
type
=
children
.
_
;
if
(
type
)
{
instance
.
slots
=
children
;
// users can get the shallow readonly version of the slots object through `this.$slots`,
// we should avoid the proxy object polluting the slots of the internal instance
instance
.
slots
=
toRaw
(
children
);
// make compiler marker non-enumerable
def
(
children
,
'
_
'
,
type
);
}
...
...
@@ -5612,7 +5638,7 @@ function createCompatVue(createApp, createSingletonApp) {
return
vm
;
}
}
Vue
.
version
=
"
3.1.0-beta.
3
"
;
Vue
.
version
=
"
3.1.0-beta.
4
"
;
Vue
.
config
=
singletonApp
.
config
;
Vue
.
use
=
(
p
,
...
options
)
=>
{
if
(
p
&&
isFunction
(
p
.
install
))
{
...
...
@@ -6487,6 +6513,9 @@ function startMeasure(instance, type) {
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
perf
.
mark
(
`vue-
${
type
}
-
${
instance
.
uid
}
`
);
}
{
devtoolsPerfStart
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
endMeasure
(
instance
,
type
)
{
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
...
...
@@ -6497,6 +6526,9 @@ function endMeasure(instance, type) {
perf
.
clearMarks
(
startTag
);
perf
.
clearMarks
(
endTag
);
}
{
devtoolsPerfEnd
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
isSupported
()
{
if
(
supported
!==
undefined
)
{
...
...
@@ -10262,7 +10294,7 @@ function initCustomFormatter() {
}
// Core API ------------------------------------------------------------------
const
version
=
"
3.1.0-beta.
3
"
;
const
version
=
"
3.1.0-beta.
4
"
;
const
_ssrUtils
=
{
createComponentInstance
,
setupComponent
,
...
...
packages/uni-h5-vue/dist/vue.runtime.compat.esm.js
浏览文件 @
fbf930ca
...
...
@@ -1766,6 +1766,15 @@ function createDevtoolsComponentHook(hook) {
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
.
parent
?
component
.
parent
.
uid
:
undefined
,
component
);
};
}
const
devtoolsPerfStart
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:start
"
/* PERFORMANCE_START */
);
const
devtoolsPerfEnd
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:end
"
/* PERFORMANCE_END */
);
function
createDevtoolsPerformanceHook
(
hook
)
{
return
(
component
,
type
,
time
)
=>
{
if
(
!
devtools
)
return
;
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
,
type
,
time
);
};
}
function
devtoolsComponentEmit
(
component
,
event
,
params
)
{
if
(
!
devtools
)
return
;
...
...
@@ -2260,8 +2269,10 @@ function convertLegacyVModelProps(vnode) {
// modelValue -> value
// onUpdate:modelValue -> onModelCompat:input
const
{
prop
=
'
value
'
,
event
=
'
input
'
}
=
type
.
model
||
{};
props
[
prop
]
=
props
.
modelValue
;
delete
props
.
modelValue
;
if
(
prop
!==
'
modelValue
'
)
{
props
[
prop
]
=
props
.
modelValue
;
delete
props
.
modelValue
;
}
// important: update dynamic props
if
(
dynamicProps
)
{
dynamicProps
[
dynamicProps
.
indexOf
(
'
modelValue
'
)]
=
prop
;
...
...
@@ -2527,12 +2538,16 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // true onl
if
(
!
isRenderingCompiledSlot
)
{
closeBlock
();
}
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
||
__VUE_PROD_DEVTOOLS__
)
{
devtoolsComponentUpdated
(
ctx
);
}
return
res
;
};
// mark this as a compiled slot function.
// this is used in vnode.ts -> normalizeChildren() to set the slot
// rendering flag.
renderFnWithContext
.
_c
=
true
;
// also used to cache the normalized results to avoid repeated normalization
renderFnWithContext
.
_c
=
renderFnWithContext
;
if
(
isNonScopedSlot
)
{
renderFnWithContext
.
_nonScoped
=
true
;
}
...
...
@@ -4431,7 +4446,8 @@ function applyOptions(instance, options, deferredData = [], deferredWatch = [],
instance
.
render
=
render
;
}
// fixed by xxxxxx
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
if
(
customApplyOptions
)
{
customApplyOptions
(
options
,
instance
,
publicThis
);
}
...
...
@@ -4912,7 +4928,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
}
else
{
const
camelizedKey
=
camelize
(
key
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
,
false
/* isAbsent */
);
}
}
else
{
...
...
@@ -4953,7 +4969,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
(
rawPrevProps
[
key
]
!==
undefined
||
// for kebab-case
rawPrevProps
[
kebabKey
]
!==
undefined
))
{
props
[
key
]
=
resolvePropValue
(
options
,
raw
Props
||
EMPTY_OBJ
,
key
,
undefined
,
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
raw
CurrentProps
,
key
,
undefined
,
instance
,
true
/* isAbsent */
);
}
}
else
{
...
...
@@ -4983,6 +4999,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
function
setFullProps
(
instance
,
rawProps
,
props
,
attrs
)
{
const
[
options
,
needCastKeys
]
=
instance
.
propsOptions
;
let
hasAttrsChanged
=
false
;
let
rawCastValues
;
if
(
rawProps
)
{
for
(
let
key
in
rawProps
)
{
// key, ref are reserved and never passed down
...
...
@@ -5002,7 +5019,12 @@ function setFullProps(instance, rawProps, props, attrs) {
// kebab -> camel conversion here we need to camelize the key.
let
camelKey
;
if
(
options
&&
hasOwn
(
options
,
(
camelKey
=
camelize
(
key
))))
{
props
[
camelKey
]
=
value
;
if
(
!
needCastKeys
||
!
needCastKeys
.
includes
(
camelKey
))
{
props
[
camelKey
]
=
value
;
}
else
{
(
rawCastValues
||
(
rawCastValues
=
{}))[
camelKey
]
=
value
;
}
}
else
if
(
!
isEmitListener
(
instance
.
emitsOptions
,
key
))
{
// Any non-declared (either as a prop or an emitted event) props are put
...
...
@@ -5025,14 +5047,15 @@ function setFullProps(instance, rawProps, props, attrs) {
}
if
(
needCastKeys
)
{
const
rawCurrentProps
=
toRaw
(
props
);
const
castValues
=
rawCastValues
||
EMPTY_OBJ
;
for
(
let
i
=
0
;
i
<
needCastKeys
.
length
;
i
++
)
{
const
key
=
needCastKeys
[
i
];
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
rawCurrentProps
[
key
],
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
castValues
[
key
],
instance
,
!
hasOwn
(
castValues
,
key
)
);
}
}
return
hasAttrsChanged
;
}
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
)
{
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
,
isAbsent
)
{
const
opt
=
options
[
key
];
if
(
opt
!=
null
)
{
const
hasDefault
=
hasOwn
(
opt
,
'
default
'
);
...
...
@@ -5058,7 +5081,7 @@ function resolvePropValue(options, props, key, value, instance) {
}
// boolean casting
if
(
opt
[
0
/* shouldCast */
])
{
if
(
!
hasOwn
(
props
,
key
)
&&
!
hasDefault
)
{
if
(
isAbsent
&&
!
hasDefault
)
{
value
=
false
;
}
else
if
(
opt
[
1
/* shouldCastTrue */
]
&&
...
...
@@ -5298,14 +5321,15 @@ const isInternalKey = (key) => key[0] === '_' || key === '$stable';
const
normalizeSlotValue
=
(
value
)
=>
isArray
(
value
)
?
value
.
map
(
normalizeVNode
)
:
[
normalizeVNode
(
value
)];
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
withCtx
((
props
)
=>
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
rawSlot
.
_c
||
withCtx
((
props
)
=>
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeObjectSlots
=
(
rawSlots
,
slots
,
instance
)
=>
{
const
ctx
=
rawSlots
.
_ctx
;
for
(
const
key
in
rawSlots
)
{
...
...
@@ -5340,7 +5364,9 @@ const initSlots = (instance, children) => {
if
(
instance
.
vnode
.
shapeFlag
&
32
/* SLOTS_CHILDREN */
)
{
const
type
=
children
.
_
;
if
(
type
)
{
instance
.
slots
=
children
;
// users can get the shallow readonly version of the slots object through `this.$slots`,
// we should avoid the proxy object polluting the slots of the internal instance
instance
.
slots
=
toRaw
(
children
);
// make compiler marker non-enumerable
def
(
children
,
'
_
'
,
type
);
}
...
...
@@ -5614,7 +5640,7 @@ function createCompatVue(createApp, createSingletonApp) {
return
vm
;
}
}
Vue
.
version
=
"
3.1.0-beta.
3
"
;
Vue
.
version
=
"
3.1.0-beta.
4
"
;
Vue
.
config
=
singletonApp
.
config
;
Vue
.
use
=
(
p
,
...
options
)
=>
{
if
(
p
&&
isFunction
(
p
.
install
))
{
...
...
@@ -6497,6 +6523,9 @@ function startMeasure(instance, type) {
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
perf
.
mark
(
`vue-
${
type
}
-
${
instance
.
uid
}
`
);
}
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
||
__VUE_PROD_DEVTOOLS__
)
{
devtoolsPerfStart
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
endMeasure
(
instance
,
type
)
{
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
...
...
@@ -6507,6 +6536,9 @@ function endMeasure(instance, type) {
perf
.
clearMarks
(
startTag
);
perf
.
clearMarks
(
endTag
);
}
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
||
__VUE_PROD_DEVTOOLS__
)
{
devtoolsPerfEnd
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
isSupported
()
{
if
(
supported
!==
undefined
)
{
...
...
@@ -10323,7 +10355,7 @@ function initCustomFormatter() {
}
// Core API ------------------------------------------------------------------
const
version
=
"
3.1.0-beta.
3
"
;
const
version
=
"
3.1.0-beta.
4
"
;
/**
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
* @internal
...
...
packages/uni-h5-vue/dist/vue.runtime.esm.js
浏览文件 @
fbf930ca
...
...
@@ -1466,6 +1466,15 @@ function createDevtoolsComponentHook(hook) {
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
.
parent
?
component
.
parent
.
uid
:
undefined
,
component
);
};
}
const
devtoolsPerfStart
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:start
"
/* PERFORMANCE_START */
);
const
devtoolsPerfEnd
=
/*#__PURE__*/
createDevtoolsPerformanceHook
(
"
perf:end
"
/* PERFORMANCE_END */
);
function
createDevtoolsPerformanceHook
(
hook
)
{
return
(
component
,
type
,
time
)
=>
{
if
(
!
devtools
)
return
;
devtools
.
emit
(
hook
,
component
.
appContext
.
app
,
component
.
uid
,
component
,
type
,
time
);
};
}
function
devtoolsComponentEmit
(
component
,
event
,
params
)
{
if
(
!
devtools
)
return
;
...
...
@@ -2038,12 +2047,16 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false on
if
(
!
isRenderingCompiledSlot
)
{
closeBlock
();
}
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
||
__VUE_PROD_DEVTOOLS__
)
{
devtoolsComponentUpdated
(
ctx
);
}
return
res
;
};
// mark this as a compiled slot function.
// this is used in vnode.ts -> normalizeChildren() to set the slot
// rendering flag.
renderFnWithContext
.
_c
=
true
;
// also used to cache the normalized results to avoid repeated normalization
renderFnWithContext
.
_c
=
renderFnWithContext
;
return
renderFnWithContext
;
}
...
...
@@ -3872,7 +3885,8 @@ function applyOptions(instance, options, deferredData = [], deferredWatch = [],
instance
.
render
=
render
;
}
// fixed by xxxxxx
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
const
customApplyOptions
=
instance
.
appContext
.
config
.
globalProperties
.
$applyOptions
;
if
(
customApplyOptions
)
{
customApplyOptions
(
options
,
instance
,
publicThis
);
}
...
...
@@ -4281,7 +4295,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
}
else
{
const
camelizedKey
=
camelize
(
key
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
);
props
[
camelizedKey
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
camelizedKey
,
value
,
instance
,
false
/* isAbsent */
);
}
}
else
{
...
...
@@ -4314,7 +4328,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
(
rawPrevProps
[
key
]
!==
undefined
||
// for kebab-case
rawPrevProps
[
kebabKey
]
!==
undefined
))
{
props
[
key
]
=
resolvePropValue
(
options
,
raw
Props
||
EMPTY_OBJ
,
key
,
undefined
,
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
raw
CurrentProps
,
key
,
undefined
,
instance
,
true
/* isAbsent */
);
}
}
else
{
...
...
@@ -4344,6 +4358,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
function
setFullProps
(
instance
,
rawProps
,
props
,
attrs
)
{
const
[
options
,
needCastKeys
]
=
instance
.
propsOptions
;
let
hasAttrsChanged
=
false
;
let
rawCastValues
;
if
(
rawProps
)
{
for
(
let
key
in
rawProps
)
{
// key, ref are reserved and never passed down
...
...
@@ -4355,7 +4370,12 @@ function setFullProps(instance, rawProps, props, attrs) {
// kebab -> camel conversion here we need to camelize the key.
let
camelKey
;
if
(
options
&&
hasOwn
(
options
,
(
camelKey
=
camelize
(
key
))))
{
props
[
camelKey
]
=
value
;
if
(
!
needCastKeys
||
!
needCastKeys
.
includes
(
camelKey
))
{
props
[
camelKey
]
=
value
;
}
else
{
(
rawCastValues
||
(
rawCastValues
=
{}))[
camelKey
]
=
value
;
}
}
else
if
(
!
isEmitListener
(
instance
.
emitsOptions
,
key
))
{
if
(
value
!==
attrs
[
key
])
{
...
...
@@ -4367,14 +4387,15 @@ function setFullProps(instance, rawProps, props, attrs) {
}
if
(
needCastKeys
)
{
const
rawCurrentProps
=
toRaw
(
props
);
const
castValues
=
rawCastValues
||
EMPTY_OBJ
;
for
(
let
i
=
0
;
i
<
needCastKeys
.
length
;
i
++
)
{
const
key
=
needCastKeys
[
i
];
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
rawCurrentProps
[
key
],
instance
);
props
[
key
]
=
resolvePropValue
(
options
,
rawCurrentProps
,
key
,
castValues
[
key
],
instance
,
!
hasOwn
(
castValues
,
key
)
);
}
}
return
hasAttrsChanged
;
}
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
)
{
function
resolvePropValue
(
options
,
props
,
key
,
value
,
instance
,
isAbsent
)
{
const
opt
=
options
[
key
];
if
(
opt
!=
null
)
{
const
hasDefault
=
hasOwn
(
opt
,
'
default
'
);
...
...
@@ -4398,7 +4419,7 @@ function resolvePropValue(options, props, key, value, instance) {
}
// boolean casting
if
(
opt
[
0
/* shouldCast */
])
{
if
(
!
hasOwn
(
props
,
key
)
&&
!
hasDefault
)
{
if
(
isAbsent
&&
!
hasDefault
)
{
value
=
false
;
}
else
if
(
opt
[
1
/* shouldCastTrue */
]
&&
...
...
@@ -4635,14 +4656,15 @@ const isInternalKey = (key) => key[0] === '_' || key === '$stable';
const
normalizeSlotValue
=
(
value
)
=>
isArray
(
value
)
?
value
.
map
(
normalizeVNode
)
:
[
normalizeVNode
(
value
)];
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
withCtx
((
props
)
=>
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeSlot
=
(
key
,
rawSlot
,
ctx
)
=>
rawSlot
.
_c
||
withCtx
((
props
)
=>
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
currentInstance
)
{
warn
(
`Slot "
${
key
}
" invoked outside of the render function: `
+
`this will not track dependencies used in the slot. `
+
`Invoke the slot function inside the render function instead.`
);
}
return
normalizeSlotValue
(
rawSlot
(
props
));
},
ctx
);
const
normalizeObjectSlots
=
(
rawSlots
,
slots
,
instance
)
=>
{
const
ctx
=
rawSlots
.
_ctx
;
for
(
const
key
in
rawSlots
)
{
...
...
@@ -4677,7 +4699,9 @@ const initSlots = (instance, children) => {
if
(
instance
.
vnode
.
shapeFlag
&
32
/* SLOTS_CHILDREN */
)
{
const
type
=
children
.
_
;
if
(
type
)
{
instance
.
slots
=
children
;
// users can get the shallow readonly version of the slots object through `this.$slots`,
// we should avoid the proxy object polluting the slots of the internal instance
instance
.
slots
=
toRaw
(
children
);
// make compiler marker non-enumerable
def
(
children
,
'
_
'
,
type
);
}
...
...
@@ -5287,6 +5311,9 @@ function startMeasure(instance, type) {
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
perf
.
mark
(
`vue-
${
type
}
-
${
instance
.
uid
}
`
);
}
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
||
__VUE_PROD_DEVTOOLS__
)
{
devtoolsPerfStart
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
endMeasure
(
instance
,
type
)
{
if
(
instance
.
appContext
.
config
.
performance
&&
isSupported
())
{
...
...
@@ -5297,6 +5324,9 @@ function endMeasure(instance, type) {
perf
.
clearMarks
(
startTag
);
perf
.
clearMarks
(
endTag
);
}
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
||
__VUE_PROD_DEVTOOLS__
)
{
devtoolsPerfEnd
(
instance
,
type
,
supported
?
perf
.
now
()
:
Date
.
now
());
}
}
function
isSupported
()
{
if
(
supported
!==
undefined
)
{
...
...
@@ -8444,7 +8474,7 @@ function initCustomFormatter() {
}
// Core API ------------------------------------------------------------------
const
version
=
"
3.1.0-beta.
3
"
;
const
version
=
"
3.1.0-beta.
4
"
;
/**
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
* @internal
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录