提交 ef099439 编写于 作者: Q qiang

fix(uvue): 避免不同页面样式污染

上级 756705c5
......@@ -9238,7 +9238,12 @@ function parseStyleSheet(_ref24) {
root
} = _ref24;
var component = type;
{
var pageInstance = root;
if (!pageInstance.componentStylesCache) {
pageInstance.componentStylesCache = /* @__PURE__ */new Map();
}
var cache = pageInstance.componentStylesCache.get(component);
if (!cache) {
var __globalStyles = appContext.provides.__globalStyles;
if (appContext && isArray$1(__globalStyles)) {
appContext.provides.__globalStyles = useCssStyles(__globalStyles);
......@@ -9255,9 +9260,10 @@ function parseStyleSheet(_ref24) {
if (isArray$1(component.styles)) {
styles.push(...component.styles);
}
component.__styles = useCssStyles(styles);
cache = useCssStyles(styles);
pageInstance.componentStylesCache.set(component, cache);
}
return component.__styles;
return cache;
}
function extend(a, b) {
b.forEach((value, key) => {
......
......@@ -7688,7 +7688,12 @@ function parseStyleSheet(_ref23) {
root
} = _ref23;
var component = type;
{
var pageInstance = root;
if (!pageInstance.componentStylesCache) {
pageInstance.componentStylesCache = /* @__PURE__ */new Map();
}
var cache = pageInstance.componentStylesCache.get(component);
if (!cache) {
var __globalStyles = appContext.provides.__globalStyles;
if (appContext && isArray$1(__globalStyles)) {
appContext.provides.__globalStyles = useCssStyles(__globalStyles);
......@@ -7705,9 +7710,10 @@ function parseStyleSheet(_ref23) {
if (isArray$1(component.styles)) {
styles.push(...component.styles);
}
component.__styles = useCssStyles(styles);
cache = useCssStyles(styles);
pageInstance.componentStylesCache.set(component, cache);
}
return component.__styles;
return cache;
}
function extend(a, b) {
b.forEach((value, key) => {
......
......@@ -8527,7 +8527,12 @@ function parseStyleSheet({
root
}) {
const component = type;
{
const pageInstance = root;
if (!pageInstance.componentStylesCache) {
pageInstance.componentStylesCache = /* @__PURE__ */ new Map();
}
let cache = pageInstance.componentStylesCache.get(component);
if (!cache) {
const __globalStyles = appContext.provides.__globalStyles;
if (appContext && isArray(__globalStyles)) {
appContext.provides.__globalStyles = useCssStyles(__globalStyles);
......@@ -8544,9 +8549,10 @@ function parseStyleSheet({
if (isArray(component.styles)) {
styles.push(...component.styles);
}
component.__styles = useCssStyles(styles);
cache = useCssStyles(styles);
pageInstance.componentStylesCache.set(component, cache);
}
return component.__styles;
return cache;
}
function extend(a, b) {
b.forEach((value, key) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册