@virou/core 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -161,9 +161,9 @@ const VRouterView = vue.defineComponent({
|
|
|
161
161
|
const render = vue.computed(() => route.value.renderList?.[depth]);
|
|
162
162
|
vue.provide(router._depthKey, depth + 1);
|
|
163
163
|
return () => {
|
|
164
|
-
const [
|
|
165
|
-
const
|
|
166
|
-
const ViewComponent = component !== null && component !== undefined ? vue.h(component, {
|
|
164
|
+
const [_key, component] = render.value ?? [];
|
|
165
|
+
const key = _key ?? props.viewKey ?? route.value.path;
|
|
166
|
+
const ViewComponent = component !== null && component !== undefined ? vue.h(component, { key }) : null;
|
|
167
167
|
return props.keepalive ? vue.h(vue.KeepAlive, null, [ViewComponent]) : ViewComponent;
|
|
168
168
|
};
|
|
169
169
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -159,9 +159,9 @@ const VRouterView = defineComponent({
|
|
|
159
159
|
const render = computed(() => route.value.renderList?.[depth]);
|
|
160
160
|
provide(router._depthKey, depth + 1);
|
|
161
161
|
return () => {
|
|
162
|
-
const [
|
|
163
|
-
const
|
|
164
|
-
const ViewComponent = component !== null && component !== undefined ? h(component, {
|
|
162
|
+
const [_key, component] = render.value ?? [];
|
|
163
|
+
const key = _key ?? props.viewKey ?? route.value.path;
|
|
164
|
+
const ViewComponent = component !== null && component !== undefined ? h(component, { key }) : null;
|
|
165
165
|
return props.keepalive ? h(KeepAlive, null, [ViewComponent]) : ViewComponent;
|
|
166
166
|
};
|
|
167
167
|
}
|
package/package.json
CHANGED