@mdsfe/mds-ui 0.4.2 → 0.4.4

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 (51) hide show
  1. package/dist/affix.js +504 -0
  2. package/dist/alert.js +471 -0
  3. package/dist/anchor.js +514 -0
  4. package/dist/avatar.js +441 -0
  5. package/dist/backtop.js +464 -0
  6. package/dist/badge.js +434 -0
  7. package/dist/bordershadow.js +316 -0
  8. package/dist/breadcrumb.js +426 -0
  9. package/dist/button.js +564 -0
  10. package/dist/carousel.js +2 -2
  11. package/dist/cascader.js +4 -4
  12. package/dist/cascaderpanel.js +10 -10
  13. package/dist/collapse.js +2 -2
  14. package/dist/divider.js +2 -2
  15. package/dist/drawer.js +4 -4
  16. package/dist/empty.js +2 -2
  17. package/dist/form.js +2 -2
  18. package/dist/input.js +2 -2
  19. package/dist/inputnumber.js +2 -2
  20. package/dist/layout.js +2 -2
  21. package/dist/list.js +2 -2
  22. package/dist/loading.js +2 -2
  23. package/dist/menu.js +4 -4
  24. package/dist/message.js +2 -2
  25. package/dist/modal.js +2 -2
  26. package/dist/notification.js +7 -7
  27. package/dist/pagination.js +4 -4
  28. package/dist/popconfirm.js +2 -2
  29. package/dist/popover.js +2 -2
  30. package/dist/progress.js +2 -2
  31. package/dist/radio.js +2 -2
  32. package/dist/rate.js +2 -2
  33. package/dist/select.js +7 -7
  34. package/dist/slider.js +2 -2
  35. package/dist/slottable.js +4 -4
  36. package/dist/steps.js +2 -2
  37. package/dist/style/icon.css +1 -1
  38. package/dist/style/rate.css +3 -3
  39. package/dist/switch.js +2 -2
  40. package/dist/table.js +6 -6
  41. package/dist/tabs.js +2 -2
  42. package/dist/tag.js +2 -2
  43. package/dist/text.js +2 -2
  44. package/dist/timeline.js +2 -2
  45. package/dist/timepicker.js +2 -2
  46. package/dist/tooltip.js +2 -2
  47. package/dist/transfer.js +6 -6
  48. package/dist/transition.js +2 -2
  49. package/dist/tree.js +2 -2
  50. package/dist/typography.js +2 -2
  51. package/package.json +1 -1
package/dist/anchor.js CHANGED
@@ -0,0 +1,514 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else {
7
+ var a = factory();
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(window, function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = 104);
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ({
98
+
99
+ /***/ 0:
100
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
101
+
102
+ "use strict";
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
104
+ /* globals __VUE_SSR_CONTEXT__ */
105
+
106
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
107
+ // This module is a runtime utility for cleaner component module output and will
108
+ // be included in the final webpack user bundle.
109
+
110
+ function normalizeComponent(
111
+ scriptExports,
112
+ render,
113
+ staticRenderFns,
114
+ functionalTemplate,
115
+ injectStyles,
116
+ scopeId,
117
+ moduleIdentifier /* server only */,
118
+ shadowMode /* vue-cli only */
119
+ ) {
120
+ // Vue.extend constructor export interop
121
+ var options =
122
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
123
+
124
+ // render functions
125
+ if (render) {
126
+ options.render = render
127
+ options.staticRenderFns = staticRenderFns
128
+ options._compiled = true
129
+ }
130
+
131
+ // functional template
132
+ if (functionalTemplate) {
133
+ options.functional = true
134
+ }
135
+
136
+ // scopedId
137
+ if (scopeId) {
138
+ options._scopeId = 'data-v-' + scopeId
139
+ }
140
+
141
+ var hook
142
+ if (moduleIdentifier) {
143
+ // server build
144
+ hook = function (context) {
145
+ // 2.3 injection
146
+ context =
147
+ context || // cached call
148
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
149
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
150
+ // 2.2 with runInNewContext: true
151
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
152
+ context = __VUE_SSR_CONTEXT__
153
+ }
154
+ // inject component styles
155
+ if (injectStyles) {
156
+ injectStyles.call(this, context)
157
+ }
158
+ // register component module identifier for async chunk inferrence
159
+ if (context && context._registeredComponents) {
160
+ context._registeredComponents.add(moduleIdentifier)
161
+ }
162
+ }
163
+ // used by ssr in case component is cached and beforeCreate
164
+ // never gets called
165
+ options._ssrRegister = hook
166
+ } else if (injectStyles) {
167
+ hook = shadowMode
168
+ ? function () {
169
+ injectStyles.call(
170
+ this,
171
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
172
+ )
173
+ }
174
+ : injectStyles
175
+ }
176
+
177
+ if (hook) {
178
+ if (options.functional) {
179
+ // for template-only hot-reload because in that case the render fn doesn't
180
+ // go through the normalizer
181
+ options._injectStyles = hook
182
+ // register for functional component in vue file
183
+ var originalRender = options.render
184
+ options.render = function renderWithStyleInjection(h, context) {
185
+ hook.call(context)
186
+ return originalRender(h, context)
187
+ }
188
+ } else {
189
+ // inject component registration as beforeCreate hook
190
+ var existing = options.beforeCreate
191
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
192
+ }
193
+ }
194
+
195
+ return {
196
+ exports: scriptExports,
197
+ options: options
198
+ }
199
+ }
200
+
201
+
202
+ /***/ }),
203
+
204
+ /***/ 104:
205
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
206
+
207
+ "use strict";
208
+ // ESM COMPAT FLAG
209
+ __webpack_require__.r(__webpack_exports__);
210
+
211
+ // EXTERNAL MODULE: ./components/style/mixins-only.less
212
+ var mixins_only = __webpack_require__(140);
213
+
214
+ // EXTERNAL MODULE: ./components/anchor/style/index.less
215
+ var style = __webpack_require__(146);
216
+
217
+ // CONCATENATED MODULE: ./components/anchor/style/index.js
218
+
219
+
220
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/anchor/anchor.vue?vue&type=template&id=51f08870
221
+ var render = function () {
222
+ var _vm = this
223
+ var _h = _vm.$createElement
224
+ var _c = _vm._self._c || _h
225
+ return _c("div", { class: _vm.prefixCls }, [
226
+ _c("div", {
227
+ class: _vm.prefixCls + "-line",
228
+ style: {
229
+ height: _vm.height + "px",
230
+ },
231
+ }),
232
+ _c("div", { class: _vm.prefixCls + "-options" }, [_vm._t("default")], 2),
233
+ ])
234
+ }
235
+ var staticRenderFns = []
236
+ render._withStripped = true
237
+
238
+
239
+ // CONCATENATED MODULE: ./components/anchor/anchor.vue?vue&type=template&id=51f08870
240
+
241
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/anchor/anchor.vue?vue&type=script&lang=js
242
+ //
243
+ //
244
+ //
245
+ //
246
+ //
247
+ //
248
+ //
249
+ //
250
+ //
251
+ //
252
+ //
253
+
254
+ /* harmony default export */ var anchorvue_type_script_lang_js = ({
255
+ name: 'MdsAnchor',
256
+ props: {
257
+ defaultColor: {
258
+ type: String,
259
+ default: '#7F8FA4'
260
+ },
261
+ activeColor: {
262
+ type: String,
263
+ default: '#0364FF'
264
+ },
265
+ defaultTag: {
266
+ type: Number
267
+ },
268
+ tagHeight: {
269
+ type: Number,
270
+ default: 22
271
+ },
272
+ padding: {
273
+ type: Number,
274
+ default: 16
275
+ },
276
+ history: {
277
+ type: Boolean,
278
+ default: false
279
+ },
280
+ prefixCls: {
281
+ type: String,
282
+ default: 'mds-anchor'
283
+ }
284
+ },
285
+ data: function data() {
286
+ return {
287
+ height: 0
288
+ };
289
+ },
290
+ mounted: function mounted() {
291
+ var _this = this;
292
+
293
+ var l = 0;
294
+ this.$slots.default.forEach(function (element) {
295
+ if (element.child && element.child.prefixCls && element.child.prefixCls === _this.prefixCls + '-option') {
296
+ l++;
297
+ }
298
+ });
299
+ this.height = this.tagHeight * l + this.padding * (l - 1);
300
+ }
301
+ });
302
+ // CONCATENATED MODULE: ./components/anchor/anchor.vue?vue&type=script&lang=js
303
+ /* harmony default export */ var anchor_anchorvue_type_script_lang_js = (anchorvue_type_script_lang_js);
304
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
305
+ var componentNormalizer = __webpack_require__(0);
306
+
307
+ // CONCATENATED MODULE: ./components/anchor/anchor.vue
308
+
309
+
310
+
311
+
312
+
313
+ /* normalize component */
314
+
315
+ var component = Object(componentNormalizer["a" /* default */])(
316
+ anchor_anchorvue_type_script_lang_js,
317
+ render,
318
+ staticRenderFns,
319
+ false,
320
+ null,
321
+ null,
322
+ null
323
+
324
+ )
325
+
326
+ /* harmony default export */ var anchor_anchor = (component.exports);
327
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/anchor/option.vue?vue&type=template&id=f0341862
328
+ var optionvue_type_template_id_f0341862_render = function () {
329
+ var _obj
330
+ var _vm = this
331
+ var _h = _vm.$createElement
332
+ var _c = _vm._self._c || _h
333
+ return _c(
334
+ "div",
335
+ {
336
+ class:
337
+ ((_obj = {}),
338
+ (_obj["" + _vm.prefixCls] = true),
339
+ (_obj.active = _vm.isActive),
340
+ _obj),
341
+ style: _vm.style,
342
+ },
343
+ [
344
+ _vm.isActive
345
+ ? _c("i", {
346
+ class: _vm.prefixCls + "-icon",
347
+ style: { background: _vm.activeColor },
348
+ })
349
+ : _vm._e(),
350
+ _c("span", { on: { click: _vm.linkTo } }, [_vm._v(_vm._s(_vm.label))]),
351
+ ]
352
+ )
353
+ }
354
+ var optionvue_type_template_id_f0341862_staticRenderFns = []
355
+ optionvue_type_template_id_f0341862_render._withStripped = true
356
+
357
+
358
+ // CONCATENATED MODULE: ./components/anchor/option.vue?vue&type=template&id=f0341862
359
+
360
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/anchor/option.vue?vue&type=script&lang=js
361
+ //
362
+ //
363
+ //
364
+ //
365
+ //
366
+ //
367
+ //
368
+ //
369
+ //
370
+ //
371
+
372
+ /* harmony default export */ var optionvue_type_script_lang_js = ({
373
+ name: 'MdsAnchorOption',
374
+ props: {
375
+ label: {
376
+ type: String,
377
+ default: ''
378
+ },
379
+ target: {
380
+ type: String,
381
+ required: true
382
+ }
383
+ },
384
+ data: function data() {
385
+ return {
386
+ isActive: false
387
+ };
388
+ },
389
+
390
+ computed: {
391
+ prefixCls: function prefixCls() {
392
+ return this.$parent.prefixCls + '-option';
393
+ },
394
+ history: function history() {
395
+ return this.$parent.history;
396
+ },
397
+ padding: function padding() {
398
+ return this.$parent.padding;
399
+ },
400
+ height: function height() {
401
+ return this.$parent.tagHeight;
402
+ },
403
+ defaultColor: function defaultColor() {
404
+ return this.$parent.defaultColor;
405
+ },
406
+ activeColor: function activeColor() {
407
+ return this.$parent.activeColor;
408
+ },
409
+ style: function style() {
410
+ var isActive = this.isActive,
411
+ height = this.height,
412
+ padding = this.padding,
413
+ defaultColor = this.defaultColor,
414
+ activeColor = this.activeColor;
415
+
416
+ return {
417
+ 'margin-bottom': padding + 'px',
418
+ 'line-height': height + 'px',
419
+ 'color': isActive ? activeColor : defaultColor
420
+ };
421
+ }
422
+ },
423
+ methods: {
424
+ handleScroll: function handleScroll() {
425
+ var target = document.getElementById(this.target);
426
+ if (!target) {
427
+ return;
428
+ }
429
+ var offsetTop = target.getBoundingClientRect().top;
430
+
431
+ if (Math.abs(offsetTop) <= 20) {
432
+ this.isActive = true;
433
+ } else {
434
+ this.isActive = false;
435
+ }
436
+ },
437
+ linkTo: function linkTo() {
438
+ var that = this;
439
+ var route = that.$route.fullPath;
440
+ if (that.history) {
441
+ var link = document.createElement('a');
442
+ link.href = '#' + that.target;
443
+ link.click();
444
+ } else {
445
+ window.location.replace('#' + that.target);
446
+ }
447
+ if (this.$router) {
448
+ setTimeout(function () {
449
+ that.$router.replace(route);
450
+ }, 50);
451
+ }
452
+ }
453
+ },
454
+ destroyed: function destroyed() {
455
+ if (this.scrollEvent) {
456
+ this.scrollEvent.remove();
457
+ }
458
+ },
459
+ mounted: function mounted() {
460
+ this.scrollEvent = window.addEventListener('scroll', this.handleScroll);
461
+ }
462
+ });
463
+ // CONCATENATED MODULE: ./components/anchor/option.vue?vue&type=script&lang=js
464
+ /* harmony default export */ var anchor_optionvue_type_script_lang_js = (optionvue_type_script_lang_js);
465
+ // CONCATENATED MODULE: ./components/anchor/option.vue
466
+
467
+
468
+
469
+
470
+
471
+ /* normalize component */
472
+
473
+ var option_component = Object(componentNormalizer["a" /* default */])(
474
+ anchor_optionvue_type_script_lang_js,
475
+ optionvue_type_template_id_f0341862_render,
476
+ optionvue_type_template_id_f0341862_staticRenderFns,
477
+ false,
478
+ null,
479
+ null,
480
+ null
481
+
482
+ )
483
+
484
+ /* harmony default export */ var anchor_option = (option_component.exports);
485
+ // CONCATENATED MODULE: ./components/anchor/index.js
486
+
487
+
488
+
489
+
490
+ anchor_anchor.install = function (Vue) {
491
+ Vue.component(anchor_anchor.name, anchor_anchor);
492
+ Vue.component(anchor_option.name, anchor_option);
493
+ };
494
+
495
+ /* harmony default export */ var components_anchor = __webpack_exports__["default"] = (anchor_anchor);
496
+
497
+ /***/ }),
498
+
499
+ /***/ 140:
500
+ /***/ (function(module, exports) {
501
+
502
+ // removed by extract-text-webpack-plugin
503
+
504
+ /***/ }),
505
+
506
+ /***/ 146:
507
+ /***/ (function(module, exports) {
508
+
509
+ // removed by extract-text-webpack-plugin
510
+
511
+ /***/ })
512
+
513
+ /******/ });
514
+ });