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,375 +0,0 @@
1
- import { defineComponent, ref } from 'vue'
2
- import DialogueSegment from './dialogueSegment/index.jsx'
3
- import PracticeStatus from './practiceStatus/index.jsx'
4
- import ReportDetail from './reportDetail/index.jsx'
5
- import DepartmentPersonnel from './departmentPersonnel/index.jsx'
6
- import { aiLoading } from '../../directives/aiLoading'
7
- import SmartAnchorTabs from '../../components/SmartAnchorTabs/index.jsx'
8
-
9
- export default defineComponent({
10
- // 智能教练
11
- name: 'AiCoach',
12
-
13
- setup() {
14
- const activeTab = ref('dialogue-segment')
15
- const aiLoadingTab = ref('directive-usage')
16
-
17
- // SmartAnchorTabs 演示数据
18
- const anchorTabsPosition = ref('left')
19
- const anchorTabsMode = ref('anchor')
20
- const anchorTabsData = [
21
- {
22
- label: '基本信息',
23
- key: 'basic-info',
24
- content: '这里是基本信息的内容区域。可以放置表单、文字等。'
25
- },
26
- {
27
- label: '场景设置',
28
- key: 'scenario-settings',
29
- content: '这里是场景设置的内容区域。'
30
- },
31
- {
32
- label: 'AI参考资料',
33
- key: 'ai-reference',
34
- content: '这里是AI参考资料的内容区域。可以上传文档等。'
35
- },
36
- {
37
- label: '高级配置',
38
- key: 'advanced-config',
39
- content: '这里是高级配置的内容区域。'
40
- },
41
- {
42
- label: '其他设置',
43
- key: 'other-settings',
44
- content: '这里是其他设置的内容区域。'
45
- }
46
- ]
47
-
48
- // v-aiLoading 指令演示用状态:
49
- // simpleLoading:基础布尔用法 v-aiLoading="loading"
50
- // advancedLoading:对象用法 v-aiLoading="{ loading, text, class }"
51
- const simpleLoading = ref(false)
52
- const advancedLoading = ref(false)
53
-
54
- const toggleSimpleLoading = () => {
55
- simpleLoading.value = !simpleLoading.value
56
- }
57
-
58
- const toggleAdvancedLoading = () => {
59
- advancedLoading.value = !advancedLoading.value
60
- }
61
-
62
- const functionDemoTargetRef = ref(null)
63
- const functionDemoLoading = ref(false)
64
- let functionDemoStop = null
65
-
66
- const triggerFunctionDemo = () => {
67
- if (functionDemoLoading.value) {
68
- if (functionDemoStop) {
69
- functionDemoStop()
70
- }
71
- functionDemoLoading.value = false
72
- functionDemoStop = null
73
- return
74
- }
75
- if (!functionDemoTargetRef.value) return
76
- functionDemoLoading.value = true
77
- const { stop } = aiLoading(functionDemoTargetRef, {
78
- text: 'AI生成中...',
79
- loaderType: 'ring',
80
- gradient: true,
81
- borderColor: '#409eff'
82
- })
83
- functionDemoStop = stop
84
- setTimeout(() => {
85
- if (functionDemoStop) {
86
- functionDemoStop()
87
- functionDemoStop = null
88
- }
89
- functionDemoLoading.value = false
90
- }, 1500)
91
- }
92
-
93
- return () => {
94
- return <div style={{ padding: '30px' }}>
95
- <el-tabs v-model={activeTab.value} type="border-card">
96
- <el-tab-pane label="对话环节" name="dialogue-segment">
97
- <DialogueSegment />
98
- </el-tab-pane>
99
- <el-tab-pane label="练习情况" name="practice-status">
100
- <PracticeStatus />
101
- </el-tab-pane>
102
- <el-tab-pane label="报告详情" name="report-detail">
103
- <ReportDetail />
104
- </el-tab-pane>
105
- <el-tab-pane label="部门人员" name="department-personnel">
106
- <DepartmentPersonnel />
107
- </el-tab-pane>
108
- <el-tab-pane label="AI Loading 用例" name="ai-loading-examples">
109
- <div style={{ padding: '16px 0' }}>
110
- <el-tabs v-model={aiLoadingTab.value} type="card">
111
- <el-tab-pane label="指令用法" name="directive-usage">
112
- <div style={{ display: 'flex', gap: '24px' }}>
113
- <div style={{ flex: 1 }}>
114
- <h3 style={{ margin: 0, marginBottom: '8px' }}>基础用法:v-aiLoading="loading"</h3>
115
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
116
- 通过布尔变量控制是否显示 AI Loading 遮罩。
117
- </p>
118
- <el-button type="primary" onClick={toggleSimpleLoading}>
119
- {simpleLoading.value ? '结束加载' : '开始加载'}
120
- </el-button>
121
- <div
122
- v-ai-loading={simpleLoading.value}
123
- style={{
124
- marginTop: '16px',
125
- padding: '16px',
126
- border: '1px solid #ebeef5',
127
- borderRadius: '4px',
128
- minHeight: '80px'
129
- }}
130
- >
131
- 当 loading 为 true 时,这个区域上会显示 AI Loading 遮罩。
132
- </div>
133
- <pre
134
- style={{
135
- marginTop: '16px',
136
- fontSize: '12px',
137
- background: '#f9fafb',
138
- padding: '12px',
139
- borderRadius: '4px',
140
- whiteSpace: 'pre-wrap'
141
- }}
142
- >
143
- {`<div v-aiLoading="loading">
144
- 内容区域
145
- </div>`}
146
- </pre>
147
- </div>
148
- <div style={{ flex: 1 }}>
149
- <h3 style={{ margin: 0, marginBottom: '8px' }}>高级用法:对象参数</h3>
150
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
151
- 通过对象同时配置 loading、提示文案 text、loader 样式、边框颜色和渐变背景。
152
- </p>
153
- <el-button type="primary" onClick={toggleAdvancedLoading}>
154
- {advancedLoading.value ? '结束加载' : '开始加载'}
155
- </el-button>
156
- <div
157
- class={['ai-loading-demo-card', advancedLoading.value ? 'ai-loading-demo-card--active' : '']}
158
- v-ai-loading={{
159
- loading: advancedLoading.value,
160
- text: 'AI智能生成中...',
161
- loaderType: 'ring',
162
- gradient: true,
163
- borderColor: '#ff7e67'
164
- }}
165
- style={{
166
- marginTop: '16px',
167
- padding: '16px',
168
- border: '1px solid #ebeef5',
169
- borderRadius: '4px',
170
- minHeight: '80px'
171
- }}
172
- >
173
- 使用对象形式,可以自定义文案、圆环边框颜色和淡色渐变背景。
174
- </div>
175
- <pre
176
- style={{
177
- marginTop: '16px',
178
- fontSize: '12px',
179
- background: '#f9fafb',
180
- padding: '12px',
181
- borderRadius: '4px',
182
- whiteSpace: 'pre-wrap'
183
- }}
184
- >
185
- {`<!-- 条形 loading + 默认渐变背景 -->
186
- <div v-aiLoading="{ loading }"></div>
187
-
188
- <!-- 圆环 loading,带有有色边框并旋转 -->
189
- <div
190
- v-aiLoading="{ loading: loading, loaderType: 'ring', borderColor: '#ff7e67' }"
191
- ></div>
192
-
193
- <!-- 圆环 loading + 自定义文案 + 动态渐变背景 -->
194
- <div
195
- v-aiLoading="{
196
- loading: loading,
197
- text: 'AI智能生成中...',
198
- loaderType: 'ring',
199
- gradient: true,
200
- borderColor: '#ff7e67'
201
- }"
202
- ></div>`}
203
- </pre>
204
- </div>
205
- </div>
206
- </el-tab-pane>
207
- <el-tab-pane label="函数式用法" name="function-usage">
208
- <div style={{ display: 'flex', gap: '24px' }}>
209
- <div style={{ flex: 1 }}>
210
- <h3 style={{ margin: 0, marginBottom: '8px' }}>基础函数式调用</h3>
211
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
212
- 通过 aiLoading(target, options) 手动控制某个区域的 AI Loading 开启和关闭。
213
- </p>
214
- <el-button type="primary" onClick={triggerFunctionDemo}>
215
- {functionDemoLoading.value ? '结束加载' : '开始加载'}
216
- </el-button>
217
- <div
218
- ref={functionDemoTargetRef}
219
- style={{
220
- marginTop: '16px',
221
- padding: '16px',
222
- border: '1px dashed #dcdfe6',
223
- borderRadius: '4px',
224
- minHeight: '80px'
225
- }}
226
- >
227
- 这是函数式调用示例绑定的区域。
228
- </div>
229
- </div>
230
- <div style={{ flex: 1 }}>
231
- <h3 style={{ margin: 0, marginBottom: '8px' }}>函数式用法示例代码</h3>
232
- <pre
233
- style={{
234
- marginTop: '16px',
235
- fontSize: '12px',
236
- background: '#f9fafb',
237
- padding: '12px',
238
- borderRadius: '4px',
239
- whiteSpace: 'pre-wrap'
240
- }}
241
- >
242
- {`import { ref } from 'vue'
243
- import { aiLoading } from '@/directives/aiLoading'
244
-
245
- const targetRef = ref(null)
246
- let stopLoading = null
247
-
248
- const start = () => {
249
- if (stopLoading) {
250
- stopLoading()
251
- stopLoading = null
252
- return
253
- }
254
- const { stop } = aiLoading(targetRef, {
255
- text: 'AI生成中...',
256
- loaderType: 'ring',
257
- gradient: true,
258
- borderColor: '#409eff'
259
- })
260
- stopLoading = stop
261
- }`}</pre>
262
- </div>
263
- </div>
264
- </el-tab-pane>
265
- <el-tab-pane label="全局配置" name="global-config">
266
- <div style={{ display: 'flex', gap: '24px' }}>
267
- <div style={{ flex: 1 }}>
268
- <h3 style={{ margin: 0, marginBottom: '8px' }}>入口注册</h3>
269
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
270
- 在 main.js 中全局注册 v-aiLoading 指令和样式文件后,即可在任意页面使用。
271
- </p>
272
- <pre
273
- style={{
274
- marginTop: '16px',
275
- fontSize: '12px',
276
- background: '#f9fafb',
277
- padding: '12px',
278
- borderRadius: '4px',
279
- whiteSpace: 'pre-wrap'
280
- }}
281
- >
282
- {`import { createApp } from 'vue'
283
- import App from './App.vue'
284
- import './style.css'
285
- import { aiLoadingDirective } from './directives/aiLoading'
286
-
287
- const app = createApp(App)
288
-
289
- app.directive('aiLoading', aiLoadingDirective)
290
-
291
- app.mount('#app')`}</pre>
292
- </div>
293
- <div style={{ flex: 1 }}>
294
- <h3 style={{ margin: 0, marginBottom: '8px' }}>可配置选项总览</h3>
295
- <pre
296
- style={{
297
- marginTop: '16px',
298
- fontSize: '12px',
299
- background: '#f9fafb',
300
- padding: '12px',
301
- borderRadius: '4px',
302
- whiteSpace: 'pre-wrap'
303
- }}
304
- >
305
- {`// 指令和函数式 options 一致:
306
- // {
307
- // loading: boolean, // 指令必填,函数式内部自动填 true/false
308
- // text?: string, // 提示文案,默认 'AI生成中'
309
- // loaderType?: 'bars' | 'ring', // 条形 / 圆环
310
- // gradient?: boolean | string, // true: 默认渐变; false: 纯白;
311
- // // string: 自定义渐变背景
312
- // borderColor?: string, // 圆环边框颜色
313
- // class?: string // 自定义遮罩 class
314
- // }`}</pre>
315
- </div>
316
- </div>
317
- </el-tab-pane>
318
- </el-tabs>
319
- </div>
320
- </el-tab-pane>
321
- <el-tab-pane label="Smart Anchor Tabs 用例" name="smart-anchor-tabs">
322
- <div style={{ padding: '16px 0' }}>
323
- <div style={{ marginBottom: '20px', display: 'flex', gap: '20px', alignItems: 'center' }}>
324
- <div>
325
- <span style={{ marginRight: '8px' }}>布局位置:</span>
326
- <el-radio-group v-model={anchorTabsPosition.value}>
327
- <el-radio-button label="left">左侧</el-radio-button>
328
- <el-radio-button label="right">右侧</el-radio-button>
329
- <el-radio-button label="top">顶部</el-radio-button>
330
- </el-radio-group>
331
- </div>
332
- <div>
333
- <span style={{ marginRight: '8px' }}>模式:</span>
334
- <el-radio-group v-model={anchorTabsMode.value}>
335
- <el-radio-button label="anchor">滚动锚点</el-radio-button>
336
- <el-radio-button label="switch">组件切换</el-radio-button>
337
- </el-radio-group>
338
- </div>
339
- </div>
340
-
341
- <div style={{ height: '500px', border: '1px solid #dcdfe6', borderRadius: '4px' }}>
342
- <SmartAnchorTabs
343
- tabs={anchorTabsData}
344
- position={anchorTabsPosition.value}
345
- mode={anchorTabsMode.value}
346
- height="100%"
347
- >
348
- {{
349
- default: ({ tab }) => (
350
- <div style={{ minHeight: '300px' }}>
351
- <h3>{tab.label}</h3>
352
- <p>{tab.content}</p>
353
- {/* 模拟长内容 */}
354
- <div style={{ color: '#909399', fontSize: '14px', lineHeight: '1.6' }}>
355
- {Array.from({ length: 5 }).map((_, i) => (
356
- <p key={i}>
357
- 这是 {tab.label} 的模拟内容段落 {i + 1}。
358
- SmartAnchorTabs 组件支持平滑滚动定位,
359
- 并且在滚动时会自动更新左侧导航的高亮状态。
360
- 切换到 switch 模式则只显示当前内容。
361
- </p>
362
- ))}
363
- </div>
364
- </div>
365
- )
366
- }}
367
- </SmartAnchorTabs>
368
- </div>
369
- </div>
370
- </el-tab-pane>
371
- </el-tabs>
372
- </div>
373
- }
374
- },
375
- })
@@ -1,121 +0,0 @@
1
- import { defineComponent, ref } from 'vue'
2
- import styles from './index.module.scss'
3
- import DonutChart from '../DonutChart'
4
- import RankBarChart from '../RankBarChart'
5
- import EchartsDonut from '../echarts/EchartsDonut.jsx'
6
- import EchartsRankBar from '../echarts/EchartsRankBar.jsx'
7
-
8
- /**
9
- * 练习情况统计(3个面板)
10
- * - 左:进度统计(环形图 + 图例)
11
- * - 中:学员练习时长排名(条形排行)
12
- * - 右:学员最高一次均分排名(条形排行)
13
- */
14
- export default defineComponent({
15
- name: 'PracticeStatusChartsPanel',
16
- props: {
17
- useEcharts: {
18
- type: Boolean,
19
- default: false,
20
- },
21
- progress: {
22
- type: Array,
23
- default: () => [],
24
- },
25
- durationRank: {
26
- type: Array,
27
- default: () => [],
28
- },
29
- scoreRank: {
30
- type: Array,
31
- default: () => [],
32
- },
33
- },
34
- setup(props) {
35
- const hiddenLegend = ref([]) // 存储被隐藏的图例名称
36
-
37
- const toggleLegend = (name) => {
38
- if (!props.useEcharts) return // 只有 Echarts 模式下支持
39
- if (hiddenLegend.value.includes(name)) {
40
- hiddenLegend.value = hiddenLegend.value.filter((n) => n !== name)
41
- } else {
42
- hiddenLegend.value.push(name)
43
- }
44
- }
45
-
46
- return () => (
47
- <div>
48
- <div class={styles.grid3}>
49
- <div class={styles.panel}>
50
- <div class={styles.panelHeader}>
51
- <div class={styles.panelTitle}>进度统计</div>
52
- <div class={styles.legend}>
53
- {props.progress.map((it, idx) => {
54
- const isHidden = hiddenLegend.value.includes(it.name)
55
- return (
56
- <span
57
- class={[styles.legendItem, isHidden && props.useEcharts ? styles.legendHidden : '']}
58
- key={`${it.name}-${idx}`}
59
- onClick={() => toggleLegend(it.name)}
60
- style={{ cursor: props.useEcharts ? 'pointer' : 'default', opacity: isHidden && props.useEcharts ? 0.5 : 1 }}
61
- >
62
- <i class={styles.dot} style={{ background: it.color }} />
63
- <span>{it.name}</span>
64
- </span>
65
- )
66
- })}
67
- </div>
68
- </div>
69
- <div class={styles.pieWrap}>
70
- {props.useEcharts ? (
71
- <EchartsDonut series={props.progress} height={200} hiddenLegend={hiddenLegend.value} />
72
- ) : (
73
- <DonutChart series={props.progress} />
74
- )}
75
- </div>
76
- </div>
77
-
78
- <div class={styles.panel}>
79
- <div class={styles.panelHeader}>
80
- <div class={styles.panelTitle}>学员练习时长排名</div>
81
- </div>
82
- {props.useEcharts ? (
83
- <EchartsRankBar
84
- data={props.durationRank}
85
- valueFormatter={(v) => `${v.toFixed(1)}`}
86
- height={300}
87
- />
88
- ) : (
89
- <RankBarChart
90
- data={props.durationRank}
91
- valueFormatter={(v) => `${v.toFixed(1)}`}
92
- height={300}
93
- />
94
- )}
95
- </div>
96
-
97
- <div class={styles.panel}>
98
- <div class={styles.panelHeader}>
99
- <div class={styles.panelTitle}>学员最高一次均分排名</div>
100
- </div>
101
- {props.useEcharts ? (
102
- <EchartsRankBar
103
- data={props.scoreRank}
104
- valueFormatter={(v) => `${v}`}
105
- height={300}
106
- max={100}
107
- />
108
- ) : (
109
- <RankBarChart
110
- data={props.scoreRank}
111
- valueFormatter={(v) => `${v}`}
112
- height={300}
113
- />
114
- )}
115
- </div>
116
- </div>
117
- </div>
118
- )
119
- },
120
- })
121
-
@@ -1,76 +0,0 @@
1
- .grid3 {
2
- display: grid;
3
- grid-template-columns: 1.2fr 1fr 1fr;
4
- gap: 10px;
5
- }
6
-
7
- .chartCard {
8
- background: #fff;
9
- border-radius: 8px;
10
- padding: 16px;
11
- border: 1px solid #ebeef5;
12
- }
13
-
14
- /* Alias for component usage */
15
- .panel {
16
- composes: chartCard;
17
- }
18
-
19
- .chartHeader {
20
- display: flex;
21
- justify-content: space-between;
22
- align-items: center;
23
- margin-bottom: 12px;
24
- }
25
-
26
- /* Alias for component usage */
27
- .panelHeader {
28
- composes: chartHeader;
29
- }
30
-
31
- .chartTitle {
32
- font-size: 14px;
33
- font-weight: 600;
34
- color: #303133;
35
- }
36
-
37
- /* Alias for component usage */
38
- .panelTitle {
39
- composes: chartTitle;
40
- }
41
-
42
- .chartLegend {
43
- display: flex;
44
- gap: 16px;
45
- }
46
-
47
- /* Alias for component usage */
48
- .legend {
49
- composes: chartLegend;
50
- }
51
-
52
- .legendItem {
53
- display: flex;
54
- align-items: center;
55
- font-size: 12px;
56
- color: #606266;
57
- cursor: pointer;
58
- transition: opacity 0.3s;
59
- }
60
-
61
- .legendHidden {
62
- opacity: 0.5;
63
- }
64
-
65
- .dot {
66
- width: 8px;
67
- height: 8px;
68
- border-radius: 50%;
69
- margin-right: 6px;
70
- }
71
-
72
- .pieWrap {
73
- display: flex;
74
- justify-content: center;
75
- align-items: center;
76
- }
@@ -1,104 +0,0 @@
1
- import { defineComponent, computed } from 'vue'
2
-
3
- /**
4
- * 轻量环形图(不依赖图表库)
5
- * - 使用 SVG stroke-dasharray 实现
6
- * - 适合做“进度统计”等概览图
7
- */
8
- export default defineComponent({
9
- name: 'PracticeStatusDonutChart',
10
- props: {
11
- series: {
12
- type: Array,
13
- default: () => [],
14
- },
15
- size: {
16
- type: Number,
17
- default: 170,
18
- },
19
- thickness: {
20
- type: Number,
21
- default: 18,
22
- },
23
- },
24
- setup(props) {
25
- const normalized = computed(() => {
26
- const safe = (props.series || []).map((s) => ({
27
- name: s?.name ?? '',
28
- value: Number(s?.value ?? 0),
29
- color: s?.color ?? '#ff7a00',
30
- }))
31
- const total = safe.reduce((sum, cur) => sum + (Number.isFinite(cur.value) ? cur.value : 0), 0)
32
- if (total <= 0) {
33
- return {
34
- total: 0,
35
- list: safe.map((s) => ({ ...s, percent: 0 })),
36
- }
37
- }
38
- return {
39
- total,
40
- list: safe.map((s) => ({ ...s, percent: s.value / total })),
41
- }
42
- })
43
-
44
- const geometry = computed(() => {
45
- const size = props.size
46
- const thickness = props.thickness
47
- const r = (size - thickness) / 2
48
- const c = 2 * Math.PI * r
49
- return { size, thickness, r, c }
50
- })
51
-
52
- const segments = computed(() => {
53
- const { c } = geometry.value
54
- let offset = 0
55
- const list = normalized.value.list.map((s) => {
56
- const len = c * s.percent
57
- const seg = {
58
- ...s,
59
- len,
60
- offset,
61
- dasharray: `${len} ${Math.max(0, c - len)}`,
62
- dashoffset: -offset,
63
- }
64
- offset += len
65
- return seg
66
- })
67
- return list
68
- })
69
-
70
- return () => {
71
- const { size, thickness, r } = geometry.value
72
- const cx = size / 2
73
- const cy = size / 2
74
- return (
75
- <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>
76
- <circle
77
- cx={cx}
78
- cy={cy}
79
- r={r}
80
- fill="none"
81
- stroke="#f2f6fc"
82
- stroke-width={thickness}
83
- />
84
- {segments.value.map((s, idx) => (
85
- <circle
86
- key={`${s.name}-${idx}`}
87
- cx={cx}
88
- cy={cy}
89
- r={r}
90
- fill="none"
91
- stroke={s.color}
92
- stroke-width={thickness}
93
- stroke-linecap="round"
94
- stroke-dasharray={s.dasharray}
95
- stroke-dashoffset={s.dashoffset}
96
- transform={`rotate(-90 ${cx} ${cy})`}
97
- />
98
- ))}
99
- </svg>
100
- )
101
- }
102
- },
103
- })
104
-