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.
Files changed (178) hide show
  1. package/package.json +1 -1
  2. package/app/wujie-wk/dev.log +0 -1979
  3. package/app/wujie-wk/wujie-react-child/README.md +0 -126
  4. package/app/wujie-wk/wujie-react-child/eslint.config.js +0 -28
  5. package/app/wujie-wk/wujie-react-child/index.html +0 -13
  6. package/app/wujie-wk/wujie-react-child/package-lock.json +0 -4344
  7. package/app/wujie-wk/wujie-react-child/package.json +0 -32
  8. package/app/wujie-wk/wujie-react-child/public/vite.svg +0 -1
  9. package/app/wujie-wk/wujie-react-child/src/App.css +0 -0
  10. package/app/wujie-wk/wujie-react-child/src/App.tsx +0 -72
  11. package/app/wujie-wk/wujie-react-child/src/assets/react.svg +0 -1
  12. package/app/wujie-wk/wujie-react-child/src/components/FeatureCards.css +0 -63
  13. package/app/wujie-wk/wujie-react-child/src/components/FeatureCards.tsx +0 -112
  14. package/app/wujie-wk/wujie-react-child/src/components/LightCard/index.tsx +0 -36
  15. package/app/wujie-wk/wujie-react-child/src/components/LightCard/style.css +0 -20
  16. package/app/wujie-wk/wujie-react-child/src/hooks/use3DCard.ts +0 -53
  17. package/app/wujie-wk/wujie-react-child/src/hooks/useLightCard.ts +0 -141
  18. package/app/wujie-wk/wujie-react-child/src/index.css +0 -0
  19. package/app/wujie-wk/wujie-react-child/src/main.tsx +0 -8
  20. package/app/wujie-wk/wujie-react-child/src/pages/ChildToParent/index.css +0 -55
  21. package/app/wujie-wk/wujie-react-child/src/pages/ChildToParent/index.tsx +0 -88
  22. package/app/wujie-wk/wujie-react-child/src/pages/Css.tsx +0 -28
  23. package/app/wujie-wk/wujie-react-child/src/pages/Home.tsx +0 -72
  24. package/app/wujie-wk/wujie-react-child/src/pages/ParentToChild.css +0 -85
  25. package/app/wujie-wk/wujie-react-child/src/pages/ParentToChild.tsx +0 -119
  26. package/app/wujie-wk/wujie-react-child/src/pages/RouterJump/index.css +0 -61
  27. package/app/wujie-wk/wujie-react-child/src/pages/RouterJump/index.tsx +0 -87
  28. package/app/wujie-wk/wujie-react-child/src/router/index.tsx +0 -63
  29. package/app/wujie-wk/wujie-react-child/src/types/wujie.d.ts +0 -26
  30. package/app/wujie-wk/wujie-react-child/src/vite-env.d.ts +0 -1
  31. package/app/wujie-wk/wujie-react-child/tsconfig.app.json +0 -26
  32. package/app/wujie-wk/wujie-react-child/tsconfig.json +0 -7
  33. package/app/wujie-wk/wujie-react-child/tsconfig.node.json +0 -24
  34. package/app/wujie-wk/wujie-react-child/vite.config.ts +0 -10
  35. package/app/wujie-wk/wujie-vue3-child/.claude/settings.local.json +0 -8
  36. package/app/wujie-wk/wujie-vue3-child/.vscode/extensions.json +0 -3
  37. package/app/wujie-wk/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
  38. package/app/wujie-wk/wujie-vue3-child/README.md +0 -5
  39. package/app/wujie-wk/wujie-vue3-child/index.html +0 -13
  40. package/app/wujie-wk/wujie-vue3-child/package-lock.json +0 -5744
  41. package/app/wujie-wk/wujie-vue3-child/package.json +0 -28
  42. package/app/wujie-wk/wujie-vue3-child/public/vite.svg +0 -1
  43. package/app/wujie-wk/wujie-vue3-child/src/App.vue +0 -130
  44. package/app/wujie-wk/wujie-vue3-child/src/assets/vue.svg +0 -1
  45. package/app/wujie-wk/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
  46. package/app/wujie-wk/wujie-vue3-child/src/components/SmartAnchorTabs/index.jsx +0 -224
  47. package/app/wujie-wk/wujie-vue3-child/src/components/SmartAnchorTabs/style.css +0 -154
  48. package/app/wujie-wk/wujie-vue3-child/src/components/tags-view.vue +0 -193
  49. package/app/wujie-wk/wujie-vue3-child/src/components/tags-view1.vue +0 -131
  50. package/app/wujie-wk/wujie-vue3-child/src/directives/aiLoading.js +0 -182
  51. package/app/wujie-wk/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
  52. package/app/wujie-wk/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
  53. package/app/wujie-wk/wujie-vue3-child/src/main.js +0 -18
  54. package/app/wujie-wk/wujie-vue3-child/src/router/index.js +0 -104
  55. package/app/wujie-wk/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
  56. package/app/wujie-wk/wujie-vue3-child/src/style.css +0 -171
  57. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
  58. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
  59. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
  60. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
  61. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
  62. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
  63. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
  64. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
  65. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
  66. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
  67. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
  68. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
  69. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
  70. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
  71. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
  72. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
  73. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
  74. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
  75. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
  76. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
  77. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
  78. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
  79. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -375
  80. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
  81. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
  82. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
  83. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
  84. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
  85. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
  86. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
  87. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
  88. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
  89. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
  90. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
  91. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
  92. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
  93. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
  94. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
  95. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
  96. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
  97. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
  98. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
  99. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
  100. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
  101. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
  102. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
  103. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
  104. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
  105. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
  106. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
  107. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
  108. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
  109. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
  110. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
  111. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
  112. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
  113. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
  114. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
  115. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
  116. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
  117. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
  118. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
  119. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
  120. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
  121. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
  122. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
  123. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
  124. package/app/wujie-wk/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
  125. package/app/wujie-wk/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
  126. package/app/wujie-wk/wujie-vue3-child/src/views/home.vue +0 -53
  127. package/app/wujie-wk/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
  128. package/app/wujie-wk/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
  129. package/app/wujie-wk/wujie-vue3-child/src/views/jsx/com.vue +0 -44
  130. package/app/wujie-wk/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
  131. package/app/wujie-wk/wujie-vue3-child/src/views/jsx/index.vue +0 -72
  132. package/app/wujie-wk/wujie-vue3-child/src/views/jsx/props.vue +0 -33
  133. package/app/wujie-wk/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
  134. package/app/wujie-wk/wujie-vue3-child/src/views/phone-code.vue +0 -318
  135. package/app/wujie-wk/wujie-vue3-child/src/views/router-jump.vue +0 -123
  136. package/app/wujie-wk/wujie-vue3-child/src/views/test.vue +0 -192
  137. package/app/wujie-wk/wujie-vue3-child/vite.config.js +0 -15
  138. package/app/wujie-wk/wujie-vue3-child copy/.vscode/extensions.json +0 -3
  139. package/app/wujie-wk/wujie-vue3-child copy/README.md +0 -5
  140. package/app/wujie-wk/wujie-vue3-child copy/index.html +0 -13
  141. package/app/wujie-wk/wujie-vue3-child copy/package-lock.json +0 -4617
  142. package/app/wujie-wk/wujie-vue3-child copy/package.json +0 -22
  143. package/app/wujie-wk/wujie-vue3-child copy/public/vite.svg +0 -1
  144. package/app/wujie-wk/wujie-vue3-child copy/src/App.vue +0 -124
  145. package/app/wujie-wk/wujie-vue3-child copy/src/assets/vue.svg +0 -1
  146. package/app/wujie-wk/wujie-vue3-child copy/src/components/HelloWorld.vue +0 -43
  147. package/app/wujie-wk/wujie-vue3-child copy/src/main.js +0 -12
  148. package/app/wujie-wk/wujie-vue3-child copy/src/router/index.js +0 -84
  149. package/app/wujie-wk/wujie-vue3-child copy/src/style.css +0 -4
  150. package/app/wujie-wk/wujie-vue3-child copy/src/views/child-to-parent.vue +0 -117
  151. package/app/wujie-wk/wujie-vue3-child copy/src/views/home.vue +0 -53
  152. package/app/wujie-wk/wujie-vue3-child copy/src/views/parent-to-child.vue +0 -225
  153. package/app/wujie-wk/wujie-vue3-child copy/src/views/phone-code.vue +0 -318
  154. package/app/wujie-wk/wujie-vue3-child copy/src/views/router-jump.vue +0 -115
  155. package/app/wujie-wk/wujie-vue3-child copy/src/views/test.vue +0 -192
  156. package/app/wujie-wk/wujie-vue3-child copy/vite.config.js +0 -10
  157. package/app/wujie-wk/wujie-vue3-main/.vscode/extensions.json +0 -3
  158. package/app/wujie-wk/wujie-vue3-main/README.md +0 -154
  159. package/app/wujie-wk/wujie-vue3-main/index.html +0 -13
  160. package/app/wujie-wk/wujie-vue3-main/package-lock.json +0 -4736
  161. package/app/wujie-wk/wujie-vue3-main/package.json +0 -25
  162. package/app/wujie-wk/wujie-vue3-main/public/vite.svg +0 -1
  163. package/app/wujie-wk/wujie-vue3-main/src/App.vue +0 -879
  164. package/app/wujie-wk/wujie-vue3-main/src/assets/vue.svg +0 -1
  165. package/app/wujie-wk/wujie-vue3-main/src/components/HelloWorld.vue +0 -43
  166. package/app/wujie-wk/wujie-vue3-main/src/components/WujieReact/index.vue +0 -20
  167. package/app/wujie-wk/wujie-vue3-main/src/components/WujieVue2/index.vue +0 -8
  168. package/app/wujie-wk/wujie-vue3-main/src/components/WujieVue3/index.vue +0 -8
  169. package/app/wujie-wk/wujie-vue3-main/src/components/WujieVue3Copy/index.vue +0 -8
  170. package/app/wujie-wk/wujie-vue3-main/src/main.js +0 -23
  171. package/app/wujie-wk/wujie-vue3-main/src/router/index.js +0 -88
  172. package/app/wujie-wk/wujie-vue3-main/src/store/useMicroAppStore.js +0 -66
  173. package/app/wujie-wk/wujie-vue3-main/src/style.css +0 -3
  174. package/app/wujie-wk/wujie-vue3-main/src/views/home.vue +0 -103
  175. package/app/wujie-wk/wujie-vue3-main/src/views/router-jump.vue +0 -159
  176. package/app/wujie-wk/wujie-vue3-main/src/views/test.vue +0 -125
  177. package/app/wujie-wk/wujie-vue3-main/src/views/vue3-child-msg.vue +0 -108
  178. package/app/wujie-wk/wujie-vue3-main/vite.config.js +0 -12
@@ -1,88 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { Form, Input, Select, Button, InputNumber } from 'antd';
3
- import './index.css';
4
-
5
- const { Option } = Select;
6
-
7
- interface FormData {
8
- title: string;
9
- message: string;
10
- type: 'success' | 'warning' | 'error' | 'info';
11
- duration: number;
12
- }
13
-
14
- const ChildToParent: React.FC = () => {
15
- const [formData, setFormData] = useState<FormData>({
16
- title: 'react子应用测试title',
17
- message: 'react子应用测试消息',
18
- type: 'success',
19
- duration: 3000
20
- });
21
-
22
- const handleChange = (field: keyof FormData, value: any) => {
23
- setFormData(prev => ({
24
- ...prev,
25
- [field]: value
26
- }));
27
- };
28
-
29
- const sendToParent = () => {
30
- window.$wujie?.bus.$emit('child-event', {
31
- message: formData.message,
32
- type: formData.type,
33
- duration: formData.duration,
34
- title: formData.title
35
- }, 'react子应用');
36
- };
37
-
38
- return (
39
- <div className="child-to-parent">
40
- <h1>子应用消息发送</h1>
41
- <div className="form-container">
42
- <Form layout="vertical">
43
- <Form.Item label="标题:">
44
- <Input
45
- value={formData.title}
46
- onChange={e => handleChange('title', e.target.value)}
47
- placeholder="请输入标题"
48
- />
49
- </Form.Item>
50
- <Form.Item label="消息:">
51
- <Input
52
- value={formData.message}
53
- onChange={e => handleChange('message', e.target.value)}
54
- placeholder="请输入消息内容"
55
- />
56
- </Form.Item>
57
- <Form.Item label="类型:">
58
- <Select
59
- value={formData.type}
60
- onChange={value => handleChange('type', value)}
61
- style={{ width: '100%' }}
62
- >
63
- <Option value="success">成功</Option>
64
- <Option value="warning">警告</Option>
65
- <Option value="error">错误</Option>
66
- <Option value="info">信息</Option>
67
- </Select>
68
- </Form.Item>
69
- <Form.Item label="持续时间:">
70
- <InputNumber
71
- value={formData.duration}
72
- onChange={value => handleChange('duration', value)}
73
- placeholder="持续时间(ms)"
74
- style={{ width: '100%' }}
75
- />
76
- </Form.Item>
77
- <Form.Item>
78
- <Button type="primary" onClick={sendToParent} block>
79
- 发送消息
80
- </Button>
81
- </Form.Item>
82
- </Form>
83
- </div>
84
- </div>
85
- );
86
- };
87
-
88
- export default ChildToParent;
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import { Tabs, Card } from 'antd';
3
- import FeatureCards from '../components/FeatureCards';
4
- import LightCard from '../components/LightCard';
5
-
6
- const { TabPane } = Tabs;
7
-
8
- const Css: React.FC = () => {
9
- return (
10
- <Card>
11
- <Tabs type="card">
12
- <TabPane tab="卡片悬浮发光" key="2">
13
- <div>
14
- <LightCard />
15
- </div>
16
- </TabPane>
17
- <TabPane tab="3d旋转卡片" key="1">
18
- <div>
19
- <FeatureCards />
20
- </div>
21
- </TabPane>
22
-
23
- </Tabs>
24
- </Card>
25
- );
26
- };
27
-
28
- export default Css;
@@ -1,72 +0,0 @@
1
- import React from 'react';
2
- import { Card, Row, Col, Statistic, Typography, Space } from 'antd';
3
- import { UserOutlined, ProjectOutlined, TeamOutlined } from '@ant-design/icons';
4
- import { use3DCard } from '../hooks/use3DCard';
5
- import LightCard from '../components/LightCard';
6
- // import FeatureCards from '../components/FeatureCards';
7
-
8
- const { Title } = Typography;
9
-
10
- const Home: React.FC = () => {
11
- const card1Ref = use3DCard({ sensitivity: 35 });
12
- const card2Ref = use3DCard({ sensitivity: 35 });
13
- const card3Ref = use3DCard({ sensitivity: 35 });
14
-
15
- return (
16
- <>
17
- <div className="home" style={{ padding: '24px' }}>
18
- <Title level={2} style={{ marginBottom: '24px', textAlign: 'center' }}>欢迎使用React微前端应用</Title>
19
-
20
- <Row gutter={[16, 16]}>
21
- <Col xs={24} sm={8}>
22
- <Card hoverable ref={card1Ref} style={{ transition: 'transform 0.3s ease' }}>
23
- <Statistic
24
- title="活跃用户"
25
- value={1234}
26
- prefix={<UserOutlined />}
27
- valueStyle={{ color: '#3f8600' }}
28
- />
29
- </Card>
30
- </Col>
31
- <Col xs={24} sm={8}>
32
- <Card hoverable ref={card2Ref} style={{ transition: 'transform 0.3s ease' }}>
33
- <Statistic
34
- title="项目数量"
35
- value={42}
36
- prefix={<ProjectOutlined />}
37
- valueStyle={{ color: '#1677ff' }}
38
- />
39
- </Card>
40
- </Col>
41
- <Col xs={24} sm={8}>
42
- <Card hoverable ref={card3Ref} style={{ transition: 'transform 0.3s ease' }}>
43
- <Statistic
44
- title="团队成员"
45
- value={18}
46
- prefix={<TeamOutlined />}
47
- valueStyle={{ color: '#722ed1' }}
48
- />
49
- </Card>
50
- </Col>
51
- </Row>
52
-
53
- <Row style={{ marginTop: '24px' }}>
54
- <Col span={24}>
55
- <Card>
56
- <Space direction="vertical" size="middle" style={{ width: '100%' }}>
57
- <Title level={4}>系统公告</Title>
58
- <p>• 欢迎使用我们的微前端解决方案!</p>
59
- <p>• 本系统采用无界微前端框架,实现应用间的无缝集成。</p>
60
- <p>• 如果您在使用过程中遇到任何问题,请随时联系技术支持团队。</p>
61
- </Space>
62
- </Card>
63
- </Col>
64
- </Row>
65
- </div>
66
- <LightCard />
67
- {/* <FeatureCards /> */}
68
- </>
69
- );
70
- };
71
-
72
- export default Home;
@@ -1,85 +0,0 @@
1
- .parent-to-child {
2
- padding: 24px;
3
- background-color: #f5f7fa;
4
- min-height: 100vh;
5
- }
6
-
7
- .page-title {
8
- color: #303133;
9
- margin-bottom: 24px;
10
- font-size: 24px;
11
- }
12
-
13
- .message-container {
14
- display: grid;
15
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
16
- gap: 24px;
17
- }
18
-
19
- .message-section {
20
- background: white;
21
- border-radius: 8px;
22
- }
23
-
24
- .section-header {
25
- display: flex;
26
- justify-content: space-between;
27
- align-items: center;
28
- }
29
-
30
- .message-list {
31
- max-height: 500px;
32
- overflow-y: auto;
33
- }
34
-
35
- .message-item {
36
- padding: 12px;
37
- border-bottom: 1px solid #ebeef5;
38
- transition: background-color 0.3s;
39
- }
40
-
41
- .message-item:hover {
42
- background-color: #f5f7fa;
43
- }
44
-
45
- .message-header {
46
- display: flex;
47
- justify-content: space-between;
48
- align-items: center;
49
- margin-bottom: 8px;
50
- }
51
-
52
- .message-time {
53
- font-size: 12px;
54
- color: #909399;
55
- }
56
-
57
- .message-title {
58
- margin: 8px 0;
59
- font-size: 14px;
60
- color: #303133;
61
- }
62
-
63
- .message-content {
64
- margin: 8px 0 0;
65
- color: #606266;
66
- line-height: 1.5;
67
- }
68
-
69
- .empty-message {
70
- padding: 30px 0;
71
- }
72
-
73
- /* 滚动条样式 */
74
- .message-list::-webkit-scrollbar {
75
- width: 6px;
76
- }
77
-
78
- .message-list::-webkit-scrollbar-thumb {
79
- background: #c0c4cc;
80
- border-radius: 3px;
81
- }
82
-
83
- .message-list::-webkit-scrollbar-track {
84
- background: #f5f7fa;
85
- }
@@ -1,119 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
- import { Button, Card, Empty, Tag } from 'antd';
3
- import './ParentToChild.css';
4
-
5
- interface Message {
6
- type: 'info' | 'success' | 'warning' | 'error';
7
- title: string;
8
- message: string;
9
- time: string;
10
- }
11
-
12
- const ParentToChild: React.FC = () => {
13
- const [globalMessages, setGlobalMessages] = useState<Message[]>([]);
14
- const [directMessages, setDirectMessages] = useState<Message[]>([]);
15
-
16
- const formatTime = () => {
17
- const now = new Date();
18
- return `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`;
19
- };
20
-
21
- const clearGlobalMessages = () => {
22
- setGlobalMessages([]);
23
- };
24
-
25
- const clearDirectMessages = () => {
26
- setDirectMessages([]);
27
- };
28
-
29
- useEffect(() => {
30
- // 监听全局广播消息
31
- window.$wujie?.bus.$on('global-message', (data: Omit<Message, 'time'>) => {
32
- setGlobalMessages(prev => [{
33
- ...data,
34
- time: formatTime()
35
- }, ...prev]);
36
- });
37
-
38
- // 监听定向消息
39
- window.$wujie?.bus.$on('react-child-message', (data: Omit<Message, 'time'>) => {
40
- setDirectMessages(prev => [{
41
- ...data,
42
- time: formatTime()
43
- }, ...prev]);
44
- });
45
-
46
- return () => {
47
- // 移除全局广播消息监听
48
- window.$wujie?.bus.$off('global-message');
49
- // 移除定向消息监听
50
- window.$wujie?.bus.$off('react-child-message');
51
- };
52
-
53
- }, []);
54
-
55
- const renderMessageList = (messages: Message[]) => {
56
- if (messages.length === 0) {
57
- return <Empty description="暂无消息" className="empty-message" />;
58
- }
59
- return messages.map((msg, index) => (
60
- <div key={index} className="message-item">
61
- <div className="message-header">
62
- <span className="message-time">{msg.time}</span>
63
- <Tag color={
64
- msg.type === 'info' ? 'blue' :
65
- msg.type === 'success' ? 'green' :
66
- msg.type === 'warning' ? 'orange' :
67
- 'red'
68
- }>
69
- {msg.type}
70
- </Tag>
71
- </div>
72
- <h4 className="message-title">{msg.title}</h4>
73
- <p className="message-content">{msg.message}</p>
74
- </div>
75
- ));
76
- };
77
-
78
- return (
79
- <div className="parent-to-child">
80
- <h2 className="page-title">消息接收中心</h2>
81
-
82
- <div className="message-container">
83
- <Card
84
- title={
85
- <div className="section-header">
86
- <span>全局广播消息</span>
87
- <Button type="primary" size="small" onClick={clearGlobalMessages}>
88
- 清空消息
89
- </Button>
90
- </div>
91
- }
92
- className="message-section"
93
- >
94
- <div className="message-list">
95
- {renderMessageList(globalMessages)}
96
- </div>
97
- </Card>
98
-
99
- <Card
100
- title={
101
- <div className="section-header">
102
- <span>定向消息</span>
103
- <Button type="primary" size="small" onClick={clearDirectMessages}>
104
- 清空消息
105
- </Button>
106
- </div>
107
- }
108
- className="message-section"
109
- >
110
- <div className="message-list">
111
- {renderMessageList(directMessages)}
112
- </div>
113
- </Card>
114
- </div>
115
- </div>
116
- );
117
- };
118
-
119
- export default ParentToChild;
@@ -1,61 +0,0 @@
1
- .flex-container {
2
- display: flex;
3
- justify-content: space-around;
4
- align-items: flex-start;
5
- padding: 20px;
6
- gap: 20px;
7
- }
8
-
9
- .container {
10
- display: flex;
11
- flex-direction: column;
12
- align-items: center;
13
- gap: 20px;
14
- padding: 20px;
15
- background-color: #f8f8f8;
16
- border-radius: 10px;
17
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
18
- width: 45%;
19
- margin: 0;
20
- transition: box-shadow 0.3s ease-in-out;
21
- }
22
-
23
- h1 {
24
- color: #333;
25
- margin-bottom: 20px;
26
- font-family: "Helvetica Neue", Arial, sans-serif;
27
- }
28
-
29
- .input-field {
30
- width: 100% !important;
31
- margin-bottom: 10px;
32
- }
33
-
34
- .action-button {
35
- width: 100%;
36
- height: 40px;
37
- }
38
-
39
- .route-params {
40
- padding: 20px;
41
- background-color: #eef2f7;
42
- border-radius: 8px;
43
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
44
- width: 45%;
45
- margin: 0;
46
- }
47
-
48
- .route-params h1 {
49
- color: #007bff;
50
- font-size: 24px;
51
- }
52
-
53
- .route-params p {
54
- font-size: 16px;
55
- color: #333;
56
- margin-bottom: 10px;
57
- background-color: #fff;
58
- padding: 10px;
59
- border-radius: 5px;
60
- border: 1px solid #ccc;
61
- }
@@ -1,87 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { Input, Select, Button } from 'antd';
3
- import { useLocation } from 'react-router-dom';
4
- import './index.css';
5
-
6
- const { Option } = Select;
7
-
8
- const RouterJump: React.FC = () => {
9
- const [url, setUrl] = useState('/router-jump');
10
- const [name, setName] = useState('name');
11
- const [age, setAge] = useState('age');
12
- const [selectedApp, setSelectedApp] = useState('main');
13
- const [isShow, setIsShow] = useState(true);
14
- const location = useLocation();
15
-
16
- useEffect(() => {
17
- if (!(window as any).$wujie) {
18
- setIsShow(false);
19
- }
20
- }, []);
21
-
22
- const jumpToMain = () => {
23
- (window as any).$wujie?.bus.$emit('router-jump-to-main', {
24
- app: selectedApp,
25
- path: url,
26
- query: {
27
- name,
28
- age,
29
- },
30
- });
31
- };
32
-
33
- const searchParams = new URLSearchParams(location.search);
34
- const queryParams = Object.fromEntries(searchParams.entries());
35
-
36
- return (
37
- <div className="flex-container">
38
- <div className="container">
39
- <h1>React子应用路由跳转</h1>
40
- <Input
41
- value={url}
42
- onChange={(e) => setUrl(e.target.value)}
43
- placeholder="请输入地址"
44
- className="input-field"
45
- />
46
- <Input
47
- value={name}
48
- onChange={(e) => setName(e.target.value)}
49
- placeholder="请输入姓名"
50
- className="input-field"
51
- />
52
- <Input
53
- value={age}
54
- onChange={(e) => setAge(e.target.value)}
55
- type="number"
56
- placeholder="请输入年龄"
57
- className="input-field"
58
- />
59
- <Select
60
- value={selectedApp}
61
- onChange={(value) => setSelectedApp(value)}
62
- placeholder="请选择应用"
63
- className="input-field"
64
- >
65
- <Option value="main">main</Option>
66
- <Option value="vue3-child-copy">vue3-child-copy</Option>
67
- </Select>
68
- {isShow && (
69
- <Button type="primary" onClick={jumpToMain} className="action-button">
70
- 跳转到主应用
71
- </Button>
72
- )}
73
- </div>
74
- <div className="route-params">
75
- <h1>接收到的路由参数:</h1>
76
- <p>路径: {location.pathname}</p>
77
- {Object.entries(queryParams).map(([key, value]) => (
78
- <p key={key}>
79
- {key}:{value}
80
- </p>
81
- ))}
82
- </div>
83
- </div>
84
- );
85
- };
86
-
87
- export default RouterJump;
@@ -1,63 +0,0 @@
1
- import { lazy } from 'react';
2
-
3
- const Home = lazy(() => import('../pages/Home'));
4
- const RouterJump = lazy(() => import('../pages/RouterJump'));
5
- const ChildToParent = lazy(() => import('../pages/ChildToParent'));
6
- const ParentToChild = lazy(() => import('../pages/ParentToChild'));
7
- const Css = lazy(() => import('../pages/Css'));
8
-
9
- export interface RouteConfig {
10
- path: string;
11
- element: React.ReactNode;
12
- label: string;
13
- key: string;
14
- showInMenu?: boolean;
15
- children?: RouteConfig[];
16
- }
17
-
18
- export const routes: RouteConfig[] = [
19
- {
20
- path: '/',
21
- element: <Home />,
22
- label: '首页',
23
- key: 'home',
24
- showInMenu: true
25
- },
26
- {
27
- path: '/router-jump',
28
- element: <RouterJump />,
29
- label: '跳转',
30
- key: 'router-jump',
31
- showInMenu: true
32
- },
33
- {
34
- path: '/child-to-parent',
35
- element: <ChildToParent />,
36
- label: '子应用到父应用',
37
- key: 'child-to-parent',
38
- showInMenu: true
39
- },
40
- {
41
- path: '/parent-to-child',
42
- element: <ParentToChild />,
43
- label: '消息接收中心',
44
- key: 'parent-to-child',
45
- showInMenu: true
46
- },
47
- {
48
- path: 'css',
49
- element: <Css/>,
50
- label: 'CSS',
51
- key: 'css',
52
- showInMenu: true,
53
- }
54
- ];
55
-
56
- export const getMenuItems = () => {
57
- return routes
58
- .filter(route => route.showInMenu)
59
- .map(({ label, key }) => ({
60
- label,
61
- key
62
- }));
63
- };
@@ -1,26 +0,0 @@
1
- // 定义无界跨应用路由跳转数据接口
2
- export interface WujieRouteJumpDataT {
3
- app: string; // 目标应用名称
4
- path: string; // 目标路由路径
5
- query: Record<string, string>; // 查询参数
6
- type: string; // 跳转类型
7
- }
8
-
9
- // 定义无界通信总线接口
10
- export interface WujieBus {
11
- $on: (event: string, callback: (data: any) => void) => void; // 事件监听方法
12
- $emit: (event: string, data: any,type?: any) => void; // 事件触发方法
13
- $off: (event: string, callback?: (data: any) => void) => void; // 事件移除方法
14
- }
15
-
16
- // 定义无界实例接口
17
- export interface WujieInstance {
18
- bus: WujieBus; // 无界通信总线
19
- }
20
-
21
- // 扩展全局Window接口,添加无界实例
22
- declare global {
23
- interface Window {
24
- $wujie?: WujieInstance;
25
- }
26
- }
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
- "target": "ES2020",
5
- "useDefineForClassFields": true,
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "module": "ESNext",
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "isolatedModules": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
- "jsx": "react-jsx",
17
-
18
- /* Linting */
19
- "strict": true,
20
- "noUnusedLocals": true,
21
- "noUnusedParameters": true,
22
- "noFallthroughCasesInSwitch": true,
23
- "noUncheckedSideEffectImports": true
24
- },
25
- "include": ["src"]
26
- }
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
7
- }
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "ES2022",
5
- "lib": ["ES2023"],
6
- "module": "ESNext",
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "isolatedModules": true,
13
- "moduleDetection": "force",
14
- "noEmit": true,
15
-
16
- /* Linting */
17
- "strict": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "noFallthroughCasesInSwitch": true,
21
- "noUncheckedSideEffectImports": true
22
- },
23
- "include": ["vite.config.ts"]
24
- }