npmapps 1.1.6 → 1.2.0
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 +1 -1
- package/app/wujie-wk/dev.log +0 -1979
- package/app/wujie-wk/wujie-react-child/README.md +0 -126
- package/app/wujie-wk/wujie-react-child/eslint.config.js +0 -28
- package/app/wujie-wk/wujie-react-child/index.html +0 -13
- package/app/wujie-wk/wujie-react-child/package-lock.json +0 -4344
- package/app/wujie-wk/wujie-react-child/package.json +0 -32
- package/app/wujie-wk/wujie-react-child/public/vite.svg +0 -1
- package/app/wujie-wk/wujie-react-child/src/App.css +0 -0
- package/app/wujie-wk/wujie-react-child/src/App.tsx +0 -72
- package/app/wujie-wk/wujie-react-child/src/assets/react.svg +0 -1
- package/app/wujie-wk/wujie-react-child/src/components/FeatureCards.css +0 -63
- package/app/wujie-wk/wujie-react-child/src/components/FeatureCards.tsx +0 -112
- package/app/wujie-wk/wujie-react-child/src/components/LightCard/index.tsx +0 -36
- package/app/wujie-wk/wujie-react-child/src/components/LightCard/style.css +0 -20
- package/app/wujie-wk/wujie-react-child/src/hooks/use3DCard.ts +0 -53
- package/app/wujie-wk/wujie-react-child/src/hooks/useLightCard.ts +0 -141
- package/app/wujie-wk/wujie-react-child/src/index.css +0 -0
- package/app/wujie-wk/wujie-react-child/src/main.tsx +0 -8
- package/app/wujie-wk/wujie-react-child/src/pages/ChildToParent/index.css +0 -55
- package/app/wujie-wk/wujie-react-child/src/pages/ChildToParent/index.tsx +0 -88
- package/app/wujie-wk/wujie-react-child/src/pages/Css.tsx +0 -28
- package/app/wujie-wk/wujie-react-child/src/pages/Home.tsx +0 -72
- package/app/wujie-wk/wujie-react-child/src/pages/ParentToChild.css +0 -85
- package/app/wujie-wk/wujie-react-child/src/pages/ParentToChild.tsx +0 -119
- package/app/wujie-wk/wujie-react-child/src/pages/RouterJump/index.css +0 -61
- package/app/wujie-wk/wujie-react-child/src/pages/RouterJump/index.tsx +0 -87
- package/app/wujie-wk/wujie-react-child/src/router/index.tsx +0 -63
- package/app/wujie-wk/wujie-react-child/src/types/wujie.d.ts +0 -26
- package/app/wujie-wk/wujie-react-child/src/vite-env.d.ts +0 -1
- package/app/wujie-wk/wujie-react-child/tsconfig.app.json +0 -26
- package/app/wujie-wk/wujie-react-child/tsconfig.json +0 -7
- package/app/wujie-wk/wujie-react-child/tsconfig.node.json +0 -24
- package/app/wujie-wk/wujie-react-child/vite.config.ts +0 -10
- package/app/wujie-wk/wujie-vue3-child/.claude/settings.local.json +0 -8
- package/app/wujie-wk/wujie-vue3-child/.vscode/extensions.json +0 -3
- package/app/wujie-wk/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
- package/app/wujie-wk/wujie-vue3-child/README.md +0 -5
- package/app/wujie-wk/wujie-vue3-child/index.html +0 -13
- package/app/wujie-wk/wujie-vue3-child/package-lock.json +0 -5744
- package/app/wujie-wk/wujie-vue3-child/package.json +0 -28
- package/app/wujie-wk/wujie-vue3-child/public/vite.svg +0 -1
- package/app/wujie-wk/wujie-vue3-child/src/App.vue +0 -130
- package/app/wujie-wk/wujie-vue3-child/src/assets/vue.svg +0 -1
- package/app/wujie-wk/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
- package/app/wujie-wk/wujie-vue3-child/src/components/SmartAnchorTabs/index.jsx +0 -224
- package/app/wujie-wk/wujie-vue3-child/src/components/SmartAnchorTabs/style.css +0 -154
- package/app/wujie-wk/wujie-vue3-child/src/components/tags-view.vue +0 -193
- package/app/wujie-wk/wujie-vue3-child/src/components/tags-view1.vue +0 -131
- package/app/wujie-wk/wujie-vue3-child/src/directives/aiLoading.js +0 -182
- package/app/wujie-wk/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
- package/app/wujie-wk/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
- package/app/wujie-wk/wujie-vue3-child/src/main.js +0 -18
- package/app/wujie-wk/wujie-vue3-child/src/router/index.js +0 -104
- package/app/wujie-wk/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
- package/app/wujie-wk/wujie-vue3-child/src/style.css +0 -171
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -375
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
- package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
- package/app/wujie-wk/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
- package/app/wujie-wk/wujie-vue3-child/src/views/home.vue +0 -53
- package/app/wujie-wk/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
- package/app/wujie-wk/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
- package/app/wujie-wk/wujie-vue3-child/src/views/jsx/com.vue +0 -44
- package/app/wujie-wk/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
- package/app/wujie-wk/wujie-vue3-child/src/views/jsx/index.vue +0 -72
- package/app/wujie-wk/wujie-vue3-child/src/views/jsx/props.vue +0 -33
- package/app/wujie-wk/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
- package/app/wujie-wk/wujie-vue3-child/src/views/phone-code.vue +0 -318
- package/app/wujie-wk/wujie-vue3-child/src/views/router-jump.vue +0 -123
- package/app/wujie-wk/wujie-vue3-child/src/views/test.vue +0 -192
- package/app/wujie-wk/wujie-vue3-child/vite.config.js +0 -15
- package/app/wujie-wk/wujie-vue3-child copy/.vscode/extensions.json +0 -3
- package/app/wujie-wk/wujie-vue3-child copy/README.md +0 -5
- package/app/wujie-wk/wujie-vue3-child copy/index.html +0 -13
- package/app/wujie-wk/wujie-vue3-child copy/package-lock.json +0 -4617
- package/app/wujie-wk/wujie-vue3-child copy/package.json +0 -22
- package/app/wujie-wk/wujie-vue3-child copy/public/vite.svg +0 -1
- package/app/wujie-wk/wujie-vue3-child copy/src/App.vue +0 -124
- package/app/wujie-wk/wujie-vue3-child copy/src/assets/vue.svg +0 -1
- package/app/wujie-wk/wujie-vue3-child copy/src/components/HelloWorld.vue +0 -43
- package/app/wujie-wk/wujie-vue3-child copy/src/main.js +0 -12
- package/app/wujie-wk/wujie-vue3-child copy/src/router/index.js +0 -84
- package/app/wujie-wk/wujie-vue3-child copy/src/style.css +0 -4
- package/app/wujie-wk/wujie-vue3-child copy/src/views/child-to-parent.vue +0 -117
- package/app/wujie-wk/wujie-vue3-child copy/src/views/home.vue +0 -53
- package/app/wujie-wk/wujie-vue3-child copy/src/views/parent-to-child.vue +0 -225
- package/app/wujie-wk/wujie-vue3-child copy/src/views/phone-code.vue +0 -318
- package/app/wujie-wk/wujie-vue3-child copy/src/views/router-jump.vue +0 -115
- package/app/wujie-wk/wujie-vue3-child copy/src/views/test.vue +0 -192
- package/app/wujie-wk/wujie-vue3-child copy/vite.config.js +0 -10
- package/app/wujie-wk/wujie-vue3-main/.vscode/extensions.json +0 -3
- package/app/wujie-wk/wujie-vue3-main/README.md +0 -154
- package/app/wujie-wk/wujie-vue3-main/index.html +0 -13
- package/app/wujie-wk/wujie-vue3-main/package-lock.json +0 -4736
- package/app/wujie-wk/wujie-vue3-main/package.json +0 -25
- package/app/wujie-wk/wujie-vue3-main/public/vite.svg +0 -1
- package/app/wujie-wk/wujie-vue3-main/src/App.vue +0 -879
- package/app/wujie-wk/wujie-vue3-main/src/assets/vue.svg +0 -1
- package/app/wujie-wk/wujie-vue3-main/src/components/HelloWorld.vue +0 -43
- package/app/wujie-wk/wujie-vue3-main/src/components/WujieReact/index.vue +0 -20
- package/app/wujie-wk/wujie-vue3-main/src/components/WujieVue2/index.vue +0 -8
- package/app/wujie-wk/wujie-vue3-main/src/components/WujieVue3/index.vue +0 -8
- package/app/wujie-wk/wujie-vue3-main/src/components/WujieVue3Copy/index.vue +0 -8
- package/app/wujie-wk/wujie-vue3-main/src/main.js +0 -23
- package/app/wujie-wk/wujie-vue3-main/src/router/index.js +0 -88
- package/app/wujie-wk/wujie-vue3-main/src/store/useMicroAppStore.js +0 -66
- package/app/wujie-wk/wujie-vue3-main/src/style.css +0 -3
- package/app/wujie-wk/wujie-vue3-main/src/views/home.vue +0 -103
- package/app/wujie-wk/wujie-vue3-main/src/views/router-jump.vue +0 -159
- package/app/wujie-wk/wujie-vue3-main/src/views/test.vue +0 -125
- package/app/wujie-wk/wujie-vue3-main/src/views/vue3-child-msg.vue +0 -108
- package/app/wujie-wk/wujie-vue3-main/vite.config.js +0 -12
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref } from 'vue'
|
|
3
|
-
|
|
4
|
-
defineProps({
|
|
5
|
-
msg: String,
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
const count = ref(0)
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<h1>{{ msg }}</h1>
|
|
13
|
-
|
|
14
|
-
<div class="card">
|
|
15
|
-
<button type="button" @click="count++">count is {{ count }}</button>
|
|
16
|
-
<p>
|
|
17
|
-
Edit
|
|
18
|
-
<code>components/HelloWorld.vue</code> to test HMR
|
|
19
|
-
</p>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<p>
|
|
23
|
-
Check out
|
|
24
|
-
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
|
25
|
-
>create-vue</a
|
|
26
|
-
>, the official Vue + Vite starter
|
|
27
|
-
</p>
|
|
28
|
-
<p>
|
|
29
|
-
Learn more about IDE Support for Vue in the
|
|
30
|
-
<a
|
|
31
|
-
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
|
32
|
-
target="_blank"
|
|
33
|
-
>Vue Docs Scaling up Guide</a
|
|
34
|
-
>.
|
|
35
|
-
</p>
|
|
36
|
-
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<style scoped>
|
|
40
|
-
.read-the-docs {
|
|
41
|
-
color: #888;
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="wujie-react-container">
|
|
3
|
-
<WujieVue
|
|
4
|
-
width="100%"
|
|
5
|
-
height="100%"
|
|
6
|
-
name="react"
|
|
7
|
-
url="http://localhost:3005"
|
|
8
|
-
:sync="true"
|
|
9
|
-
></WujieVue>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<style scoped>
|
|
15
|
-
.wujie-react-container {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
min-height: 500px;
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import router from './router' // 更新导入路径
|
|
3
|
-
import './style.css'
|
|
4
|
-
import App from './App.vue'
|
|
5
|
-
import WujieVue from "wujie-vue3";
|
|
6
|
-
// 引人element-plus
|
|
7
|
-
import 'element-plus/dist/index.css'
|
|
8
|
-
import ElementPlus from 'element-plus'
|
|
9
|
-
// 引入 pinia
|
|
10
|
-
import { createPinia } from 'pinia'
|
|
11
|
-
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
|
12
|
-
|
|
13
|
-
const app = createApp(App)
|
|
14
|
-
// 创建 pinia 实例
|
|
15
|
-
const pinia = createPinia()
|
|
16
|
-
pinia.use(piniaPluginPersistedstate)
|
|
17
|
-
|
|
18
|
-
app.use(router)
|
|
19
|
-
app.use(WujieVue);
|
|
20
|
-
app.use(ElementPlus);
|
|
21
|
-
// 使用 pinia
|
|
22
|
-
app.use(pinia)
|
|
23
|
-
app.mount('#app')
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
-
import Home from '../views/home.vue'
|
|
3
|
-
import Test from '../views/test.vue'
|
|
4
|
-
import WujieVue3 from '../components/WujieVue3/index.vue'
|
|
5
|
-
import WujieVue3Copy from '../components/WujieVue3Copy/index.vue'
|
|
6
|
-
import Vue3ChildMsg from '../views/vue3-child-msg.vue'
|
|
7
|
-
import RouterJump from '../views/router-jump.vue'
|
|
8
|
-
import WujieVue2 from '../components/WujieVue2/index.vue'
|
|
9
|
-
import WujieReact from '../components/WujieReact/index.vue'
|
|
10
|
-
// 定义路由配置
|
|
11
|
-
const router = createRouter({
|
|
12
|
-
history: createWebHistory(),
|
|
13
|
-
routes: [
|
|
14
|
-
{
|
|
15
|
-
path: '/',
|
|
16
|
-
name: 'home',
|
|
17
|
-
component: Home,
|
|
18
|
-
meta: {
|
|
19
|
-
title: '主应用主页',
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
path: '/test',
|
|
24
|
-
name: 'test',
|
|
25
|
-
component: Test,
|
|
26
|
-
meta: {
|
|
27
|
-
title: '测试页面',
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
path: '/vue3-child',
|
|
33
|
-
name: 'vue3-child',
|
|
34
|
-
component: WujieVue3,
|
|
35
|
-
meta: {
|
|
36
|
-
title: 'Vue3子应用',
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
path: '/vue3-child-copy',
|
|
42
|
-
name: 'vue3-child-copy',
|
|
43
|
-
component: WujieVue3Copy,
|
|
44
|
-
meta: {
|
|
45
|
-
title: 'Vue3子应用(保活)',
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
path: '/vue2-child',
|
|
51
|
-
name: 'vue2-child',
|
|
52
|
-
component: WujieVue2,
|
|
53
|
-
meta: {
|
|
54
|
-
title: 'Vue2子应用',
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
// react子应用
|
|
58
|
-
{
|
|
59
|
-
path: '/react-child',
|
|
60
|
-
name: 'react-child',
|
|
61
|
-
component: WujieReact,
|
|
62
|
-
meta: {
|
|
63
|
-
title: 'React子应用',
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
// 子应用消息
|
|
67
|
-
{
|
|
68
|
-
path: '/vue3-child-msg',
|
|
69
|
-
name: 'vue3-child-msg',
|
|
70
|
-
component: Vue3ChildMsg,
|
|
71
|
-
meta: {
|
|
72
|
-
title: '子应用消息',
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
// 路由跳转
|
|
76
|
-
{
|
|
77
|
-
path: '/router-jump',
|
|
78
|
-
name: 'router-jump',
|
|
79
|
-
component: RouterJump,
|
|
80
|
-
meta: {
|
|
81
|
-
title: '路由跳转',
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
]
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
export default router
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineStore } from 'pinia'
|
|
2
|
-
|
|
3
|
-
export const useMicroAppStore = defineStore('microApp', {
|
|
4
|
-
state: () => ({
|
|
5
|
-
// 存储子应用的消息
|
|
6
|
-
messages: [],
|
|
7
|
-
// 当前激活的子应用
|
|
8
|
-
activeApp: '',
|
|
9
|
-
// 子应用的状态
|
|
10
|
-
appStatus: {
|
|
11
|
-
vue3: false,
|
|
12
|
-
react: false,
|
|
13
|
-
vite: false
|
|
14
|
-
}
|
|
15
|
-
}),
|
|
16
|
-
|
|
17
|
-
// 添加持久化配置
|
|
18
|
-
persist: {
|
|
19
|
-
// 启用持久化
|
|
20
|
-
enabled: true,
|
|
21
|
-
// 存储到 localStorage
|
|
22
|
-
storage: localStorage,
|
|
23
|
-
// 只持久化 messages 数据
|
|
24
|
-
paths: ['messages']
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
getters: {
|
|
28
|
-
// 获取最新的消息
|
|
29
|
-
latestMessage: (state) => state.messages[state.messages.length - 1],
|
|
30
|
-
// 获取指定应用的消息
|
|
31
|
-
getMessagesByApp: (state) => (appName) => {
|
|
32
|
-
return state.messages.filter(msg => msg.from === appName)
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
actions: {
|
|
37
|
-
// 接收子应用消息
|
|
38
|
-
receiveMessage(message) {
|
|
39
|
-
this.messages.push({
|
|
40
|
-
...message,
|
|
41
|
-
timestamp: new Date().getTime()
|
|
42
|
-
})
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
// 设置当前激活的子应用
|
|
46
|
-
setActiveApp(appName) {
|
|
47
|
-
this.activeApp = appName
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
// 更新子应用状态
|
|
51
|
-
updateAppStatus(appName, status) {
|
|
52
|
-
if (appName in this.appStatus) {
|
|
53
|
-
this.appStatus[appName] = status
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
// 清除指定应用的消息
|
|
58
|
-
clearMessages(appName) {
|
|
59
|
-
if (appName) {
|
|
60
|
-
this.messages = this.messages.filter(msg => msg.from !== appName)
|
|
61
|
-
} else {
|
|
62
|
-
this.messages = []
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
})
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
// 主页
|
|
2
|
-
<template>
|
|
3
|
-
<div class="home-container">
|
|
4
|
-
<h1 class="home-title">主应用主页</h1>
|
|
5
|
-
<!-- 使用 Element Plus 的导航菜单 -->
|
|
6
|
-
<el-menu
|
|
7
|
-
:default-active="activeRoute"
|
|
8
|
-
class="nav-menu"
|
|
9
|
-
mode="horizontal"
|
|
10
|
-
router
|
|
11
|
-
@select="handleSelect"
|
|
12
|
-
>
|
|
13
|
-
<el-menu-item
|
|
14
|
-
v-for="route in routes"
|
|
15
|
-
:key="route.path"
|
|
16
|
-
:index="route.path"
|
|
17
|
-
>
|
|
18
|
-
<el-icon v-if="route.meta?.icon">
|
|
19
|
-
<component :is="route.meta.icon" />
|
|
20
|
-
</el-icon>
|
|
21
|
-
<span>{{ route.meta.title }}</span>
|
|
22
|
-
</el-menu-item>
|
|
23
|
-
</el-menu>
|
|
24
|
-
|
|
25
|
-
<div class="home-content">
|
|
26
|
-
<p class="welcome-text">欢迎使用无界微前端框架</p>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script setup>
|
|
32
|
-
import { ref, computed } from 'vue';
|
|
33
|
-
import { useRouter, useRoute } from 'vue-router';
|
|
34
|
-
|
|
35
|
-
const router = useRouter();
|
|
36
|
-
const route = useRoute();
|
|
37
|
-
|
|
38
|
-
// 获取路由配置
|
|
39
|
-
const routes = router.options.routes.filter(route => route.name);
|
|
40
|
-
|
|
41
|
-
// 当前激活的路由
|
|
42
|
-
const activeRoute = computed(() => route.path);
|
|
43
|
-
|
|
44
|
-
// 菜单选择处理
|
|
45
|
-
const handleSelect = (path) => {
|
|
46
|
-
router.push(path);
|
|
47
|
-
};
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<style scoped>
|
|
51
|
-
.home-container {
|
|
52
|
-
padding: 2rem;
|
|
53
|
-
max-width: 1200px;
|
|
54
|
-
margin: 0 auto;
|
|
55
|
-
min-height: 80vh;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.home-title {
|
|
59
|
-
color: #2c3e50;
|
|
60
|
-
font-size: 2.5rem;
|
|
61
|
-
margin-bottom: 2rem;
|
|
62
|
-
text-align: center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.nav-menu {
|
|
66
|
-
margin-bottom: 2rem;
|
|
67
|
-
border-radius: 8px;
|
|
68
|
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:deep(.el-menu) {
|
|
72
|
-
border-radius: 8px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
:deep(.el-menu-item) {
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
font-size: 1.1rem;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:deep(.el-menu-item.is-active) {
|
|
82
|
-
font-weight: bold;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
:deep(.el-icon) {
|
|
86
|
-
margin-right: 8px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.home-content {
|
|
90
|
-
background-color: #f8f9fa;
|
|
91
|
-
border-radius: 8px;
|
|
92
|
-
padding: 2rem;
|
|
93
|
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.welcome-text {
|
|
97
|
-
font-size: 1.2rem;
|
|
98
|
-
color: #666;
|
|
99
|
-
text-align: center;
|
|
100
|
-
line-height: 1.6;
|
|
101
|
-
}
|
|
102
|
-
</style>
|
|
103
|
-
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex-container" style="margin-top: 50px;">
|
|
3
|
-
<div class="container">
|
|
4
|
-
<h1>主应用路由跳转</h1>
|
|
5
|
-
<el-input v-model="url" placeholder="请输入地址"></el-input>
|
|
6
|
-
<el-input v-model="name" placeholder="请输入姓名"></el-input>
|
|
7
|
-
<el-input v-model="age" placeholder="请输入年龄" type="number"></el-input>
|
|
8
|
-
<el-select v-model="selectedApp" placeholder="请选择应用">
|
|
9
|
-
<el-option label="vue3-child" value="vue3-child"></el-option>
|
|
10
|
-
<el-option label="vue3-child-copy" value="vue3-child-copy"></el-option>
|
|
11
|
-
<el-option label="vue2-child" value="vue2-child"></el-option>
|
|
12
|
-
<el-option label="react-child" value="react-child"></el-option>
|
|
13
|
-
</el-select>
|
|
14
|
-
<el-button type="primary" @click="jumpToChild">跳转到子应用</el-button>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="route-params">
|
|
17
|
-
<h2>路由参数</h2>
|
|
18
|
-
<p>地址: {{ $route.path }}</p>
|
|
19
|
-
<p v-for="(item,key) in $route.query" :key="item">{{ key }}:{{ item }}</p>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script setup>
|
|
25
|
-
import { useRouter } from "vue-router";
|
|
26
|
-
import { ref } from "vue";
|
|
27
|
-
import { ElInput, ElButton, ElSelect, ElOption } from "element-plus";
|
|
28
|
-
import WujieVue from "wujie-vue3";
|
|
29
|
-
const router = useRouter();
|
|
30
|
-
const url = ref("/router-jump");
|
|
31
|
-
const name = ref("zhangsan");
|
|
32
|
-
const age = ref(18);
|
|
33
|
-
const selectedApp = ref("vue3-child");
|
|
34
|
-
const { bus } = WujieVue;
|
|
35
|
-
|
|
36
|
-
const isAlive = {
|
|
37
|
-
'vue3-child':false,
|
|
38
|
-
'vue3-child-copy':true,
|
|
39
|
-
'react-child':false
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const jumpToChild = () => {
|
|
43
|
-
router.push(selectedApp.value);
|
|
44
|
-
// 判断子应用是否存在
|
|
45
|
-
if ( isAlive[selectedApp.value] && window.document.querySelector(`iframe[name=${selectedApp.value}]`)) {
|
|
46
|
-
bus.$emit("router-jump", {
|
|
47
|
-
app: selectedApp.value,
|
|
48
|
-
path: url.value,
|
|
49
|
-
query: {
|
|
50
|
-
name: name.value,
|
|
51
|
-
age: age.value,
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
console.log("子应用不存在");
|
|
56
|
-
// 监听子应用加载完成
|
|
57
|
-
bus.$on("loaded", handleLoaded);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
// 定义一个具体的函数
|
|
62
|
-
const handleLoaded = (app) => {
|
|
63
|
-
console.log("子应用加载完成", app);
|
|
64
|
-
|
|
65
|
-
if (app === selectedApp.value) {
|
|
66
|
-
console.log(selectedApp.value);
|
|
67
|
-
|
|
68
|
-
bus.$emit("router-jump", {
|
|
69
|
-
app: selectedApp.value,
|
|
70
|
-
path: url.value,
|
|
71
|
-
query: {
|
|
72
|
-
name: name.value,
|
|
73
|
-
age: age.value,
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
// 使用相同的函数引用来移除监听器
|
|
77
|
-
bus.$off("loaded", handleLoaded);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
</script>
|
|
81
|
-
<style scoped>
|
|
82
|
-
.container {
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
align-items: center;
|
|
86
|
-
gap: 20px;
|
|
87
|
-
padding: 20px;
|
|
88
|
-
background-color: #f8f8f8;
|
|
89
|
-
border-radius: 10px;
|
|
90
|
-
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
|
|
91
|
-
width: 45%;
|
|
92
|
-
margin: 0;
|
|
93
|
-
transition: box-shadow 0.3s ease-in-out;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
h1 {
|
|
97
|
-
color: #333;
|
|
98
|
-
margin-bottom: 20px;
|
|
99
|
-
font-family: 'Helvetica Neue', Arial, sans-serif;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
el-input, el-select {
|
|
103
|
-
width: 100%;
|
|
104
|
-
border: 1px solid #ccc;
|
|
105
|
-
border-radius: 5px;
|
|
106
|
-
padding: 10px;
|
|
107
|
-
transition: border-color 0.3s ease-in-out;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
el-input:focus, el-select:focus {
|
|
111
|
-
border-color: #007BFF;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
el-button {
|
|
115
|
-
width: 100%;
|
|
116
|
-
height: 40px;
|
|
117
|
-
background-color: #007BFF;
|
|
118
|
-
color: white;
|
|
119
|
-
border: none;
|
|
120
|
-
border-radius: 5px;
|
|
121
|
-
transition: background-color 0.3s ease-in-out;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
el-button:hover {
|
|
125
|
-
background-color: #0056b3;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.route-params {
|
|
129
|
-
padding: 20px;
|
|
130
|
-
background-color: #eef2f7;
|
|
131
|
-
border-radius: 8px;
|
|
132
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
133
|
-
width: 45%;
|
|
134
|
-
margin: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.route-params h1 {
|
|
138
|
-
color: #007BFF;
|
|
139
|
-
font-size: 24px;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.route-params p {
|
|
143
|
-
font-size: 16px;
|
|
144
|
-
color: #333;
|
|
145
|
-
margin-bottom: 10px;
|
|
146
|
-
background-color: #fff;
|
|
147
|
-
padding: 10px;
|
|
148
|
-
border-radius: 5px;
|
|
149
|
-
border: 1px solid #ccc;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.flex-container {
|
|
153
|
-
display: flex;
|
|
154
|
-
justify-content: space-around;
|
|
155
|
-
align-items: flex-start;
|
|
156
|
-
padding: 20px;
|
|
157
|
-
gap: 20px;
|
|
158
|
-
}
|
|
159
|
-
</style>
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="test-container">
|
|
3
|
-
<h1 class="test-title">功能测试页面</h1>
|
|
4
|
-
|
|
5
|
-
<div class="test-section">
|
|
6
|
-
<h2 class="section-title">基础功能演示</h2>
|
|
7
|
-
|
|
8
|
-
<div class="card">
|
|
9
|
-
<h3>计数器示例</h3>
|
|
10
|
-
<div class="counter-wrapper">
|
|
11
|
-
<button class="btn" @click="decrease">-</button>
|
|
12
|
-
<span class="counter">{{ counter }}</span>
|
|
13
|
-
<button class="btn" @click="increase">+</button>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<div class="card">
|
|
18
|
-
<h3>数据列表示例</h3>
|
|
19
|
-
<ul class="test-list">
|
|
20
|
-
<li v-for="item in items" :key="item.id" class="list-item">
|
|
21
|
-
{{ item.name }}
|
|
22
|
-
</li>
|
|
23
|
-
</ul>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script setup>
|
|
30
|
-
import { ref } from 'vue'
|
|
31
|
-
|
|
32
|
-
const counter = ref(0)
|
|
33
|
-
const items = ref([
|
|
34
|
-
{ id: 1, name: '测试项目 1' },
|
|
35
|
-
{ id: 2, name: '测试项目 2' },
|
|
36
|
-
{ id: 3, name: '测试项目 3' }
|
|
37
|
-
])
|
|
38
|
-
|
|
39
|
-
const increase = () => {
|
|
40
|
-
counter.value++
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const decrease = () => {
|
|
44
|
-
counter.value--
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style scoped>
|
|
49
|
-
.test-container {
|
|
50
|
-
padding: 2rem;
|
|
51
|
-
max-width: 1200px;
|
|
52
|
-
margin: 0 auto;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.test-title {
|
|
56
|
-
color: #2c3e50;
|
|
57
|
-
font-size: 2.5rem;
|
|
58
|
-
margin-bottom: 2rem;
|
|
59
|
-
text-align: center;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.test-section {
|
|
63
|
-
margin-top: 2rem;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.section-title {
|
|
67
|
-
color: #42b983;
|
|
68
|
-
font-size: 1.8rem;
|
|
69
|
-
margin-bottom: 1.5rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.card {
|
|
73
|
-
background-color: #fff;
|
|
74
|
-
border-radius: 8px;
|
|
75
|
-
padding: 1.5rem;
|
|
76
|
-
margin-bottom: 1.5rem;
|
|
77
|
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.card h3 {
|
|
81
|
-
color: #2c3e50;
|
|
82
|
-
margin-bottom: 1rem;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.counter-wrapper {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
justify-content: center;
|
|
89
|
-
gap: 1rem;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.counter {
|
|
93
|
-
font-size: 1.5rem;
|
|
94
|
-
min-width: 3rem;
|
|
95
|
-
text-align: center;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.btn {
|
|
99
|
-
background-color: #42b983;
|
|
100
|
-
color: white;
|
|
101
|
-
border: none;
|
|
102
|
-
padding: 0.5rem 1rem;
|
|
103
|
-
border-radius: 4px;
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
font-size: 1.2rem;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.btn:hover {
|
|
109
|
-
background-color: #3aa876;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.test-list {
|
|
113
|
-
list-style: none;
|
|
114
|
-
padding: 0;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.list-item {
|
|
118
|
-
padding: 0.8rem;
|
|
119
|
-
border-bottom: 1px solid #eee;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.list-item:last-child {
|
|
123
|
-
border-bottom: none;
|
|
124
|
-
}
|
|
125
|
-
</style>
|