npmapps 1.0.24 → 1.0.26

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 (210) hide show
  1. package/app/.codegraph/daemon.pid +6 -0
  2. package/app/.eslintrc.js +19 -0
  3. package/app/README.md +24 -0
  4. package/app/babel.config.js +5 -0
  5. package/app/devtool-windows-amd64.zip +0 -0
  6. package/app/docs/superpowers/plans/2026-05-29-quill-editor.md +836 -0
  7. package/app/docs/superpowers/specs/2026-05-29-quill-editor-design.md +210 -0
  8. package/app/docs/superpowers/specs/2026-06-06-lazy-cascader-design.md +400 -0
  9. package/app/jsconfig.json +19 -0
  10. package/app/package-lock.json +21347 -0
  11. package/app/package.json +63 -0
  12. package/app/postcss.config.js +10 -0
  13. package/app/public/favicon.ico +0 -0
  14. package/app/public/index.html +17 -0
  15. package/app/public//344/270/200/351/224/256/351/273/221/346/232/227.html +136 -0
  16. package/app/src/App.vue +110 -0
  17. package/app/src/assets/bpmn-camunda.jpg +0 -0
  18. package/app/src/assets/css/diagram.less +17 -0
  19. package/app/src/assets/icon/Icon.less +31 -0
  20. package/app/src/assets/icon/font/app-codes.css +26 -0
  21. package/app/src/assets/icon/font/app.eot +0 -0
  22. package/app/src/assets/icon/font/app.svg +60 -0
  23. package/app/src/assets/icon/font/app.ttf +0 -0
  24. package/app/src/assets/icon/font/app.woff +0 -0
  25. package/app/src/assets/icon/font/app.woff2 +0 -0
  26. package/app/src/assets/icon/font/config.json +248 -0
  27. package/app/src/assets/icon/font/source/raw/align-bottom-tool.svg +30 -0
  28. package/app/src/assets/icon/font/source/raw/align-horizontal-center-tool.svg +85 -0
  29. package/app/src/assets/icon/font/source/raw/align-left-tool.svg +84 -0
  30. package/app/src/assets/icon/font/source/raw/align-right-tool.svg +80 -0
  31. package/app/src/assets/icon/font/source/raw/align-top-tool.svg +84 -0
  32. package/app/src/assets/icon/font/source/raw/align-vertical-center-tool.svg +89 -0
  33. package/app/src/assets/icon/font/source/raw/distribute-horizontally-tool.svg +95 -0
  34. package/app/src/assets/icon/font/source/raw/distribute-vertically-tool.svg +99 -0
  35. package/app/src/assets/icon/font/source/raw/set-color-tool.svg +111 -0
  36. package/app/src/assets/icon/font/source/symbols/align-bottom-tool.svg +30 -0
  37. package/app/src/assets/icon/font/source/symbols/align-horizontal-center-tool.svg +30 -0
  38. package/app/src/assets/icon/font/source/symbols/align-left-tool.svg +30 -0
  39. package/app/src/assets/icon/font/source/symbols/align-right-tool.svg +30 -0
  40. package/app/src/assets/icon/font/source/symbols/align-top-tool.svg +30 -0
  41. package/app/src/assets/icon/font/source/symbols/align-vertical-center-tool.svg +30 -0
  42. package/app/src/assets/icon/font/source/symbols/distribute-horizontally-tool.svg +30 -0
  43. package/app/src/assets/icon/font/source/symbols/distribute-vertically-tool.svg +30 -0
  44. package/app/src/assets/icon/font/source/symbols/set-color-tool.svg +63 -0
  45. package/app/src/assets/logo.png +0 -0
  46. package/app/src/components/EllTable/README.md +70 -0
  47. package/app/src/components/EllTable/article.md +184 -0
  48. package/app/src/components/EllTable/index.js +213 -0
  49. package/app/src/components/FormulaEditor/FunctionSelector.vue +123 -0
  50. package/app/src/components/FormulaEditor/OperatorSelector.vue +184 -0
  51. package/app/src/components/FormulaEditor/ParameterSelector.vue +123 -0
  52. package/app/src/components/FormulaEditor/api.js +69 -0
  53. package/app/src/components/FormulaEditor/index.vue +435 -0
  54. package/app/src/components/HelloWorld.vue +58 -0
  55. package/app/src/components/PageHeader/index.vue +158 -0
  56. package/app/src/components/Splitter/README.md +144 -0
  57. package/app/src/components/Splitter/example.vue +88 -0
  58. package/app/src/components/Splitter/index.vue +203 -0
  59. package/app/src/components/diagram/ToolBar.vue +357 -0
  60. package/app/src/components/diagram/customTranslate/customTranslate.js +12 -0
  61. package/app/src/components/diagram/customTranslate/translationsGerman.js +241 -0
  62. package/app/src/components/diagram/index.vue +261 -0
  63. package/app/src/components/diagram/xmlData.js +29 -0
  64. package/app/src/directives/filldown.js +155 -0
  65. package/app/src/directives/filldownTable.js +291 -0
  66. package/app/src/main.js +40 -0
  67. package/app/src/router/index.js +63 -0
  68. package/app/src/store/index.js +23 -0
  69. package/app/src/utils/winBox.js +23 -0
  70. package/app/src/views/Extend/A.vue +12 -0
  71. package/app/src/views/Extend/B.vue +10 -0
  72. package/app/src/views/Extend/MagicalComponentsForELFormItem.vue +87 -0
  73. package/app/src/views/Extend/index.vue +59 -0
  74. package/app/src/views/Extend/tableMouseHorizontalWheel.vue +193 -0
  75. package/app/src/views/Home.vue +37 -0
  76. package/app/src/views/RouterJump.vue +155 -0
  77. package/app/src/views/css.vue +57 -0
  78. package/app/src/views/cssComponents/EllipsisText.vue +83 -0
  79. package/app/src/views/cssComponents/HoverCard.vue +79 -0
  80. package/app/src/views/cssComponents/TableHover.vue +140 -0
  81. package/app/src/views/cssComponents/inputSlo.vue +52 -0
  82. package/app/src/views/cssComponents/tableFixed.vue +158 -0
  83. package/app/src/views/echarts/echart-dome.vue +82 -0
  84. package/app/src/views/echarts/index.vue +118 -0
  85. package/app/src/views/echarts/pei3d.vue +667 -0
  86. package/app/src/views/element/bpmn/index.vue +18 -0
  87. package/app/src/views/element/components/attendanceCycle/index.vue +131 -0
  88. package/app/src/views/element/components/attendanceGroup/index.vue +147 -0
  89. package/app/src/views/element/components/attendancePersonnel/index.vue +158 -0
  90. package/app/src/views/element/components/companyCalendar/index.vue +147 -0
  91. package/app/src/views/element/components/shift/index.vue +147 -0
  92. package/app/src/views/element/components/shiftRotationSystem/index.vue +147 -0
  93. package/app/src/views/element/elTableJsx/columnManagement.vue +340 -0
  94. package/app/src/views/element/elTableJsx/dialogInput.vue +71 -0
  95. package/app/src/views/element/elTableJsx/elTableJsx.vue +1826 -0
  96. package/app/src/views/element/elTableJsx/formTable.vue +598 -0
  97. package/app/src/views/element/elTableJsx/index.vue +29 -0
  98. package/app/src/views/element/elTableJsx/simpleTable.vue +192 -0
  99. package/app/src/views/element/elTableJsx.zip +0 -0
  100. package/app/src/views/element/index.vue +44 -0
  101. package/app/src/views/element/lazyCascader/LazyCascader.vue +302 -0
  102. package/app/src/views/element/lazyCascader/data.js +205 -0
  103. package/app/src/views/element/lazyCascader/index.vue +315 -0
  104. package/app/src/views/element/quillEditor/README.md +163 -0
  105. package/app/src/views/element/quillEditor/example.vue +314 -0
  106. package/app/src/views/element/quillEditor/index.vue +409 -0
  107. package/app/src/views/element/quillEditor/toolbar.js +122 -0
  108. package/app/vue.config.js +15 -0
  109. package/package.json +1 -1
  110. package/app/wujie-vue3-child/.claude/settings.local.json +0 -8
  111. package/app/wujie-vue3-child/.vscode/extensions.json +0 -3
  112. package/app/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
  113. package/app/wujie-vue3-child/README.md +0 -5
  114. package/app/wujie-vue3-child/index.html +0 -13
  115. package/app/wujie-vue3-child/package-lock.json +0 -5744
  116. package/app/wujie-vue3-child/package.json +0 -28
  117. package/app/wujie-vue3-child/public/vite.svg +0 -1
  118. package/app/wujie-vue3-child/src/App.vue +0 -130
  119. package/app/wujie-vue3-child/src/assets/vue.svg +0 -1
  120. package/app/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
  121. package/app/wujie-vue3-child/src/components/tags-view.vue +0 -193
  122. package/app/wujie-vue3-child/src/components/tags-view1.vue +0 -131
  123. package/app/wujie-vue3-child/src/directives/aiLoading.js +0 -182
  124. package/app/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
  125. package/app/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
  126. package/app/wujie-vue3-child/src/main.js +0 -18
  127. package/app/wujie-vue3-child/src/router/index.js +0 -104
  128. package/app/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
  129. package/app/wujie-vue3-child/src/style.css +0 -171
  130. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
  131. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
  132. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
  133. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
  134. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
  135. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
  136. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
  137. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
  138. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
  139. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
  140. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
  141. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
  142. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
  143. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
  144. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
  145. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
  146. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
  147. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
  148. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
  149. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
  150. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
  151. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
  152. package/app/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -293
  153. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
  154. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
  155. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
  156. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
  157. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
  158. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
  159. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
  160. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
  161. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
  162. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
  163. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
  164. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
  165. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
  166. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
  167. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
  168. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
  169. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
  170. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
  171. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
  172. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
  173. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
  174. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
  175. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
  176. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
  177. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
  178. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
  179. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
  180. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
  181. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
  182. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
  183. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
  184. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
  185. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
  186. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
  187. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
  188. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
  189. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
  190. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
  191. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
  192. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
  193. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
  194. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
  195. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
  196. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
  197. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
  198. package/app/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
  199. package/app/wujie-vue3-child/src/views/home.vue +0 -53
  200. package/app/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
  201. package/app/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
  202. package/app/wujie-vue3-child/src/views/jsx/com.vue +0 -44
  203. package/app/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
  204. package/app/wujie-vue3-child/src/views/jsx/index.vue +0 -72
  205. package/app/wujie-vue3-child/src/views/jsx/props.vue +0 -33
  206. package/app/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
  207. package/app/wujie-vue3-child/src/views/phone-code.vue +0 -318
  208. package/app/wujie-vue3-child/src/views/router-jump.vue +0 -123
  209. package/app/wujie-vue3-child/src/views/test.vue +0 -192
  210. package/app/wujie-vue3-child/vite.config.js +0 -15
