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,193 +0,0 @@
1
- <template>
2
- <div class="tags-container">
3
- <draggable
4
- :list="tagsViewList.list"
5
- ghost-class="ghost"
6
- chosen-class="chosenClass"
7
- animation="300"
8
- @start="onStart"
9
- @end="onEnd"
10
- >
11
- <template #item="{ element }">
12
- <div
13
- :key="element.path"
14
- class="tag"
15
- @contextmenu.prevent="openContextMenu($event, element)"
16
- @drag="dragging($event,element)"
17
- >
18
- {{ element.meta.title }}
19
- <span class="close-btn" @click="closeTag(element)">✖</span>
20
- </div>
21
- </template>
22
- </draggable>
23
- <div
24
- v-if="contextMenuVisible"
25
- class="context-menu"
26
- :style="{ top: contextMenuPosition.y + 'px', left: contextMenuPosition.x + 'px' }"
27
- >
28
- <ul>
29
- <li @click="closeTag(contextMenuItem)">关闭标签</li>
30
- <li @click="closeOtherTag(contextMenuItem)">关闭其他标签</li>
31
- <li @click="closeAllTag()">关闭所有标签</li>
32
- </ul>
33
- </div>
34
- <div class="dragging-info" v-if="isDragging" :style="{top: clientY + 'px', left: clientX + 'px'}" >
35
- <p>screenX: {{ clientX }}</p>
36
- <p>screenY: {{ clientY }}</p>
37
- </div>
38
- </div>
39
- </template>
40
-
41
- <script setup>
42
- import { useTagsViewStore } from "../store/tagsViewStroe";
43
- import { useRouter } from "vue-router";
44
- import { ref, watch, reactive ,onMounted} from "vue";
45
- import draggable from "vuedraggable";
46
- import { throttle } from 'lodash';
47
- const tagsViewStore = useTagsViewStore();
48
- const router = useRouter();
49
-
50
- const isDragging = ref(false);
51
-
52
- const tagsViewList = reactive({
53
- list: tagsViewStore.tagsViewList,
54
- });
55
-
56
- watch(tagsViewList, (newVal) => {
57
- console.log(newVal);
58
- });
59
-
60
- // 监听路由变化
61
- router.afterEach((to, from) => {
62
- tagsViewStore.addTagsView(to);
63
- });
64
-
65
- const closeTag = (tag) => {
66
- tagsViewStore.removeTagsView(tag);
67
- };
68
-
69
- const closeOtherTag = (tag) => {
70
- tagsViewStore.removeOtherTagsView(tag);
71
- };
72
-
73
- const closeAllTag = () => {
74
- tagsViewStore.clearTagsView();
75
- };
76
-
77
- const contextMenuVisible = ref(false);
78
- const contextMenuPosition = ref({ x: 0, y: 0 });
79
- const contextMenuItem = ref(null);
80
-
81
- const openContextMenu = (event, item) => {
82
- contextMenuPosition.value = { x: event.clientX, y: event.clientY };
83
- contextMenuItem.value = item;
84
- contextMenuVisible.value = true;
85
- };
86
-
87
- // 添加点击页面其他位置隐藏菜单的逻辑
88
- window.addEventListener("click", () => {
89
- contextMenuVisible.value = false;
90
- });
91
-
92
- const onStart = () => {
93
- console.log("onStart");
94
- };
95
-
96
- onMounted(() => {
97
- // window.addEventListener("mousemove", dragging);
98
- })
99
-
100
- const clientX = ref(0);
101
- const clientY = ref(0);
102
-
103
- const dragging = throttle((e) => {
104
-
105
- // 鼠标往下移动100px再显示
106
- if(e.clientY > 120){
107
- isDragging.value = true;
108
- console.log("dragging", e);
109
- clientX.value = e.clientX;
110
- clientY.value = e.clientY;
111
- }
112
-
113
-
114
- }, 1); // 更新频率设置为每100毫秒触发一次
115
-
116
- const onEnd = () => {
117
- console.log("onEnd");
118
- isDragging.value = false;
119
- };
120
-
121
- </script>
122
-
123
- <style scoped lang="scss">
124
- .dragging-info{
125
- position: absolute;
126
- z-index: 1000;
127
- background-color: #fff;
128
- padding: 10px;
129
- border: 1px solid #000;
130
- }
131
- .tags-container {
132
- display: flex;
133
- flex-wrap: wrap;
134
- padding: 10px;
135
- background-color: #f5f5f5;
136
- }
137
-
138
- .tag {
139
- margin: 5px;
140
- padding: 5px 10px;
141
- background-color: #e0e0e0;
142
- border-radius: 5px;
143
- cursor: pointer;
144
- transition: background-color 0.3s;
145
- user-select: none;
146
- display: inline-block;
147
- }
148
-
149
- .tag:hover {
150
- background-color: #d0d0d0;
151
- .close-btn {
152
- display: inline-block;
153
- }
154
- }
155
-
156
- .close-btn {
157
- margin-left: 5px;
158
- cursor: pointer;
159
- display: none;
160
- }
161
-
162
- .context-menu {
163
- position: absolute;
164
- top: 0;
165
- left: 0;
166
- background-color: #fff;
167
- z-index: 1000;
168
- }
169
-
170
- .context-menu ul {
171
- list-style: none;
172
- padding: 10px;
173
- margin: 0;
174
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
175
- }
176
-
177
- .context-menu li {
178
- padding: 8px 12px;
179
- cursor: pointer;
180
- &:hover {
181
- background-color: #f0f0f0;
182
- }
183
- }
184
-
185
- .ghost {
186
- opacity: 0;
187
- }
188
-
189
- .chosenClass {
190
- background-color: #3FB37F !important;
191
- border: 1px solid #3FB37F !important;
192
- }
193
- </style>
@@ -1,131 +0,0 @@
1
- <template>
2
- <div class="tags-container">
3
- <span v-for="item in tagsViewStore.getTagsViewList()" :key="item.path" draggable="true"
4
- @dragstart="onDragStart($event,item)"
5
- @dragend="onDragEnd($event,item)"
6
-
7
- @drag="onDrop($event,item)"
8
- class="tag" @contextmenu.prevent="openContextMenu($event, item)">
9
- {{ item.meta.title }}
10
- <span class="close-btn" @click="closeTag(item)">✖</span>
11
- </span>
12
- <div v-if="contextMenuVisible" class="context-menu" :style="{top: contextMenuPosition.y + 'px', left: contextMenuPosition.x + 'px'}">
13
- <ul>
14
- <li @click="closeTag(contextMenuItem)">关闭标签</li>
15
- <li @click="closeOtherTag(contextMenuItem)">关闭其他标签</li>
16
- <li @click="closeAllTag()">关闭所有标签</li>
17
- </ul>
18
- </div>
19
- </div>
20
-
21
- </template>
22
-
23
- <script setup>
24
- import { useTagsViewStore } from '../store/tagsViewStroe'
25
- import { useRouter } from 'vue-router'
26
- import { ref } from 'vue'
27
-
28
- const tagsViewStore = useTagsViewStore()
29
- const router = useRouter()
30
-
31
- // 监听路由变化
32
- router.afterEach((to, from) => {
33
- tagsViewStore.addTagsView(to)
34
- })
35
-
36
- const closeTag = (tag) => {
37
- tagsViewStore.removeTagsView(tag)
38
- }
39
-
40
- const closeOtherTag = (tag) => {
41
- tagsViewStore.removeOtherTagsView(tag)
42
- }
43
-
44
- const closeAllTag = () => {
45
- tagsViewStore.clearTagsView()
46
- }
47
-
48
- const contextMenuVisible = ref(false)
49
- const contextMenuPosition = ref({ x: 0, y: 0 })
50
- const contextMenuItem = ref(null)
51
-
52
- const openContextMenu = (event, item) => {
53
- contextMenuPosition.value = { x: event.clientX, y: event.clientY }
54
- contextMenuItem.value = item
55
- contextMenuVisible.value = true
56
- }
57
-
58
- // 添加点击页面其他位置隐藏菜单的逻辑
59
- window.addEventListener('click', () => {
60
- contextMenuVisible.value = false
61
- })
62
-
63
- const onDragStart = (event,item) => {
64
- console.log('onDragStart', event,item)
65
- }
66
-
67
- const onDragEnd = (event,item) => {
68
- console.log('onDragEnd', event,item)
69
- }
70
-
71
- const onDrop = (event,item) => {
72
- console.log('onDrop', event,item)
73
- }
74
-
75
- </script>
76
-
77
- <style scoped lang="scss">
78
- .tags-container {
79
- display: flex;
80
- flex-wrap: wrap;
81
- padding: 10px;
82
- background-color: #f5f5f5;
83
- }
84
-
85
- .tag {
86
- margin: 5px;
87
- padding: 5px 10px;
88
- background-color: #e0e0e0;
89
- border-radius: 5px;
90
- cursor: pointer;
91
- transition: background-color 0.3s;
92
- user-select: none;
93
- }
94
-
95
- .tag:hover {
96
- background-color: #d0d0d0;
97
- .close-btn {
98
- display: inline-block;
99
- }
100
- }
101
-
102
- .close-btn {
103
- margin-left: 5px;
104
- cursor: pointer;
105
- display: none;
106
- }
107
-
108
- .context-menu {
109
- position: absolute;
110
- top: 0;
111
- left: 0;
112
- background-color: #fff;
113
- z-index: 1000;
114
- }
115
-
116
- .context-menu ul {
117
- list-style: none;
118
- padding: 10px;
119
- margin: 0;
120
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
121
- }
122
-
123
- .context-menu li {
124
- padding: 8px 12px;
125
- cursor: pointer;
126
- &:hover {
127
- background-color: #f0f0f0;
128
- }
129
- }
130
-
131
- </style>
@@ -1,182 +0,0 @@
1
- /**
2
- * v-aiLoading 全局自定义指令
3
- *
4
- * 支持两种使用方式:
5
- * 1) 基础用法(布尔或变量):
6
- * v-aiLoading="loading"
7
- * - loading 为 true 时显示遮罩
8
- * - loading 为 false 时移除遮罩
9
- *
10
- * 2) 对象用法(可配置文案和自定义样式类):
11
- * v-aiLoading="{ loading: loading, text: 'AI生成中...', class: 'custom-class' }"
12
- * - loading:必填,布尔值,控制显示/隐藏
13
- * - text:选填,提示文案,默认 'AI生成中'
14
- * - class:选填,附加到遮罩元素上的 class 名,用于自定义样式
15
- */
16
-
17
- export const createAiLoadingOptions = (binding) => {
18
- const value = binding.value
19
- if (value && typeof value === 'object') {
20
- return {
21
- loading: !!value.loading,
22
- text: value.text || 'AI生成中',
23
- className: value.class || '',
24
- loaderType: value.loaderType || 'bars',
25
- gradient: value.gradient ?? true,
26
- borderColor: value.borderColor || '#409eff'
27
- }
28
- }
29
- return {
30
- loading: !!value,
31
- text: 'AI生成中',
32
- className: '',
33
- loaderType: 'bars',
34
- gradient: true,
35
- borderColor: '#409eff'
36
- }
37
- }
38
-
39
- /**
40
- * 根据配置在元素上挂载 / 更新 / 移除遮罩层
41
- * @param {HTMLElement} el 指令绑定的 DOM 元素
42
- * @param {import('vue').DirectiveBinding} binding 指令绑定对象
43
- */
44
- export const toggleAiLoading = (el, binding) => {
45
- const options = createAiLoadingOptions(binding)
46
- let mask = el.__aiLoadingMask__
47
-
48
- // loading 为 false 时移除遮罩
49
- if (!options.loading) {
50
- if (mask && mask.parentNode) {
51
- mask.parentNode.removeChild(mask)
52
- }
53
- el.__aiLoadingMask__ = null
54
- el.classList.remove('ai-loading-parent')
55
- return
56
- }
57
-
58
- if (!mask) {
59
- mask = document.createElement('div')
60
- mask.className = 'ai-loading-mask'
61
- if (options.className) {
62
- mask.classList.add(options.className)
63
- }
64
-
65
- const content = document.createElement('div')
66
- content.className = 'ai-loading-content'
67
-
68
- const spinner = document.createElement('div')
69
- spinner.className = options.loaderType === 'ring' ? 'ai-loading-spinner' : 'ai-loading-bars'
70
-
71
- const textNode = document.createElement('div')
72
- textNode.className = 'ai-loading-text'
73
- textNode.textContent = options.text
74
-
75
- content.appendChild(spinner)
76
- content.appendChild(textNode)
77
- mask.appendChild(content)
78
-
79
- el.__aiLoadingMask__ = mask
80
- } else {
81
- const textNode = mask.querySelector('.ai-loading-text')
82
- if (textNode) {
83
- textNode.textContent = options.text
84
- }
85
- mask.className = 'ai-loading-mask'
86
- if (options.className) {
87
- mask.classList.add(options.className)
88
- }
89
- }
90
-
91
- const spinnerEl = el.__aiLoadingMask__ && el.__aiLoadingMask__.querySelector('.ai-loading-spinner, .ai-loading-bars')
92
- if (spinnerEl) {
93
- if (options.loaderType === 'ring') {
94
- spinnerEl.className = 'ai-loading-spinner'
95
- spinnerEl.style.borderTopColor = options.borderColor || '#409eff'
96
- } else {
97
- spinnerEl.className = 'ai-loading-bars'
98
- spinnerEl.style.borderTopColor = ''
99
- }
100
- }
101
-
102
- if (options.gradient === true) {
103
- mask.classList.add('ai-loading-mask-gradient')
104
- mask.style.background = ''
105
- } else if (typeof options.gradient === 'string') {
106
- mask.classList.remove('ai-loading-mask-gradient')
107
- mask.style.background = options.gradient
108
- } else {
109
- mask.classList.remove('ai-loading-mask-gradient')
110
- mask.style.background = 'rgba(255, 255, 255, 0.7)'
111
- }
112
-
113
- // 保证宿主元素为定位容器
114
- const computedStyle = window.getComputedStyle(el)
115
- if (computedStyle.position === 'static' || !computedStyle.position) {
116
- el.style.position = 'relative'
117
- }
118
-
119
- // 挂载遮罩
120
- if (!mask.parentNode) {
121
- el.appendChild(mask)
122
- }
123
- el.classList.add('ai-loading-parent')
124
- }
125
-
126
- const resolveAiLoadingTargetElement = (target) => {
127
- if (!target) return null
128
- if (typeof target === 'string') {
129
- return document.querySelector(target)
130
- }
131
- if (target instanceof HTMLElement) {
132
- return target
133
- }
134
- if (typeof target === 'object') {
135
- if (target.value instanceof HTMLElement) {
136
- return target.value
137
- }
138
- if (target.$el instanceof HTMLElement) {
139
- return target.$el
140
- }
141
- }
142
- return null
143
- }
144
-
145
- export const aiLoading = (target, options = {}) => {
146
- const el = resolveAiLoadingTargetElement(target)
147
- if (!el) {
148
- return {
149
- stop() {}
150
- }
151
- }
152
- const binding = { value: { ...options, loading: true } }
153
- toggleAiLoading(el, binding)
154
- return {
155
- stop() {
156
- const stopBinding = { value: { ...options, loading: false } }
157
- toggleAiLoading(el, stopBinding)
158
- }
159
- }
160
- }
161
-
162
- /**
163
- * v-aiLoading 指令实现
164
- * - 在组件全局注册后即可在任意模板中直接使用
165
- */
166
- export const aiLoadingDirective = {
167
- mounted(el, binding) {
168
- toggleAiLoading(el, binding)
169
- },
170
- updated(el, binding) {
171
- toggleAiLoading(el, binding)
172
- },
173
- unmounted(el) {
174
- const mask = el.__aiLoadingMask__
175
- if (mask && mask.parentNode) {
176
- mask.parentNode.removeChild(mask)
177
- }
178
- el.__aiLoadingMask__ = null
179
- el.classList.remove('ai-loading-parent')
180
- }
181
- }
182
-
@@ -1,11 +0,0 @@
1
- import { ref, onMounted, onBeforeUnmount } from 'vue'
2
-
3
- export function useClickOutside(elRef, handler) {
4
- const listener = (e) => {
5
- if (!elRef.value || elRef.value.contains(e.target)) return
6
- handler(e)
7
- }
8
-
9
- onMounted (() => document.addEventListener('click', listener))
10
- onBeforeUnmount(() => document.removeEventListener('click', listener))
11
- }
@@ -1,28 +0,0 @@
1
- // hooks/useTableDragSort.js
2
- import Sortable from 'sortablejs'
3
- import { nextTick, watch, onUnmounted } from 'vue'
4
-
5
- export function useTableDragSort(tableRef, list, options = {}) {
6
- let sortable = null
7
-
8
- const init = async () => {
9
- await nextTick()
10
- const tbody = tableRef.value?.$el.querySelector('.el-table__body-wrapper tbody')
11
- if (!tbody) return
12
- sortable?.destroy()
13
- sortable = Sortable.create(tbody, {
14
- animation: 150,
15
- handle: '.drag-cell', // 只有手柄能拖
16
- onEnd: evt => {
17
- const { oldIndex, newIndex } = evt
18
- if (oldIndex === undefined || newIndex === undefined) return
19
- const [removed] = list.value.splice(oldIndex, 1)
20
- list.value.splice(newIndex, 0, removed)
21
- },
22
- ...options
23
- })
24
- }
25
-
26
- watch(list, init, { deep: true, immediate: true })
27
- onUnmounted(() => sortable?.destroy())
28
- }
@@ -1,18 +0,0 @@
1
- import { createApp } from 'vue'
2
- import router from './router'
3
- import './style.css'
4
- import App from './App.vue'
5
- import ElementPlus from 'element-plus'
6
- import 'element-plus/dist/index.css'
7
- import { createPinia } from 'pinia'
8
- import { aiLoadingDirective } from './directives/aiLoading'
9
-
10
- const app = createApp(App)
11
- const pinia = createPinia()
12
-
13
- app.directive('aiLoading', aiLoadingDirective)
14
-
15
- app.use(ElementPlus)
16
- app.use(router)
17
- app.use(pinia)
18
- app.mount('#app')
@@ -1,104 +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 PhoneCode from '../views/phone-code.vue'
5
- import ChildToParent from '../views/child-to-parent.vue'
6
- import ParentToChild from '../views/parent-to-child.vue'
7
- import RouterJump from '../views/router-jump.vue'
8
- // 定义路由配置
9
- const router = createRouter({
10
- history: createWebHistory(),
11
- routes: [
12
- {
13
- path: '/',
14
- name: 'home',
15
- component: Home,
16
- meta: {
17
- title: '首页'
18
- }
19
- },
20
-
21
-
22
- // 通讯
23
- {
24
- path: '/contact',
25
- name: 'contact',
26
- meta: {
27
- title: '通讯'
28
- },
29
- children: [
30
- // 子通知父
31
- {
32
- path: '/contact/child-to-parent',
33
- name: 'child-to-parent',
34
- component: ChildToParent,
35
- meta: {
36
- title: '子通知父'
37
- }
38
- },
39
- // 父通知子
40
- {
41
- path: '/contact/parent-to-child',
42
- name: 'parent-to-child',
43
- component: ParentToChild,
44
- meta: {
45
- title: '父通知子'
46
- }
47
- }
48
- ]
49
- },
50
-
51
- // 手机验证码
52
- {
53
- path: '/phone-code',
54
- name: 'phone-code',
55
- component: PhoneCode,
56
- meta: {
57
- title: '手机验证码'
58
- }
59
- },
60
-
61
-
62
- // 路由跳转
63
- {
64
- path: '/router-jump',
65
- name: 'router-jump',
66
- component: RouterJump,
67
- meta: {
68
- title: '路由跳转'
69
- }
70
- },
71
- // jsx
72
- {
73
- path: '/jsx',
74
- name: 'jsx',
75
- component: () => import('../views/jsx/index.vue'),
76
- meta: {
77
- title: 'jsx'
78
- }
79
- },
80
-
81
-
82
- // 智能教练
83
- {
84
- path: '/ai-coach',
85
- name: 'ai-coach',
86
- component: () => import('../views/aiCoach/index.jsx'),
87
- meta: {
88
- title: '智能教练'
89
- }
90
- },
91
-
92
- // 测试
93
- {
94
- path: '/test',
95
- name: 'test',
96
- component: Test,
97
- meta: {
98
- title: '测试'
99
- }
100
- }
101
- ]
102
- })
103
-
104
- export default router
@@ -1,34 +0,0 @@
1
- import { defineStore } from 'pinia'
2
-
3
- export const useTagsViewStore = defineStore('tagsView', {
4
- state: () => ({
5
- tagsViewList: [],
6
- }),
7
- actions: {
8
- addTagsView(tag) {
9
-
10
- // 判断是否已经存在
11
- const isExist = this.tagsViewList.some(item => item.path === tag.path)
12
- if(isExist){
13
- return
14
- }
15
-
16
- this.tagsViewList.push(tag)
17
- },
18
- removeTagsView(tag) {
19
- this.tagsViewList = this.tagsViewList.filter(item => item.path !== tag.path)
20
- },
21
- removeOtherTagsView(tag) {
22
- this.tagsViewList = this.tagsViewList.filter(item => item.path === tag.path)
23
- },
24
- clearTagsView() {
25
- this.tagsViewList = []
26
- },
27
- getTagsViewList() {
28
- return this.tagsViewList
29
- },
30
- setTagsViewList(tagsList) {
31
- this.tagsViewList = tagsList
32
- }
33
- }
34
- })