- index
+
+ indexindex5454
diff --git a/apps/vue2-app/src/router.ts b/apps/vue2-app/src/router.ts
index 61cc9a7..4b34de5 100644
--- a/apps/vue2-app/src/router.ts
+++ b/apps/vue2-app/src/router.ts
@@ -1,17 +1,20 @@
-import Vue from 'vue'
-import type { RouteConfig } from 'vue-router'
-import VueRouter from 'vue-router'
+import Vue from "vue";
+import type { RouteConfig } from "vue-router";
+import VueRouter from "vue-router";
-import Index from './pages/index.vue'
-import Bar from './pages/bar.vue'
-import Foo from './pages/foo.vue'
+import Index from "./pages/index.vue";
+import Bar from "./pages/bar.vue";
+import Foo from "./pages/foo.vue";
export const routes: RouteConfig[] = [
- { path: '/', component: Index },
- { path: '/foo', component: Foo },
- { path: '/Bar', component: Bar },
-]
+ { path: "/", redirect: "/index" },
+ { path: "/index", component: Index },
+ { path: "/foo", component: Foo },
+ { path: "/Bar", component: Bar },
+];
-Vue.use(VueRouter)
+Vue.use(VueRouter);
-export const subAppLocation = window.__POWERED_BY_WUJIE__ ? window.$wujie.location : window.location
+export const subAppLocation = window.__POWERED_BY_WUJIE__
+ ? window.$wujie.location
+ : window.location;
diff --git a/apps/vue2-app/tsconfig.json b/apps/vue2-app/tsconfig.json
index d1362a4..73cb45a 100644
--- a/apps/vue2-app/tsconfig.json
+++ b/apps/vue2-app/tsconfig.json
@@ -25,7 +25,8 @@
"include": [
"src/**/*.ts",
"src/**/*.tsx",
- "src/**/*.vue"
+ "src/**/*.vue",
+ "../../shared/constants/**/*.ts"
],
"references": [
{
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1802a6a..d2b0720 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -83,9 +83,15 @@ importers:
apps/shell-vue-app:
dependencies:
+ element-plus:
+ specifier: ^2.7.7
+ version: 2.7.7(vue@3.4.31(typescript@5.5.3))
vue:
specifier: ^3.4.29
version: 3.4.31(typescript@5.5.3)
+ vue-router:
+ specifier: ^4.4.0
+ version: 4.4.0(vue@3.4.31(typescript@5.5.3))
wujie-vue3:
specifier: ^1.0.22
version: 1.0.22(vue@3.4.31(typescript@5.5.3))
@@ -533,6 +539,10 @@ packages:
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
engines: {node: '>=12'}
+ '@ctrl/tinycolor@3.6.1':
+ resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==}
+ engines: {node: '>=10'}
+
'@dprint/formatter@0.3.0':
resolution: {integrity: sha512-N9fxCxbaBOrDkteSOzaCqwWjso5iAe+WJPsHC021JfHNj2ThInPNEF13ORDKta3llq5D1TlclODCvOvipH7bWQ==}
@@ -542,6 +552,11 @@ packages:
'@dprint/toml@0.6.2':
resolution: {integrity: sha512-Mk5unEANsL/L+WHYU3NpDXt1ARU5bNU5k5OZELxaJodDycKG6RoRnSlZXpW6+7UN2PSnETAFVUdKrh937ZwtHA==}
+ '@element-plus/icons-vue@2.3.1':
+ resolution: {integrity: sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==}
+ peerDependencies:
+ vue: ^3.2.0
+
'@es-joy/jsdoccomment@0.43.1':
resolution: {integrity: sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==}
engines: {node: '>=16'}
@@ -1116,6 +1131,15 @@ packages:
resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@floating-ui/core@1.6.5':
+ resolution: {integrity: sha512-8GrTWmoFhm5BsMZOTHeGD2/0FLKLQQHvO/ZmQga4tKempYRLz8aqJGqXVuQgisnMObq2YZ2SgkwctN1LOOxcqA==}
+
+ '@floating-ui/dom@1.6.8':
+ resolution: {integrity: sha512-kx62rP19VZ767Q653wsP1XZCGIirkE09E0QUGNYTM/ttbbQHqcGPdSfWFxUyyNLc/W6aoJRBajOSXhP6GXjC0Q==}
+
+ '@floating-ui/utils@0.2.5':
+ resolution: {integrity: sha512-sTcG+QZ6fdEUObICavU+aB3Mp8HY4n14wYHdxK4fXjPmv3PXZZeY5RaguJmGyeH/CJQhX3fqKUtS4qc1LoHwhQ==}
+
'@humanwhocodes/module-importer@1.0.1':
resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
engines: {node: '>=12.22'}
@@ -1393,6 +1417,9 @@ packages:
peerDependencies:
eslint: '>=8.40.0'
+ '@sxzz/popperjs-es@2.11.7':
+ resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==}
+
'@tsconfig/node10@1.0.11':
resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}
@@ -1477,6 +1504,9 @@ packages:
'@types/unist@3.0.2':
resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==}
+ '@types/web-bluetooth@0.0.16':
+ resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
+
'@typescript-eslint/eslint-plugin@7.16.0':
resolution: {integrity: sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==}
engines: {node: ^18.18.0 || >=20.0.0}
@@ -1635,6 +1665,15 @@ packages:
'@vue/shared@3.4.31':
resolution: {integrity: sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==}
+ '@vueuse/core@9.13.0':
+ resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
+
+ '@vueuse/metadata@9.13.0':
+ resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==}
+
+ '@vueuse/shared@9.13.0':
+ resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
+
JSONStream@1.3.5:
resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==}
hasBin: true
@@ -1759,6 +1798,9 @@ packages:
ast-types-flow@0.0.8:
resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==}
+ async-validator@4.2.5:
+ resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
+
autoprefixer@10.4.19:
resolution: {integrity: sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==}
engines: {node: ^10 || ^12 || >=14}
@@ -2077,6 +2119,9 @@ packages:
dataloader@1.4.0:
resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==}
+ dayjs@1.11.12:
+ resolution: {integrity: sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==}
+
de-indent@1.0.2:
resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==}
@@ -2182,6 +2227,11 @@ packages:
electron-to-chromium@1.4.824:
resolution: {integrity: sha512-GTQnZOP1v0wCuoWzKOxL8rurg9T13QRYISkoICGaZzskBf9laC3V8g9BHTpJv+j9vBRcKOulbGXwMzuzNdVrAA==}
+ element-plus@2.7.7:
+ resolution: {integrity: sha512-7ucUiDAxevyBE8JbXBTe9ofHhS047VmWMLoksE45zZ08XSnhnyG7WUuk3gmDbAklfVMHedb9sEV3OovPUWt+Sw==}
+ peerDependencies:
+ vue: ^3.2.0
+
emoji-regex@10.3.0:
resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}
@@ -2274,6 +2324,9 @@ packages:
resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
engines: {node: '>=6'}
+ escape-html@1.0.3:
+ resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
+
escape-string-regexp@1.0.5:
resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
engines: {node: '>=0.8.0'}
@@ -3286,6 +3339,13 @@ packages:
lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
+ lodash-unified@1.0.3:
+ resolution: {integrity: sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==}
+ peerDependencies:
+ '@types/lodash-es': '*'
+ lodash: '*'
+ lodash-es: '*'
+
lodash.camelcase@4.3.0:
resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
@@ -3396,6 +3456,9 @@ packages:
mdn-data@2.0.30:
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
+ memoize-one@6.0.0:
+ resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
+
meow@12.1.1:
resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==}
engines: {node: '>=16.10'}
@@ -3613,6 +3676,9 @@ packages:
resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==}
engines: {node: '>=0.10.0'}
+ normalize-wheel-es@1.2.0:
+ resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==}
+
npm-install-checks@6.3.0:
resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
@@ -5462,12 +5528,18 @@ snapshots:
'@jridgewell/trace-mapping': 0.3.9
optional: true
+ '@ctrl/tinycolor@3.6.1': {}
+
'@dprint/formatter@0.3.0': {}
'@dprint/markdown@0.17.1': {}
'@dprint/toml@0.6.2': {}
+ '@element-plus/icons-vue@2.3.1(vue@3.4.31(typescript@5.5.3))':
+ dependencies:
+ vue: 3.4.31(typescript@5.5.3)
+
'@es-joy/jsdoccomment@0.43.1':
dependencies:
'@types/eslint': 8.56.10
@@ -5786,6 +5858,17 @@ snapshots:
'@eslint/object-schema@2.1.4': {}
+ '@floating-ui/core@1.6.5':
+ dependencies:
+ '@floating-ui/utils': 0.2.5
+
+ '@floating-ui/dom@1.6.8':
+ dependencies:
+ '@floating-ui/core': 1.6.5
+ '@floating-ui/utils': 0.2.5
+
+ '@floating-ui/utils@0.2.5': {}
+
'@humanwhocodes/module-importer@1.0.1': {}
'@humanwhocodes/retry@0.3.0': {}
@@ -6100,6 +6183,8 @@ snapshots:
- supports-color
- typescript
+ '@sxzz/popperjs-es@2.11.7': {}
+
'@tsconfig/node10@1.0.11':
optional: true
@@ -6183,6 +6268,8 @@ snapshots:
'@types/unist@3.0.2': {}
+ '@types/web-bluetooth@0.0.16': {}
+
'@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0(eslint@9.7.0)(typescript@5.5.3))(eslint@9.7.0)(typescript@5.5.3)':
dependencies:
'@eslint-community/regexpp': 4.11.0
@@ -6437,6 +6524,25 @@ snapshots:
'@vue/shared@3.4.31': {}
+ '@vueuse/core@9.13.0(vue@3.4.31(typescript@5.5.3))':
+ dependencies:
+ '@types/web-bluetooth': 0.0.16
+ '@vueuse/metadata': 9.13.0
+ '@vueuse/shared': 9.13.0(vue@3.4.31(typescript@5.5.3))
+ vue-demi: 0.14.8(vue@3.4.31(typescript@5.5.3))
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+
+ '@vueuse/metadata@9.13.0': {}
+
+ '@vueuse/shared@9.13.0(vue@3.4.31(typescript@5.5.3))':
+ dependencies:
+ vue-demi: 0.14.8(vue@3.4.31(typescript@5.5.3))
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+
JSONStream@1.3.5:
dependencies:
jsonparse: 1.3.1
@@ -6566,6 +6672,8 @@ snapshots:
ast-types-flow@0.0.8: {}
+ async-validator@4.2.5: {}
+
autoprefixer@10.4.19(postcss@8.4.39):
dependencies:
browserslist: 4.23.1
@@ -6886,6 +6994,8 @@ snapshots:
dataloader@1.4.0: {}
+ dayjs@1.11.12: {}
+
de-indent@1.0.2: {}
debug@3.2.7:
@@ -6985,6 +7095,27 @@ snapshots:
electron-to-chromium@1.4.824: {}
+ element-plus@2.7.7(vue@3.4.31(typescript@5.5.3)):
+ dependencies:
+ '@ctrl/tinycolor': 3.6.1
+ '@element-plus/icons-vue': 2.3.1(vue@3.4.31(typescript@5.5.3))
+ '@floating-ui/dom': 1.6.8
+ '@popperjs/core': '@sxzz/popperjs-es@2.11.7'
+ '@types/lodash': 4.17.6
+ '@types/lodash-es': 4.17.12
+ '@vueuse/core': 9.13.0(vue@3.4.31(typescript@5.5.3))
+ async-validator: 4.2.5
+ dayjs: 1.11.12
+ escape-html: 1.0.3
+ lodash: 4.17.21
+ lodash-es: 4.17.21
+ lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21)
+ memoize-one: 6.0.0
+ normalize-wheel-es: 1.2.0
+ vue: 3.4.31(typescript@5.5.3)
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+
emoji-regex@10.3.0: {}
emoji-regex@8.0.0: {}
@@ -7221,6 +7352,8 @@ snapshots:
escalade@3.1.2: {}
+ escape-html@1.0.3: {}
+
escape-string-regexp@1.0.5: {}
escape-string-regexp@4.0.0: {}
@@ -8358,6 +8491,12 @@ snapshots:
lodash-es@4.17.21: {}
+ lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21):
+ dependencies:
+ '@types/lodash-es': 4.17.12
+ lodash: 4.17.21
+ lodash-es: 4.17.21
+
lodash.camelcase@4.3.0: {}
lodash.isplainobject@4.0.6: {}
@@ -8531,6 +8670,8 @@ snapshots:
mdn-data@2.0.30:
optional: true
+ memoize-one@6.0.0: {}
+
meow@12.1.1: {}
merge-stream@2.0.0: {}
@@ -8859,6 +9000,8 @@ snapshots:
normalize-range@0.1.2: {}
+ normalize-wheel-es@1.2.0: {}
+
npm-install-checks@6.3.0:
dependencies:
semver: 7.6.2
@@ -10121,6 +10264,10 @@ snapshots:
dependencies:
vue: 2.7.16
+ vue-demi@0.14.8(vue@3.4.31(typescript@5.5.3)):
+ dependencies:
+ vue: 3.4.31(typescript@5.5.3)
+
vue-eslint-parser@9.4.3(eslint@9.7.0):
dependencies:
debug: 4.3.5
diff --git a/shared/constants/index.ts b/shared/constants/index.ts
new file mode 100644
index 0000000..ba89c34
--- /dev/null
+++ b/shared/constants/index.ts
@@ -0,0 +1,9 @@
+enum WUJIE_MESSAGE_CODE {
+ SUB_ROUTE_CHANGE = "sub-route-change",
+ VUE3_ROUTE_CHANGE = "vue3-router-change",
+ VUE2_ROUTE_CHANGE = "vue2-router-change"
+}
+
+export {
+ WUJIE_MESSAGE_CODE,
+}
\ No newline at end of file