提交 84be67a4 编写于 作者: Q qiang

chore(x-ios): update uvue

上级 cbb5ee66
......@@ -277,22 +277,29 @@ let flushIndex = 0;
const pendingPostFlushCbs = [];
let activePostFlushCbs = null;
let postFlushIndex = 0;
const resolvedPromise = /* @__PURE__ */ Promise.resolve();
const iOSPromise = {
then(callback) {
setTimeout(() => callback(), 0);
}
};
const resolvedPromise = iOSPromise;
let currentFlushPromise = null;
const RECURSION_LIMIT = 100;
function nextTick(fn, instance = getCurrentInstance()) {
const promise = currentFlushPromise || resolvedPromise;
const current = currentFlushPromise === null || instance === null ? promise : promise.then(() => {
return new Promise((resolve) => {
if (instance === null) {
resolve();
} else {
instance.$waitNativeRender(() => {
const current = currentFlushPromise === null || instance === null ? promise : {
then(resolve) {
promise.then(() => {
if (instance === null) {
resolve();
});
}
});
});
} else {
instance.$waitNativeRender(() => {
resolve();
});
}
});
}
};
return fn ? current.then(this ? fn.bind(this) : fn) : current;
}
function findInsertionIndex(id) {
......@@ -8532,7 +8539,8 @@ function parseStyleSheet({
}
const styles = [];
if (appContext && __globalStyles) {
styles.push(__globalStyles);
const globalStyles = isArray(__globalStyles) ? __globalStyles : [__globalStyles];
styles.push(...globalStyles);
}
const page = root.type;
if (component !== page && isArray(page.styles)) {
......@@ -9035,6 +9043,9 @@ function parseStyleDecl(prop, value) {
return expandStyle(prop, value);
}
function isSame(a, b) {
return isString(a) && isString(b) || typeof a === "number" && typeof b === "number" ? a == b : a === b;
}
function patchStyle(el, prev, next) {
if (!next) {
return;
......@@ -9049,9 +9060,9 @@ function patchStyle(el, prev, next) {
const style = getExtraStyle(el);
for (const key in prev) {
const _key = camelize(key);
if (next[_key] == null) {
if (next[key] == null) {
const value = classStyle != null && classStyle.has(_key) ? classStyle.get(_key) : "";
parseStyleDecl(key, value).forEach((value2, key2) => {
parseStyleDecl(_key, value).forEach((value2, key2) => {
batchedStyles.set(key2, value2);
style == null ? void 0 : style.delete(key2);
});
......@@ -9059,7 +9070,8 @@ function patchStyle(el, prev, next) {
}
for (const key in next) {
const value = next[key];
{
const prevValue = prev[key];
if (!isSame(prevValue, value)) {
parseStyleDecl(camelize(key), value).forEach(
(value2, key2) => {
batchedStyles.set(key2, value2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册