npmapps 1.1.4 → 1.1.5

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 (114) hide show
  1. package/app/wujie-vue2-child/.eslintrc.js +19 -0
  2. package/app/wujie-vue2-child/README.md +24 -0
  3. package/app/wujie-vue2-child/babel.config.js +5 -0
  4. package/app/wujie-vue2-child/docs/superpowers/plans/2026-05-29-quill-editor.md +836 -0
  5. package/app/wujie-vue2-child/docs/superpowers/specs/2026-05-29-quill-editor-design.md +210 -0
  6. package/app/wujie-vue2-child/jsconfig.json +19 -0
  7. package/app/wujie-vue2-child/package-lock.json +21333 -0
  8. package/app/wujie-vue2-child/package.json +63 -0
  9. package/app/wujie-vue2-child/postcss.config.js +10 -0
  10. package/app/wujie-vue2-child/public/favicon.ico +0 -0
  11. package/app/wujie-vue2-child/public/index.html +17 -0
  12. package/app/wujie-vue2-child/public/rili.jpg +0 -0
  13. package/app/wujie-vue2-child/public//344/270/200/351/224/256/351/273/221/346/232/227.html +136 -0
  14. package/app/wujie-vue2-child/src/App.vue +110 -0
  15. package/app/wujie-vue2-child/src/assets/bpmn-camunda.jpg +0 -0
  16. package/app/wujie-vue2-child/src/assets/css/diagram.less +17 -0
  17. package/app/wujie-vue2-child/src/assets/icon/Icon.less +31 -0
  18. package/app/wujie-vue2-child/src/assets/icon/font/app-codes.css +26 -0
  19. package/app/wujie-vue2-child/src/assets/icon/font/app.eot +0 -0
  20. package/app/wujie-vue2-child/src/assets/icon/font/app.svg +60 -0
  21. package/app/wujie-vue2-child/src/assets/icon/font/app.ttf +0 -0
  22. package/app/wujie-vue2-child/src/assets/icon/font/app.woff +0 -0
  23. package/app/wujie-vue2-child/src/assets/icon/font/app.woff2 +0 -0
  24. package/app/wujie-vue2-child/src/assets/icon/font/config.json +248 -0
  25. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/align-bottom-tool.svg +30 -0
  26. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/align-horizontal-center-tool.svg +85 -0
  27. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/align-left-tool.svg +84 -0
  28. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/align-right-tool.svg +80 -0
  29. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/align-top-tool.svg +84 -0
  30. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/align-vertical-center-tool.svg +89 -0
  31. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/distribute-horizontally-tool.svg +95 -0
  32. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/distribute-vertically-tool.svg +99 -0
  33. package/app/wujie-vue2-child/src/assets/icon/font/source/raw/set-color-tool.svg +111 -0
  34. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/align-bottom-tool.svg +30 -0
  35. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/align-horizontal-center-tool.svg +30 -0
  36. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/align-left-tool.svg +30 -0
  37. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/align-right-tool.svg +30 -0
  38. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/align-top-tool.svg +30 -0
  39. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/align-vertical-center-tool.svg +30 -0
  40. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/distribute-horizontally-tool.svg +30 -0
  41. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/distribute-vertically-tool.svg +30 -0
  42. package/app/wujie-vue2-child/src/assets/icon/font/source/symbols/set-color-tool.svg +63 -0
  43. package/app/wujie-vue2-child/src/assets/logo.png +0 -0
  44. package/app/wujie-vue2-child/src/components/EllTable/README.md +70 -0
  45. package/app/wujie-vue2-child/src/components/EllTable/article.md +184 -0
  46. package/app/wujie-vue2-child/src/components/EllTable/index.js +213 -0
  47. package/app/wujie-vue2-child/src/components/EventCalendar/CalendarSkeleton.vue +147 -0
  48. package/app/wujie-vue2-child/src/components/EventCalendar/CodeBlock.vue +199 -0
  49. package/app/wujie-vue2-child/src/components/EventCalendar/MonthSelect.vue +376 -0
  50. package/app/wujie-vue2-child/src/components/EventCalendar/README.md +368 -0
  51. package/app/wujie-vue2-child/src/components/EventCalendar/example.vue +1551 -0
  52. package/app/wujie-vue2-child/src/components/EventCalendar/index.vue +1646 -0
  53. package/app/wujie-vue2-child/src/components/EventCalendar/mockData.js +349 -0
  54. package/app/wujie-vue2-child/src/components/EventCalendar/utils.js +201 -0
  55. package/app/wujie-vue2-child/src/components/FormulaEditor/FunctionSelector.vue +123 -0
  56. package/app/wujie-vue2-child/src/components/FormulaEditor/OperatorSelector.vue +184 -0
  57. package/app/wujie-vue2-child/src/components/FormulaEditor/ParameterSelector.vue +123 -0
  58. package/app/wujie-vue2-child/src/components/FormulaEditor/api.js +69 -0
  59. package/app/wujie-vue2-child/src/components/FormulaEditor/index.vue +435 -0
  60. package/app/wujie-vue2-child/src/components/HelloWorld.vue +58 -0
  61. package/app/wujie-vue2-child/src/components/PageHeader/index.vue +158 -0
  62. package/app/wujie-vue2-child/src/components/Splitter/README.md +144 -0
  63. package/app/wujie-vue2-child/src/components/Splitter/example.vue +84 -0
  64. package/app/wujie-vue2-child/src/components/Splitter/index.vue +203 -0
  65. package/app/wujie-vue2-child/src/components/diagram/ToolBar.vue +357 -0
  66. package/app/wujie-vue2-child/src/components/diagram/customTranslate/customTranslate.js +12 -0
  67. package/app/wujie-vue2-child/src/components/diagram/customTranslate/translationsGerman.js +241 -0
  68. package/app/wujie-vue2-child/src/components/diagram/index.vue +261 -0
  69. package/app/wujie-vue2-child/src/components/diagram/xmlData.js +29 -0
  70. package/app/wujie-vue2-child/src/directives/filldown.js +155 -0
  71. package/app/wujie-vue2-child/src/directives/filldownTable.js +291 -0
  72. package/app/wujie-vue2-child/src/main.js +40 -0
  73. package/app/wujie-vue2-child/src/router/index.js +72 -0
  74. package/app/wujie-vue2-child/src/store/index.js +23 -0
  75. package/app/wujie-vue2-child/src/utils/winBox.js +23 -0
  76. package/app/wujie-vue2-child/src/views/Extend/A.vue +12 -0
  77. package/app/wujie-vue2-child/src/views/Extend/B.vue +10 -0
  78. package/app/wujie-vue2-child/src/views/Extend/MagicalComponentsForELFormItem.vue +78 -0
  79. package/app/wujie-vue2-child/src/views/Extend/index.vue +59 -0
  80. package/app/wujie-vue2-child/src/views/Extend/tableMouseHorizontalWheel.vue +184 -0
  81. package/app/wujie-vue2-child/src/views/Home.vue +27 -0
  82. package/app/wujie-vue2-child/src/views/RouterJump.vue +145 -0
  83. package/app/wujie-vue2-child/src/views/calendar/index.vue +19 -0
  84. package/app/wujie-vue2-child/src/views/css.vue +57 -0
  85. package/app/wujie-vue2-child/src/views/cssComponents/EllipsisText.vue +73 -0
  86. package/app/wujie-vue2-child/src/views/cssComponents/HoverCard.vue +69 -0
  87. package/app/wujie-vue2-child/src/views/cssComponents/TableHover.vue +130 -0
  88. package/app/wujie-vue2-child/src/views/cssComponents/inputSlo.vue +42 -0
  89. package/app/wujie-vue2-child/src/views/cssComponents/tableFixed.vue +148 -0
  90. package/app/wujie-vue2-child/src/views/echarts/echart-dome.vue +73 -0
  91. package/app/wujie-vue2-child/src/views/echarts/index.vue +118 -0
  92. package/app/wujie-vue2-child/src/views/echarts/pei3d.vue +658 -0
  93. package/app/wujie-vue2-child/src/views/element/bpmn/index.vue +15 -0
  94. package/app/wujie-vue2-child/src/views/element/components/attendanceCycle/index.vue +131 -0
  95. package/app/wujie-vue2-child/src/views/element/components/attendanceGroup/index.vue +147 -0
  96. package/app/wujie-vue2-child/src/views/element/components/attendancePersonnel/index.vue +158 -0
  97. package/app/wujie-vue2-child/src/views/element/components/companyCalendar/index.vue +147 -0
  98. package/app/wujie-vue2-child/src/views/element/components/shift/index.vue +147 -0
  99. package/app/wujie-vue2-child/src/views/element/components/shiftRotationSystem/index.vue +147 -0
  100. package/app/wujie-vue2-child/src/views/element/elTableJsx/columnManagement.vue +340 -0
  101. package/app/wujie-vue2-child/src/views/element/elTableJsx/dialogInput.vue +71 -0
  102. package/app/wujie-vue2-child/src/views/element/elTableJsx/elTableJsx.vue +1826 -0
  103. package/app/wujie-vue2-child/src/views/element/elTableJsx/formTable.vue +595 -0
  104. package/app/wujie-vue2-child/src/views/element/elTableJsx/index.vue +29 -0
  105. package/app/wujie-vue2-child/src/views/element/elTableJsx/simpleTable.vue +189 -0
  106. package/app/wujie-vue2-child/src/views/element/elTableJsx.zip +0 -0
  107. package/app/wujie-vue2-child/src/views/element/index.vue +39 -0
  108. package/app/wujie-vue2-child/src/views/element/quillEditor/README.md +163 -0
  109. package/app/wujie-vue2-child/src/views/element/quillEditor/example.vue +307 -0
  110. package/app/wujie-vue2-child/src/views/element/quillEditor/index.vue +409 -0
  111. package/app/wujie-vue2-child/src/views/element/quillEditor/toolbar.js +122 -0
  112. package/app/wujie-vue2-child/vue.config.js +15 -0
  113. package/package.json +1 -1
  114. package/app/check-import-case.js +0 -344
@@ -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,72 @@
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
+ path: '/calendar',
60
+ name: 'Calendar',
61
+ component: () => import('../views/calendar/index.vue'),
62
+ meta: {
63
+ title: '日程日历'
64
+ }
65
+ },
66
+ ]
67
+
68
+ const router = new VueRouter({
69
+ routes // (缩写) 相当于 routes: routes
70
+ })
71
+
72
+ 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,78 @@
1
+ <script>
2
+ import { FormItem } from "element-ui";
3
+ import Vue from "vue";
4
+ Vue.component("ell-form-item", {
5
+ extends: FormItem,
6
+ async mounted() {
7
+ await this.$nextTick();
8
+ if (!this.$el.children && !this.$el.children.length) return;
9
+ const label = Array.from(this.$el.children).find((item) =>
10
+ item.classList.contains("el-form-item__label")
11
+ );
12
+ if (!label) return;
13
+
14
+ // 如果有noEllipsis属性
15
+ if (this.$attrs.noEllipsis !== undefined) {
16
+ return;
17
+ }
18
+
19
+ // 获取元素的行高
20
+ const lineHeight = parseFloat(getComputedStyle(label).lineHeight);
21
+ // 获取元素的高度
22
+ const scrollHeight = label.scrollHeight;
23
+ // 计算元素的行数
24
+ const lineCount = Math.round(scrollHeight / lineHeight);
25
+ // 如果行数大于2
26
+ if (lineCount > 2) {
27
+ const newLineHeight = scrollHeight / lineCount / 2;
28
+ // 设置元素的行高
29
+ label.style.lineHeight = newLineHeight + "px";
30
+ label.style.overflow = "hidden";
31
+ label.style.textOverflow = "ellipsis";
32
+ label.style.display = "-webkit-box";
33
+ label.style.webkitBoxOrient = "vertical";
34
+ label.style.webkitLineClamp = "2";
35
+ label.title = label.innerText;
36
+ }
37
+ // 如果行数大于1
38
+ if (lineCount > 1) {
39
+ const newLineHeight = scrollHeight / lineCount / 2;
40
+ // 设置元素的行高
41
+ label.style.lineHeight = newLineHeight + "px";
42
+ }
43
+ },
44
+ });
45
+ export default {
46
+ name: "MagicalComponentsForELFormItem",
47
+ };
48
+ </script>
49
+ <template>
50
+ <div>
51
+ <el-form label-width="100px">
52
+ <el-form-item label="活动名称">
53
+ <el-input placeholder="请输入活动名称" />
54
+ </el-form-item>
55
+ <el-form-item label="活动名称活动名称">
56
+ <el-input placeholder="请输入活动名称" />
57
+ </el-form-item>
58
+ <el-form-item label="活动名称活动名称活动名称活动名称">
59
+ <el-input placeholder="请输入活动名称" />
60
+ </el-form-item>
61
+ </el-form>
62
+
63
+ <el-form label-width="100px">
64
+ <ell-form-item label="活动名称">
65
+ <el-input placeholder="请输入活动名称" />
66
+ </ell-form-item>
67
+ <ell-form-item label="活动名称活动名称">
68
+ <el-input placeholder="请输入活动名称" />
69
+ </ell-form-item>
70
+ <ell-form-item label="活动名称活动名称活动名称活动名称">
71
+ <el-input placeholder="请输入活动名称" />
72
+ </ell-form-item>
73
+ <ell-form-item noEllipsis label="活动名称活动名称活动名称活动名称">
74
+ <el-input placeholder="请输入活动名称" />
75
+ </ell-form-item>
76
+ </el-form>
77
+ </div>
78
+ </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>