npmapps 1.0.25 → 1.0.27

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 (213) hide show
  1. package/PUBLISH.md +268 -0
  2. package/app/.codegraph/daemon.pid +6 -0
  3. package/app/.eslintrc.js +19 -0
  4. package/app/README.md +24 -0
  5. package/app/babel.config.js +5 -0
  6. package/app/devtool-windows-amd64.zip +0 -0
  7. package/app/docs/superpowers/plans/2026-05-29-quill-editor.md +836 -0
  8. package/app/docs/superpowers/specs/2026-05-29-quill-editor-design.md +210 -0
  9. package/app/docs/superpowers/specs/2026-06-06-lazy-cascader-design.md +400 -0
  10. package/app/jsconfig.json +19 -0
  11. package/app/package-lock.json +21347 -0
  12. package/app/package.json +63 -0
  13. package/app/postcss.config.js +10 -0
  14. package/app/public/favicon.ico +0 -0
  15. package/app/public/index.html +17 -0
  16. package/app/public//344/270/200/351/224/256/351/273/221/346/232/227.html +136 -0
  17. package/app/src/App.vue +110 -0
  18. package/app/src/assets/bpmn-camunda.jpg +0 -0
  19. package/app/src/assets/css/diagram.less +17 -0
  20. package/app/src/assets/icon/Icon.less +31 -0
  21. package/app/src/assets/icon/font/app-codes.css +26 -0
  22. package/app/src/assets/icon/font/app.eot +0 -0
  23. package/app/src/assets/icon/font/app.svg +60 -0
  24. package/app/src/assets/icon/font/app.ttf +0 -0
  25. package/app/src/assets/icon/font/app.woff +0 -0
  26. package/app/src/assets/icon/font/app.woff2 +0 -0
  27. package/app/src/assets/icon/font/config.json +248 -0
  28. package/app/src/assets/icon/font/source/raw/align-bottom-tool.svg +30 -0
  29. package/app/src/assets/icon/font/source/raw/align-horizontal-center-tool.svg +85 -0
  30. package/app/src/assets/icon/font/source/raw/align-left-tool.svg +84 -0
  31. package/app/src/assets/icon/font/source/raw/align-right-tool.svg +80 -0
  32. package/app/src/assets/icon/font/source/raw/align-top-tool.svg +84 -0
  33. package/app/src/assets/icon/font/source/raw/align-vertical-center-tool.svg +89 -0
  34. package/app/src/assets/icon/font/source/raw/distribute-horizontally-tool.svg +95 -0
  35. package/app/src/assets/icon/font/source/raw/distribute-vertically-tool.svg +99 -0
  36. package/app/src/assets/icon/font/source/raw/set-color-tool.svg +111 -0
  37. package/app/src/assets/icon/font/source/symbols/align-bottom-tool.svg +30 -0
  38. package/app/src/assets/icon/font/source/symbols/align-horizontal-center-tool.svg +30 -0
  39. package/app/src/assets/icon/font/source/symbols/align-left-tool.svg +30 -0
  40. package/app/src/assets/icon/font/source/symbols/align-right-tool.svg +30 -0
  41. package/app/src/assets/icon/font/source/symbols/align-top-tool.svg +30 -0
  42. package/app/src/assets/icon/font/source/symbols/align-vertical-center-tool.svg +30 -0
  43. package/app/src/assets/icon/font/source/symbols/distribute-horizontally-tool.svg +30 -0
  44. package/app/src/assets/icon/font/source/symbols/distribute-vertically-tool.svg +30 -0
  45. package/app/src/assets/icon/font/source/symbols/set-color-tool.svg +63 -0
  46. package/app/src/assets/logo.png +0 -0
  47. package/app/src/components/EllTable/README.md +70 -0
  48. package/app/src/components/EllTable/article.md +184 -0
  49. package/app/src/components/EllTable/index.js +213 -0
  50. package/app/src/components/FormulaEditor/FunctionSelector.vue +123 -0
  51. package/app/src/components/FormulaEditor/OperatorSelector.vue +184 -0
  52. package/app/src/components/FormulaEditor/ParameterSelector.vue +123 -0
  53. package/app/src/components/FormulaEditor/api.js +69 -0
  54. package/app/src/components/FormulaEditor/index.vue +435 -0
  55. package/app/src/components/HelloWorld.vue +58 -0
  56. package/app/src/components/PageHeader/index.vue +158 -0
  57. package/app/src/components/Splitter/README.md +144 -0
  58. package/app/src/components/Splitter/example.vue +88 -0
  59. package/app/src/components/Splitter/index.vue +203 -0
  60. package/app/src/components/diagram/ToolBar.vue +357 -0
  61. package/app/src/components/diagram/customTranslate/customTranslate.js +12 -0
  62. package/app/src/components/diagram/customTranslate/translationsGerman.js +241 -0
  63. package/app/src/components/diagram/index.vue +261 -0
  64. package/app/src/components/diagram/xmlData.js +29 -0
  65. package/app/src/directives/filldown.js +155 -0
  66. package/app/src/directives/filldownTable.js +291 -0
  67. package/app/src/main.js +40 -0
  68. package/app/src/router/index.js +63 -0
  69. package/app/src/store/index.js +23 -0
  70. package/app/src/utils/winBox.js +23 -0
  71. package/app/src/views/Extend/A.vue +12 -0
  72. package/app/src/views/Extend/B.vue +10 -0
  73. package/app/src/views/Extend/MagicalComponentsForELFormItem.vue +87 -0
  74. package/app/src/views/Extend/index.vue +59 -0
  75. package/app/src/views/Extend/tableMouseHorizontalWheel.vue +193 -0
  76. package/app/src/views/Home.vue +37 -0
  77. package/app/src/views/RouterJump.vue +155 -0
  78. package/app/src/views/css.vue +57 -0
  79. package/app/src/views/cssComponents/EllipsisText.vue +83 -0
  80. package/app/src/views/cssComponents/HoverCard.vue +79 -0
  81. package/app/src/views/cssComponents/TableHover.vue +140 -0
  82. package/app/src/views/cssComponents/inputSlo.vue +52 -0
  83. package/app/src/views/cssComponents/tableFixed.vue +158 -0
  84. package/app/src/views/echarts/echart-dome.vue +82 -0
  85. package/app/src/views/echarts/index.vue +118 -0
  86. package/app/src/views/echarts/pei3d.vue +667 -0
  87. package/app/src/views/element/bpmn/index.vue +18 -0
  88. package/app/src/views/element/components/attendanceCycle/index.vue +131 -0
  89. package/app/src/views/element/components/attendanceGroup/index.vue +147 -0
  90. package/app/src/views/element/components/attendancePersonnel/index.vue +158 -0
  91. package/app/src/views/element/components/companyCalendar/index.vue +147 -0
  92. package/app/src/views/element/components/shift/index.vue +147 -0
  93. package/app/src/views/element/components/shiftRotationSystem/index.vue +147 -0
  94. package/app/src/views/element/elTableJsx/columnManagement.vue +340 -0
  95. package/app/src/views/element/elTableJsx/dialogInput.vue +71 -0
  96. package/app/src/views/element/elTableJsx/elTableJsx.vue +1826 -0
  97. package/app/src/views/element/elTableJsx/formTable.vue +598 -0
  98. package/app/src/views/element/elTableJsx/index.vue +29 -0
  99. package/app/src/views/element/elTableJsx/simpleTable.vue +192 -0
  100. package/app/src/views/element/elTableJsx.zip +0 -0
  101. package/app/src/views/element/index.vue +44 -0
  102. package/app/src/views/element/lazyCascader/LazyCascader.vue +302 -0
  103. package/app/src/views/element/lazyCascader/data.js +205 -0
  104. package/app/src/views/element/lazyCascader/index.vue +315 -0
  105. package/app/src/views/element/quillEditor/README.md +163 -0
  106. package/app/src/views/element/quillEditor/example.vue +314 -0
  107. package/app/src/views/element/quillEditor/index.vue +409 -0
  108. package/app/src/views/element/quillEditor/toolbar.js +122 -0
  109. package/app/vue.config.js +15 -0
  110. package/package.json +1 -1
  111. package/app/wujie-vue3-child/.claude/settings.local.json +0 -8
  112. package/app/wujie-vue3-child/.vscode/extensions.json +0 -3
  113. package/app/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
  114. package/app/wujie-vue3-child/README.md +0 -5
  115. package/app/wujie-vue3-child/index.html +0 -13
  116. package/app/wujie-vue3-child/package-lock.json +0 -5744
  117. package/app/wujie-vue3-child/package.json +0 -28
  118. package/app/wujie-vue3-child/public/vite.svg +0 -1
  119. package/app/wujie-vue3-child/src/App.vue +0 -130
  120. package/app/wujie-vue3-child/src/assets/vue.svg +0 -1
  121. package/app/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
  122. package/app/wujie-vue3-child/src/components/SmartAnchorTabs/index.jsx +0 -224
  123. package/app/wujie-vue3-child/src/components/SmartAnchorTabs/style.css +0 -154
  124. package/app/wujie-vue3-child/src/components/tags-view.vue +0 -193
  125. package/app/wujie-vue3-child/src/components/tags-view1.vue +0 -131
  126. package/app/wujie-vue3-child/src/directives/aiLoading.js +0 -182
  127. package/app/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
  128. package/app/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
  129. package/app/wujie-vue3-child/src/main.js +0 -18
  130. package/app/wujie-vue3-child/src/router/index.js +0 -104
  131. package/app/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
  132. package/app/wujie-vue3-child/src/style.css +0 -171
  133. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
  134. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
  135. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
  136. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
  137. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
  138. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
  139. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
  140. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
  141. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
  142. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
  143. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
  144. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
  145. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
  146. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
  147. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
  148. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
  149. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
  150. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
  151. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
  152. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
  153. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
  154. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
  155. package/app/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -375
  156. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
  157. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
  158. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
  159. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
  160. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
  161. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
  162. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
  163. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
  164. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
  165. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
  166. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
  167. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
  168. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
  169. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
  170. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
  171. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
  172. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
  173. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
  174. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
  175. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
  176. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
  177. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
  178. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
  179. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
  180. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
  181. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
  182. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
  183. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
  184. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
  185. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
  186. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
  187. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
  188. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
  189. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
  190. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
  191. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
  192. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
  193. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
  194. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
  195. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
  196. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
  197. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
  198. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
  199. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
  200. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
  201. package/app/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
  202. package/app/wujie-vue3-child/src/views/home.vue +0 -53
  203. package/app/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
  204. package/app/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
  205. package/app/wujie-vue3-child/src/views/jsx/com.vue +0 -44
  206. package/app/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
  207. package/app/wujie-vue3-child/src/views/jsx/index.vue +0 -72
  208. package/app/wujie-vue3-child/src/views/jsx/props.vue +0 -33
  209. package/app/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
  210. package/app/wujie-vue3-child/src/views/phone-code.vue +0 -318
  211. package/app/wujie-vue3-child/src/views/router-jump.vue +0 -123
  212. package/app/wujie-vue3-child/src/views/test.vue +0 -192
  213. package/app/wujie-vue3-child/vite.config.js +0 -15
