提交 f499710e 编写于 作者: Q qiang

chore: build

上级 d0d9736f
......@@ -1569,8 +1569,20 @@ var resolvedPromise = /*#__PURE__*/Promise.resolve();
var currentFlushPromise = null;
var RECURSION_LIMIT = 100;
function nextTick(fn) {
var p = currentFlushPromise || resolvedPromise;
return fn ? p.then(this ? fn.bind(this) : fn) : p;
var instance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstance();
var promise = currentFlushPromise || resolvedPromise;
var current = currentFlushPromise === null || instance === null ? promise : promise.then(() => {
return new Promise(resolve => {
if (instance === null) {
resolve();
} else {
instance.$waitNativeRender(() => {
resolve();
});
}
});
});
return fn ? current.then(this ? fn.bind(this) : fn) : current;
}
// #2768
// Use binary-search to find a suitable position in the queue,
......@@ -5749,7 +5761,8 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode) {
// because the template ref is forwarded to inner component
return;
}
var refValue = vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
var refValue = vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && !vnode.component.type.rootElement // fixed by xxxxxx 非 x 项目或者非内置组件
? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
var value = isUnmount ? null : refValue;
var {
i: owner,
......@@ -8379,7 +8392,11 @@ function createComponentInstance(vnode, parent, suspense) {
rtg: null,
rtc: null,
ec: null,
sp: null
sp: null,
$waitNativeRender(fn) {
// TODO use native
setTimeout(fn, 150);
}
};
{
instance.ctx = createDevRenderContext(instance);
......
......@@ -1336,8 +1336,20 @@ var postFlushIndex = 0;
var resolvedPromise = /*#__PURE__*/Promise.resolve();
var currentFlushPromise = null;
function nextTick(fn) {
var p = currentFlushPromise || resolvedPromise;
return fn ? p.then(this ? fn.bind(this) : fn) : p;
var instance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstance();
var promise = currentFlushPromise || resolvedPromise;
var current = currentFlushPromise === null || instance === null ? promise : promise.then(() => {
return new Promise(resolve => {
if (instance === null) {
resolve();
} else {
instance.$waitNativeRender(() => {
resolve();
});
}
});
});
return fn ? current.then(this ? fn.bind(this) : fn) : current;
}
// #2768
// Use binary-search to find a suitable position in the queue,
......@@ -4672,7 +4684,8 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode) {
// because the template ref is forwarded to inner component
return;
}
var refValue = vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
var refValue = vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && !vnode.component.type.rootElement // fixed by xxxxxx 非 x 项目或者非内置组件
? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
var value = isUnmount ? null : refValue;
var {
i: owner,
......@@ -7011,7 +7024,11 @@ function createComponentInstance(vnode, parent, suspense) {
rtg: null,
rtc: null,
ec: null,
sp: null
sp: null,
$waitNativeRender(fn) {
// TODO use native
setTimeout(fn, 150);
}
};
{
instance.ctx = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册