@@ -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
- })
@@ -1,171 +0,0 @@
1
- body {
2
- margin: 0;
3
- padding: 0;
4
- }
5
-
6
- .ai-loading-parent {
7
- position: relative;
8
- }
9
-
10
- .ai-loading-mask {
11
- position: absolute;
12
- inset: 0;
13
- display: flex;
14
- align-items: center;
15
- justify-content: center;
16
- background-color: rgba(255, 255, 255, 0.7);
17
- z-index: 99;
18
- }
19
-
20
- .ai-loading-content {
21
- display: flex;
22
- flex-direction: column;
23
- align-items: center;
24
- padding: 8px 16px;
25
- border-radius: 4px;
26
- background-color: rgba(255, 255, 255, 0.9);
27
- box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
28
- font-size: 12px;
29
- color: #606266;
30
- }
31
-
32
- .ai-loading-spinner {
33
- width: 14px;
34
- height: 14px;
35
- border-radius: 50%;
36
- border: 2px solid #dcdfe6;
37
- border-top-color: #606266;
38
- animation: ai-loading-spin 1s linear infinite;
39
- margin-bottom: 4px;
40
- }
41
-
42
- .ai-loading-bars {
43
- width: 20px;
44
- aspect-ratio: 1;
45
- --c: linear-gradient(#606266 0 0);
46
- --r1: radial-gradient(farthest-side at bottom,#606266 93%,#0000);
47
- --r2: radial-gradient(farthest-side at top,#606266 93%,#0000);
48
- background:
49
- var(--c),var(--r1),var(--r2),
50
- var(--c),var(--r1),var(--r2),
51
- var(--c),var(--r1),var(--r2);
52
- background-repeat: no-repeat;
53
- animation: ai-loading-bars 1s infinite alternate;
54
- margin-bottom: 4px;
55
- }
56
-
57
- .ai-loading-text {
58
- white-space: nowrap;
59
- animation: ai-loading-text-pulse 1.4s ease-in-out infinite;
60
- }
61
-
62
- /* v-aiLoading 演示用自定义遮罩样式示例
63
- * 在 AiCoach 页面「AI Loading 用例」Tab 中使用 class: 'ai-loading-demo-mask'
64
- * 你可以参考这里的写法,按需覆盖背景色、文字颜色等
65
- */
66
- .ai-loading-demo-mask {
67
- background-color: rgba(0, 0, 0, 0.3);
68
- }
69
-
70
- .ai-loading-mask-gradient {
71
- background-image: linear-gradient(135deg, #f5f7ff 0%, #f0f9ff 50%, #fff7f7 100%);
72
- background-size: 200% 200%;
73
- animation: ai-loading-gradient 4s ease infinite;
74
- }
75
-
76
- .ai-loading-demo-card {
77
- position: relative;
78
- overflow: hidden;
79
- }
80
-
81
- .ai-loading-demo-card::before {
82
- content: "";
83
- position: absolute;
84
- inset: 0;
85
- border-radius: 4px;
86
- padding: 1px;
87
- background: conic-gradient(
88
- from 0deg,
89
- #ff7e67,
90
- #ffb967,
91
- #67c1ff,
92
- #ff7e67
93
- );
94
- -webkit-mask:
95
- linear-gradient(#000 0 0) content-box,
96
- linear-gradient(#000 0 0);
97
- -webkit-mask-composite: xor;
98
- mask-composite: exclude;
99
- opacity: 0;
100
- animation: none;
101
- pointer-events: none;
102
- }
103
-
104
- .ai-loading-demo-card--active::before {
105
- opacity: 1;
106
- animation: ai-loading-border-rotate 3s linear infinite;
107
- }
108
-
109
- @keyframes ai-loading-spin {
110
- from {
111
- transform: rotate(0deg);
112
- }
113
- to {
114
- transform: rotate(360deg);
115
- }
116
- }
117
-
118
- @keyframes ai-loading-bars {
119
- 0%,25% {
120
- background-size: 5px 0,5px 4px,5px 4px,5px 0,5px 4px,5px 4px,5px 0,5px 4px,5px 4px;
121
- background-position: 0 50%,0 calc(50% - 2px),0 calc(50% + 2px),50% 50%,50% calc(50% - 2px),50% calc(50% + 2px),100% 50%,100% calc(50% - 2px),100% calc(50% + 2px);
122
- }
123
- 50% {
124
- background-size: 5px 100%,5px 4px,5px 4px,5px 0,5px 4px,5px 4px,5px 0,5px 4px,5px 4px;
125
- background-position: 0 50%,0 calc(0% - 2px),0 calc(100% + 2px),50% 50%,50% calc(50% - 2px),50% calc(50% + 2px),100% 50%,100% calc(50% - 2px),100% calc(50% + 2px);
126
- }
127
- 75% {
128
- background-size: 5px 100%,5px 4px,5px 4px,5px 100%,5px 4px,5px 4px,5px 0,5px 4px,5px 4px;
129
- background-position: 0 50%,0 calc(0% - 2px),0 calc(100% + 2px),50% 50%,50% calc(0% - 2px),50% calc(100% + 2px),100% 50%,100% calc(50% - 2px),100% calc(50% + 2px);
130
- }
131
- 95%,100% {
132
- background-size: 5px 100%,5px 4px, 5px 4px,5px 100%,5px 4px,5px 4px,5px 100%,5px 4px,5px 4px;
133
- background-position: 0 50%,0 calc(0% - 2px),0 calc(100% + 2px),50% 50%,50% calc(0% - 2px),50% calc(100% + 2px),100% 50%,100% calc(0% - 2px),100% calc(100% + 2px);
134
- }
135
- }
136
-
137
- @keyframes ai-loading-gradient {
138
- 0% {
139
- background-position: 0% 50%;
140
- }
141
- 50% {
142
- background-position: 100% 50%;
143
- }
144
- 100% {
145
- background-position: 0% 50%;
146
- }
147
- }
148
-
149
- @keyframes ai-loading-text-pulse {
150
- 0% {
151
- opacity: 0.6;
152
- transform: translateY(0);
153
- }
154
- 50% {
155
- opacity: 1;
156
- transform: translateY(-1px);
157
- }
158
- 100% {
159
- opacity: 0.6;
160
- transform: translateY(0);
161
- }
162
- }
163
-
164
- @keyframes ai-loading-border-rotate {
165
- from {
166
- transform: rotate(0deg);
167
- }
168
- to {
169
- transform: rotate(360deg);
170
- }
171
- }
@@ -1,108 +0,0 @@
1
-
2
- import { defineComponent, ref, h } from 'vue'
3
- import styles from './index.module.scss'
4
- import { Expand, DeleteFilled } from '@element-plus/icons-vue'
5
- import draggable from 'vuedraggable'
6
- import _ from 'lodash'
7
- export default defineComponent({
8
- // 折叠展开组件 - 列表展示
9
- name: 'CollapseExpand',
10
- props: {
11
- collapseList: {
12
- type: Array,
13
- default: () => [],
14
- },
15
- draggableDisabled: {
16
- type: Boolean,
17
- default: false,
18
- },
19
- },
20
- emits: ['update:collapseList'],
21
- setup(props, { emit, attrs, slots }) {
22
-
23
- const newCollapseList = ref(_.cloneDeep(props.collapseList))
24
- const dragEnd = (e) => {
25
- console.log(e)
26
- attrs.dragEnd && attrs.dragEnd(e, newCollapseList.value)
27
- emit('update:collapseList', newCollapseList.value)
28
- }
29
- const handleDelete = (item) => {
30
- newCollapseList.value = newCollapseList.value.filter((i) => i.id !== item.id)
31
- emit('update:collapseList', newCollapseList.value)
32
- }
33
- return () => (
34
- <div class={styles.collapseExpand}>
35
- <el-collapse
36
- {...attrs}
37
- >
38
- <draggable
39
- v-model={newCollapseList.value}
40
- item-key="id"
41
- class="list"
42
- ghost-class="ghost"
43
- disabled={props.draggableDisabled}
44
- onEnd={dragEnd}
45
- animation={attrs.animation || 100}
46
- handle=".drag-icon"
47
- >
48
- {{
49
- item: (({ element: item, index }) => (
50
- <el-collapse-item class={[styles.item,
51
- index === 0 ?
52
- styles.firstItem : '',
53
- index === props.collapseList.length - 1 ?
54
- styles.lastItem : '']}
55
- key={item.id}
56
- name={item.id}>
57
- {{
58
- // 自定义标题栏
59
- title: () => (
60
- attrs.title ? attrs.title(item) :
61
- <div class={[styles.header]}>
62
- <div class={[styles.headerLeft]}>
63
- <div>
64
- <el-icon style={{ cursor: 'grab' }} class={'drag-icon'} size={20}><Expand /></el-icon>
65
- </div>
66
- <div class={[styles.headerContent]}>
67
- <div class={[styles.title]}>{item.title}</div>
68
- {/* 目标描述 */}
69
- <div class={[styles.goal]}>
70
- {item.goal}
71
- </div>
72
- </div>
73
- </div>
74
- {/* 阻止冒泡避免触发折叠 */}
75
- <el-popconfirm
76
- title="确认删除吗?"
77
- confirm-button-text="确定"
78
- cancel-button-text="取消"
79
- onConfirm={(e) => {
80
- handleDelete(item)
81
- e.stopPropagation()
82
- }}
83
- >
84
- {{
85
- reference: () => (
86
- <el-icon onClick={(e) => e.stopPropagation()} style={{ marginRight: '8px' }}><DeleteFilled /></el-icon>
87
- )
88
- }}
89
-
90
- </el-popconfirm>
91
- </div>
92
- ),
93
- // 展开的内容区域
94
- default: () => (
95
- <div>
96
- {item.item ? item.item(item) : null}
97
- </div>
98
- )
99
- }}
100
- </el-collapse-item>
101
- ))
102
- }}
103
- </draggable>
104
- </el-collapse>
105
- </div>
106
- )
107
- },
108
- })