Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromvuejs/vue

Commitbc71940

Browse files
committed
build: build 2.5.12
1 parentbacb911 commitbc71940

File tree

17 files changed

+2683
-792
lines changed

17 files changed

+2683
-792
lines changed

‎dist/vue.common.js

Lines changed: 167 additions & 81 deletions
Large diffs are not rendered by default.

‎dist/vue.esm.js

Lines changed: 167 additions & 81 deletions
Large diffs are not rendered by default.

‎dist/vue.js

Lines changed: 162 additions & 80 deletions
Large diffs are not rendered by default.

‎dist/vue.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎dist/vue.runtime.common.js

Lines changed: 78 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v2.5.11
2+
* Vue.js v2.5.12
33
* (c) 2014-2017 Evan You
44
* Released under the MIT License.
55
*/
@@ -34,6 +34,8 @@ function isPrimitive (value) {
3434
return(
3535
typeofvalue==='string'||
3636
typeofvalue==='number'||
37+
// $flow-disable-line
38+
typeofvalue==='symbol'||
3739
typeofvalue==='boolean'
3840
)
3941
}
@@ -1353,9 +1355,6 @@ function normalizeProps (options, vm) {
13531355
for(varkeyinprops){
13541356
val=props[key];
13551357
name=camelize(key);
1356-
if(process.env.NODE_ENV!=='production'&&isPlainObject(val)){
1357-
validatePropObject(name,val,vm);
1358-
}
13591358
res[name]=isPlainObject(val)
13601359
?val
13611360
:{type:val};
@@ -1370,31 +1369,12 @@ function normalizeProps (options, vm) {
13701369
options.props=res;
13711370
}
13721371

1373-
/**
1374-
* Validate whether a prop object keys are valid.
1375-
*/
1376-
varpropOptionsRE=/^(type|default|required|validator)$/;
1377-
1378-
functionvalidatePropObject(
1379-
propName,
1380-
prop,
1381-
vm
1382-
){
1383-
for(varkeyinprop){
1384-
if(!propOptionsRE.test(key)){
1385-
warn(
1386-
("Invalid key \""+key+"\" in validation rules object for prop \""+propName+"\"."),
1387-
vm
1388-
);
1389-
}
1390-
}
1391-
}
1392-
13931372
/**
13941373
* Normalize all injections into Object-based format
13951374
*/
13961375
functionnormalizeInject(options,vm){
13971376
varinject=options.inject;
1377+
if(!inject){return}
13981378
varnormalized=options.inject={};
13991379
if(Array.isArray(inject)){
14001380
for(vari=0;i<inject.length;i++){
@@ -1407,7 +1387,7 @@ function normalizeInject (options, vm) {
14071387
?extend({from:key},val)
14081388
:{from:val};
14091389
}
1410-
}elseif(process.env.NODE_ENV!=='production'&&inject){
1390+
}elseif(process.env.NODE_ENV!=='production'){
14111391
warn(
14121392
"Invalid value for option \"inject\": expected an Array or an Object, "+
14131393
"but got "+(toRawType(inject))+".",
@@ -1549,7 +1529,11 @@ function validateProp (
15491529
observe(value);
15501530
observerState.shouldConvert=prevShouldConvert;
15511531
}
1552-
if(process.env.NODE_ENV!=='production'){
1532+
if(
1533+
process.env.NODE_ENV!=='production'&&
1534+
// skip validation for weex recycle-list child component props
1535+
!(false&&isObject(value)&&('@binding'invalue))
1536+
){
15531537
assertProp(prop,key,value,vm,absent);
15541538
}
15551539
returnvalue
@@ -2029,11 +2013,12 @@ function updateListeners (
20292013
remove$$1,
20302014
vm
20312015
){
2032-
varname,cur,old,event;
2016+
varname,def,cur,old,event;
20332017
for(nameinon){
2034-
cur=on[name];
2018+
def=cur=on[name];
20352019
old=oldOn[name];
20362020
event=normalizeEvent(name);
2021+
/* istanbul ignore if */
20372022
if(isUndef(cur)){
20382023
process.env.NODE_ENV!=='production'&&warn(
20392024
"Invalid handler for event \""+(event.name)+"\": got "+String(cur),
@@ -2043,7 +2028,7 @@ function updateListeners (
20432028
if(isUndef(cur.fns)){
20442029
cur=on[name]=createFnInvoker(cur);
20452030
}
2046-
add(event.name,cur,event.once,event.capture,event.passive);
2031+
add(event.name,cur,event.once,event.capture,event.passive,event.params);
20472032
}elseif(cur!==old){
20482033
old.fns=cur;
20492034
on[name]=old;
@@ -3290,6 +3275,7 @@ function proxy (target, sourceKey, key) {
32903275

32913276
functioninitState(vm){
32923277
vm._watchers=[];
3278+
vm._inlineComputed=null;
32933279
varopts=vm.$options;
32943280
if(opts.props){initProps(vm,opts.props);}
32953281
if(opts.methods){initMethods(vm,opts.methods);}
@@ -3926,6 +3912,32 @@ function bindObjectListeners (data, value) {
39263912

39273913
/* */
39283914

3915+
/**
3916+
* This runtime helper creates an inline computed property for component
3917+
* props that contain object or array literals. The caching ensures the same
3918+
* object/array is returned unless the value has indeed changed, thus avoiding
3919+
* the child component to always re-render when comparing props values.
3920+
*
3921+
* Installed to the instance as _a, requires special handling in parser that
3922+
* transforms the following
3923+
* <foo :bar="{ a: 1 }"/>
3924+
* to:
3925+
* <foo :bar="_a(0, function(){return { a: 1 }})"
3926+
*/
3927+
functioncreateInlineComputed(id,getter){
3928+
varvm=this;
3929+
varwatchers=vm._inlineComputed||(vm._inlineComputed={});
3930+
varcached$$1=watchers[id];
3931+
if(cached$$1){
3932+
returncached$$1.value
3933+
}else{
3934+
watchers[id]=newWatcher(vm,getter,noop,{sync:true});
3935+
returnwatchers[id].value
3936+
}
3937+
}
3938+
3939+
/* */
3940+
39293941
functioninstallRenderHelpers(target){
39303942
target._o=markOnce;
39313943
target._n=toNumber;
@@ -3942,6 +3954,7 @@ function installRenderHelpers (target) {
39423954
target._e=createEmptyVNode;
39433955
target._u=resolveScopedSlots;
39443956
target._g=bindObjectListeners;
3957+
target._a=createInlineComputed;
39453958
}
39463959

39473960
/* */
@@ -4041,6 +4054,25 @@ function mergeProps (to, from) {
40414054

40424055
/* */
40434056

4057+
4058+
4059+
4060+
// Register the component hook to weex native render engine.
4061+
// The hook will be triggered by native, not javascript.
4062+
4063+
4064+
// Updates the state of the component to weex native render engine.
4065+
4066+
/* */
4067+
4068+
// https://github.com/Hanks10100/weex-native-directive/tree/master/component
4069+
4070+
// listening on native callback
4071+
4072+
/* */
4073+
4074+
/* */
4075+
40444076
// hooks to be invoked on component VNodes during patch
40454077
varcomponentVNodeHooks={
40464078
init:functioninit(
@@ -4206,6 +4238,11 @@ function createComponent (
42064238
{Ctor:Ctor,propsData:propsData,listeners:listeners,tag:tag,children:children},
42074239
asyncFactory
42084240
);
4241+
4242+
// Weex specific: invoke recycle-list optimized @render function for
4243+
// extracting cell-slot template.
4244+
// https://github.com/Hanks10100/weex-native-directive/tree/master/component
4245+
/* istanbul ignore if */
42094246
returnvnode
42104247
}
42114248

@@ -4316,11 +4353,13 @@ function _createElement (
43164353
if(process.env.NODE_ENV!=='production'&&
43174354
isDef(data)&&isDef(data.key)&&!isPrimitive(data.key)
43184355
){
4319-
warn(
4320-
'Avoid using non-primitive value as key, '+
4321-
'use string/number value instead.',
4322-
context
4323-
);
4356+
{
4357+
warn(
4358+
'Avoid using non-primitive value as key, '+
4359+
'use string/number value instead.',
4360+
context
4361+
);
4362+
}
43244363
}
43254364
// support single function children as default scoped slot
43264365
if(Array.isArray(children)&&
@@ -4998,7 +5037,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
49985037
}
49995038
});
50005039

5001-
Vue$3.version='2.5.11';
5040+
Vue$3.version='2.5.12';
50025041

50035042
/* */
50045043

@@ -5573,7 +5612,7 @@ function createPatchFunction (backend) {
55735612
createElm(children[i],insertedVnodeQueue,vnode.elm,null,true);
55745613
}
55755614
}elseif(isPrimitive(vnode.text)){
5576-
nodeOps.appendChild(vnode.elm,nodeOps.createTextNode(vnode.text));
5615+
nodeOps.appendChild(vnode.elm,nodeOps.createTextNode(String(vnode.text)));
55775616
}
55785617
}
55795618

@@ -6339,6 +6378,9 @@ var klass = {
63396378

63406379

63416380

6381+
// add a raw attr (use this in preTransforms)
6382+
6383+
63426384

63436385

63446386

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp