umy-ui-table 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +111 -0
- package/lib/button.js +1 -0
- package/lib/icon.js +1 -0
- package/lib/index.js +1 -0
- package/lib/locale/format.js +56 -0
- package/lib/locale/index.js +72 -0
- package/lib/locale/lang/en.js +123 -0
- package/lib/locale/lang/zh-CN.js +119 -0
- package/lib/mixins/locale.js +17 -0
- package/lib/theme-chalk/base.css +0 -0
- package/lib/theme-chalk/button.css +1 -0
- package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
- package/lib/theme-chalk/fonts/element-icons.woff +0 -0
- package/lib/theme-chalk/fonts/iconfont.1785562768224.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.1785562768224.woff +0 -0
- package/lib/theme-chalk/fonts/iconfont.1785562768224.woff2 +0 -0
- package/lib/theme-chalk/icon.css +1 -0
- package/lib/theme-chalk/index.css +1 -0
- package/lib/theme-chalk/u-table-column.css +0 -0
- package/lib/theme-chalk/u-table.css +1 -0
- package/lib/theme-chalk/ux-grid.css +1 -0
- package/lib/theme-chalk/ux-table-column.css +0 -0
- package/lib/u-table-column.js +1 -0
- package/lib/u-table.js +1 -0
- package/lib/umd/locale/en.js +139 -0
- package/lib/umd/locale/zh-CN.js +135 -0
- package/lib/umy-ui.common.js +1 -0
- package/lib/utils/svg.js +33 -0
- package/lib/utils/types.js +35 -0
- package/lib/utils/util.js +268 -0
- package/lib/ux-grid.js +1 -0
- package/lib/ux-table-column.js +1 -0
- package/package.json +117 -0
- package/packages/button/index.js +7 -0
- package/packages/button/src/button-group.vue +10 -0
- package/packages/button/src/button.vue +166 -0
- package/packages/checkbox/index.js +8 -0
- package/packages/checkbox/src/checkbox-button.vue +199 -0
- package/packages/checkbox/src/checkbox-group.vue +48 -0
- package/packages/checkbox/src/checkbox.vue +222 -0
- package/packages/checkbox-button/index.js +8 -0
- package/packages/checkbox-group/index.js +8 -0
- package/packages/icon/index.js +7 -0
- package/packages/icon/src/icon.vue +40 -0
- package/packages/input/index.js +2 -0
- package/packages/input/src/calcTextareaHeight.js +104 -0
- package/packages/input/src/input.vue +424 -0
- package/packages/option/index.js +2 -0
- package/packages/pagination/index.js +2 -0
- package/packages/pagination/src/pager.vue +163 -0
- package/packages/pagination/src/pagination.js +386 -0
- package/packages/scrollbar/index.js +8 -0
- package/packages/scrollbar/src/bar.js +92 -0
- package/packages/scrollbar/src/main.js +130 -0
- package/packages/scrollbar/src/util.js +34 -0
- package/packages/select/index.js +2 -0
- package/packages/select/src/navigation-mixin.js +54 -0
- package/packages/select/src/option-group.vue +60 -0
- package/packages/select/src/option.vue +163 -0
- package/packages/select/src/select-dropdown.vue +74 -0
- package/packages/select/src/select.vue +889 -0
- package/packages/table/index.js +8 -0
- package/packages/table/src/config.js +123 -0
- package/packages/table/src/dropdown.js +28 -0
- package/packages/table/src/filter-panel.vue +194 -0
- package/packages/table/src/layout-observer.js +68 -0
- package/packages/table/src/store/current.js +71 -0
- package/packages/table/src/store/expand.js +65 -0
- package/packages/table/src/store/helper.js +37 -0
- package/packages/table/src/store/index.js +145 -0
- package/packages/table/src/store/tree.js +208 -0
- package/packages/table/src/store/watcher.js +448 -0
- package/packages/table/src/table-body.js +493 -0
- package/packages/table/src/table-column.js +381 -0
- package/packages/table/src/table-footer.js +174 -0
- package/packages/table/src/table-header.js +537 -0
- package/packages/table/src/table-layout.js +231 -0
- package/packages/table/src/table.vue +741 -0
- package/packages/table/src/util.js +256 -0
- package/packages/tag/index.js +8 -0
- package/packages/tag/src/tag.vue +58 -0
- package/packages/tools/directives/mousewheel.js +18 -0
- package/packages/tools/directives/repeat-click.js +24 -0
- package/packages/tools/locale/format.js +46 -0
- package/packages/tools/locale/index.js +48 -0
- package/packages/tools/locale/lang/en.js +120 -0
- package/packages/tools/locale/lang/zh-CN.js +116 -0
- package/packages/tools/mixins/emitter.js +33 -0
- package/packages/tools/mixins/focus.js +9 -0
- package/packages/tools/mixins/locale.js +9 -0
- package/packages/tools/mixins/migrating.js +54 -0
- package/packages/tools/transitions/collapse-transition.js +77 -0
- package/packages/tools/utils/after-leave.js +27 -0
- package/packages/tools/utils/aria-dialog.js +90 -0
- package/packages/tools/utils/aria-utils.js +122 -0
- package/packages/tools/utils/clickoutside.js +76 -0
- package/packages/tools/utils/date-util.js +292 -0
- package/packages/tools/utils/date.js +368 -0
- package/packages/tools/utils/dom.js +227 -0
- package/packages/tools/utils/menu/aria-menubar.js +14 -0
- package/packages/tools/utils/menu/aria-menuitem.js +49 -0
- package/packages/tools/utils/menu/aria-submenu.js +59 -0
- package/packages/tools/utils/merge.js +15 -0
- package/packages/tools/utils/popper.js +1276 -0
- package/packages/tools/utils/popup/index.js +218 -0
- package/packages/tools/utils/popup/popup-manager.js +194 -0
- package/packages/tools/utils/resize-event.js +35 -0
- package/packages/tools/utils/scroll-into-view.js +27 -0
- package/packages/tools/utils/scrollbar-width.js +29 -0
- package/packages/tools/utils/shared.js +7 -0
- package/packages/tools/utils/svg.js +1 -0
- package/packages/tools/utils/types.js +28 -0
- package/packages/tools/utils/util.js +241 -0
- package/packages/tools/utils/vdom.js +5 -0
- package/packages/tools/utils/vue-popper.js +198 -0
- package/packages/tooltip/index.js +8 -0
- package/packages/tooltip/src/main.js +241 -0
- package/packages/u-table/index.js +4 -0
- package/packages/u-table/revise-el-table-mixins/index.js +10 -0
- package/packages/u-table/revise-el-table-mixins/table-extend.js +60 -0
- package/packages/u-table/revise-el-table-mixins/table.mixins.js +261 -0
- package/packages/u-table/revise-el-table-mixins/virtual-table-body-render.js +132 -0
- package/packages/u-table/src/u-table.vue +248 -0
- package/packages/u-table/u-table-mixins/index.js +483 -0
- package/packages/u-table/u-table-tree-mixins/methods.js +120 -0
- package/packages/u-table/u-table-tree-mixins/u-table-tree-mixins.js +161 -0
- package/packages/u-table-column/index.js +8 -0
- package/packages/utils/common.js +27 -0
- package/packages/ux-grid/index.js +6 -0
- package/packages/ux-grid/mixins/index.js +707 -0
- package/packages/ux-grid/src/interceptor.js +6 -0
- package/packages/ux-grid/src/ux-grid.vue +301 -0
- package/packages/ux-table-column/index.js +10 -0
- package/tools/locale/format.js +46 -0
- package/tools/locale/index.js +54 -0
- package/tools/locale/lang/en.js +120 -0
- package/tools/locale/lang/zh-CN.js +116 -0
- package/tools/mixins/locale.js +9 -0
- package/tools/utils/svg.js +1 -0
- package/tools/utils/types.js +28 -0
- package/tools/utils/util.js +241 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/* istanbul ignore next */
|
|
2
|
+
|
|
3
|
+
import Vue from 'vue';
|
|
4
|
+
|
|
5
|
+
const isServer = Vue.prototype.$isServer;
|
|
6
|
+
const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
|
7
|
+
const MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
|
8
|
+
const ieVersion = isServer ? 0 : Number(document.documentMode);
|
|
9
|
+
|
|
10
|
+
/* istanbul ignore next */
|
|
11
|
+
const trim = function(string) {
|
|
12
|
+
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
|
13
|
+
};
|
|
14
|
+
/* istanbul ignore next */
|
|
15
|
+
const camelCase = function(name) {
|
|
16
|
+
return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
|
|
17
|
+
return offset ? letter.toUpperCase() : letter;
|
|
18
|
+
}).replace(MOZ_HACK_REGEXP, 'Moz$1');
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/* istanbul ignore next */
|
|
22
|
+
export const on = (function() {
|
|
23
|
+
if (!isServer && document.addEventListener) {
|
|
24
|
+
return function(element, event, handler) {
|
|
25
|
+
if (element && event && handler) {
|
|
26
|
+
element.addEventListener(event, handler, false);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
} else {
|
|
30
|
+
return function(element, event, handler) {
|
|
31
|
+
if (element && event && handler) {
|
|
32
|
+
element.attachEvent('on' + event, handler);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
37
|
+
|
|
38
|
+
/* istanbul ignore next */
|
|
39
|
+
export const off = (function() {
|
|
40
|
+
if (!isServer && document.removeEventListener) {
|
|
41
|
+
return function(element, event, handler) {
|
|
42
|
+
if (element && event) {
|
|
43
|
+
element.removeEventListener(event, handler, false);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
} else {
|
|
47
|
+
return function(element, event, handler) {
|
|
48
|
+
if (element && event) {
|
|
49
|
+
element.detachEvent('on' + event, handler);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
})();
|
|
54
|
+
|
|
55
|
+
/* istanbul ignore next */
|
|
56
|
+
export const once = function(el, event, fn) {
|
|
57
|
+
var listener = function() {
|
|
58
|
+
if (fn) {
|
|
59
|
+
fn.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
off(el, event, listener);
|
|
62
|
+
};
|
|
63
|
+
on(el, event, listener);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/* istanbul ignore next */
|
|
67
|
+
export function hasClass(el, cls) {
|
|
68
|
+
if (!el || !cls) return false;
|
|
69
|
+
if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
|
|
70
|
+
if (el.classList) {
|
|
71
|
+
return el.classList.contains(cls);
|
|
72
|
+
} else {
|
|
73
|
+
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/* istanbul ignore next */
|
|
78
|
+
export function addClass(el, cls) {
|
|
79
|
+
if (!el) return;
|
|
80
|
+
var curClass = el.className;
|
|
81
|
+
var classes = (cls || '').split(' ');
|
|
82
|
+
|
|
83
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
|
84
|
+
var clsName = classes[i];
|
|
85
|
+
if (!clsName) continue;
|
|
86
|
+
|
|
87
|
+
if (el.classList) {
|
|
88
|
+
el.classList.add(clsName);
|
|
89
|
+
} else if (!hasClass(el, clsName)) {
|
|
90
|
+
curClass += ' ' + clsName;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (!el.classList) {
|
|
94
|
+
el.className = curClass;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/* istanbul ignore next */
|
|
99
|
+
export function removeClass(el, cls) {
|
|
100
|
+
if (!el || !cls) return;
|
|
101
|
+
var classes = cls.split(' ');
|
|
102
|
+
var curClass = ' ' + el.className + ' ';
|
|
103
|
+
|
|
104
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
|
105
|
+
var clsName = classes[i];
|
|
106
|
+
if (!clsName) continue;
|
|
107
|
+
|
|
108
|
+
if (el.classList) {
|
|
109
|
+
el.classList.remove(clsName);
|
|
110
|
+
} else if (hasClass(el, clsName)) {
|
|
111
|
+
curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (!el.classList) {
|
|
115
|
+
el.className = trim(curClass);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/* istanbul ignore next */
|
|
120
|
+
export const getStyle = ieVersion < 9 ? function(element, styleName) {
|
|
121
|
+
if (isServer) return;
|
|
122
|
+
if (!element || !styleName) return null;
|
|
123
|
+
styleName = camelCase(styleName);
|
|
124
|
+
if (styleName === 'float') {
|
|
125
|
+
styleName = 'styleFloat';
|
|
126
|
+
}
|
|
127
|
+
try {
|
|
128
|
+
switch (styleName) {
|
|
129
|
+
case 'opacity':
|
|
130
|
+
try {
|
|
131
|
+
return element.filters.item('alpha').opacity / 100;
|
|
132
|
+
} catch (e) {
|
|
133
|
+
return 1.0;
|
|
134
|
+
}
|
|
135
|
+
default:
|
|
136
|
+
return (element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null);
|
|
137
|
+
}
|
|
138
|
+
} catch (e) {
|
|
139
|
+
return element.style[styleName];
|
|
140
|
+
}
|
|
141
|
+
} : function(element, styleName) {
|
|
142
|
+
if (isServer) return;
|
|
143
|
+
if (!element || !styleName) return null;
|
|
144
|
+
styleName = camelCase(styleName);
|
|
145
|
+
if (styleName === 'float') {
|
|
146
|
+
styleName = 'cssFloat';
|
|
147
|
+
}
|
|
148
|
+
try {
|
|
149
|
+
var computed = document.defaultView.getComputedStyle(element, '');
|
|
150
|
+
return element.style[styleName] || computed ? computed[styleName] : null;
|
|
151
|
+
} catch (e) {
|
|
152
|
+
return element.style[styleName];
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/* istanbul ignore next */
|
|
157
|
+
export function setStyle(element, styleName, value) {
|
|
158
|
+
if (!element || !styleName) return;
|
|
159
|
+
|
|
160
|
+
if (typeof styleName === 'object') {
|
|
161
|
+
for (var prop in styleName) {
|
|
162
|
+
if (styleName.hasOwnProperty(prop)) {
|
|
163
|
+
setStyle(element, prop, styleName[prop]);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
styleName = camelCase(styleName);
|
|
168
|
+
if (styleName === 'opacity' && ieVersion < 9) {
|
|
169
|
+
element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
|
|
170
|
+
} else {
|
|
171
|
+
element.style[styleName] = value;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const isScroll = (el, vertical) => {
|
|
177
|
+
if (isServer) return;
|
|
178
|
+
|
|
179
|
+
const determinedDirection = vertical !== null || vertical !== undefined;
|
|
180
|
+
const overflow = determinedDirection
|
|
181
|
+
? vertical
|
|
182
|
+
? getStyle(el, 'overflow-y')
|
|
183
|
+
: getStyle(el, 'overflow-x')
|
|
184
|
+
: getStyle(el, 'overflow');
|
|
185
|
+
|
|
186
|
+
return overflow.match(/(scroll|auto)/);
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export const getScrollContainer = (el, vertical) => {
|
|
190
|
+
if (isServer) return;
|
|
191
|
+
|
|
192
|
+
let parent = el;
|
|
193
|
+
while (parent) {
|
|
194
|
+
if ([window, document, document.documentElement].includes(parent)) {
|
|
195
|
+
return window;
|
|
196
|
+
}
|
|
197
|
+
if (isScroll(parent, vertical)) {
|
|
198
|
+
return parent;
|
|
199
|
+
}
|
|
200
|
+
parent = parent.parentNode;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return parent;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export const isInContainer = (el, container) => {
|
|
207
|
+
if (isServer || !el || !container) return false;
|
|
208
|
+
|
|
209
|
+
const elRect = el.getBoundingClientRect();
|
|
210
|
+
let containerRect;
|
|
211
|
+
|
|
212
|
+
if ([window, document, document.documentElement, null, undefined].includes(container)) {
|
|
213
|
+
containerRect = {
|
|
214
|
+
top: 0,
|
|
215
|
+
right: window.innerWidth,
|
|
216
|
+
bottom: window.innerHeight,
|
|
217
|
+
left: 0
|
|
218
|
+
};
|
|
219
|
+
} else {
|
|
220
|
+
containerRect = container.getBoundingClientRect();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return elRect.top < containerRect.bottom &&
|
|
224
|
+
elRect.bottom > containerRect.top &&
|
|
225
|
+
elRect.right > containerRect.left &&
|
|
226
|
+
elRect.left < containerRect.right;
|
|
227
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import MenuItem from './aria-menuitem';
|
|
2
|
+
|
|
3
|
+
const Menu = function(domNode) {
|
|
4
|
+
this.domNode = domNode;
|
|
5
|
+
this.init();
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
Menu.prototype.init = function() {
|
|
9
|
+
let menuChildren = this.domNode.childNodes;
|
|
10
|
+
[].filter.call(menuChildren, child => child.nodeType === 1).forEach(child => {
|
|
11
|
+
new MenuItem(child); // eslint-disable-line
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
export default Menu;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import Utils from '../aria-utils';
|
|
2
|
+
import SubMenu from './aria-submenu';
|
|
3
|
+
|
|
4
|
+
const MenuItem = function(domNode) {
|
|
5
|
+
this.domNode = domNode;
|
|
6
|
+
this.submenu = null;
|
|
7
|
+
this.init();
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
MenuItem.prototype.init = function() {
|
|
11
|
+
this.domNode.setAttribute('tabindex', '0');
|
|
12
|
+
let menuChild = this.domNode.querySelector('.el-menu');
|
|
13
|
+
if (menuChild) {
|
|
14
|
+
this.submenu = new SubMenu(this, menuChild);
|
|
15
|
+
}
|
|
16
|
+
this.addListeners();
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
MenuItem.prototype.addListeners = function() {
|
|
20
|
+
const keys = Utils.keys;
|
|
21
|
+
this.domNode.addEventListener('keydown', event => {
|
|
22
|
+
let prevDef = false;
|
|
23
|
+
switch (event.keyCode) {
|
|
24
|
+
case keys.down:
|
|
25
|
+
Utils.triggerEvent(event.currentTarget, 'mouseenter');
|
|
26
|
+
this.submenu && this.submenu.gotoSubIndex(0);
|
|
27
|
+
prevDef = true;
|
|
28
|
+
break;
|
|
29
|
+
case keys.up:
|
|
30
|
+
Utils.triggerEvent(event.currentTarget, 'mouseenter');
|
|
31
|
+
this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1);
|
|
32
|
+
prevDef = true;
|
|
33
|
+
break;
|
|
34
|
+
case keys.tab:
|
|
35
|
+
Utils.triggerEvent(event.currentTarget, 'mouseleave');
|
|
36
|
+
break;
|
|
37
|
+
case keys.enter:
|
|
38
|
+
case keys.space:
|
|
39
|
+
prevDef = true;
|
|
40
|
+
event.currentTarget.click();
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
if (prevDef) {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default MenuItem;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Utils from '../aria-utils';
|
|
2
|
+
|
|
3
|
+
const SubMenu = function(parent, domNode) {
|
|
4
|
+
this.domNode = domNode;
|
|
5
|
+
this.parent = parent;
|
|
6
|
+
this.subMenuItems = [];
|
|
7
|
+
this.subIndex = 0;
|
|
8
|
+
this.init();
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
SubMenu.prototype.init = function() {
|
|
12
|
+
this.subMenuItems = this.domNode.querySelectorAll('li');
|
|
13
|
+
this.addListeners();
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
SubMenu.prototype.gotoSubIndex = function(idx) {
|
|
17
|
+
if (idx === this.subMenuItems.length) {
|
|
18
|
+
idx = 0;
|
|
19
|
+
} else if (idx < 0) {
|
|
20
|
+
idx = this.subMenuItems.length - 1;
|
|
21
|
+
}
|
|
22
|
+
this.subMenuItems[idx].focus();
|
|
23
|
+
this.subIndex = idx;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
SubMenu.prototype.addListeners = function() {
|
|
27
|
+
const keys = Utils.keys;
|
|
28
|
+
const parentNode = this.parent.domNode;
|
|
29
|
+
Array.prototype.forEach.call(this.subMenuItems, el => {
|
|
30
|
+
el.addEventListener('keydown', event => {
|
|
31
|
+
let prevDef = false;
|
|
32
|
+
switch (event.keyCode) {
|
|
33
|
+
case keys.down:
|
|
34
|
+
this.gotoSubIndex(this.subIndex + 1);
|
|
35
|
+
prevDef = true;
|
|
36
|
+
break;
|
|
37
|
+
case keys.up:
|
|
38
|
+
this.gotoSubIndex(this.subIndex - 1);
|
|
39
|
+
prevDef = true;
|
|
40
|
+
break;
|
|
41
|
+
case keys.tab:
|
|
42
|
+
Utils.triggerEvent(parentNode, 'mouseleave');
|
|
43
|
+
break;
|
|
44
|
+
case keys.enter:
|
|
45
|
+
case keys.space:
|
|
46
|
+
prevDef = true;
|
|
47
|
+
event.currentTarget.click();
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
if (prevDef) {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default SubMenu;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function(target) {
|
|
2
|
+
for (let i = 1, j = arguments.length; i < j; i++) {
|
|
3
|
+
let source = arguments[i] || {};
|
|
4
|
+
for (let prop in source) {
|
|
5
|
+
if (source.hasOwnProperty(prop)) {
|
|
6
|
+
let value = source[prop];
|
|
7
|
+
if (value !== undefined) {
|
|
8
|
+
target[prop] = value;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return target;
|
|
15
|
+
};
|