Skip to content

Commit ac56aa5

Browse files
committed
wip(app-vapor): 同步运行时
1 parent b298822 commit ac56aa5

File tree

8 files changed

+26
-8
lines changed

8 files changed

+26
-8
lines changed

packages/uni-app-vue/dist/uvue.vapor.runtime.esm.dev.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12038,7 +12038,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot) {
1203812038
initNativePage,
1203912039
initFontFace
1204012040
} = appContext.config.uniX || {};
12041-
if (component.mpType === "page") {
12041+
if (instance.renderer === "page") {
1204212042
beforeSetupPage && beforeSetupPage(instance.props, instance);
1204312043
}
1204412044
initNativePage && initNativePage(instance.proxy);
@@ -12140,6 +12140,9 @@ class VaporComponentInstance {
1214012140
}
1214112141
this.rawSlots = rawSlots || EMPTY_OBJ;
1214212142
this.slots = rawSlots ? rawSlots.$ ? new Proxy(rawSlots, dynamicSlotsProxyHandlers) : rawSlots : EMPTY_OBJ;
12143+
this.renderer =
12144+
// @ts-expect-error
12145+
comp.mpType === "app" ? "app" : rawProps && rawProps.__pagePath ? "page" : "component";
1214312146
}
1214412147
/**
1214512148
* Expose `getKeysFromRawProps` on the instance so it can be used in code

packages/uni-app-vue/dist/uvue.vapor.runtime.esm.prod.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10481,7 +10481,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot) {
1048110481
initNativePage,
1048210482
initFontFace
1048310483
} = appContext.config.uniX || {};
10484-
if (component.mpType === "page") {
10484+
if (instance.renderer === "page") {
1048510485
beforeSetupPage && beforeSetupPage(instance.props, instance);
1048610486
}
1048710487
initNativePage && initNativePage(instance.proxy);
@@ -10559,6 +10559,9 @@ class VaporComponentInstance {
1055910559
}
1056010560
this.rawSlots = rawSlots || EMPTY_OBJ;
1056110561
this.slots = rawSlots ? rawSlots.$ ? new Proxy(rawSlots, dynamicSlotsProxyHandlers) : rawSlots : EMPTY_OBJ;
10562+
this.renderer =
10563+
// @ts-expect-error
10564+
comp.mpType === "app" ? "app" : rawProps && rawProps.__pagePath ? "page" : "component";
1056210565
}
1056310566
/**
1056410567
* Expose `getKeysFromRawProps` on the instance so it can be used in code

packages/uni-app-vue/dist/uvue.vapor.runtime.harmony.esm.dev.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12038,7 +12038,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot) {
1203812038
initNativePage,
1203912039
initFontFace
1204012040
} = appContext.config.uniX || {};
12041-
if (component.mpType === "page") {
12041+
if (instance.renderer === "page") {
1204212042
beforeSetupPage && beforeSetupPage(instance.props, instance);
1204312043
}
1204412044
initNativePage && initNativePage(instance.proxy);
@@ -12140,6 +12140,9 @@ class VaporComponentInstance {
1214012140
}
1214112141
this.rawSlots = rawSlots || EMPTY_OBJ;
1214212142
this.slots = rawSlots ? rawSlots.$ ? new Proxy(rawSlots, dynamicSlotsProxyHandlers) : rawSlots : EMPTY_OBJ;
12143+
this.renderer =
12144+
// @ts-expect-error
12145+
comp.mpType === "app" ? "app" : rawProps && rawProps.__pagePath ? "page" : "component";
1214312146
}
1214412147
/**
1214512148
* Expose `getKeysFromRawProps` on the instance so it can be used in code

packages/uni-app-vue/dist/uvue.vapor.runtime.harmony.esm.prod.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10481,7 +10481,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot) {
1048110481
initNativePage,
1048210482
initFontFace
1048310483
} = appContext.config.uniX || {};
10484-
if (component.mpType === "page") {
10484+
if (instance.renderer === "page") {
1048510485
beforeSetupPage && beforeSetupPage(instance.props, instance);
1048610486
}
1048710487
initNativePage && initNativePage(instance.proxy);
@@ -10559,6 +10559,9 @@ class VaporComponentInstance {
1055910559
}
1056010560
this.rawSlots = rawSlots || EMPTY_OBJ;
1056110561
this.slots = rawSlots ? rawSlots.$ ? new Proxy(rawSlots, dynamicSlotsProxyHandlers) : rawSlots : EMPTY_OBJ;
10562+
this.renderer =
10563+
// @ts-expect-error
10564+
comp.mpType === "app" ? "app" : rawProps && rawProps.__pagePath ? "page" : "component";
1056210565
}
1056310566
/**
1056410567
* Expose `getKeysFromRawProps` on the instance so it can be used in code

packages/uni-app-vue/lib/uvue.vapor.runtime.esm.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10549,7 +10549,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot, appContext
1054910549
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
1055010550
const setupFn = isFunction(component) ? component : component.setup;
1055110551
const { beforeSetupPage, initNativePage, initFontFace } = appContext.config.uniX || {};
10552-
if (component.mpType === "page") {
10552+
if (instance.renderer === "page") {
1055310553
beforeSetupPage && beforeSetupPage(instance.props, instance);
1055410554
}
1055510555
initNativePage && initNativePage(instance.proxy);
@@ -10679,6 +10679,8 @@ class VaporComponentInstance {
1067910679
}
1068010680
this.rawSlots = rawSlots || EMPTY_OBJ;
1068110681
this.slots = rawSlots ? rawSlots.$ ? new Proxy(rawSlots, dynamicSlotsProxyHandlers) : rawSlots : EMPTY_OBJ;
10682+
this.renderer = // @ts-expect-error
10683+
comp.mpType === "app" ? "app" : rawProps && rawProps.__pagePath ? "page" : "component";
1068210684
}
1068310685
/**
1068410686
* Expose `getKeysFromRawProps` on the instance so it can be used in code

packages/uni-cli-shared/lib/vapor/@vue/runtime-vapor/dist/runtime-vapor.esm-bundler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2222,7 +2222,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot, appContext
22222222
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
22232223
const setupFn = isFunction(component) ? component : component.setup;
22242224
const { beforeSetupPage, initNativePage, initFontFace } = appContext.config.uniX || {};
2225-
if (component.mpType === "page") {
2225+
if (instance.renderer === "page") {
22262226
beforeSetupPage && beforeSetupPage(instance.props, instance);
22272227
}
22282228
initNativePage && initNativePage(instance.proxy);
@@ -2352,6 +2352,8 @@ class VaporComponentInstance {
23522352
}
23532353
this.rawSlots = rawSlots || EMPTY_OBJ;
23542354
this.slots = rawSlots ? rawSlots.$ ? new Proxy(rawSlots, dynamicSlotsProxyHandlers) : rawSlots : EMPTY_OBJ;
2355+
this.renderer = // @ts-expect-error
2356+
comp.mpType === "app" ? "app" : rawProps && rawProps.__pagePath ? "page" : "component";
23552357
}
23562358
/**
23572359
* Expose `getKeysFromRawProps` on the instance so it can be used in code

packages/uni-cli-shared/lib/vapor/@vue/vue/dist/vue.runtime-with-vapor.esm-browser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14637,7 +14637,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot, appContext
1463714637
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
1463814638
const setupFn = isFunction(component) ? component : component.setup;
1463914639
const { beforeSetupPage, initNativePage, initFontFace } = appContext.config.uniX || {};
14640-
if (component.mpType === "page") {
14640+
if (instance.renderer === "page") {
1464114641
beforeSetupPage && beforeSetupPage(instance.props, instance);
1464214642
}
1464314643
initNativePage && initNativePage(instance.proxy);
@@ -14767,6 +14767,8 @@ class VaporComponentInstance {
1476714767
}
1476814768
this.rawSlots = rawSlots || EMPTY_OBJ;
1476914769
this.slots = rawSlots ? rawSlots.$ ? new Proxy(rawSlots, dynamicSlotsProxyHandlers) : rawSlots : EMPTY_OBJ;
14770+
this.renderer = // @ts-expect-error
14771+
comp.mpType === "app" ? "app" : rawProps && rawProps.__pagePath ? "page" : "component";
1477014772
}
1477114773
/**
1477214774
* Expose `getKeysFromRawProps` on the instance so it can be used in code

packages/uni-cli-shared/lib/vapor/@vue/vue/dist/vue.runtime-with-vapor.esm-browser.prod.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)