xto-fronted 0.4.96 → 0.4.97

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xto-fronted",
3
- "version": "0.4.96",
3
+ "version": "0.4.97",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "XTO 前端应用框架",
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { createRouter as vueCreateRouter, createWebHistory } from 'vue-router'
6
6
  import type { RouteRecordRaw, Router } from 'vue-router'
7
- import { h } from 'vue'
7
+ import { h, defineComponent } from 'vue'
8
8
  import Layout from '@/components/Layout/index.vue'
9
9
 
10
10
  interface LayoutRouteOptions {
@@ -39,10 +39,18 @@ export function createLayoutRoute(
39
39
  }
40
40
  }
41
41
 
42
+ // 创建带 props 的 Layout 包装组件
43
+ const LayoutWrapper = defineComponent({
44
+ name: 'LayoutWrapper',
45
+ render() {
46
+ return h(Layout, { logoSrc })
47
+ }
48
+ })
49
+
42
50
  return {
43
51
  path: '/',
44
52
  name: 'Layout',
45
- component: () => h(Layout, { logoSrc }),
53
+ component: LayoutWrapper,
46
54
  redirect: indexPath,
47
55
  children: [...children, catchAllRoute]
48
56
  }