@@ -0,0 +1,291 @@
1
+ function ensurePosition(el) {
2
+ const pos = window.getComputedStyle(el).position;
3
+ if (!pos || pos === "static") el.style.position = "relative";
4
+ }
5
+
6
+ function createHandle() {
7
+ const h = document.createElement("span");
8
+ h.className = "v-filldown-handle";
9
+ h.style.position = "absolute";
10
+ h.style.right = "0";
11
+ h.style.bottom = "0";
12
+ h.style.width = "10px";
13
+ h.style.height = "10px";
14
+ h.style.background = "#409EFF";
15
+ h.style.clipPath = "polygon(100% 0, 100% 100%, 0 100%)";
16
+ h.style.cursor = "crosshair";
17
+ h.style.display = "none";
18
+ h.style.zIndex = "10";
19
+ h.style.pointerEvents = "auto";
20
+ return h;
21
+ }
22
+
23
+ function setSelected(el, selected) {
24
+ if (selected) el.classList.add("v-filldown-selected");
25
+ else el.classList.remove("v-filldown-selected");
26
+ }
27
+
28
+ function indexOfNode(nodeList, node) {
29
+ for (let i = 0; i < nodeList.length; i++) if (nodeList[i] === node) return i;
30
+ return -1;
31
+ }
32
+
33
+ function getCellInfo(td, tbody) {
34
+ const tr = td.closest("tr");
35
+ if (!tr) return null;
36
+ const rowIndex = indexOfNode(tbody.children, tr);
37
+ const colIndex = indexOfNode(tr.children, td);
38
+ return { tr, rowIndex, colIndex };
39
+ }
40
+
41
+ function buildColumnMap(el, columns) {
42
+ const map = {};
43
+ const headerCells = el.querySelectorAll(".el-table__header-wrapper thead tr th .cell");
44
+ for (let i = 0; i < headerCells.length; i++) {
45
+ const text = (headerCells[i].textContent || "").trim();
46
+ const conf = columns.find((c) => c.label === text);
47
+ if (conf && conf.prop) map[i] = conf.prop;
48
+ }
49
+ return map;
50
+ }
51
+
52
+ function injectStyle() {
53
+ const styleId = "v-filldown-style";
54
+ if (!document.getElementById(styleId)) {
55
+ const style = document.createElement("style");
56
+ style.id = styleId;
57
+ style.innerHTML = `
58
+ .el-table td.v-filldown-selected{background-color:#ecf5ff !important;}
59
+ .el-table td .cell.v-filldown-range{
60
+ box-shadow: inset 0 0 0 2px #409EFF;
61
+ outline: 2px solid #409EFF;
62
+ outline-offset: -2px;
63
+ background-color: rgba(64,158,255,0.18);
64
+ }
65
+ .v-filldown-dragging{user-select:none;}
66
+ `;
67
+ document.head.appendChild(style);
68
+ }
69
+ }
70
+
71
+ function attach(el, binding) {
72
+ if (el._filldownTableCleanup) {
73
+ el._filldownTableCleanup();
74
+ }
75
+ el._filldownOverlay = null;
76
+ el._filldownDraggingGlobal = false;
77
+ if (el._filldownObserver) {
78
+ try { el._filldownObserver.disconnect(); } catch (e) {}
79
+ el._filldownObserver = null;
80
+ }
81
+ injectStyle();
82
+ const cfg = binding.value || {};
83
+ const group = cfg.group || "filldown-table";
84
+ const columns = Array.isArray(cfg.columns) ? cfg.columns : [];
85
+ const map = buildColumnMap(el, columns);
86
+ let tbody = el.querySelector(".el-table__body-wrapper tbody");
87
+ if (!tbody) {
88
+ const obs = new MutationObserver(() => {
89
+ const tb = el.querySelector(".el-table__body-wrapper tbody");
90
+ if (tb) {
91
+ obs.disconnect();
92
+ el._filldownObserver = null;
93
+ attach(el, binding);
94
+ }
95
+ });
96
+ obs.observe(el, { childList: true, subtree: true });
97
+ el._filldownObserver = obs;
98
+ return;
99
+ }
100
+
101
+ function clearSelection() {
102
+ const selectedTds = tbody.querySelectorAll(".v-filldown-selected");
103
+ selectedTds.forEach((n) => setSelected(n, false));
104
+ const rangeCells = tbody.querySelectorAll(".cell.v-filldown-range");
105
+ rangeCells.forEach((n) => n.classList.remove("v-filldown-range"));
106
+ }
107
+
108
+ function ensureHandle(td) {
109
+ ensurePosition(td);
110
+ let handle = td._filldownHandle;
111
+ if (!handle) {
112
+ handle = createHandle();
113
+ td._filldownHandle = handle;
114
+ td.appendChild(handle);
115
+ td.addEventListener("mouseenter", () => {
116
+ const info = getCellInfo(td, tbody);
117
+ if (info && map[info.colIndex] && !td._filldownDragging) handle.style.display = "block";
118
+ });
119
+ td.addEventListener("mouseleave", () => {
120
+ if (!td._filldownDragging) handle.style.display = "none";
121
+ });
122
+ handle.addEventListener("mousedown", (e) => startDrag(e, td));
123
+ }
124
+ return handle;
125
+ }
126
+
127
+ function findCellByPoint(clientX, clientY) {
128
+ let t = document.elementFromPoint(clientX, clientY);
129
+ while (t && t !== document.body) {
130
+ if (t.tagName === "TD") return t;
131
+ t = t.parentElement;
132
+ }
133
+ return null;
134
+ }
135
+
136
+ function startDrag(e, startTd) {
137
+ if (el._filldownDraggingGlobal) return;
138
+ el._filldownDraggingGlobal = true;
139
+ const state = el._filldownTableState || {};
140
+ const getRows = state.getRows || (() => []);
141
+ const rows = getRows();
142
+ const info = getCellInfo(startTd, tbody);
143
+ if (!info) return;
144
+ const prop = map[info.colIndex];
145
+ if (!prop || !Array.isArray(rows)) return;
146
+ const startIndex = info.rowIndex;
147
+ const startValue = rows[startIndex] ? rows[startIndex][prop] : undefined;
148
+ let lastIndex = startIndex;
149
+ startTd._filldownDragging = true;
150
+ const handle = startTd._filldownHandle;
151
+ if (handle) handle.style.display = "block";
152
+ el.classList.add("v-filldown-dragging");
153
+ const bodyWrapper = el.querySelector(".el-table__body-wrapper");
154
+ const overlayContainer = tbody;
155
+ ensurePosition(overlayContainer);
156
+ let overlay = el._filldownOverlay;
157
+ if (!overlay) {
158
+ overlay = document.createElement("div");
159
+ overlay.className = "v-filldown-overlay";
160
+ overlay.style.position = "absolute";
161
+ overlay.style.pointerEvents = "none";
162
+ overlay.style.zIndex = "9";
163
+ overlay.style.border = "2px solid #409EFF";
164
+ overlay.style.background = "rgba(64,158,255,0.12)";
165
+ overlay.style.display = "none";
166
+ el._filldownOverlay = overlay;
167
+ overlayContainer.appendChild(overlay);
168
+ }
169
+ const startCell = startTd.querySelector(".cell") || startTd;
170
+
171
+ function updateOverlayRect(currTd) {
172
+ if (!overlay) return;
173
+ const currCell = currTd ? (currTd.querySelector(".cell") || currTd) : startCell;
174
+ const containerRect = overlayContainer.getBoundingClientRect();
175
+ const startRect = (startTd.querySelector(".cell") || startTd).getBoundingClientRect();
176
+ const currRect = currCell.getBoundingClientRect();
177
+ overlay.style.display = "block";
178
+ overlay.style.left = `${startRect.left - containerRect.left}px`;
179
+ overlay.style.top = `${startRect.top - containerRect.top}px`;
180
+ overlay.style.width = `${startRect.width}px`;
181
+ overlay.style.height = `${currRect.bottom - startRect.top}px`;
182
+ }
183
+
184
+ function onMove(ev) {
185
+ const t = findCellByPoint(ev.clientX, ev.clientY);
186
+ if (t) {
187
+ const i = getCellInfo(t, tbody);
188
+ if (i && i.colIndex === info.colIndex && i.rowIndex !== lastIndex) {
189
+ clearSelection();
190
+ if (i.rowIndex > startIndex) {
191
+ for (let r = startIndex + 1; r <= i.rowIndex; r++) {
192
+ const tr = tbody.children[r];
193
+ if (tr && tr.children[info.colIndex]) {
194
+ const td = tr.children[info.colIndex];
195
+ setSelected(td, true);
196
+ const cellDiv = td.querySelector(".cell");
197
+ if (cellDiv) cellDiv.classList.add("v-filldown-range");
198
+ }
199
+ }
200
+ }
201
+ updateOverlayRect(t);
202
+ lastIndex = i.rowIndex;
203
+ }
204
+ }
205
+ }
206
+
207
+ function onScroll() {
208
+ const currTr = tbody.children[lastIndex];
209
+ const currTd = currTr && currTr.children[info.colIndex] ? currTr.children[info.colIndex] : null;
210
+ updateOverlayRect(currTd);
211
+ }
212
+
213
+ function onUp() {
214
+ document.removeEventListener("mousemove", onMove);
215
+ document.removeEventListener("mouseup", onUp);
216
+ window.removeEventListener("mouseup", onUp);
217
+ bodyWrapper && bodyWrapper.removeEventListener("scroll", onScroll, true);
218
+ startTd._filldownDragging = false;
219
+ if (handle) handle.style.display = "none";
220
+ el.classList.remove("v-filldown-dragging");
221
+ if (overlay) overlay.style.display = "none";
222
+ el._filldownDraggingGlobal = false;
223
+ if (typeof lastIndex === "number" && lastIndex > startIndex) {
224
+ for (let r = startIndex + 1; r <= lastIndex; r++) {
225
+ if (rows[r] && prop in rows[r]) {
226
+ const next = Object.assign({}, rows[r], { [prop]: startValue });
227
+ if (typeof rows.splice === "function") rows.splice(r, 1, next);
228
+ else rows[r][prop] = startValue;
229
+ }
230
+ }
231
+ }
232
+ clearSelection();
233
+ }
234
+
235
+ document.addEventListener("mousemove", onMove);
236
+ document.addEventListener("mouseup", onUp);
237
+ window.addEventListener("mouseup", onUp);
238
+ bodyWrapper && bodyWrapper.addEventListener("scroll", onScroll, true);
239
+ e.preventDefault();
240
+ e.stopPropagation();
241
+ }
242
+
243
+ function onMouseOver(e) {
244
+ const td = e.target.tagName === "TD" ? e.target : e.target.closest("td");
245
+ if (!td) return;
246
+ const info = getCellInfo(td, tbody);
247
+ if (!info) return;
248
+ if (!map[info.colIndex]) return;
249
+ const h = ensureHandle(td);
250
+ if (h && !td._filldownDragging) h.style.display = "block";
251
+ }
252
+
253
+ el._filldownTableCleanup = () => {
254
+ el.removeEventListener("mouseover", onMouseOver, true);
255
+ const hs = el.querySelectorAll(".v-filldown-handle");
256
+ hs.forEach((h) => h.remove());
257
+ if (el._filldownOverlay) {
258
+ try { el._filldownOverlay.remove(); } catch (e) {}
259
+ el._filldownOverlay = null;
260
+ }
261
+ if (el._filldownObserver) {
262
+ try { el._filldownObserver.disconnect(); } catch (e) {}
263
+ el._filldownObserver = null;
264
+ }
265
+ };
266
+
267
+ el.addEventListener("mouseover", onMouseOver, true);
268
+ const getRows = () => {
269
+ const v = el.__vue__;
270
+ const arr = v && v.$props ? v.$props.data : null;
271
+ return Array.isArray(arr) ? arr : (cfg.rows || []);
272
+ };
273
+ el._filldownTableState = { group, map, getRows };
274
+ }
275
+
276
+ export default {
277
+ inserted(el, binding) {
278
+ attach(el, binding);
279
+ },
280
+ update(el, binding) {
281
+ attach(el, binding);
282
+ },
283
+ componentUpdated(el, binding) {
284
+ attach(el, binding);
285
+ },
286
+ unbind(el) {
287
+ if (el._filldownTableCleanup) el._filldownTableCleanup();
288
+ el._filldownTableCleanup = null;
289
+ el._filldownTableState = null;
290
+ },
291
+ };
@@ -0,0 +1,40 @@
1
+ import Vue from 'vue'
2
+ import App from './App.vue'
3
+ import router from './router'
4
+ import ElementUI from 'element-ui'
5
+ import 'element-ui/lib/theme-chalk/index.css'
6
+ import Router from 'vue-router'
7
+ import VueCodemirror from 'vue-codemirror'
8
+ import 'codemirror/lib/codemirror.css'
9
+ import store from './store'
10
+ import filldown from './directives/filldown'
11
+ import filldownTable from './directives/filldownTable'
12
+ Vue.use(VueCodemirror)
13
+ Vue.config.productionTip = false
14
+
15
+ Vue.use(Router)
16
+ Vue.use(ElementUI)
17
+ Vue.directive('filldown', filldown)
18
+ Vue.directive('filldown-table', filldownTable)
19
+
20
+ new Vue({
21
+ store,
22
+ router,
23
+ render: h => h(App),
24
+ }).$mount('#app')
25
+ // 自适应布局代码
26
+ function setRem() {
27
+ const baseSize = 16; // 基准字体大小
28
+ const scale = document.documentElement.clientWidth / 1920; // 1920为设计稿宽度
29
+ document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px';
30
+ console.log('setRem', baseSize * Math.min(scale, 2) + 'px');
31
+ }
32
+ window.onload = function() {
33
+ console.log('onload');
34
+ setRem();
35
+ }
36
+
37
+ // 改变窗口大小时重新设置rem
38
+ window.onresize = function() {
39
+ setRem();
40
+ }
@@ -0,0 +1,63 @@
1
+ import VueRouter from 'vue-router'
2
+ // 引入组件
3
+ // import ExampleComponent from './components/ExampleComponent.vue'
4
+
5
+ const routes = [
6
+ {
7
+ path: '/',
8
+ name: 'Home',
9
+ component: () => import('../views/Home.vue'),
10
+ meta: {
11
+ title: 'Vue2子应用'
12
+ }
13
+ },
14
+
15
+ // router-jump
16
+ {
17
+ path: '/router-jump',
18
+ name: 'RouterJump',
19
+ component: () => import('../views/RouterJump.vue'),
20
+ meta: {
21
+ title: '路由跳转'
22
+ }
23
+ },
24
+ // css
25
+ {
26
+ path: '/css',
27
+ name: 'Css',
28
+ component: () => import('../views/css.vue'),
29
+ meta: {
30
+ title: 'css'
31
+ }
32
+ },
33
+ {
34
+ path: '/extend',
35
+ name: 'Extend',
36
+ component: () => import('../views/Extend/index.vue'),
37
+ meta: {
38
+ title: '扩展'
39
+ }
40
+ },
41
+ {
42
+ path: 'echarts',
43
+ name: 'Echarts',
44
+ component: () => import('../views/echarts/index.vue'),
45
+ meta: {
46
+ title: 'echarts'
47
+ }
48
+ },
49
+ {
50
+ path: 'element',
51
+ name: 'Element',
52
+ component: () => import('../views/element/index.vue'),
53
+ meta: {
54
+ title: 'element'
55
+ }
56
+ },
57
+ ]
58
+
59
+ const router = new VueRouter({
60
+ routes // (缩写) 相当于 routes: routes
61
+ })
62
+
63
+ export default router
@@ -0,0 +1,23 @@
1
+ import Vue from 'vue'
2
+ import Vuex from 'vuex'
3
+
4
+ Vue.use(Vuex)
5
+
6
+ export default new Vuex.Store({
7
+ state: {
8
+ radioValue: ''
9
+ },
10
+ getters: {
11
+ radioValue ({ radioValue }) {
12
+ return radioValue
13
+ }
14
+ },
15
+ mutations: {
16
+
17
+ setRadioValue (state, newVAlue) {
18
+ state.radioValue = newVAlue
19
+ }
20
+ },
21
+ actions: {},
22
+ modules: {}
23
+ })
@@ -0,0 +1,23 @@
1
+ import WinBox from 'winbox/src/js/winbox.js';
2
+ import 'winbox/dist/css/winbox.min.css';
3
+
4
+ export const openWinBox = ({
5
+ mount,
6
+ width,
7
+ height,
8
+ title,
9
+ url
10
+ }) => {
11
+
12
+ const win = new WinBox("标题", {
13
+ width: '500px',
14
+ height: '400px',
15
+ x: "center",
16
+ y: "center",
17
+ mount,
18
+ title,
19
+ url
20
+ });
21
+
22
+ return win;
23
+ }
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <div>A</div>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'A',
8
+ created() {
9
+ console.log('A created')
10
+ }
11
+ }
12
+ </script>
@@ -0,0 +1,10 @@
1
+ <script>
2
+ import A from "./A.vue";
3
+ export default {
4
+ extends: A,
5
+ name: 'B',
6
+ created() {
7
+ console.log('B created')
8
+ }
9
+ }
10
+ </script>
@@ -0,0 +1,87 @@
1
+ <script>
2
+ import { FormItem } from "element-ui";
3
+ import Vue from "vue";
4
+ import PageHeader from "@/components/PageHeader/index.vue";
5
+ Vue.component("ell-form-item", {
6
+ extends: FormItem,
7
+ async mounted() {
8
+ await this.$nextTick();
9
+ if (!this.$el.children && !this.$el.children.length) return;
10
+ const label = Array.from(this.$el.children).find((item) =>
11
+ item.classList.contains("el-form-item__label")
12
+ );
13
+ if (!label) return;
14
+
15
+ // 如果有noEllipsis属性
16
+ if (this.$attrs.noEllipsis !== undefined) {
17
+ return;
18
+ }
19
+
20
+ // 获取元素的行高
21
+ const lineHeight = parseFloat(getComputedStyle(label).lineHeight);
22
+ // 获取元素的高度
23
+ const scrollHeight = label.scrollHeight;
24
+ // 计算元素的行数
25
+ const lineCount = Math.round(scrollHeight / lineHeight);
26
+ // 如果行数大于2
27
+ if (lineCount > 2) {
28
+ const newLineHeight = scrollHeight / lineCount / 2;
29
+ // 设置元素的行高
30
+ label.style.lineHeight = newLineHeight + "px";
31
+ label.style.overflow = "hidden";
32
+ label.style.textOverflow = "ellipsis";
33
+ label.style.display = "-webkit-box";
34
+ label.style.webkitBoxOrient = "vertical";
35
+ label.style.webkitLineClamp = "2";
36
+ label.title = label.innerText;
37
+ }
38
+ // 如果行数大于1
39
+ if (lineCount > 1) {
40
+ const newLineHeight = scrollHeight / lineCount / 2;
41
+ // 设置元素的行高
42
+ label.style.lineHeight = newLineHeight + "px";
43
+ }
44
+ },
45
+ });
46
+ export default {
47
+ name: "MagicalComponentsForELFormItem",
48
+ components: {
49
+ PageHeader,
50
+ },
51
+ };
52
+ </script>
53
+ <template>
54
+ <div>
55
+ <PageHeader
56
+ title="魔改 el-form-item"
57
+ description="解决 el-form-item label 文字过多时的换行和省略问题"
58
+ usage="&lt;ell-form-item label=&quot;长文字&quot; /&gt; 添加 noEllipsis 属性可禁用省略"
59
+ />
60
+ <el-form label-width="100px">
61
+ <el-form-item label="活动名称">
62
+ <el-input placeholder="请输入活动名称" />
63
+ </el-form-item>
64
+ <el-form-item label="活动名称活动名称">
65
+ <el-input placeholder="请输入活动名称" />
66
+ </el-form-item>
67
+ <el-form-item label="活动名称活动名称活动名称活动名称">
68
+ <el-input placeholder="请输入活动名称" />
69
+ </el-form-item>
70
+ </el-form>
71
+
72
+ <el-form label-width="100px">
73
+ <ell-form-item label="活动名称">
74
+ <el-input placeholder="请输入活动名称" />
75
+ </ell-form-item>
76
+ <ell-form-item label="活动名称活动名称">
77
+ <el-input placeholder="请输入活动名称" />
78
+ </ell-form-item>
79
+ <ell-form-item label="活动名称活动名称活动名称活动名称">
80
+ <el-input placeholder="请输入活动名称" />
81
+ </ell-form-item>
82
+ <ell-form-item noEllipsis label="活动名称活动名称活动名称活动名称">
83
+ <el-input placeholder="请输入活动名称" />
84
+ </ell-form-item>
85
+ </el-form>
86
+ </div>
87
+ </template>
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <div id="extend">
3
+ <el-button @click="winbox">winbox</el-button>
4
+ <span>{{ $route.query.a }}</span>
5
+ <el-tabs type="border-card">
6
+ <el-tab-pane label="鼠标滚轮控制横向滚动">
7
+ <tableMouseHorizontalWheel />
8
+ </el-tab-pane>
9
+ <el-tab-pane label="魔改el-form-item lable换行问题">
10
+ <MagicalComponentsForELFormItem />
11
+ </el-tab-pane>
12
+ <el-tab-pane label="vue2继承组件的生命周期会覆盖原有的生命周期吗">
13
+ <!-- <A></A> -->
14
+ <B></B>
15
+ <C></C>
16
+ </el-tab-pane>
17
+ </el-tabs>
18
+
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ import Vue from "vue";
24
+ import A from "./A.vue";
25
+ import B from "./B.vue";
26
+ import MagicalComponentsForELFormItem from "./MagicalComponentsForELFormItem.vue";
27
+ import tableMouseHorizontalWheel from "./tableMouseHorizontalWheel.vue";
28
+
29
+ import { openWinBox } from "@/utils/winBox";
30
+ Vue.component("C", {
31
+ extends: A,
32
+ created() {
33
+ console.log("C created");
34
+ },
35
+ });
36
+ export default {
37
+ name: "App",
38
+ components: {
39
+ A,
40
+ B,
41
+ MagicalComponentsForELFormItem,
42
+ tableMouseHorizontalWheel,
43
+ },
44
+ created() {
45
+ console.log("App created", this.$route.query);
46
+ },
47
+ mounted() {
48
+ console.log(this);
49
+ },
50
+ methods: {
51
+ winbox() {
52
+ openWinBox({
53
+ title: "winbox",
54
+ mount: this.$el,
55
+ });
56
+ },
57
+ },
58
+ };
59
+ </script>