@mdsfe/mds-ui 0.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +778 -0
  2. package/LICENSE +21 -0
  3. package/README.md +106 -0
  4. package/dist/_locale/index.js +18 -0
  5. package/dist/_locale/zh-CN.js +123 -0
  6. package/dist/_mixin/emitter.js +35 -0
  7. package/dist/_mixin/focus.js +13 -0
  8. package/dist/_mixin/locale.js +17 -0
  9. package/dist/_mixin/popper.js +192 -0
  10. package/dist/_mixin/tooltip.js +218 -0
  11. package/dist/_util/__test__/switchcase.test.js +43 -0
  12. package/dist/_util/autoprefixer.js +249 -0
  13. package/dist/_util/clickoutside.js +79 -0
  14. package/dist/_util/date.js +368 -0
  15. package/dist/_util/dateUtil.js +311 -0
  16. package/dist/_util/dom.js +240 -0
  17. package/dist/_util/getRequestAnimationFrame.js +50 -0
  18. package/dist/_util/getScroll.js +21 -0
  19. package/dist/_util/loaders/loaders.css.js +52 -0
  20. package/dist/_util/loaders/loading.js +53 -0
  21. package/dist/_util/merge.js +18 -0
  22. package/dist/_util/popper.js +1261 -0
  23. package/dist/_util/popup/index.js +232 -0
  24. package/dist/_util/popup/popup-manager.js +205 -0
  25. package/dist/_util/proptype.js +12 -0
  26. package/dist/_util/repeatClick.js +30 -0
  27. package/dist/_util/resize.js +61 -0
  28. package/dist/_util/resizeEvent.js +59 -0
  29. package/dist/_util/scrollIntoView.js +38 -0
  30. package/dist/_util/scrollbar-width.js +37 -0
  31. package/dist/_util/soda.js +54 -0
  32. package/dist/_util/switchcase.js +22 -0
  33. package/dist/_util/throttleByAnimationFrame.js +70 -0
  34. package/dist/_util/tree/node.js +412 -0
  35. package/dist/_util/tree/tree.js +410 -0
  36. package/dist/_util/util.js +166 -0
  37. package/dist/_util/vue-popper.js +213 -0
  38. package/dist/affix.js +509 -0
  39. package/dist/anchor.js +522 -0
  40. package/dist/avatar.js +437 -0
  41. package/dist/backtop.js +469 -0
  42. package/dist/badge.js +439 -0
  43. package/dist/bordershadow.js +310 -0
  44. package/dist/breadcrumb.js +434 -0
  45. package/dist/button.js +579 -0
  46. package/dist/card.js +514 -0
  47. package/dist/carousel.js +1326 -0
  48. package/dist/cascaderpanel.js +2320 -0
  49. package/dist/checkbox.js +681 -0
  50. package/dist/col.js +546 -0
  51. package/dist/collapse.js +671 -0
  52. package/dist/color.js +306 -0
  53. package/dist/datepicker.js +8089 -0
  54. package/dist/divider.js +346 -0
  55. package/dist/drawer.js +652 -0
  56. package/dist/dropdown.js +687 -0
  57. package/dist/empty.js +416 -0
  58. package/dist/font.js +306 -0
  59. package/dist/form.js +878 -0
  60. package/dist/icon.js +401 -0
  61. package/dist/index.js +1 -0
  62. package/dist/input.js +1251 -0
  63. package/dist/inputnumber.js +689 -0
  64. package/dist/layout.js +786 -0
  65. package/dist/list.js +789 -0
  66. package/dist/loading.js +430 -0
  67. package/dist/mds-ui.min.css +7 -0
  68. package/dist/mds-ui.min.js +64911 -0
  69. package/dist/menu.js +1131 -0
  70. package/dist/message.js +1016 -0
  71. package/dist/modal.js +895 -0
  72. package/dist/notification.js +818 -0
  73. package/dist/pagination.js +1213 -0
  74. package/dist/popconfirm.js +336 -0
  75. package/dist/popover.js +206 -0
  76. package/dist/progress.js +1023 -0
  77. package/dist/radio.js +760 -0
  78. package/dist/rate.js +765 -0
  79. package/dist/row.js +546 -0
  80. package/dist/select.js +4950 -0
  81. package/dist/slider.js +1411 -0
  82. package/dist/slottable.js +1414 -0
  83. package/dist/steps.js +546 -0
  84. package/dist/style/affix.css +5524 -0
  85. package/dist/style/anchor.css +5572 -0
  86. package/dist/style/avatar.css +5587 -0
  87. package/dist/style/backtop.css +34 -0
  88. package/dist/style/badge.css +5655 -0
  89. package/dist/style/bordershadow.css +5601 -0
  90. package/dist/style/breadcrumb.css +5551 -0
  91. package/dist/style/button.css +7679 -0
  92. package/dist/style/card.css +5670 -0
  93. package/dist/style/carousel.css +5731 -0
  94. package/dist/style/cascaderpanel.css +125 -0
  95. package/dist/style/checkbox.css +5700 -0
  96. package/dist/style/col.css +8121 -0
  97. package/dist/style/collapse.css +5593 -0
  98. package/dist/style/color.css +6136 -0
  99. package/dist/style/datepicker.css +5977 -0
  100. package/dist/style/divider.css +5558 -0
  101. package/dist/style/drawer.css +7979 -0
  102. package/dist/style/dropdown.css +7950 -0
  103. package/dist/style/empty.css +5563 -0
  104. package/dist/style/font.css +5559 -0
  105. package/dist/style/form.css +5662 -0
  106. package/dist/style/icon.css +5538 -0
  107. package/dist/style/input.css +6256 -0
  108. package/dist/style/inputnumber.css +5828 -0
  109. package/dist/style/layout.css +5572 -0
  110. package/dist/style/list.css +5655 -0
  111. package/dist/style/loading.css +5540 -0
  112. package/dist/style/menu.css +6183 -0
  113. package/dist/style/message.css +194 -0
  114. package/dist/style/modal.css +5637 -0
  115. package/dist/style/notification.css +5706 -0
  116. package/dist/style/pagination.css +6683 -0
  117. package/dist/style/popconfirm.css +7951 -0
  118. package/dist/style/popover.css +5727 -0
  119. package/dist/style/progress.css +5714 -0
  120. package/dist/style/radio.css +5769 -0
  121. package/dist/style/rate.css +5616 -0
  122. package/dist/style/row.css +8121 -0
  123. package/dist/style/select.css +5729 -0
  124. package/dist/style/slider.css +5594 -0
  125. package/dist/style/slottable.css +5831 -0
  126. package/dist/style/steps.css +6100 -0
  127. package/dist/style/switch.css +5624 -0
  128. package/dist/style/table.css +8392 -0
  129. package/dist/style/tabs.css +6047 -0
  130. package/dist/style/tag.css +5935 -0
  131. package/dist/style/text.css +5636 -0
  132. package/dist/style/timeline.css +5602 -0
  133. package/dist/style/timepicker.css +5904 -0
  134. package/dist/style/tooltip.css +5686 -0
  135. package/dist/style/transfer.css +101 -0
  136. package/dist/style/transition.css +1417 -0
  137. package/dist/style/tree.css +5598 -0
  138. package/dist/style/typography.css +5640 -0
  139. package/dist/style/upload.css +5834 -0
  140. package/dist/switch.js +448 -0
  141. package/dist/table.js +3809 -0
  142. package/dist/tabs.js +1273 -0
  143. package/dist/tag.js +478 -0
  144. package/dist/text.js +1100 -0
  145. package/dist/timeline.js +495 -0
  146. package/dist/timepicker.js +1567 -0
  147. package/dist/tooltip.js +179 -0
  148. package/dist/transfer.js +981 -0
  149. package/dist/transition.js +246 -0
  150. package/dist/tree.js +1866 -0
  151. package/dist/typography.js +469 -0
  152. package/dist/upload.js +1990 -0
  153. package/package.json +144 -0
