Skip to content

Commit

Permalink
build: build 2.5.12
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 19, 2017
1 parent bacb911 commit bc71940
Show file tree
Hide file tree
Showing 17 changed files with 2,683 additions and 792 deletions.
248 changes: 167 additions & 81 deletions dist/vue.common.js

Large diffs are not rendered by default.

248 changes: 167 additions & 81 deletions dist/vue.esm.js

Large diffs are not rendered by default.

242 changes: 162 additions & 80 deletions dist/vue.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/vue.min.js

Large diffs are not rendered by default.

114 changes: 78 additions & 36 deletions dist/vue.runtime.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.5.11
* Vue.js v2.5.12
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -34,6 +34,8 @@ function isPrimitive (value) {
return (
typeof value === 'string' ||
typeof value === 'number' ||
// $flow-disable-line
typeof value === 'symbol' ||
typeof value === 'boolean'
)
}
Expand Down Expand Up @@ -1353,9 +1355,6 @@ function normalizeProps (options, vm) {
for (var key in props) {
val = props[key];
name = camelize(key);
if (process.env.NODE_ENV !== 'production' && isPlainObject(val)) {
validatePropObject(name, val, vm);
}
res[name] = isPlainObject(val)
? val
: { type: val };
Expand All @@ -1370,31 +1369,12 @@ function normalizeProps (options, vm) {
options.props = res;
}

/**
* Validate whether a prop object keys are valid.
*/
var propOptionsRE = /^(type|default|required|validator)$/;

function validatePropObject (
propName,
prop,
vm
) {
for (var key in prop) {
if (!propOptionsRE.test(key)) {
warn(
("Invalid key \"" + key + "\" in validation rules object for prop \"" + propName + "\"."),
vm
);
}
}
}

/**
* Normalize all injections into Object-based format
*/
function normalizeInject (options, vm) {
var inject = options.inject;
if (!inject) { return }
var normalized = options.inject = {};
if (Array.isArray(inject)) {
for (var i = 0; i < inject.length; i++) {
Expand All @@ -1407,7 +1387,7 @@ function normalizeInject (options, vm) {
? extend({ from: key }, val)
: { from: val };
}
} else if (process.env.NODE_ENV !== 'production' && inject) {
} else if (process.env.NODE_ENV !== 'production') {
warn(
"Invalid value for option \"inject\": expected an Array or an Object, " +
"but got " + (toRawType(inject)) + ".",
Expand Down Expand Up @@ -1549,7 +1529,11 @@ function validateProp (
observe(value);
observerState.shouldConvert = prevShouldConvert;
}
if (process.env.NODE_ENV !== 'production') {
if (
process.env.NODE_ENV !== 'production' &&
// skip validation for weex recycle-list child component props
!(false && isObject(value) && ('@binding' in value))
) {
assertProp(prop, key, value, vm, absent);
}
return value
Expand Down Expand Up @@ -2029,11 +2013,12 @@ function updateListeners (
remove$$1,
vm
) {
var name, cur, old, event;
var name, def, cur, old, event;
for (name in on) {
cur = on[name];
def = cur = on[name];
old = oldOn[name];
event = normalizeEvent(name);
/* istanbul ignore if */
if (isUndef(cur)) {
process.env.NODE_ENV !== 'production' && warn(
"Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
Expand All @@ -2043,7 +2028,7 @@ function updateListeners (
if (isUndef(cur.fns)) {
cur = on[name] = createFnInvoker(cur);
}
add(event.name, cur, event.once, event.capture, event.passive);
add(event.name, cur, event.once, event.capture, event.passive, event.params);
} else if (cur !== old) {
old.fns = cur;
on[name] = old;
Expand Down Expand Up @@ -3290,6 +3275,7 @@ function proxy (target, sourceKey, key) {

function initState (vm) {
vm._watchers = [];
vm._inlineComputed = null;
var opts = vm.$options;
if (opts.props) { initProps(vm, opts.props); }
if (opts.methods) { initMethods(vm, opts.methods); }
Expand Down Expand Up @@ -3926,6 +3912,32 @@ function bindObjectListeners (data, value) {

/* */

/**
* This runtime helper creates an inline computed property for component
* props that contain object or array literals. The caching ensures the same
* object/array is returned unless the value has indeed changed, thus avoiding
* the child component to always re-render when comparing props values.
*
* Installed to the instance as _a, requires special handling in parser that
* transforms the following
* <foo :bar="{ a: 1 }"/>
* to:
* <foo :bar="_a(0, function(){return { a: 1 }})"
*/
function createInlineComputed (id, getter) {
var vm = this;
var watchers = vm._inlineComputed || (vm._inlineComputed = {});
var cached$$1 = watchers[id];
if (cached$$1) {
return cached$$1.value
} else {
watchers[id] = new Watcher(vm, getter, noop, { sync: true });
return watchers[id].value
}
}

/* */

function installRenderHelpers (target) {
target._o = markOnce;
target._n = toNumber;
Expand All @@ -3942,6 +3954,7 @@ function installRenderHelpers (target) {
target._e = createEmptyVNode;
target._u = resolveScopedSlots;
target._g = bindObjectListeners;
target._a = createInlineComputed;
}

/* */
Expand Down Expand Up @@ -4041,6 +4054,25 @@ function mergeProps (to, from) {

/* */




// Register the component hook to weex native render engine.
// The hook will be triggered by native, not javascript.


// Updates the state of the component to weex native render engine.

/* */

// https://github.com/Hanks10100/weex-native-directive/tree/master/component

// listening on native callback

/* */

/* */

// hooks to be invoked on component VNodes during patch
var componentVNodeHooks = {
init: function init (
Expand Down Expand Up @@ -4206,6 +4238,11 @@ function createComponent (
{ Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
asyncFactory
);

// Weex specific: invoke recycle-list optimized @render function for
// extracting cell-slot template.
// https://github.com/Hanks10100/weex-native-directive/tree/master/component
/* istanbul ignore if */
return vnode
}

Expand Down Expand Up @@ -4316,11 +4353,13 @@ function _createElement (
if (process.env.NODE_ENV !== 'production' &&
isDef(data) && isDef(data.key) && !isPrimitive(data.key)
) {
warn(
'Avoid using non-primitive value as key, ' +
'use string/number value instead.',
context
);
{
warn(
'Avoid using non-primitive value as key, ' +
'use string/number value instead.',
context
);
}
}
// support single function children as default scoped slot
if (Array.isArray(children) &&
Expand Down Expand Up @@ -4998,7 +5037,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
}
});

Vue$3.version = '2.5.11';
Vue$3.version = '2.5.12';

/* */

Expand Down Expand Up @@ -5573,7 +5612,7 @@ function createPatchFunction (backend) {
createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);
}
} else if (isPrimitive(vnode.text)) {
nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));
nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
}
}

Expand Down Expand Up @@ -6339,6 +6378,9 @@ var klass = {



// add a raw attr (use this in preTransforms)





Expand Down
Loading

0 comments on commit bc71940

Please sign in to comment.