提交 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 * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
...@@ -698,7 +698,13 @@ var uid = 0; ...@@ -698,7 +698,13 @@ var uid = 0;
* directives subscribing to it. * directives subscribing to it.
*/ */
var Dep = function Dep () { 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 = []; this.subs = [];
}; };
...@@ -1964,7 +1970,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) { ...@@ -1964,7 +1970,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
}; };
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
// Fallback to 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. // but it is still a better choice than setTimeout.
timerFunc = function () { timerFunc = function () {
setImmediate(flushCallbacks); setImmediate(flushCallbacks);
...@@ -2030,7 +2036,7 @@ if (process.env.NODE_ENV !== 'production') { ...@@ -2030,7 +2036,7 @@ if (process.env.NODE_ENV !== 'production') {
warn( warn(
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
'properties starting with "$" or "_" are not proxied in the Vue instance to ' + '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', 'See: https://vuejs.org/v2/api/#data',
target target
); );
...@@ -2230,17 +2236,48 @@ function updateListeners ( ...@@ -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 ( function extractPropsFromVNodeData (
data, data,
Ctor, Ctor,
tag tag,
context// fixed by xxxxxx
) { ) {
// we are only extracting raw values here. // we are only extracting raw values here.
// validation and default values are handled in the child // validation and default values are handled in the child
// component itself. // component itself.
var propOptions = Ctor.options.props; var propOptions = Ctor.options.props;
if (isUndef(propOptions)) { if (isUndef(propOptions)) {
return // fixed by xxxxxx
return extractPropertiesFromVNodeData(data, Ctor, {}, context)
} }
var res = {}; var res = {};
var attrs = data.attrs; var attrs = data.attrs;
...@@ -2268,7 +2305,8 @@ function extractPropsFromVNodeData ( ...@@ -2268,7 +2305,8 @@ function extractPropsFromVNodeData (
checkProp(res, attrs, key, altKey, false); checkProp(res, attrs, key, altKey, false);
} }
} }
return res // fixed by xxxxxx
return extractPropertiesFromVNodeData(data, Ctor, res, context)
} }
function checkProp ( function checkProp (
...@@ -2603,12 +2641,12 @@ function renderList ( ...@@ -2603,12 +2641,12 @@ function renderList (
if (Array.isArray(val) || typeof val === 'string') { if (Array.isArray(val) || typeof val === 'string') {
ret = new Array(val.length); ret = new Array(val.length);
for (i = 0, l = val.length; i < l; i++) { 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') { } else if (typeof val === 'number') {
ret = new Array(val); ret = new Array(val);
for (i = 0; i < val; i++) { 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)) { } else if (isObject(val)) {
if (hasSymbol && val[Symbol.iterator]) { if (hasSymbol && val[Symbol.iterator]) {
...@@ -2616,7 +2654,7 @@ function renderList ( ...@@ -2616,7 +2654,7 @@ function renderList (
var iterator = val[Symbol.iterator](); var iterator = val[Symbol.iterator]();
var result = iterator.next(); var result = iterator.next();
while (!result.done) { 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(); result = iterator.next();
} }
} else { } else {
...@@ -2624,7 +2662,7 @@ function renderList ( ...@@ -2624,7 +2662,7 @@ function renderList (
ret = new Array(keys.length); ret = new Array(keys.length);
for (i = 0, l = keys.length; i < l; i++) { for (i = 0, l = keys.length; i < l; i++) {
key = keys[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 ( ...@@ -2659,7 +2697,8 @@ function renderSlot (
} }
props = extend(extend({}, bindObject), props); props = extend(extend({}, bindObject), props);
} }
nodes = scopedSlotFn(props) || fallback; // fixed by xxxxxx app-plus scopedSlot
nodes = scopedSlotFn(props, this, props._i) || fallback;
} else { } else {
nodes = this.$slots[name] || fallback; nodes = this.$slots[name] || fallback;
} }
...@@ -2887,7 +2926,7 @@ function bindDynamicKeys (baseObj, values) { ...@@ -2887,7 +2926,7 @@ function bindDynamicKeys (baseObj, values) {
if (typeof key === 'string' && key) { if (typeof key === 'string' && key) {
baseObj[values[i]] = values[i + 1]; baseObj[values[i]] = values[i + 1];
} else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) { } 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( warn(
("Invalid value for dynamic directive argument (expected string or null): " + key), ("Invalid value for dynamic directive argument (expected string or null): " + key),
this this
...@@ -3111,6 +3150,8 @@ var componentVNodeHooks = { ...@@ -3111,6 +3150,8 @@ var componentVNodeHooks = {
var context = vnode.context; var context = vnode.context;
var componentInstance = vnode.componentInstance; var componentInstance = vnode.componentInstance;
if (!componentInstance._isMounted) { if (!componentInstance._isMounted) {
callHook(componentInstance, 'onServiceCreated');
callHook(componentInstance, 'onServiceAttached');
componentInstance._isMounted = true; componentInstance._isMounted = true;
callHook(componentInstance, 'mounted'); callHook(componentInstance, 'mounted');
} }
...@@ -3200,7 +3241,7 @@ function createComponent ( ...@@ -3200,7 +3241,7 @@ function createComponent (
} }
// extract props // extract props
var propsData = extractPropsFromVNodeData(data, Ctor, tag); var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
// functional component // functional component
if (isTrue(Ctor.options.functional)) { if (isTrue(Ctor.options.functional)) {
...@@ -3383,6 +3424,12 @@ function _createElement ( ...@@ -3383,6 +3424,12 @@ function _createElement (
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
if (config.isReservedTag(tag)) { if (config.isReservedTag(tag)) {
// platform built-in elements // 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( vnode = new VNode(
config.parsePlatformTagName(tag), data, children, config.parsePlatformTagName(tag), data, children,
undefined, undefined, context undefined, undefined, context
...@@ -3511,7 +3558,7 @@ function renderMixin (Vue) { ...@@ -3511,7 +3558,7 @@ function renderMixin (Vue) {
// render self // render self
var vnode; var vnode;
try { 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 // separately from one another. Nested component's render fns are called
// when parent component is patched. // when parent component is patched.
currentRenderingInstance = vm; currentRenderingInstance = vm;
...@@ -4046,7 +4093,10 @@ function updateChildComponent ( ...@@ -4046,7 +4093,10 @@ function updateChildComponent (
// keep a copy of raw propsData // keep a copy of raw propsData
vm.$options.propsData = propsData; vm.$options.propsData = propsData;
} }
// fixed by xxxxxx update properties(mp runtime)
vm._$updateProperties && vm._$updateProperties(vm);
// update listeners // update listeners
listeners = listeners || emptyObject; listeners = listeners || emptyObject;
var oldListeners = vm.$options._parentListeners; var oldListeners = vm.$options._parentListeners;
...@@ -5369,7 +5419,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', { ...@@ -5369,7 +5419,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: 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 * 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.
先完成此消息的编辑!
想要评论请 注册