package/dist/list.js ADDED
@@ -0,0 +1,789 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("./_util/proptype"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["./_util/proptype"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("./_util/proptype")) : factory(root["./_util/proptype"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__3__) {
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 = "/dist/";
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 = typeof scriptExports === 'function'
122
+ ? scriptExports.options
123
+ : scriptExports
124
+
125
+ // render functions
126
+ if (render) {
127
+ options.render = render
128
+ options.staticRenderFns = staticRenderFns
129
+ options._compiled = true
130
+ }
131
+
132
+ // functional template
133
+ if (functionalTemplate) {
134
+ options.functional = true
135
+ }
136
+
137
+ // scopedId
138
+ if (scopeId) {
139
+ options._scopeId = 'data-v-' + scopeId
140
+ }
141
+
142
+ var hook
143
+ if (moduleIdentifier) { // 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
192
+ ? [].concat(existing, hook)
193
+ : [hook]
194
+ }
195
+ }
196
+
197
+ return {
198
+ exports: scriptExports,
199
+ options: options
200
+ }
201
+ }
202
+
203
+
204
+ /***/ }),
205
+
206
+ /***/ 1:
207
+ /***/ (function(module, exports) {
208
+
209
+ module.exports = require("babel-runtime/helpers/defineProperty");
210
+
211
+ /***/ }),
212
+
213
+ /***/ 104:
214
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
215
+
216
+ "use strict";
217
+ // ESM COMPAT FLAG
218
+ __webpack_require__.r(__webpack_exports__);
219
+
220
+ // EXTERNAL MODULE: ./components/style/index.less
221
+ var style = __webpack_require__(131);
222
+
223
+ // EXTERNAL MODULE: ./components/list/style/index.less
224
+ var list_style = __webpack_require__(229);
225
+
226
+ // CONCATENATED MODULE: ./components/list/style/index.js
227
+
228
+
229
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/list/list.vue?vue&type=template&id=48015944&
230
+ var render = function () {
231
+ var _vm = this
232
+ var _h = _vm.$createElement
233
+ var _c = _vm._self._c || _h
234
+ return _c("div", { class: _vm.classes }, [
235
+ _c(
236
+ "div",
237
+ {
238
+ directives: [
239
+ {
240
+ name: "show",
241
+ rawName: "v-show",
242
+ value: this.$slots.head || _vm.head,
243
+ expression: "this.$slots.head || head",
244
+ },
245
+ ],
246
+ class: _vm.prefixCls + "-head",
247
+ },
248
+ [_vm._t("head", [_vm._v(_vm._s(_vm.head))])],
249
+ 2
250
+ ),
251
+ _c(
252
+ "div",
253
+ {
254
+ ref: _vm.prefixCls + "-container",
255
+ class: _vm.prefixCls + "-container",
256
+ style: "height: " + _vm.getHeight,
257
+ },
258
+ [
259
+ _c(
260
+ "ul",
261
+ { class: _vm.prefixCls + "-container-list" },
262
+ [_vm._t("default")],
263
+ 2
264
+ ),
265
+ _vm.loadMore &&
266
+ _vm.getLoadType != "scroll" &&
267
+ !_vm.loading &&
268
+ !_vm.finish
269
+ ? _c(
270
+ "div",
271
+ {
272
+ class: _vm.prefixCls + "-tips " + _vm.prefixCls + "-loadmore",
273
+ on: {
274
+ click: function ($event) {
275
+ return _vm.loadMoreData()
276
+ },
277
+ },
278
+ },
279
+ [
280
+ _vm._t("loadmoretext", [
281
+ _vm._v(
282
+ "\n " +
283
+ _vm._s(_vm.loadMoreText || "加载更多...") +
284
+ "\n "
285
+ ),
286
+ ]),
287
+ ],
288
+ 2
289
+ )
290
+ : _vm._e(),
291
+ _vm.loadMore && _vm.loading && !_vm.finish
292
+ ? _c(
293
+ "div",
294
+ { class: _vm.prefixCls + "-tips " + _vm.prefixCls + "-loading" },
295
+ [
296
+ _vm._t("loadingtext", [
297
+ _vm._v(
298
+ "\n " +
299
+ _vm._s(_vm.loadingText || "加载中...") +
300
+ "\n "
301
+ ),
302
+ ]),
303
+ ],
304
+ 2
305
+ )
306
+ : _vm._e(),
307
+ _vm.finish
308
+ ? _c(
309
+ "div",
310
+ {
311
+ class:
312
+ _vm.prefixCls + "-tips " + _vm.prefixCls + "-loading-finish",
313
+ },
314
+ [
315
+ _vm._t("finishtext", [
316
+ _vm._v(
317
+ "\n " +
318
+ _vm._s(
319
+ _vm.finishText || _vm.finishText === ""
320
+ ? _vm.finishText
321
+ : "数据已加载完毕~"
322
+ ) +
323
+ "\n "
324
+ ),
325
+ ]),
326
+ ],
327
+ 2
328
+ )
329
+ : _vm._e(),
330
+ ]
331
+ ),
332
+ _c(
333
+ "div",
334
+ {
335
+ directives: [
336
+ {
337
+ name: "show",
338
+ rawName: "v-show",
339
+ value: this.$slots.foot || _vm.foot,
340
+ expression: "this.$slots.foot || foot",
341
+ },
342
+ ],
343
+ class: _vm.prefixCls + "-foot",
344
+ },
345
+ [_vm._t("foot", [_vm._v(_vm._s(_vm.foot))])],
346
+ 2
347
+ ),
348
+ ])
349
+ }
350
+ var staticRenderFns = []
351
+ render._withStripped = true
352
+
353
+
354
+ // CONCATENATED MODULE: ./components/list/list.vue?vue&type=template&id=48015944&
355
+
356
+ // EXTERNAL MODULE: external "babel-runtime/helpers/defineProperty"
357
+ var defineProperty_ = __webpack_require__(1);
358
+ var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
359
+
360
+ // EXTERNAL MODULE: external "./_util/proptype"
361
+ var proptype_ = __webpack_require__(3);
362
+
363
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/list/list.vue?vue&type=script&lang=js&
364
+
365
+ //
366
+ //
367
+ //
368
+ //
369
+ //
370
+ //
371
+ //
372
+ //
373
+ //
374
+ //
375
+ //
376
+ //
377
+ //
378
+ //
379
+ //
380
+ //
381
+ //
382
+ //
383
+ //
384
+ //
385
+ //
386
+ //
387
+ //
388
+ //
389
+ //
390
+ //
391
+ //
392
+ //
393
+ //
394
+ //
395
+ //
396
+ //
397
+ //
398
+ //
399
+ //
400
+ //
401
+ //
402
+
403
+
404
+ var SIZEMAP = {
405
+ small: 'sm',
406
+ large: 'lg'
407
+ };
408
+ var TYPEMAP = {
409
+ complex: 'complex'
410
+ };
411
+ /* harmony default export */ var listvue_type_script_lang_js_ = ({
412
+ name: 'MdsList',
413
+ provide: function provide() {
414
+ return {
415
+ 'list': this
416
+ };
417
+ },
418
+
419
+ props: {
420
+ prefixCls: {
421
+ type: String,
422
+ default: 'mds-list'
423
+ },
424
+ bordered: {
425
+ type: Boolean,
426
+ default: true
427
+ },
428
+ type: {
429
+ type: String,
430
+ validator: function validator(value) {
431
+ return Object(proptype_["oneOf"])(value, ['', 'complex']);
432
+ }
433
+ },
434
+ size: {
435
+ type: String,
436
+ validator: function validator(value) {
437
+ return Object(proptype_["oneOf"])(value, ['', 'small', 'large']);
438
+ }
439
+ },
440
+ distance: {
441
+ type: Number,
442
+ default: 0
443
+ },
444
+ height: {
445
+ type: Number,
446
+ default: 0
447
+ },
448
+ finish: {
449
+ test: Boolean,
450
+ default: false
451
+ },
452
+ finishText: {
453
+ type: String,
454
+ default: ''
455
+ },
456
+ loading: {
457
+ type: Boolean,
458
+ default: false
459
+ },
460
+ loadingText: {
461
+ type: String,
462
+ default: ''
463
+ },
464
+ loadType: {
465
+ type: String,
466
+ validator: function validator(value) {
467
+ return Object(proptype_["oneOf"])(value, ['', 'scroll']);
468
+ },
469
+
470
+ default: ''
471
+ },
472
+ loadMore: {
473
+ type: Boolean,
474
+ default: false
475
+ },
476
+ loadMoreText: {
477
+ type: String,
478
+ default: ''
479
+ },
480
+ head: {
481
+ type: String,
482
+ default: ''
483
+ },
484
+ foot: {
485
+ type: String,
486
+ default: ''
487
+ }
488
+ },
489
+ data: function data() {
490
+ return {
491
+ isScrollLoad: false
492
+ };
493
+ },
494
+
495
+ methods: {
496
+ loadMoreData: function loadMoreData() {
497
+ this.$emit('loadMore');
498
+ },
499
+ scrollLoadMore: function scrollLoadMore(event) {
500
+ event = event || window.event;
501
+ var target = event.srcElement ? event.srcElement : event.target;
502
+ var scrollHeight = target.scrollHeight;
503
+ var scrollTop = target.scrollTop;
504
+ if (this.height + scrollTop + this.distance >= scrollHeight) {
505
+ !this.isScrollLoad && this.$emit('loadMore');
506
+ this.isScrollLoad = true;
507
+ } else {
508
+ this.isScrollLoad = false;
509
+ }
510
+ }
511
+ },
512
+ watch: {
513
+ 'finish': {
514
+ handler: function handler(newVal, oldVal) {
515
+ if (newVal && this.loadMore && this.getLoadType === 'scroll') {
516
+ this.$refs[this.prefixCls + '-container'] && this.$refs[this.prefixCls + '-container'].removeEventListener('scroll', this.scrollLoadMore);
517
+ }
518
+ }
519
+ }
520
+ },
521
+ computed: {
522
+ getHeight: function getHeight() {
523
+ return this.height > 0 ? this.height + 'px' : 'auto';
524
+ },
525
+ getLoadType: function getLoadType() {
526
+ return this.loadType.toLowerCase();
527
+ },
528
+ getHead: function getHead() {
529
+ return this.head || this.$slots.head;
530
+ },
531
+ classes: function classes() {
532
+ var prefixCls = this.prefixCls;
533
+ var size = this.size ? SIZEMAP[this.size] : 'default';
534
+ var type = this.type ? TYPEMAP[this.type] : 'simple';
535
+ return ['' + prefixCls, prefixCls + '-' + size, prefixCls + '-' + type, defineProperty_default()({}, prefixCls + '-bordered', this.bordered)];
536
+ }
537
+ },
538
+ mounted: function mounted() {
539
+ if (this.loadMore && this.getLoadType === 'scroll') {
540
+ this.$refs[this.prefixCls + '-container'] && this.$refs[this.prefixCls + '-container'].addEventListener('scroll', this.scrollLoadMore);
541
+ }
542
+ },
543
+ beforeDestory: function beforeDestory() {
544
+ if (this.loadMore && this.getLoadType === 'scroll') {
545
+ this.$refs[this.prefixCls + '-container'] && this.$refs[this.prefixCls + '-container'].removeEventListener('scroll', this.scrollLoadMore);
546
+ }
547
+ }
548
+ });
549
+ // CONCATENATED MODULE: ./components/list/list.vue?vue&type=script&lang=js&
550
+ /* harmony default export */ var list_listvue_type_script_lang_js_ = (listvue_type_script_lang_js_);
551
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
552
+ var componentNormalizer = __webpack_require__(0);
553
+
554
+ // CONCATENATED MODULE: ./components/list/list.vue
555
+
556
+
557
+
558
+
559
+
560
+ /* normalize component */
561
+
562
+ var component = Object(componentNormalizer["a" /* default */])(
563
+ list_listvue_type_script_lang_js_,
564
+ render,
565
+ staticRenderFns,
566
+ false,
567
+ null,
568
+ null,
569
+ null
570
+
571
+ )
572
+
573
+ /* hot reload */
574
+ if (false) { var api; }
575
+ component.options.__file = "components/list/list.vue"
576
+ /* harmony default export */ var list = (component.exports);
577
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/list/list-item.vue?vue&type=template&id=4b16d7a8&
578
+ var list_itemvue_type_template_id_4b16d7a8_render = function () {
579
+ var _vm = this
580
+ var _h = _vm.$createElement
581
+ var _c = _vm._self._c || _h
582
+ return _c("li", { class: _vm.classes }, [
583
+ _c("div", { class: _vm.prefixCls + "-item-container" }, [
584
+ _vm.isComplex
585
+ ? _c(
586
+ "div",
587
+ {
588
+ directives: [
589
+ {
590
+ name: "show",
591
+ rawName: "v-show",
592
+ value: this.$slots.avatar || _vm.avatar,
593
+ expression: "this.$slots.avatar || avatar",
594
+ },
595
+ ],
596
+ class:
597
+ _vm.prefixCls + "-item-avatar " + _vm.prefixCls + "-item-cell",
598
+ },
599
+ [_c("div", { staticClass: "content" }, [_vm._t("avatar")], 2)]
600
+ )
601
+ : _vm._e(),
602
+ _c(
603
+ "div",
604
+ { class: _vm.prefixCls + "-item-main " + _vm.prefixCls + "-item-cell" },
605
+ [
606
+ _c(
607
+ "div",
608
+ { class: _vm.prefixCls + "-item-title" },
609
+ [_vm._t("default", [_vm._v(_vm._s(_vm.title || "列表内容"))])],
610
+ 2
611
+ ),
612
+ _c(
613
+ "div",
614
+ {
615
+ directives: [
616
+ {
617
+ name: "show",
618
+ rawName: "v-show",
619
+ value: this.$slots.description || _vm.description,
620
+ expression: "this.$slots.description || description",
621
+ },
622
+ ],
623
+ class: _vm.prefixCls + "-item-desc",
624
+ },
625
+ [_vm._t("description", [_vm._v(_vm._s(_vm.description))])],
626
+ 2
627
+ ),
628
+ ]
629
+ ),
630
+ _vm.isComplex
631
+ ? _c(
632
+ "div",
633
+ {
634
+ directives: [
635
+ {
636
+ name: "show",
637
+ rawName: "v-show",
638
+ value: this.$slots.remarks || _vm.remarks,
639
+ expression: "this.$slots.remarks || remarks",
640
+ },
641
+ ],
642
+ class:
643
+ _vm.prefixCls + "-item-remarks " + _vm.prefixCls + "-item-cell",
644
+ },
645
+ [_vm._t("remarks", [_vm._v(_vm._s(_vm.remarks))])],
646
+ 2
647
+ )
648
+ : _vm._e(),
649
+ ]),
650
+ ])
651
+ }
652
+ var list_itemvue_type_template_id_4b16d7a8_staticRenderFns = []
653
+ list_itemvue_type_template_id_4b16d7a8_render._withStripped = true
654
+
655
+
656
+ // CONCATENATED MODULE: ./components/list/list-item.vue?vue&type=template&id=4b16d7a8&
657
+
658
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/list/list-item.vue?vue&type=script&lang=js&
659
+ //
660
+ //
661
+ //
662
+ //
663
+ //
664
+ //
665
+ //
666
+ //
667
+ //
668
+ //
669
+ //
670
+ //
671
+ //
672
+ //
673
+ //
674
+ //
675
+ //
676
+ //
677
+ //
678
+ //
679
+ //
680
+ //
681
+ //
682
+
683
+ // import { oneOf } from 'mds-ui/_util/proptype'
684
+ /* const SIZEMAP = {
685
+ small: 'sm'
686
+ } */
687
+ /* harmony default export */ var list_itemvue_type_script_lang_js_ = ({
688
+ name: 'MdsListItem',
689
+ inject: ['list'],
690
+ props: {
691
+ prefixCls: {
692
+ type: String,
693
+ default: 'mds-list'
694
+ },
695
+ title: {
696
+ type: String,
697
+ default: ''
698
+ },
699
+ avatar: {
700
+ type: String,
701
+ default: ''
702
+ },
703
+ description: {
704
+ type: String,
705
+ default: ''
706
+ },
707
+ remarks: {
708
+ type: String,
709
+ default: ''
710
+ }
711
+ },
712
+ data: function data() {
713
+ return {};
714
+ },
715
+
716
+ computed: {
717
+ isComplex: function isComplex() {
718
+ return this.list.type === 'complex';
719
+ },
720
+ classes: function classes() {
721
+ var prefixCls = this.prefixCls;
722
+ return [prefixCls + '-item'];
723
+ }
724
+ },
725
+ created: function created() {}
726
+ });
727
+ // CONCATENATED MODULE: ./components/list/list-item.vue?vue&type=script&lang=js&
728
+ /* harmony default export */ var list_list_itemvue_type_script_lang_js_ = (list_itemvue_type_script_lang_js_);
729
+ // CONCATENATED MODULE: ./components/list/list-item.vue
730
+
731
+
732
+
733
+
734
+
735
+ /* normalize component */
736
+
737
+ var list_item_component = Object(componentNormalizer["a" /* default */])(
738
+ list_list_itemvue_type_script_lang_js_,
739
+ list_itemvue_type_template_id_4b16d7a8_render,
740
+ list_itemvue_type_template_id_4b16d7a8_staticRenderFns,
741
+ false,
742
+ null,
743
+ null,
744
+ null
745
+
746
+ )
747
+
748
+ /* hot reload */
749
+ if (false) { var list_item_api; }
750
+ list_item_component.options.__file = "components/list/list-item.vue"
751
+ /* harmony default export */ var list_item = (list_item_component.exports);
752
+ // CONCATENATED MODULE: ./components/list/index.js
753
+
754
+
755
+
756
+
757
+
758
+ /* istanbul ignore next */
759
+ list.install = function (Vue) {
760
+ Vue.component(list.name, list);
761
+ Vue.component(list_item.name, list_item);
762
+ };
763
+ /* harmony default export */ var components_list = __webpack_exports__["default"] = (list);
764
+
765
+ /***/ }),
766
+
767
+ /***/ 131:
768
+ /***/ (function(module, exports) {
769
+
770
+ // removed by extract-text-webpack-plugin
771
+
772
+ /***/ }),
773
+
774
+ /***/ 229:
775
+ /***/ (function(module, exports) {
776
+
777
+ // removed by extract-text-webpack-plugin
778
+
779
+ /***/ }),
780
+
781
+ /***/ 3:
782
+ /***/ (function(module, exports) {
783
+
784
+ module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
785
+
786
+ /***/ })
787
+
788
+ /******/ });
789
+ });