diff --git a/apps/react-app/package.json b/apps/react-app/package.json
index 64c1cbd..bf4a08a 100644
--- a/apps/react-app/package.json
+++ b/apps/react-app/package.json
@@ -11,7 +11,9 @@
},
"dependencies": {
"react": "^18.3.1",
- "react-dom": "^18.3.1"
+ "react-dom": "^18.3.1",
+ "wujie": "^1.0.22",
+ "wujie-react": "^1.0.22"
},
"devDependencies": {
"@types/react": "^18.3.3",
diff --git a/apps/react-app/src/App.tsx b/apps/react-app/src/App.tsx
index afe48ac..9850242 100644
--- a/apps/react-app/src/App.tsx
+++ b/apps/react-app/src/App.tsx
@@ -1,33 +1,37 @@
import { useState } from 'react'
-import reactLogo from './assets/react.svg'
-import viteLogo from '/vite.svg'
import './App.css'
+import WujieReact from 'wujie-react'
function App() {
- const [count, setCount] = useState(0)
-
return (
<>
-
- Vite + React
-
-
-
- Edit src/App.tsx
and save to test HMR
-
-
-
- Click on the Vite and React logos to learn more
-
+
+
+
+
+
+
>
)
}
diff --git a/apps/react-app/src/lifecycle.ts b/apps/react-app/src/lifecycle.ts
new file mode 100644
index 0000000..d661582
--- /dev/null
+++ b/apps/react-app/src/lifecycle.ts
@@ -0,0 +1,12 @@
+const lifecycles = {
+ beforeLoad: appWindow => console.log(`${appWindow.__WUJIE.id} beforeLoad 生命周期`),
+ beforeMount: appWindow => console.log(`${appWindow.__WUJIE.id} beforeMount 生命周期`),
+ afterMount: appWindow => console.log(`${appWindow.__WUJIE.id} afterMount 生命周期`),
+ beforeUnmount: appWindow => console.log(`${appWindow.__WUJIE.id} beforeUnmount 生命周期`),
+ afterUnmount: appWindow => console.log(`${appWindow.__WUJIE.id} afterUnmount 生命周期`),
+ activated: appWindow => console.log(`${appWindow.__WUJIE.id} activated 生命周期`),
+ deactivated: appWindow => console.log(`${appWindow.__WUJIE.id} deactivated 生命周期`),
+ loadError: (url, e) => console.log(`${url} 加载失败`, e),
+}
+
+export default lifecycles
diff --git a/apps/react-app/src/main.tsx b/apps/react-app/src/main.tsx
index 3d7150d..f6496b3 100644
--- a/apps/react-app/src/main.tsx
+++ b/apps/react-app/src/main.tsx
@@ -2,6 +2,28 @@ import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'
+import WujieReact from 'wujie-react'
+
+const { setupApp, preloadApp, bus } = WujieReact
+bus.$on('click', msg => window.alert(msg))
+
+setupApp({
+ name: 'svelte',
+ url: '//localhost:8082/',
+ exec: true,
+})
+
+setupApp({
+ name: 'vue3',
+ url: '//localhost:8083/',
+ exec: true,
+})
+
+setupApp({
+ name: 'vue2',
+ url: '//localhost:8084/',
+ exec: true,
+})
ReactDOM.createRoot(document.getElementById('root')!).render(
diff --git a/apps/shell-vue-app/.gitignore b/apps/shell-vue-app/.gitignore
new file mode 100644
index 0000000..a547bf3
--- /dev/null
+++ b/apps/shell-vue-app/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/apps/shell-vue-app/.vscode/extensions.json b/apps/shell-vue-app/.vscode/extensions.json
new file mode 100644
index 0000000..a7cea0b
--- /dev/null
+++ b/apps/shell-vue-app/.vscode/extensions.json
@@ -0,0 +1,3 @@
+{
+ "recommendations": ["Vue.volar"]
+}
diff --git a/apps/shell-vue-app/README.md b/apps/shell-vue-app/README.md
new file mode 100644
index 0000000..33895ab
--- /dev/null
+++ b/apps/shell-vue-app/README.md
@@ -0,0 +1,5 @@
+# Vue 3 + TypeScript + Vite
+
+This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `
+