@mdsfe/mds-ui 0.2.0 → 0.2.8
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/README.md +9 -9
- package/dist/_mixin/popper.js +1 -0
- package/dist/_util/_popper/dom-helper.js +284 -0
- package/dist/_util/_popper/popper-mixin.js +35 -0
- package/dist/_util/_popper/popper.js +1267 -0
- package/dist/_util/_popper/popup/popup-main.js +224 -0
- package/dist/_util/_popper/popup/popup-manager.js +205 -0
- package/dist/_util/_popper/vue-popper.js +204 -0
- package/dist/_util/popup/index.js +1 -1
- package/dist/_util/tree/node.js +2 -0
- package/dist/_util/tree/tree.js +65 -21
- package/dist/_util/util.js +29 -1
- package/dist/affix.js +18 -18
- package/dist/anchor.js +18 -18
- package/dist/avatar.js +17 -17
- package/dist/backtop.js +19 -19
- package/dist/badge.js +21 -21
- package/dist/bordershadow.js +20 -9
- package/dist/breadcrumb.js +18 -18
- package/dist/button.js +21 -21
- package/dist/card.js +18 -18
- package/dist/carousel.js +76 -76
- package/dist/cascader.js +4976 -0
- package/dist/cascaderpanel.js +645 -603
- package/dist/checkbox.js +23 -23
- package/dist/col.js +14 -14
- package/dist/collapse.js +6 -6
- package/dist/color.js +6 -6
- package/dist/datepicker.js +2487 -266
- package/dist/divider.js +19 -19
- package/dist/drawer.js +787 -37
- package/dist/dropdown.js +150 -104
- package/dist/empty.js +19 -19
- package/dist/font/iconfont.28359fa.ttf +0 -0
- package/dist/font/iconfont.486e3d3.woff2 +0 -0
- package/dist/font/iconfont.675049e.woff +0 -0
- package/dist/font.js +6 -6
- package/dist/form.js +28 -26
- package/dist/icon.js +55 -47
- package/dist/index.js +1 -1
- package/dist/input.js +58 -48
- package/dist/inputnumber.js +59 -39
- package/dist/layout.js +25 -25
- package/dist/list.js +17 -17
- package/dist/loading.js +21 -8
- package/dist/mds-ui.min.css +3 -3
- package/dist/mds-ui.min.js +19176 -15406
- package/dist/menu.js +31 -31
- package/dist/message.js +773 -24
- package/dist/modal.js +1146 -307
- package/dist/notification.js +27 -27
- package/dist/pagination.js +78 -55
- package/dist/popconfirm.js +36 -36
- package/dist/popover.js +2778 -48
- package/dist/progress.js +107 -65
- package/dist/radio.js +56 -54
- package/dist/rate.js +67 -59
- package/dist/row.js +14 -14
- package/dist/select.js +847 -503
- package/dist/slider.js +25 -25
- package/dist/slottable.js +2663 -129
- package/dist/steps.js +18 -18
- package/dist/style/affix.css +224 -2
- package/dist/style/anchor.css +224 -2
- package/dist/style/avatar.css +224 -2
- package/dist/style/badge.css +224 -2
- package/dist/style/bordershadow.css +236 -59
- package/dist/style/breadcrumb.css +224 -2
- package/dist/style/button.css +234 -5
- package/dist/style/card.css +224 -2
- package/dist/style/carousel.css +224 -2
- package/dist/style/cascader.css +214 -0
- package/dist/style/cascaderpanel.css +13 -16
- package/dist/style/checkbox.css +230 -8
- package/dist/style/col.css +225 -3
- package/dist/style/collapse.css +224 -2
- package/dist/style/color.css +224 -2
- package/dist/style/datepicker.css +236 -2
- package/dist/style/divider.css +227 -2
- package/dist/style/drawer.css +224 -2
- package/dist/style/dropdown.css +234 -5
- package/dist/style/empty.css +224 -2
- package/dist/style/font.css +226 -4
- package/dist/style/form.css +224 -2
- package/dist/style/icon.css +226 -3
- package/dist/style/input.css +231 -5
- package/dist/style/inputnumber.css +224 -2
- package/dist/style/layout.css +224 -2
- package/dist/style/list.css +224 -2
- package/dist/style/loading.css +2527 -2
- package/dist/style/menu.css +340 -129
- package/dist/style/message.css +1 -4
- package/dist/style/modal.css +247 -25
- package/dist/style/notification.css +224 -2
- package/dist/style/pagination.css +236 -7
- package/dist/style/popconfirm.css +334 -180
- package/dist/style/popover.css +324 -177
- package/dist/style/progress.css +226 -3
- package/dist/style/radio.css +225 -3
- package/dist/style/rate.css +226 -3
- package/dist/style/row.css +225 -3
- package/dist/style/select.css +240 -12
- package/dist/style/slider.css +224 -2
- package/dist/style/slottable.css +350 -149
- package/dist/style/steps.css +224 -2
- package/dist/style/switch.css +224 -2
- package/dist/style/table.css +458 -314
- package/dist/style/tabs.css +225 -18
- package/dist/style/tag.css +224 -2
- package/dist/style/text.css +224 -2
- package/dist/style/timeline.css +224 -2
- package/dist/style/timepicker.css +231 -6
- package/dist/style/tooltip.css +340 -129
- package/dist/style/tree.css +228 -6
- package/dist/style/typography.css +224 -2
- package/dist/style/upload.css +224 -2
- package/dist/switch.js +20 -20
- package/dist/table.js +3071 -201
- package/dist/tabs.js +24 -22
- package/dist/tag.js +17 -23
- package/dist/text.js +38 -22
- package/dist/timeline.js +14 -14
- package/dist/timepicker.js +3063 -172
- package/dist/tooltip.js +2550 -27
- package/dist/transfer.js +28 -28
- package/dist/transition.js +6 -6
- package/dist/tree.js +316 -171
- package/dist/typography.js +6 -6
- package/dist/upload.js +46 -38
- package/package.json +9 -5
- package/CHANGELOG.md +0 -778
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
#### npm 安装
|
|
35
35
|
> 推荐使用npm的方式安装,能更好的和`webpack`等打包工具配合使用
|
|
36
36
|
``` bash
|
|
37
|
-
npm install @
|
|
37
|
+
npm install @mdsfe/mds-ui -S
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
#### CDN 引用
|
|
@@ -42,14 +42,14 @@ npm install @bic-fe/mds-ui -S
|
|
|
42
42
|
|
|
43
43
|
```
|
|
44
44
|
<!-- 引入样式 -->
|
|
45
|
-
<link rel="stylesheet" href="https://unpkg.com/@
|
|
45
|
+
<link rel="stylesheet" href="https://unpkg.com/@mdsfe/mds-ui/dist/mds-ui.min.css">
|
|
46
46
|
<!-- 引入组件库 -->
|
|
47
|
-
<script src="https://unpkg.com/@
|
|
47
|
+
<script src="https://unpkg.com/@mdsfe/mds-ui/dist/mds-ui.min.js"></script>
|
|
48
48
|
|
|
49
49
|
```
|
|
50
50
|
`注意`:使用`CDN`引入`mds-ui`组件库需要在链接地址上锁定版本,避免组件库升级的时候带来兼容性的影响。锁定版本的方法为在连接后面增加版本号
|
|
51
51
|
|
|
52
|
-
目前可以通过 [unpkg.com/mds-ui](https://unpkg.com/browse/@
|
|
52
|
+
目前可以通过 [unpkg.com/mds-ui](https://unpkg.com/browse/@mdsfe/mds-ui/) 获取到最新版本的资源,支持在页面上引入Js和Css文件既可以开始使用
|
|
53
53
|
|
|
54
54
|
## Quick Start
|
|
55
55
|
|
|
@@ -57,8 +57,8 @@ npm install @bic-fe/mds-ui -S
|
|
|
57
57
|
|
|
58
58
|
```
|
|
59
59
|
import Vue from 'vue'; // 引入Vue
|
|
60
|
-
import '@
|
|
61
|
-
import MdsUi from '@
|
|
60
|
+
import '@mdsfe/mds-ui/dist/mds-ui.min.css'; // 引入组件的样式
|
|
61
|
+
import MdsUi from '@mdsfe/mds-ui'; // 引入组件
|
|
62
62
|
|
|
63
63
|
Vue.use(MdsUi); // 使用组件
|
|
64
64
|
|
|
@@ -71,14 +71,14 @@ Vue.use(MdsUi); // 使用组件
|
|
|
71
71
|
可以通过下面的写法来按需加载组件
|
|
72
72
|
|
|
73
73
|
```
|
|
74
|
-
import Button from '@
|
|
74
|
+
import Button from '@mdsfe/mds-ui/dist/button';
|
|
75
75
|
```
|
|
76
76
|
方法二:
|
|
77
77
|
|
|
78
78
|
也可以使用 babel-plugin-import 来进行按需加载
|
|
79
79
|
|
|
80
80
|
```
|
|
81
|
-
import { Button } from '@
|
|
81
|
+
import { Button } from '@mdsfe/mds-ui';
|
|
82
82
|
```
|
|
83
83
|
`.babelrc`修改
|
|
84
84
|
|
|
@@ -87,7 +87,7 @@ import { Button } from '@bic-fe/mds-ui';
|
|
|
87
87
|
"plugins": [
|
|
88
88
|
[
|
|
89
89
|
"import", {
|
|
90
|
-
"libraryName": "@
|
|
90
|
+
"libraryName": "@mdsfe/mds-ui",
|
|
91
91
|
"libraryDirectory": "dist",
|
|
92
92
|
"styleLibraryDirectory": "dist/style",
|
|
93
93
|
"style":true
|
package/dist/_mixin/popper.js
CHANGED
|
@@ -140,6 +140,7 @@ exports.default = {
|
|
|
140
140
|
this.popperJS.update();
|
|
141
141
|
} else {
|
|
142
142
|
this.createPopper();
|
|
143
|
+
this.reference && this.reference.__vue__ && this.reference.__vue__.initWidth && this.reference.__vue__.initWidth();
|
|
143
144
|
}
|
|
144
145
|
},
|
|
145
146
|
doDestroy: function doDestroy() {
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.isInContainer = exports.getScrollContainer = exports.isScroll = exports.getStyle = exports.once = exports.off = exports.on = undefined;
|
|
5
|
+
|
|
6
|
+
var _typeof2 = require('babel-runtime/helpers/typeof');
|
|
7
|
+
|
|
8
|
+
var _typeof3 = _interopRequireDefault(_typeof2);
|
|
9
|
+
|
|
10
|
+
exports.hasClass = hasClass;
|
|
11
|
+
exports.addClass = addClass;
|
|
12
|
+
exports.removeClass = removeClass;
|
|
13
|
+
exports.setStyle = setStyle;
|
|
14
|
+
exports.merge = merge;
|
|
15
|
+
exports.getScrollBarWidth = getScrollBarWidth;
|
|
16
|
+
|
|
17
|
+
var _vue = require('vue');
|
|
18
|
+
|
|
19
|
+
var _vue2 = _interopRequireDefault(_vue);
|
|
20
|
+
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
|
|
23
|
+
/* eslint-disable */
|
|
24
|
+
var isServer = _vue2.default.prototype.$isServer;
|
|
25
|
+
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
|
26
|
+
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
|
27
|
+
var ieVersion = isServer ? 0 : Number(document.documentMode);
|
|
28
|
+
|
|
29
|
+
/* istanbul ignore next */
|
|
30
|
+
var trim = function trim(string) {
|
|
31
|
+
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
|
32
|
+
};
|
|
33
|
+
/* istanbul ignore next */
|
|
34
|
+
var camelCase = function camelCase(name) {
|
|
35
|
+
return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
|
|
36
|
+
return offset ? letter.toUpperCase() : letter;
|
|
37
|
+
}).replace(MOZ_HACK_REGEXP, 'Moz$1');
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/* istanbul ignore next */
|
|
41
|
+
var on = exports.on = function () {
|
|
42
|
+
if (!isServer && document.addEventListener) {
|
|
43
|
+
return function (element, event, handler) {
|
|
44
|
+
if (element && event && handler) {
|
|
45
|
+
element.addEventListener(event, handler, false);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
} else {
|
|
49
|
+
return function (element, event, handler) {
|
|
50
|
+
if (element && event && handler) {
|
|
51
|
+
element.attachEvent('on' + event, handler);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}();
|
|
56
|
+
|
|
57
|
+
/* istanbul ignore next */
|
|
58
|
+
var off = exports.off = function () {
|
|
59
|
+
if (!isServer && document.removeEventListener) {
|
|
60
|
+
return function (element, event, handler) {
|
|
61
|
+
if (element && event) {
|
|
62
|
+
element.removeEventListener(event, handler, false);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
} else {
|
|
66
|
+
return function (element, event, handler) {
|
|
67
|
+
if (element && event) {
|
|
68
|
+
element.detachEvent('on' + event, handler);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}();
|
|
73
|
+
|
|
74
|
+
/* istanbul ignore next */
|
|
75
|
+
var once = exports.once = function once(el, event, fn) {
|
|
76
|
+
var listener = function listener() {
|
|
77
|
+
if (fn) {
|
|
78
|
+
fn.apply(this, arguments);
|
|
79
|
+
}
|
|
80
|
+
off(el, event, listener);
|
|
81
|
+
};
|
|
82
|
+
on(el, event, listener);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/* istanbul ignore next */
|
|
86
|
+
function hasClass(el, cls) {
|
|
87
|
+
if (!el || !cls) return false;
|
|
88
|
+
if (cls.indexOf(' ') !== -1) {
|
|
89
|
+
throw new Error('className should not contain space.');
|
|
90
|
+
}
|
|
91
|
+
if (el.classList) {
|
|
92
|
+
return el.classList.contains(cls);
|
|
93
|
+
} else {
|
|
94
|
+
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* istanbul ignore next */
|
|
99
|
+
function addClass(el, cls) {
|
|
100
|
+
if (!el) return;
|
|
101
|
+
var curClass = el.className;
|
|
102
|
+
var classes = (cls || '').split(' ');
|
|
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.add(clsName);
|
|
110
|
+
} else if (!hasClass(el, clsName)) {
|
|
111
|
+
curClass += ' ' + clsName;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (!el.classList) {
|
|
115
|
+
el.setAttribute('class', curClass);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* istanbul ignore next */
|
|
120
|
+
function removeClass(el, cls) {
|
|
121
|
+
if (!el || !cls) return;
|
|
122
|
+
var classes = cls.split(' ');
|
|
123
|
+
var curClass = ' ' + el.className + ' ';
|
|
124
|
+
|
|
125
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
|
126
|
+
var clsName = classes[i];
|
|
127
|
+
if (!clsName) continue;
|
|
128
|
+
|
|
129
|
+
if (el.classList) {
|
|
130
|
+
el.classList.remove(clsName);
|
|
131
|
+
} else if (hasClass(el, clsName)) {
|
|
132
|
+
curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (!el.classList) {
|
|
136
|
+
el.setAttribute('class', trim(curClass));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* istanbul ignore next */
|
|
141
|
+
var getStyle = exports.getStyle = ieVersion < 9 ? function (element, styleName) {
|
|
142
|
+
if (isServer) return;
|
|
143
|
+
if (!element || !styleName) return null;
|
|
144
|
+
styleName = camelCase(styleName);
|
|
145
|
+
if (styleName === 'float') {
|
|
146
|
+
styleName = 'styleFloat';
|
|
147
|
+
}
|
|
148
|
+
try {
|
|
149
|
+
switch (styleName) {
|
|
150
|
+
case 'opacity':
|
|
151
|
+
try {
|
|
152
|
+
return element.filters.item('alpha').opacity / 100;
|
|
153
|
+
} catch (e) {
|
|
154
|
+
return 1.0;
|
|
155
|
+
}
|
|
156
|
+
default:
|
|
157
|
+
return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
|
|
158
|
+
}
|
|
159
|
+
} catch (e) {
|
|
160
|
+
return element.style[styleName];
|
|
161
|
+
}
|
|
162
|
+
} : function (element, styleName) {
|
|
163
|
+
if (isServer) return;
|
|
164
|
+
if (!element || !styleName) return null;
|
|
165
|
+
styleName = camelCase(styleName);
|
|
166
|
+
if (styleName === 'float') {
|
|
167
|
+
styleName = 'cssFloat';
|
|
168
|
+
}
|
|
169
|
+
try {
|
|
170
|
+
var computed = document.defaultView.getComputedStyle(element, '');
|
|
171
|
+
return element.style[styleName] || computed ? computed[styleName] : null;
|
|
172
|
+
} catch (e) {
|
|
173
|
+
return element.style[styleName];
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
/* istanbul ignore next */
|
|
178
|
+
function setStyle(element, styleName, value) {
|
|
179
|
+
if (!element || !styleName) return;
|
|
180
|
+
|
|
181
|
+
if ((typeof styleName === 'undefined' ? 'undefined' : (0, _typeof3.default)(styleName)) === 'object') {
|
|
182
|
+
for (var prop in styleName) {
|
|
183
|
+
if (styleName.hasOwnProperty(prop)) {
|
|
184
|
+
setStyle(element, prop, styleName[prop]);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
styleName = camelCase(styleName);
|
|
189
|
+
if (styleName === 'opacity' && ieVersion < 9) {
|
|
190
|
+
element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
|
|
191
|
+
} else {
|
|
192
|
+
element.style[styleName] = value;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
var isScroll = exports.isScroll = function isScroll(el, vertical) {
|
|
198
|
+
if (isServer) return;
|
|
199
|
+
|
|
200
|
+
var determinedDirection = vertical !== null && vertical !== undefined;
|
|
201
|
+
var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
|
|
202
|
+
|
|
203
|
+
return overflow.match(/(scroll|auto|overlay)/);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
var getScrollContainer = exports.getScrollContainer = function getScrollContainer(el, vertical) {
|
|
207
|
+
if (isServer) return;
|
|
208
|
+
|
|
209
|
+
var parent = el;
|
|
210
|
+
while (parent) {
|
|
211
|
+
if ([window, document, document.documentElement].includes(parent)) {
|
|
212
|
+
return window;
|
|
213
|
+
}
|
|
214
|
+
if (isScroll(parent, vertical)) {
|
|
215
|
+
return parent;
|
|
216
|
+
}
|
|
217
|
+
parent = parent.parentNode;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
return parent;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
var isInContainer = exports.isInContainer = function isInContainer(el, container) {
|
|
224
|
+
if (isServer || !el || !container) return false;
|
|
225
|
+
|
|
226
|
+
var elRect = el.getBoundingClientRect();
|
|
227
|
+
var containerRect = void 0;
|
|
228
|
+
|
|
229
|
+
if ([window, document, document.documentElement, null, undefined].includes(container)) {
|
|
230
|
+
containerRect = {
|
|
231
|
+
top: 0,
|
|
232
|
+
right: window.innerWidth,
|
|
233
|
+
bottom: window.innerHeight,
|
|
234
|
+
left: 0
|
|
235
|
+
};
|
|
236
|
+
} else {
|
|
237
|
+
containerRect = container.getBoundingClientRect();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
function merge(target) {
|
|
244
|
+
for (var i = 1, j = arguments.length; i < j; i++) {
|
|
245
|
+
var source = arguments[i] || {};
|
|
246
|
+
for (var prop in source) {
|
|
247
|
+
if (source.hasOwnProperty(prop)) {
|
|
248
|
+
var value = source[prop];
|
|
249
|
+
if (value !== undefined) {
|
|
250
|
+
target[prop] = value;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return target;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
var scrollBarWidth = void 0;
|
|
260
|
+
function getScrollBarWidth() {
|
|
261
|
+
if (_vue2.default.prototype.$isServer) return 0;
|
|
262
|
+
if (scrollBarWidth !== undefined) return scrollBarWidth;
|
|
263
|
+
|
|
264
|
+
var outer = document.createElement('div');
|
|
265
|
+
outer.className = 'el-scrollbar__wrap';
|
|
266
|
+
outer.style.visibility = 'hidden';
|
|
267
|
+
outer.style.width = '100px';
|
|
268
|
+
outer.style.position = 'absolute';
|
|
269
|
+
outer.style.top = '-9999px';
|
|
270
|
+
document.body.appendChild(outer);
|
|
271
|
+
|
|
272
|
+
var widthNoScroll = outer.offsetWidth;
|
|
273
|
+
outer.style.overflow = 'scroll';
|
|
274
|
+
|
|
275
|
+
var inner = document.createElement('div');
|
|
276
|
+
inner.style.width = '100%';
|
|
277
|
+
outer.appendChild(inner);
|
|
278
|
+
|
|
279
|
+
var widthWithScroll = inner.offsetWidth;
|
|
280
|
+
outer.parentNode.removeChild(outer);
|
|
281
|
+
scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
282
|
+
|
|
283
|
+
return scrollBarWidth;
|
|
284
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _transition = require('mds-ui/dist/transition');
|
|
6
|
+
|
|
7
|
+
var _transition2 = _interopRequireDefault(_transition);
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
var placementMap = {
|
|
12
|
+
top: 'top',
|
|
13
|
+
left: 'left',
|
|
14
|
+
right: 'right',
|
|
15
|
+
bottom: 'bottom',
|
|
16
|
+
topLeft: 'top-start',
|
|
17
|
+
topRight: 'top-end',
|
|
18
|
+
bottomLeft: 'bottom-start',
|
|
19
|
+
bottomRight: 'bottom-end',
|
|
20
|
+
leftTop: 'left-start',
|
|
21
|
+
leftBottom: 'left-end',
|
|
22
|
+
rightTop: 'right-start',
|
|
23
|
+
rightBottom: 'right-end'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.default = {
|
|
27
|
+
components: {
|
|
28
|
+
mdsTransition: _transition2.default
|
|
29
|
+
},
|
|
30
|
+
computed: {
|
|
31
|
+
realPlacement: function realPlacement() {
|
|
32
|
+
return placementMap[this.placement];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|