提交 b6ffe5d0 编写于 作者: fxy060608's avatar fxy060608

chore(release): mp.runtime.esm.js(2.6.11)

上级 da64c2c0
/*!
* Vue.js v2.6.10
* Vue.js v2.6.11
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
......@@ -698,7 +698,13 @@ var uid = 0;
* directives subscribing to it.
*/
var Dep = function Dep () {
this.id = uid++;
// fixed by xxxxxx (nvue vuex)
/* eslint-disable no-undef */
if(typeof SharedObject !== 'undefined'){
this.id = SharedObject.uid++;
} else {
this.id = uid++;
}
this.subs = [];
};
......@@ -1964,7 +1970,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
};
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
// Fallback to setImmediate.
// Techinically it leverages the (macro) task queue,
// Technically it leverages the (macro) task queue,
// but it is still a better choice than setTimeout.
timerFunc = function () {
setImmediate(flushCallbacks);
......@@ -2030,7 +2036,7 @@ if (process.env.NODE_ENV !== 'production') {
warn(
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
'prevent conflicts with Vue internals' +
'prevent conflicts with Vue internals. ' +
'See: https://vuejs.org/v2/api/#data',
target
);
......@@ -2230,17 +2236,48 @@ function updateListeners (
/* */
// fixed by xxxxxx (mp properties)
function extractPropertiesFromVNodeData(data, Ctor, res, context) {
var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
if (isUndef(propOptions)) {
return res
}
var externalClasses = Ctor.options.mpOptions.externalClasses || [];
var attrs = data.attrs;
var props = data.props;
if (isDef(attrs) || isDef(props)) {
for (var key in propOptions) {
var altKey = hyphenate(key);
var result = checkProp(res, props, key, altKey, true) ||
checkProp(res, attrs, key, altKey, false);
// externalClass
if (
result &&
res[key] &&
externalClasses.indexOf(altKey) !== -1 &&
context[camelize(res[key])]
) {
// 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
res[key] = context[camelize(res[key])];
}
}
}
return res
}
function extractPropsFromVNodeData (
data,
Ctor,
tag
tag,
context// fixed by xxxxxx
) {
// we are only extracting raw values here.
// validation and default values are handled in the child
// component itself.
var propOptions = Ctor.options.props;
if (isUndef(propOptions)) {
return
// fixed by xxxxxx
return extractPropertiesFromVNodeData(data, Ctor, {}, context)
}
var res = {};
var attrs = data.attrs;
......@@ -2268,7 +2305,8 @@ function extractPropsFromVNodeData (
checkProp(res, attrs, key, altKey, false);
}
}
return res
// fixed by xxxxxx
return extractPropertiesFromVNodeData(data, Ctor, res, context)
}
function checkProp (
......@@ -2603,12 +2641,12 @@ function renderList (
if (Array.isArray(val) || typeof val === 'string') {
ret = new Array(val.length);
for (i = 0, l = val.length; i < l; i++) {
ret[i] = render(val[i], i);
ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
}
} else if (typeof val === 'number') {
ret = new Array(val);
for (i = 0; i < val; i++) {
ret[i] = render(i + 1, i);
ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
}
} else if (isObject(val)) {
if (hasSymbol && val[Symbol.iterator]) {
......@@ -2616,7 +2654,7 @@ function renderList (
var iterator = val[Symbol.iterator]();
var result = iterator.next();
while (!result.done) {
ret.push(render(result.value, ret.length));
ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
result = iterator.next();
}
} else {
......@@ -2624,7 +2662,7 @@ function renderList (
ret = new Array(keys.length);
for (i = 0, l = keys.length; i < l; i++) {
key = keys[i];
ret[i] = render(val[key], key, i);
ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
}
}
}
......@@ -2659,7 +2697,8 @@ function renderSlot (
}
props = extend(extend({}, bindObject), props);
}
nodes = scopedSlotFn(props) || fallback;
// fixed by xxxxxx app-plus scopedSlot
nodes = scopedSlotFn(props, this, props._i) || fallback;
} else {
nodes = this.$slots[name] || fallback;
}
......@@ -2887,7 +2926,7 @@ function bindDynamicKeys (baseObj, values) {
if (typeof key === 'string' && key) {
baseObj[values[i]] = values[i + 1];
} else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {
// null is a speical value for explicitly removing a binding
// null is a special value for explicitly removing a binding
warn(
("Invalid value for dynamic directive argument (expected string or null): " + key),
this
......@@ -3111,6 +3150,8 @@ var componentVNodeHooks = {
var context = vnode.context;
var componentInstance = vnode.componentInstance;
if (!componentInstance._isMounted) {
callHook(componentInstance, 'onServiceCreated');
callHook(componentInstance, 'onServiceAttached');
componentInstance._isMounted = true;
callHook(componentInstance, 'mounted');
}
......@@ -3200,7 +3241,7 @@ function createComponent (
}
// extract props
var propsData = extractPropsFromVNodeData(data, Ctor, tag);
var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
// functional component
if (isTrue(Ctor.options.functional)) {
......@@ -3383,6 +3424,12 @@ function _createElement (
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
if (config.isReservedTag(tag)) {
// platform built-in elements
if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.nativeOn)) {
warn(
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
context
);
}
vnode = new VNode(
config.parsePlatformTagName(tag), data, children,
undefined, undefined, context
......@@ -3511,7 +3558,7 @@ function renderMixin (Vue) {
// render self
var vnode;
try {
// There's no need to maintain a stack becaues all render fns are called
// There's no need to maintain a stack because all render fns are called
// separately from one another. Nested component's render fns are called
// when parent component is patched.
currentRenderingInstance = vm;
......@@ -4046,7 +4093,10 @@ function updateChildComponent (
// keep a copy of raw propsData
vm.$options.propsData = propsData;
}
// fixed by xxxxxx update properties(mp runtime)
vm._$updateProperties && vm._$updateProperties(vm);
// update listeners
listeners = listeners || emptyObject;
var oldListeners = vm.$options._parentListeners;
......@@ -5369,7 +5419,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext
});
Vue.version = '2.6.10';
Vue.version = '2.6.11';
/**
* https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册