ai.touchui-vue 1.32.1 → 1.33.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 (81) hide show
  1. package/lib/affix.js +2 -2
  2. package/lib/ai.touchui-vue.common.js +994 -881
  3. package/lib/align.js +2 -2
  4. package/lib/animation.js +2 -2
  5. package/lib/article.js +2 -2
  6. package/lib/box.js +2 -2
  7. package/lib/button.js +2 -2
  8. package/lib/calendar.js +2 -2
  9. package/lib/card-item.js +4 -4
  10. package/lib/card.js +178 -178
  11. package/lib/cascader.js +2 -2
  12. package/lib/center-scroll.js +2 -2
  13. package/lib/chat.js +4 -4
  14. package/lib/checkbox.js +2 -2
  15. package/lib/checkboxes.js +2 -2
  16. package/lib/collapse.js +771 -771
  17. package/lib/color.js +2 -2
  18. package/lib/countdown.js +2 -2
  19. package/lib/date-picker.js +1466 -1466
  20. package/lib/date-range.js +2 -2
  21. package/lib/dialog.js +2 -2
  22. package/lib/dis.js +2 -2
  23. package/lib/ellipsis.js +2 -2
  24. package/lib/emote.js +2 -2
  25. package/lib/export.js +10 -10
  26. package/lib/filter.js +2 -2
  27. package/lib/fix.js +2 -2
  28. package/lib/float.js +2 -2
  29. package/lib/flow.js +4 -4
  30. package/lib/form.js +2 -2
  31. package/lib/grid.js +2 -2
  32. package/lib/guider.js +2 -2
  33. package/lib/header.js +2 -2
  34. package/lib/hide.js +2 -2
  35. package/lib/icon.js +2 -2
  36. package/lib/import.js +12 -12
  37. package/lib/index.js +1 -1
  38. package/lib/input.js +62 -10
  39. package/lib/ip.js +2 -2
  40. package/lib/line.js +2 -2
  41. package/lib/loading.js +11 -11
  42. package/lib/longtap.js +2 -2
  43. package/lib/menu-icon.js +673 -670
  44. package/lib/message.js +2 -2
  45. package/lib/msg.js +19 -19
  46. package/lib/org.js +582 -582
  47. package/lib/padding.js +2 -2
  48. package/lib/page.js +578 -578
  49. package/lib/param.js +24 -8
  50. package/lib/pic.js +4 -4
  51. package/lib/popup.js +2 -2
  52. package/lib/progress.js +2 -2
  53. package/lib/range.js +452 -18
  54. package/lib/rate.js +2 -2
  55. package/lib/reverser.js +2 -2
  56. package/lib/scroll.js +2 -2
  57. package/lib/segment.js +2 -2
  58. package/lib/select.js +2 -2
  59. package/lib/size.js +2 -2
  60. package/lib/skeleton.js +2 -2
  61. package/lib/slide.js +2 -2
  62. package/lib/space.js +2 -2
  63. package/lib/step.js +2 -2
  64. package/lib/submit.js +2 -2
  65. package/lib/switch.js +2 -2
  66. package/lib/tab.js +5 -5
  67. package/lib/table.js +10 -10
  68. package/lib/tag.js +2 -2
  69. package/lib/timeline.js +2 -2
  70. package/lib/tip.js +2 -2
  71. package/lib/tooltip.js +2 -2
  72. package/lib/transfer.js +2 -2
  73. package/lib/tree.js +2 -2
  74. package/lib/upload.js +14 -14
  75. package/package.json +1 -1
  76. package/packages/input/src/input.vue +65 -7
  77. package/packages/param/src/param.vue +6 -2
  78. package/packages/range/src/range.vue +17 -14
  79. package/packages/tab/src/tab.vue +1 -1
  80. package/packages/table/src/table-head.vue +1 -1
  81. package/src/index.js +1 -1
package/lib/collapse.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 345);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 348);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,926 +192,926 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 11:
195
+ /***/ 20:
196
196
  /***/ (function(module, exports, __webpack_require__) {
197
197
 
198
- "use strict";
198
+ var content = __webpack_require__(99);
199
199
 
200
+ if (typeof content === 'string') {
201
+ content = [[module.i, content, '']];
202
+ }
200
203
 
201
- /*
202
- MIT License http://www.opensource.org/licenses/mit-license.php
203
- Author Tobias Koppers @sokra
204
- */
205
- // css base code, injected by the css-loader
206
- // eslint-disable-next-line func-names
207
- module.exports = function (useSourceMap) {
208
- var list = []; // return the list of modules as css string
204
+ var options = {}
209
205
 
210
- list.toString = function toString() {
211
- return this.map(function (item) {
212
- var content = cssWithMappingToString(item, useSourceMap);
206
+ options.insert = "head";
207
+ options.singleton = false;
213
208
 
214
- if (item[2]) {
215
- return "@media ".concat(item[2], "{").concat(content, "}");
216
- }
209
+ var update = __webpack_require__(8)(content, options);
217
210
 
218
- return content;
219
- }).join('');
220
- }; // import a list of modules into the list
221
- // eslint-disable-next-line func-names
211
+ if (content.locals) {
212
+ module.exports = content.locals;
213
+ }
222
214
 
223
215
 
224
- list.i = function (modules, mediaQuery) {
225
- if (typeof modules === 'string') {
226
- // eslint-disable-next-line no-param-reassign
227
- modules = [[null, modules, '']];
228
- }
216
+ /***/ }),
229
217
 
230
- var alreadyImportedModules = {};
218
+ /***/ 348:
219
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
231
220
 
232
- for (var i = 0; i < this.length; i++) {
233
- // eslint-disable-next-line prefer-destructuring
234
- var id = this[i][0];
221
+ "use strict";
222
+ // ESM COMPAT FLAG
223
+ __webpack_require__.r(__webpack_exports__);
235
224
 
236
- if (id != null) {
237
- alreadyImportedModules[id] = true;
238
- }
239
- }
225
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=template&id=05720247&scoped=true
226
+ var render = function () {
227
+ var _vm = this
228
+ var _h = _vm.$createElement
229
+ var _c = _vm._self._c || _h
230
+ return _c(
231
+ "div",
232
+ { staticClass: "to-collapse", attrs: { id: "collapse" } },
233
+ [_vm._t("default")],
234
+ 2
235
+ )
236
+ }
237
+ var staticRenderFns = []
238
+ render._withStripped = true
240
239
 
241
- for (var _i = 0; _i < modules.length; _i++) {
242
- var item = modules[_i]; // skip already imported module
243
- // this implementation is not 100% perfect for weird media query combinations
244
- // when a module is imported multiple times with different media queries.
245
- // I hope this will never occur (Hey this way we have smaller bundles)
246
240
 
247
- if (item[0] == null || !alreadyImportedModules[item[0]]) {
248
- if (mediaQuery && !item[2]) {
249
- item[2] = mediaQuery;
250
- } else if (mediaQuery) {
251
- item[2] = "(".concat(item[2], ") and (").concat(mediaQuery, ")");
252
- }
241
+ // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=template&id=05720247&scoped=true
253
242
 
254
- list.push(item);
255
- }
256
- }
257
- };
243
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=script&lang=js
244
+ //
245
+ //
246
+ //
247
+ //
248
+ //
258
249
 
259
- return list;
260
- };
250
+ /* harmony default export */ var collapsevue_type_script_lang_js = ({
251
+ name: 'ToCollapse',
252
+ componentName: 'ToCollapse',
253
+ model: {
254
+ // 当前激活面板改变时触发(如果是手风琴模式,参数 activeNames 类型为string,否则为array)
255
+ event: 'change'
256
+ },
257
+ props: {
258
+ value: {
259
+ type: [String, Array],
260
+ default: ''
261
+ },
262
+ // 是否默认展开所有
263
+ expandAll: {
264
+ type: Boolean,
265
+ default: false
266
+ },
267
+ // 当前激活的面板(如果是手风琴模式,绑定值类型需要为string,否则为array)
268
+ accordion: {
269
+ type: Boolean,
270
+ default: false
271
+ }
272
+ },
273
+ data: function data() {
274
+ return {
275
+ actives: null,
276
+ lastActive: null
277
+ };
278
+ },
261
279
 
262
- function cssWithMappingToString(item, useSourceMap) {
263
- var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
280
+ watch: {
281
+ value: {
282
+ handler: function handler() {
283
+ var actives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
264
284
 
265
- var cssMapping = item[3];
285
+ this.setActives(actives);
286
+ },
266
287
 
267
- if (!cssMapping) {
268
- return content;
269
- }
288
+ immediate: true,
289
+ deep: true
290
+ },
291
+ accordion: {
292
+ handler: function handler() {
293
+ this.setActives(this.actives);
294
+ this.updateActivesModel();
295
+ },
270
296
 
271
- if (useSourceMap && typeof btoa === 'function') {
272
- var sourceMapping = toComment(cssMapping);
273
- var sourceURLs = cssMapping.sources.map(function (source) {
274
- return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */");
275
- });
276
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
277
- }
297
+ immediate: true,
298
+ deep: true
299
+ }
300
+ },
301
+ created: function created() {
302
+ (!this.actives || this.actives.length === 0) && this.expandAll && this.toggleExpandAll();
303
+ },
278
304
 
279
- return [content].join('\n');
280
- } // Adapted from convert-source-map (MIT)
305
+ methods: {
306
+ setActives: function setActives() {
307
+ var actives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
281
308
 
309
+ actives = [].concat(Array.isArray(actives) ? actives : actives ? [actives] : []);
310
+ if (this.accordion) {
311
+ actives = actives.length > 0 ? [actives[0]] : [];
312
+ }
313
+ this.actives = actives;
314
+ },
315
+ updateActivesModel: function updateActivesModel() {
316
+ this.$emit('change', this.accordion ? this.actives[0] : this.actives);
317
+ },
282
318
 
283
- function toComment(sourceMap) {
284
- // eslint-disable-next-line no-undef
285
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
286
- var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
287
- return "/*# ".concat(data, " */");
288
- }
319
+ // 根据传入的数组 收起或展开 collapse-item
320
+ toggleExpandAll: function toggleExpandAll() {
321
+ var actives = [];
322
+ var collapseItem = this.$slots.default || [];
323
+ collapseItem.map(function () {
324
+ var vnode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
325
+ var _vnode$componentOptio = vnode.componentOptions,
326
+ componentOptions = _vnode$componentOptio === undefined ? {} : _vnode$componentOptio;
327
+ var _componentOptions$pro = componentOptions.propsData,
328
+ propsData = _componentOptions$pro === undefined ? {} : _componentOptions$pro,
329
+ tag = componentOptions.tag;
330
+ var name = propsData.name;
289
331
 
290
- /***/ }),
332
+ if (tag === 'to-collapse-item') {
333
+ actives.push(name);
334
+ }
335
+ });
336
+ this.setActives(actives);
337
+ this.updateActivesModel();
338
+ },
291
339
 
292
- /***/ 12:
293
- /***/ (function(module, exports, __webpack_require__) {
340
+ // collapse 为true时 为收起
341
+ change: function change(name, collapse) {
342
+ if (this.accordion) {
343
+ this.lastActive = this.actives[0];
344
+ this.actives = collapse ? [] : name ? [name] : [];
345
+ } else {
346
+ if (collapse) {
347
+ var index = this.actives.findIndex(function (nameItem) {
348
+ return name === nameItem;
349
+ });
350
+ if (index > -1) this.actives.splice(index, 1);
351
+ } else {
352
+ this.actives.push(name);
353
+ }
354
+ }
355
+ this.updateActivesModel();
356
+ }
357
+ }
358
+ });
359
+ // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=script&lang=js
360
+ /* harmony default export */ var src_collapsevue_type_script_lang_js = (collapsevue_type_script_lang_js);
361
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
362
+ var componentNormalizer = __webpack_require__(0);
294
363
 
295
- "use strict";
364
+ // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue
296
365
 
297
366
 
298
- var stylesInDom = {};
299
367
 
300
- var isOldIE = function isOldIE() {
301
- var memo;
302
- return function memorize() {
303
- if (typeof memo === 'undefined') {
304
- // Test for IE <= 9 as proposed by Browserhacks
305
- // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
306
- // Tests for existence of standard globals is to allow style-loader
307
- // to operate correctly into non-standard environments
308
- // @see https://github.com/webpack-contrib/style-loader/issues/177
309
- memo = Boolean(window && document && document.all && !window.atob);
310
- }
311
368
 
312
- return memo;
313
- };
314
- }();
315
369
 
316
- var getTarget = function getTarget() {
317
- var memo = {};
318
- return function memorize(target) {
319
- if (typeof memo[target] === 'undefined') {
320
- var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
370
+ /* normalize component */
321
371
 
322
- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
323
- try {
324
- // This will throw an exception if access to iframe is blocked
325
- // due to cross-origin restrictions
326
- styleTarget = styleTarget.contentDocument.head;
327
- } catch (e) {
328
- // istanbul ignore next
329
- styleTarget = null;
330
- }
331
- }
372
+ var component = Object(componentNormalizer["a" /* default */])(
373
+ src_collapsevue_type_script_lang_js,
374
+ render,
375
+ staticRenderFns,
376
+ false,
377
+ null,
378
+ "05720247",
379
+ null
380
+
381
+ )
332
382
 
333
- memo[target] = styleTarget;
334
- }
335
-
336
- return memo[target];
337
- };
338
- }();
339
-
340
- function listToStyles(list, options) {
341
- var styles = [];
342
- var newStyles = {};
343
-
344
- for (var i = 0; i < list.length; i++) {
345
- var item = list[i];
346
- var id = options.base ? item[0] + options.base : item[0];
347
- var css = item[1];
348
- var media = item[2];
349
- var sourceMap = item[3];
350
- var part = {
351
- css: css,
352
- media: media,
353
- sourceMap: sourceMap
354
- };
355
-
356
- if (!newStyles[id]) {
357
- styles.push(newStyles[id] = {
358
- id: id,
359
- parts: [part]
360
- });
361
- } else {
362
- newStyles[id].parts.push(part);
363
- }
364
- }
365
-
366
- return styles;
367
- }
368
-
369
- function addStylesToDom(styles, options) {
370
- for (var i = 0; i < styles.length; i++) {
371
- var item = styles[i];
372
- var domStyle = stylesInDom[item.id];
373
- var j = 0;
374
-
375
- if (domStyle) {
376
- domStyle.refs++;
377
-
378
- for (; j < domStyle.parts.length; j++) {
379
- domStyle.parts[j](item.parts[j]);
380
- }
381
-
382
- for (; j < item.parts.length; j++) {
383
- domStyle.parts.push(addStyle(item.parts[j], options));
384
- }
385
- } else {
386
- var parts = [];
387
-
388
- for (; j < item.parts.length; j++) {
389
- parts.push(addStyle(item.parts[j], options));
390
- }
391
-
392
- stylesInDom[item.id] = {
393
- id: item.id,
394
- refs: 1,
395
- parts: parts
396
- };
397
- }
398
- }
383
+ /* harmony default export */ var collapse = (component.exports);
384
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=template&id=30d49ba6&scoped=true
385
+ var collapse_itemvue_type_template_id_30d49ba6_scoped_true_render = function () {
386
+ var _vm = this
387
+ var _h = _vm.$createElement
388
+ var _c = _vm._self._c || _h
389
+ return _c(
390
+ "div",
391
+ {
392
+ staticClass: "to-collapse-item",
393
+ attrs: { id: "collapse-item", role: "collapseItme", name: _vm.name },
394
+ },
395
+ [
396
+ _c(
397
+ "div",
398
+ {
399
+ directives: [
400
+ {
401
+ name: "size",
402
+ rawName: "v-size",
403
+ value: _vm.titleSize,
404
+ expression: "titleSize",
405
+ },
406
+ ],
407
+ staticClass:
408
+ "to-header to-header-fillet-normal to-collapse-item-header",
409
+ on: {
410
+ click: function ($event) {
411
+ $event.stopPropagation()
412
+ return _vm.change()
413
+ },
414
+ },
415
+ },
416
+ [
417
+ _c(
418
+ "div",
419
+ {
420
+ staticClass: "text to-pointer",
421
+ style: {
422
+ paddingLeft: _vm.$slots.title ? 0 : "" + _vm.cpadding,
423
+ paddingRight: "" + _vm.cpadding,
424
+ },
425
+ },
426
+ [
427
+ _c(
428
+ "span",
429
+ { on: { click: _vm.handleTitleClick } },
430
+ [
431
+ _vm._t("title", [
432
+ _vm._v("\n\t\t\t\t\t" + _vm._s(_vm.title) + "\n\t\t\t\t"),
433
+ ]),
434
+ ],
435
+ 2
436
+ ),
437
+ ]
438
+ ),
439
+ _c(
440
+ "div",
441
+ { staticClass: "fn to-collapse-icon-box" },
442
+ [
443
+ _vm._t("icon", [
444
+ _c(
445
+ "div",
446
+ {
447
+ staticClass: "to-icon-unfold ",
448
+ class: {
449
+ "to-collapse-item-icon-active": _vm.collapse,
450
+ },
451
+ style: {
452
+ transition: _vm.isReady
453
+ ? "transform " + _vm.duration + "ms ease-in-out"
454
+ : "none",
455
+ },
456
+ },
457
+ [_c("span")]
458
+ ),
459
+ ]),
460
+ ],
461
+ 2
462
+ ),
463
+ ]
464
+ ),
465
+ _c(
466
+ "div",
467
+ {
468
+ staticClass: "collapse-item-content",
469
+ style: {
470
+ height: _vm.collapse ? "0px" : _vm.realHeight,
471
+ overflow: "hidden",
472
+ transition: _vm.isReady
473
+ ? "height " + _vm.duration + "ms ease-in-out"
474
+ : "none",
475
+ },
476
+ },
477
+ [
478
+ _c(
479
+ "div",
480
+ { ref: "contentBox", staticClass: "collapse-item-content__box" },
481
+ [_vm._t("default")],
482
+ 2
483
+ ),
484
+ ]
485
+ ),
486
+ _c("div", { staticClass: "to-line to-line-color-lightGray" }),
487
+ ]
488
+ )
399
489
  }
490
+ var collapse_itemvue_type_template_id_30d49ba6_scoped_true_staticRenderFns = []
491
+ collapse_itemvue_type_template_id_30d49ba6_scoped_true_render._withStripped = true
400
492
 
401
- function insertStyleElement(options) {
402
- var style = document.createElement('style');
403
-
404
- if (typeof options.attributes.nonce === 'undefined') {
405
- var nonce = true ? __webpack_require__.nc : undefined;
406
493
 
407
- if (nonce) {
408
- options.attributes.nonce = nonce;
409
- }
410
- }
494
+ // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=template&id=30d49ba6&scoped=true
411
495
 
412
- Object.keys(options.attributes).forEach(function (key) {
413
- style.setAttribute(key, options.attributes[key]);
414
- });
496
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js
497
+ //
498
+ //
499
+ //
500
+ //
501
+ //
502
+ //
503
+ //
504
+ //
505
+ //
506
+ //
507
+ //
508
+ //
509
+ //
510
+ //
511
+ //
512
+ //
513
+ //
514
+ //
515
+ //
516
+ //
517
+ //
518
+ //
519
+ //
520
+ //
521
+ //
522
+ //
523
+ //
524
+ //
525
+ //
526
+ //
527
+ //
528
+ //
529
+ //
530
+ //
531
+ //
532
+ //
533
+ //
534
+ //
535
+ //
536
+ //
537
+ //
538
+ //
539
+ //
540
+ //
541
+ //
542
+ //
543
+ //
544
+ //
545
+ //
546
+ //
547
+ //
415
548
 
416
- if (typeof options.insert === 'function') {
417
- options.insert(style);
418
- } else {
419
- var target = getTarget(options.insert || 'head');
549
+ /* harmony default export */ var collapse_itemvue_type_script_lang_js = ({
550
+ name: 'ToCollapseItem',
551
+ componentName: 'ToCollapseItem',
552
+ model: {
553
+ event: 'change'
554
+ },
555
+ props: {
556
+ // padding
557
+ padding: { type: [Number, String], default: 1 },
558
+ // 是否收起
559
+ value: {
560
+ type: [String, Boolean, Number],
561
+ default: true
562
+ },
563
+ // 唯一标志符
564
+ name: {
565
+ type: [String, Number],
566
+ default: ''
567
+ },
568
+ // 面板标题
569
+ title: {
570
+ type: String,
571
+ default: ''
572
+ },
573
+ // 面板标题文字大小
574
+ titleSize: {
575
+ type: String,
576
+ default: 'm'
577
+ },
578
+ disabled: {
579
+ type: Boolean,
580
+ default: false
581
+ }
582
+ },
583
+ data: function data() {
584
+ return {
585
+ isReady: false,
586
+ collapse: true,
587
+ realHeight: '',
588
+ duration: 250,
589
+ collapseTimer: null
590
+ };
591
+ },
420
592
 
421
- if (!target) {
422
- throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
423
- }
593
+ computed: {
594
+ cpadding: function cpadding() {
595
+ return this.toFixedPx(this.padding);
596
+ },
597
+ valueInParent: function valueInParent() {
598
+ if (this.$parent && this.$parent.$vnode && this.$parent.$vnode.componentOptions.tag === 'to-collapse') {
599
+ var actives = this.$parent.actives || [];
600
+ return !actives.includes(this.name);
601
+ } else {
602
+ return undefined;
603
+ }
604
+ }
605
+ },
606
+ watch: {
607
+ valueInParent: {
608
+ handler: function handler(collapse) {
609
+ this.handleCollapse(collapse);
610
+ },
424
611
 
425
- target.appendChild(style);
426
- }
612
+ deep: true
613
+ },
614
+ value: {
615
+ handler: function handler(collapse) {
616
+ // 父级为to-collapse时
617
+ if (this.valueInParent !== undefined) {
618
+ collapse = this.valueInParent;
619
+ } else {
620
+ collapse = !!collapse;
621
+ }
622
+ this.handleCollapse(collapse);
623
+ },
427
624
 
428
- return style;
429
- }
625
+ immediate: true,
626
+ deep: true
627
+ }
628
+ },
629
+ methods: {
630
+ handleTitleClick: function handleTitleClick(event) {
631
+ this.$emit('titleClicked', event);
632
+ },
633
+ handleCollapse: function handleCollapse(collapse) {
634
+ var _this = this;
430
635
 
431
- function removeStyleElement(style) {
432
- // istanbul ignore if
433
- if (style.parentNode === null) {
434
- return false;
435
- }
636
+ if (this.disabled) return;
637
+ this.$nextTick(function () {
638
+ if (!_this.$refs.contentBox) return;
639
+ _this.realHeight = _this.$refs.contentBox.clientHeight + 'px' || false;
640
+ var macroTask = null;
641
+ macroTask = setTimeout(function () {
642
+ _this.collapse = collapse;
643
+ clearTimeout(macroTask);
644
+ clearTimeout(_this.collapseTimer);
645
+ macroTask = null;
646
+ _this.collapseTimer = null;
647
+ _this.collapseTimer = setTimeout(function () {
648
+ _this.isReady = true;
649
+ _this.realHeight = 'auto';
650
+ }, _this.duration);
651
+ });
652
+ });
653
+ },
654
+ change: function change(collapse) {
655
+ if (this.disabled) return;
656
+ collapse = collapse !== undefined ? collapse : !this.collapse;
657
+ this.handleCollapse(collapse);
658
+ this.$emit('change', collapse);
659
+ typeof this.$parent.change === 'function' && this.$parent.change(this.name, collapse);
660
+ },
661
+ toFixedPx: function toFixedPx(num) {
662
+ if (isNaN(Number(num))) {
663
+ if (/(%|px|pt|em|rem)$/.test(num)) {
664
+ return num;
665
+ } else {
666
+ return '100%';
667
+ }
668
+ } else {
669
+ return num + 'em';
670
+ }
671
+ }
672
+ }
673
+ });
674
+ // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js
675
+ /* harmony default export */ var src_collapse_itemvue_type_script_lang_js = (collapse_itemvue_type_script_lang_js);
676
+ // EXTERNAL MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=style&index=0&id=30d49ba6&prod&scoped=true&lang=css
677
+ var collapse_itemvue_type_style_index_0_id_30d49ba6_prod_scoped_true_lang_css = __webpack_require__(98);
436
678
 
437
- style.parentNode.removeChild(style);
438
- }
439
- /* istanbul ignore next */
679
+ // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue
440
680
 
441
681
 
442
- var replaceText = function replaceText() {
443
- var textStore = [];
444
- return function replace(index, replacement) {
445
- textStore[index] = replacement;
446
- return textStore.filter(Boolean).join('\n');
447
- };
448
- }();
449
682
 
450
- function applyToSingletonTag(style, index, remove, obj) {
451
- var css = remove ? '' : obj.css; // For old IE
452
683
 
453
- /* istanbul ignore if */
454
684
 
455
- if (style.styleSheet) {
456
- style.styleSheet.cssText = replaceText(index, css);
457
- } else {
458
- var cssNode = document.createTextNode(css);
459
- var childNodes = style.childNodes;
460
685
 
461
- if (childNodes[index]) {
462
- style.removeChild(childNodes[index]);
463
- }
686
+ /* normalize component */
464
687
 
465
- if (childNodes.length) {
466
- style.insertBefore(cssNode, childNodes[index]);
467
- } else {
468
- style.appendChild(cssNode);
469
- }
470
- }
471
- }
688
+ var collapse_item_component = Object(componentNormalizer["a" /* default */])(
689
+ src_collapse_itemvue_type_script_lang_js,
690
+ collapse_itemvue_type_template_id_30d49ba6_scoped_true_render,
691
+ collapse_itemvue_type_template_id_30d49ba6_scoped_true_staticRenderFns,
692
+ false,
693
+ null,
694
+ "30d49ba6",
695
+ null
696
+
697
+ )
472
698
 
473
- function applyToTag(style, options, obj) {
474
- var css = obj.css;
475
- var media = obj.media;
476
- var sourceMap = obj.sourceMap;
699
+ /* harmony default export */ var collapse_item = (collapse_item_component.exports);
700
+ // CONCATENATED MODULE: ./packages/collapse/index.js
477
701
 
478
- if (media) {
479
- style.setAttribute('media', media);
480
- }
481
702
 
482
- if (sourceMap && btoa) {
483
- css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
484
- } // For old IE
485
703
 
486
- /* istanbul ignore if */
704
+ /* istanbul ignore next */
705
+ collapse.install = function (Vue) {
706
+ Vue.component(collapse.name, collapse);
707
+ Vue.component(collapse_item.name, collapse_item);
708
+ };
487
709
 
710
+ /* harmony default export */ var packages_collapse = __webpack_exports__["default"] = (collapse);
488
711
 
489
- if (style.styleSheet) {
490
- style.styleSheet.cssText = css;
491
- } else {
492
- while (style.firstChild) {
493
- style.removeChild(style.firstChild);
494
- }
712
+ /***/ }),
495
713
 
496
- style.appendChild(document.createTextNode(css));
497
- }
498
- }
714
+ /***/ 7:
715
+ /***/ (function(module, exports, __webpack_require__) {
499
716
 
500
- var singleton = null;
501
- var singletonCounter = 0;
717
+ "use strict";
502
718
 
503
- function addStyle(obj, options) {
504
- var style;
505
- var update;
506
- var remove;
507
719
 
508
- if (options.singleton) {
509
- var styleIndex = singletonCounter++;
510
- style = singleton || (singleton = insertStyleElement(options));
511
- update = applyToSingletonTag.bind(null, style, styleIndex, false);
512
- remove = applyToSingletonTag.bind(null, style, styleIndex, true);
513
- } else {
514
- style = insertStyleElement(options);
515
- update = applyToTag.bind(null, style, options);
720
+ /*
721
+ MIT License http://www.opensource.org/licenses/mit-license.php
722
+ Author Tobias Koppers @sokra
723
+ */
724
+ // css base code, injected by the css-loader
725
+ // eslint-disable-next-line func-names
726
+ module.exports = function (useSourceMap) {
727
+ var list = []; // return the list of modules as css string
516
728
 
517
- remove = function remove() {
518
- removeStyleElement(style);
519
- };
520
- }
729
+ list.toString = function toString() {
730
+ return this.map(function (item) {
731
+ var content = cssWithMappingToString(item, useSourceMap);
521
732
 
522
- update(obj);
523
- return function updateStyle(newObj) {
524
- if (newObj) {
525
- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
526
- return;
733
+ if (item[2]) {
734
+ return "@media ".concat(item[2], "{").concat(content, "}");
527
735
  }
528
736
 
529
- update(obj = newObj);
530
- } else {
531
- remove();
532
- }
533
- };
534
- }
737
+ return content;
738
+ }).join('');
739
+ }; // import a list of modules into the list
740
+ // eslint-disable-next-line func-names
535
741
 
536
- module.exports = function (list, options) {
537
- options = options || {};
538
- options.attributes = typeof options.attributes === 'object' ? options.attributes : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
539
- // tags it will allow on a page
540
742
 
541
- if (!options.singleton && typeof options.singleton !== 'boolean') {
542
- options.singleton = isOldIE();
543
- }
743
+ list.i = function (modules, mediaQuery) {
744
+ if (typeof modules === 'string') {
745
+ // eslint-disable-next-line no-param-reassign
746
+ modules = [[null, modules, '']];
747
+ }
544
748
 
545
- var styles = listToStyles(list, options);
546
- addStylesToDom(styles, options);
547
- return function update(newList) {
548
- var mayRemove = [];
749
+ var alreadyImportedModules = {};
549
750
 
550
- for (var i = 0; i < styles.length; i++) {
551
- var item = styles[i];
552
- var domStyle = stylesInDom[item.id];
751
+ for (var i = 0; i < this.length; i++) {
752
+ // eslint-disable-next-line prefer-destructuring
753
+ var id = this[i][0];
553
754
 
554
- if (domStyle) {
555
- domStyle.refs--;
556
- mayRemove.push(domStyle);
755
+ if (id != null) {
756
+ alreadyImportedModules[id] = true;
557
757
  }
558
758
  }
559
759
 
560
- if (newList) {
561
- var newStyles = listToStyles(newList, options);
562
- addStylesToDom(newStyles, options);
563
- }
564
-
565
- for (var _i = 0; _i < mayRemove.length; _i++) {
566
- var _domStyle = mayRemove[_i];
760
+ for (var _i = 0; _i < modules.length; _i++) {
761
+ var item = modules[_i]; // skip already imported module
762
+ // this implementation is not 100% perfect for weird media query combinations
763
+ // when a module is imported multiple times with different media queries.
764
+ // I hope this will never occur (Hey this way we have smaller bundles)
567
765
 
568
- if (_domStyle.refs === 0) {
569
- for (var j = 0; j < _domStyle.parts.length; j++) {
570
- _domStyle.parts[j]();
766
+ if (item[0] == null || !alreadyImportedModules[item[0]]) {
767
+ if (mediaQuery && !item[2]) {
768
+ item[2] = mediaQuery;
769
+ } else if (mediaQuery) {
770
+ item[2] = "(".concat(item[2], ") and (").concat(mediaQuery, ")");
571
771
  }
572
772
 
573
- delete stylesInDom[_domStyle.id];
773
+ list.push(item);
574
774
  }
575
775
  }
576
776
  };
577
- };
578
777
 
579
- /***/ }),
778
+ return list;
779
+ };
580
780
 
581
- /***/ 19:
582
- /***/ (function(module, exports, __webpack_require__) {
781
+ function cssWithMappingToString(item, useSourceMap) {
782
+ var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
583
783
 
584
- var content = __webpack_require__(96);
784
+ var cssMapping = item[3];
585
785
 
586
- if (typeof content === 'string') {
587
- content = [[module.i, content, '']];
588
- }
786
+ if (!cssMapping) {
787
+ return content;
788
+ }
589
789
 
590
- var options = {}
790
+ if (useSourceMap && typeof btoa === 'function') {
791
+ var sourceMapping = toComment(cssMapping);
792
+ var sourceURLs = cssMapping.sources.map(function (source) {
793
+ return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */");
794
+ });
795
+ return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
796
+ }
591
797
 
592
- options.insert = "head";
593
- options.singleton = false;
798
+ return [content].join('\n');
799
+ } // Adapted from convert-source-map (MIT)
594
800
 
595
- var update = __webpack_require__(12)(content, options);
596
801
 
597
- if (content.locals) {
598
- module.exports = content.locals;
802
+ function toComment(sourceMap) {
803
+ // eslint-disable-next-line no-undef
804
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
805
+ var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
806
+ return "/*# ".concat(data, " */");
599
807
  }
600
808
 
601
-
602
809
  /***/ }),
603
810
 
604
- /***/ 345:
605
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
811
+ /***/ 8:
812
+ /***/ (function(module, exports, __webpack_require__) {
606
813
 
607
814
  "use strict";
608
- // ESM COMPAT FLAG
609
- __webpack_require__.r(__webpack_exports__);
610
815
 
611
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=template&id=05720247&scoped=true
612
- var render = function () {
613
- var _vm = this
614
- var _h = _vm.$createElement
615
- var _c = _vm._self._c || _h
616
- return _c(
617
- "div",
618
- { staticClass: "to-collapse", attrs: { id: "collapse" } },
619
- [_vm._t("default")],
620
- 2
621
- )
622
- }
623
- var staticRenderFns = []
624
- render._withStripped = true
625
816
 
817
+ var stylesInDom = {};
626
818
 
627
- // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=template&id=05720247&scoped=true
819
+ var isOldIE = function isOldIE() {
820
+ var memo;
821
+ return function memorize() {
822
+ if (typeof memo === 'undefined') {
823
+ // Test for IE <= 9 as proposed by Browserhacks
824
+ // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
825
+ // Tests for existence of standard globals is to allow style-loader
826
+ // to operate correctly into non-standard environments
827
+ // @see https://github.com/webpack-contrib/style-loader/issues/177
828
+ memo = Boolean(window && document && document.all && !window.atob);
829
+ }
628
830
 
629
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=script&lang=js
630
- //
631
- //
632
- //
633
- //
634
- //
831
+ return memo;
832
+ };
833
+ }();
635
834
 
636
- /* harmony default export */ var collapsevue_type_script_lang_js = ({
637
- name: 'ToCollapse',
638
- componentName: 'ToCollapse',
639
- model: {
640
- // 当前激活面板改变时触发(如果是手风琴模式,参数 activeNames 类型为string,否则为array)
641
- event: 'change'
642
- },
643
- props: {
644
- value: {
645
- type: [String, Array],
646
- default: ''
647
- },
648
- // 是否默认展开所有
649
- expandAll: {
650
- type: Boolean,
651
- default: false
652
- },
653
- // 当前激活的面板(如果是手风琴模式,绑定值类型需要为string,否则为array)
654
- accordion: {
655
- type: Boolean,
656
- default: false
657
- }
658
- },
659
- data: function data() {
660
- return {
661
- actives: null,
662
- lastActive: null
663
- };
664
- },
835
+ var getTarget = function getTarget() {
836
+ var memo = {};
837
+ return function memorize(target) {
838
+ if (typeof memo[target] === 'undefined') {
839
+ var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
665
840
 
666
- watch: {
667
- value: {
668
- handler: function handler() {
669
- var actives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
841
+ if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
842
+ try {
843
+ // This will throw an exception if access to iframe is blocked
844
+ // due to cross-origin restrictions
845
+ styleTarget = styleTarget.contentDocument.head;
846
+ } catch (e) {
847
+ // istanbul ignore next
848
+ styleTarget = null;
849
+ }
850
+ }
670
851
 
671
- this.setActives(actives);
672
- },
852
+ memo[target] = styleTarget;
853
+ }
673
854
 
674
- immediate: true,
675
- deep: true
676
- },
677
- accordion: {
678
- handler: function handler() {
679
- this.setActives(this.actives);
680
- this.updateActivesModel();
681
- },
855
+ return memo[target];
856
+ };
857
+ }();
682
858
 
683
- immediate: true,
684
- deep: true
685
- }
686
- },
687
- created: function created() {
688
- (!this.actives || this.actives.length === 0) && this.expandAll && this.toggleExpandAll();
689
- },
859
+ function listToStyles(list, options) {
860
+ var styles = [];
861
+ var newStyles = {};
690
862
 
691
- methods: {
692
- setActives: function setActives() {
693
- var actives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
863
+ for (var i = 0; i < list.length; i++) {
864
+ var item = list[i];
865
+ var id = options.base ? item[0] + options.base : item[0];
866
+ var css = item[1];
867
+ var media = item[2];
868
+ var sourceMap = item[3];
869
+ var part = {
870
+ css: css,
871
+ media: media,
872
+ sourceMap: sourceMap
873
+ };
694
874
 
695
- actives = [].concat(Array.isArray(actives) ? actives : actives ? [actives] : []);
696
- if (this.accordion) {
697
- actives = actives.length > 0 ? [actives[0]] : [];
698
- }
699
- this.actives = actives;
700
- },
701
- updateActivesModel: function updateActivesModel() {
702
- this.$emit('change', this.accordion ? this.actives[0] : this.actives);
703
- },
875
+ if (!newStyles[id]) {
876
+ styles.push(newStyles[id] = {
877
+ id: id,
878
+ parts: [part]
879
+ });
880
+ } else {
881
+ newStyles[id].parts.push(part);
882
+ }
883
+ }
704
884
 
705
- // 根据传入的数组 收起或展开 collapse-item
706
- toggleExpandAll: function toggleExpandAll() {
707
- var actives = [];
708
- var collapseItem = this.$slots.default || [];
709
- collapseItem.map(function () {
710
- var vnode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
711
- var _vnode$componentOptio = vnode.componentOptions,
712
- componentOptions = _vnode$componentOptio === undefined ? {} : _vnode$componentOptio;
713
- var _componentOptions$pro = componentOptions.propsData,
714
- propsData = _componentOptions$pro === undefined ? {} : _componentOptions$pro,
715
- tag = componentOptions.tag;
716
- var name = propsData.name;
885
+ return styles;
886
+ }
887
+
888
+ function addStylesToDom(styles, options) {
889
+ for (var i = 0; i < styles.length; i++) {
890
+ var item = styles[i];
891
+ var domStyle = stylesInDom[item.id];
892
+ var j = 0;
893
+
894
+ if (domStyle) {
895
+ domStyle.refs++;
896
+
897
+ for (; j < domStyle.parts.length; j++) {
898
+ domStyle.parts[j](item.parts[j]);
899
+ }
717
900
 
718
- if (tag === 'to-collapse-item') {
719
- actives.push(name);
720
- }
721
- });
722
- this.setActives(actives);
723
- this.updateActivesModel();
724
- },
901
+ for (; j < item.parts.length; j++) {
902
+ domStyle.parts.push(addStyle(item.parts[j], options));
903
+ }
904
+ } else {
905
+ var parts = [];
725
906
 
726
- // collapse 为true时 为收起
727
- change: function change(name, collapse) {
728
- if (this.accordion) {
729
- this.lastActive = this.actives[0];
730
- this.actives = collapse ? [] : name ? [name] : [];
731
- } else {
732
- if (collapse) {
733
- var index = this.actives.findIndex(function (nameItem) {
734
- return name === nameItem;
735
- });
736
- if (index > -1) this.actives.splice(index, 1);
737
- } else {
738
- this.actives.push(name);
739
- }
740
- }
741
- this.updateActivesModel();
742
- }
743
- }
744
- });
745
- // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=script&lang=js
746
- /* harmony default export */ var src_collapsevue_type_script_lang_js = (collapsevue_type_script_lang_js);
747
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
748
- var componentNormalizer = __webpack_require__(0);
907
+ for (; j < item.parts.length; j++) {
908
+ parts.push(addStyle(item.parts[j], options));
909
+ }
749
910
 
750
- // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue
911
+ stylesInDom[item.id] = {
912
+ id: item.id,
913
+ refs: 1,
914
+ parts: parts
915
+ };
916
+ }
917
+ }
918
+ }
751
919
 
920
+ function insertStyleElement(options) {
921
+ var style = document.createElement('style');
752
922
 
923
+ if (typeof options.attributes.nonce === 'undefined') {
924
+ var nonce = true ? __webpack_require__.nc : undefined;
753
925
 
926
+ if (nonce) {
927
+ options.attributes.nonce = nonce;
928
+ }
929
+ }
754
930
 
931
+ Object.keys(options.attributes).forEach(function (key) {
932
+ style.setAttribute(key, options.attributes[key]);
933
+ });
755
934
 
756
- /* normalize component */
935
+ if (typeof options.insert === 'function') {
936
+ options.insert(style);
937
+ } else {
938
+ var target = getTarget(options.insert || 'head');
757
939
 
758
- var component = Object(componentNormalizer["a" /* default */])(
759
- src_collapsevue_type_script_lang_js,
760
- render,
761
- staticRenderFns,
762
- false,
763
- null,
764
- "05720247",
765
- null
766
-
767
- )
940
+ if (!target) {
941
+ throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
942
+ }
768
943
 
769
- /* harmony default export */ var collapse = (component.exports);
770
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=template&id=30d49ba6&scoped=true
771
- var collapse_itemvue_type_template_id_30d49ba6_scoped_true_render = function () {
772
- var _vm = this
773
- var _h = _vm.$createElement
774
- var _c = _vm._self._c || _h
775
- return _c(
776
- "div",
777
- {
778
- staticClass: "to-collapse-item",
779
- attrs: { id: "collapse-item", role: "collapseItme", name: _vm.name },
780
- },
781
- [
782
- _c(
783
- "div",
784
- {
785
- directives: [
786
- {
787
- name: "size",
788
- rawName: "v-size",
789
- value: _vm.titleSize,
790
- expression: "titleSize",
791
- },
792
- ],
793
- staticClass:
794
- "to-header to-header-fillet-normal to-collapse-item-header",
795
- on: {
796
- click: function ($event) {
797
- $event.stopPropagation()
798
- return _vm.change()
799
- },
800
- },
801
- },
802
- [
803
- _c(
804
- "div",
805
- {
806
- staticClass: "text to-pointer",
807
- style: {
808
- paddingLeft: _vm.$slots.title ? 0 : "" + _vm.cpadding,
809
- paddingRight: "" + _vm.cpadding,
810
- },
811
- },
812
- [
813
- _c(
814
- "span",
815
- { on: { click: _vm.handleTitleClick } },
816
- [
817
- _vm._t("title", [
818
- _vm._v("\n\t\t\t\t\t" + _vm._s(_vm.title) + "\n\t\t\t\t"),
819
- ]),
820
- ],
821
- 2
822
- ),
823
- ]
824
- ),
825
- _c(
826
- "div",
827
- { staticClass: "fn to-collapse-icon-box" },
828
- [
829
- _vm._t("icon", [
830
- _c(
831
- "div",
832
- {
833
- staticClass: "to-icon-unfold ",
834
- class: {
835
- "to-collapse-item-icon-active": _vm.collapse,
836
- },
837
- style: {
838
- transition: _vm.isReady
839
- ? "transform " + _vm.duration + "ms ease-in-out"
840
- : "none",
841
- },
842
- },
843
- [_c("span")]
844
- ),
845
- ]),
846
- ],
847
- 2
848
- ),
849
- ]
850
- ),
851
- _c(
852
- "div",
853
- {
854
- staticClass: "collapse-item-content",
855
- style: {
856
- height: _vm.collapse ? "0px" : _vm.realHeight,
857
- overflow: "hidden",
858
- transition: _vm.isReady
859
- ? "height " + _vm.duration + "ms ease-in-out"
860
- : "none",
861
- },
862
- },
863
- [
864
- _c(
865
- "div",
866
- { ref: "contentBox", staticClass: "collapse-item-content__box" },
867
- [_vm._t("default")],
868
- 2
869
- ),
870
- ]
871
- ),
872
- _c("div", { staticClass: "to-line to-line-color-lightGray" }),
873
- ]
874
- )
944
+ target.appendChild(style);
945
+ }
946
+
947
+ return style;
875
948
  }
876
- var collapse_itemvue_type_template_id_30d49ba6_scoped_true_staticRenderFns = []
877
- collapse_itemvue_type_template_id_30d49ba6_scoped_true_render._withStripped = true
878
949
 
950
+ function removeStyleElement(style) {
951
+ // istanbul ignore if
952
+ if (style.parentNode === null) {
953
+ return false;
954
+ }
955
+
956
+ style.parentNode.removeChild(style);
957
+ }
958
+ /* istanbul ignore next */
879
959
 
880
- // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=template&id=30d49ba6&scoped=true
881
960
 
882
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js
883
- //
884
- //
885
- //
886
- //
887
- //
888
- //
889
- //
890
- //
891
- //
892
- //
893
- //
894
- //
895
- //
896
- //
897
- //
898
- //
899
- //
900
- //
901
- //
902
- //
903
- //
904
- //
905
- //
906
- //
907
- //
908
- //
909
- //
910
- //
911
- //
912
- //
913
- //
914
- //
915
- //
916
- //
917
- //
918
- //
919
- //
920
- //
921
- //
922
- //
923
- //
924
- //
925
- //
926
- //
927
- //
928
- //
929
- //
930
- //
931
- //
932
- //
933
- //
961
+ var replaceText = function replaceText() {
962
+ var textStore = [];
963
+ return function replace(index, replacement) {
964
+ textStore[index] = replacement;
965
+ return textStore.filter(Boolean).join('\n');
966
+ };
967
+ }();
934
968
 
935
- /* harmony default export */ var collapse_itemvue_type_script_lang_js = ({
936
- name: 'ToCollapseItem',
937
- componentName: 'ToCollapseItem',
938
- model: {
939
- event: 'change'
940
- },
941
- props: {
942
- // padding
943
- padding: { type: [Number, String], default: 1 },
944
- // 是否收起
945
- value: {
946
- type: [String, Boolean, Number],
947
- default: true
948
- },
949
- // 唯一标志符
950
- name: {
951
- type: [String, Number],
952
- default: ''
953
- },
954
- // 面板标题
955
- title: {
956
- type: String,
957
- default: ''
958
- },
959
- // 面板标题文字大小
960
- titleSize: {
961
- type: String,
962
- default: 'm'
963
- },
964
- disabled: {
965
- type: Boolean,
966
- default: false
967
- }
968
- },
969
- data: function data() {
970
- return {
971
- isReady: false,
972
- collapse: true,
973
- realHeight: '',
974
- duration: 250,
975
- collapseTimer: null
976
- };
977
- },
969
+ function applyToSingletonTag(style, index, remove, obj) {
970
+ var css = remove ? '' : obj.css; // For old IE
978
971
 
979
- computed: {
980
- cpadding: function cpadding() {
981
- return this.toFixedPx(this.padding);
982
- },
983
- valueInParent: function valueInParent() {
984
- if (this.$parent && this.$parent.$vnode && this.$parent.$vnode.componentOptions.tag === 'to-collapse') {
985
- var actives = this.$parent.actives || [];
986
- return !actives.includes(this.name);
987
- } else {
988
- return undefined;
989
- }
990
- }
991
- },
992
- watch: {
993
- valueInParent: {
994
- handler: function handler(collapse) {
995
- this.handleCollapse(collapse);
996
- },
972
+ /* istanbul ignore if */
997
973
 
998
- deep: true
999
- },
1000
- value: {
1001
- handler: function handler(collapse) {
1002
- // 父级为to-collapse时
1003
- if (this.valueInParent !== undefined) {
1004
- collapse = this.valueInParent;
1005
- } else {
1006
- collapse = !!collapse;
1007
- }
1008
- this.handleCollapse(collapse);
1009
- },
974
+ if (style.styleSheet) {
975
+ style.styleSheet.cssText = replaceText(index, css);
976
+ } else {
977
+ var cssNode = document.createTextNode(css);
978
+ var childNodes = style.childNodes;
1010
979
 
1011
- immediate: true,
1012
- deep: true
1013
- }
1014
- },
1015
- methods: {
1016
- handleTitleClick: function handleTitleClick(event) {
1017
- this.$emit('titleClicked', event);
1018
- },
1019
- handleCollapse: function handleCollapse(collapse) {
1020
- var _this = this;
980
+ if (childNodes[index]) {
981
+ style.removeChild(childNodes[index]);
982
+ }
1021
983
 
1022
- if (this.disabled) return;
1023
- this.$nextTick(function () {
1024
- if (!_this.$refs.contentBox) return;
1025
- _this.realHeight = _this.$refs.contentBox.clientHeight + 'px' || false;
1026
- var macroTask = null;
1027
- macroTask = setTimeout(function () {
1028
- _this.collapse = collapse;
1029
- clearTimeout(macroTask);
1030
- clearTimeout(_this.collapseTimer);
1031
- macroTask = null;
1032
- _this.collapseTimer = null;
1033
- _this.collapseTimer = setTimeout(function () {
1034
- _this.isReady = true;
1035
- _this.realHeight = 'auto';
1036
- }, _this.duration);
1037
- });
1038
- });
1039
- },
1040
- change: function change(collapse) {
1041
- if (this.disabled) return;
1042
- collapse = collapse !== undefined ? collapse : !this.collapse;
1043
- this.handleCollapse(collapse);
1044
- this.$emit('change', collapse);
1045
- typeof this.$parent.change === 'function' && this.$parent.change(this.name, collapse);
1046
- },
1047
- toFixedPx: function toFixedPx(num) {
1048
- if (isNaN(Number(num))) {
1049
- if (/(%|px|pt|em|rem)$/.test(num)) {
1050
- return num;
1051
- } else {
1052
- return '100%';
1053
- }
1054
- } else {
1055
- return num + 'em';
1056
- }
1057
- }
1058
- }
1059
- });
1060
- // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js
1061
- /* harmony default export */ var src_collapse_itemvue_type_script_lang_js = (collapse_itemvue_type_script_lang_js);
1062
- // EXTERNAL MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=style&index=0&id=30d49ba6&prod&scoped=true&lang=css
1063
- var collapse_itemvue_type_style_index_0_id_30d49ba6_prod_scoped_true_lang_css = __webpack_require__(95);
984
+ if (childNodes.length) {
985
+ style.insertBefore(cssNode, childNodes[index]);
986
+ } else {
987
+ style.appendChild(cssNode);
988
+ }
989
+ }
990
+ }
1064
991
 
1065
- // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue
992
+ function applyToTag(style, options, obj) {
993
+ var css = obj.css;
994
+ var media = obj.media;
995
+ var sourceMap = obj.sourceMap;
996
+
997
+ if (media) {
998
+ style.setAttribute('media', media);
999
+ }
1066
1000
 
1001
+ if (sourceMap && btoa) {
1002
+ css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
1003
+ } // For old IE
1067
1004
 
1005
+ /* istanbul ignore if */
1068
1006
 
1069
1007
 
1008
+ if (style.styleSheet) {
1009
+ style.styleSheet.cssText = css;
1010
+ } else {
1011
+ while (style.firstChild) {
1012
+ style.removeChild(style.firstChild);
1013
+ }
1070
1014
 
1015
+ style.appendChild(document.createTextNode(css));
1016
+ }
1017
+ }
1071
1018
 
1072
- /* normalize component */
1019
+ var singleton = null;
1020
+ var singletonCounter = 0;
1073
1021
 
1074
- var collapse_item_component = Object(componentNormalizer["a" /* default */])(
1075
- src_collapse_itemvue_type_script_lang_js,
1076
- collapse_itemvue_type_template_id_30d49ba6_scoped_true_render,
1077
- collapse_itemvue_type_template_id_30d49ba6_scoped_true_staticRenderFns,
1078
- false,
1079
- null,
1080
- "30d49ba6",
1081
- null
1082
-
1083
- )
1022
+ function addStyle(obj, options) {
1023
+ var style;
1024
+ var update;
1025
+ var remove;
1084
1026
 
1085
- /* harmony default export */ var collapse_item = (collapse_item_component.exports);
1086
- // CONCATENATED MODULE: ./packages/collapse/index.js
1027
+ if (options.singleton) {
1028
+ var styleIndex = singletonCounter++;
1029
+ style = singleton || (singleton = insertStyleElement(options));
1030
+ update = applyToSingletonTag.bind(null, style, styleIndex, false);
1031
+ remove = applyToSingletonTag.bind(null, style, styleIndex, true);
1032
+ } else {
1033
+ style = insertStyleElement(options);
1034
+ update = applyToTag.bind(null, style, options);
1087
1035
 
1036
+ remove = function remove() {
1037
+ removeStyleElement(style);
1038
+ };
1039
+ }
1088
1040
 
1041
+ update(obj);
1042
+ return function updateStyle(newObj) {
1043
+ if (newObj) {
1044
+ if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
1045
+ return;
1046
+ }
1089
1047
 
1090
- /* istanbul ignore next */
1091
- collapse.install = function (Vue) {
1092
- Vue.component(collapse.name, collapse);
1093
- Vue.component(collapse_item.name, collapse_item);
1094
- };
1048
+ update(obj = newObj);
1049
+ } else {
1050
+ remove();
1051
+ }
1052
+ };
1053
+ }
1095
1054
 
1096
- /* harmony default export */ var packages_collapse = __webpack_exports__["default"] = (collapse);
1055
+ module.exports = function (list, options) {
1056
+ options = options || {};
1057
+ options.attributes = typeof options.attributes === 'object' ? options.attributes : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
1058
+ // tags it will allow on a page
1059
+
1060
+ if (!options.singleton && typeof options.singleton !== 'boolean') {
1061
+ options.singleton = isOldIE();
1062
+ }
1063
+
1064
+ var styles = listToStyles(list, options);
1065
+ addStylesToDom(styles, options);
1066
+ return function update(newList) {
1067
+ var mayRemove = [];
1068
+
1069
+ for (var i = 0; i < styles.length; i++) {
1070
+ var item = styles[i];
1071
+ var domStyle = stylesInDom[item.id];
1072
+
1073
+ if (domStyle) {
1074
+ domStyle.refs--;
1075
+ mayRemove.push(domStyle);
1076
+ }
1077
+ }
1078
+
1079
+ if (newList) {
1080
+ var newStyles = listToStyles(newList, options);
1081
+ addStylesToDom(newStyles, options);
1082
+ }
1083
+
1084
+ for (var _i = 0; _i < mayRemove.length; _i++) {
1085
+ var _domStyle = mayRemove[_i];
1086
+
1087
+ if (_domStyle.refs === 0) {
1088
+ for (var j = 0; j < _domStyle.parts.length; j++) {
1089
+ _domStyle.parts[j]();
1090
+ }
1091
+
1092
+ delete stylesInDom[_domStyle.id];
1093
+ }
1094
+ }
1095
+ };
1096
+ };
1097
1097
 
1098
1098
  /***/ }),
1099
1099
 
1100
- /***/ 95:
1100
+ /***/ 98:
1101
1101
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1102
1102
 
1103
1103
  "use strict";
1104
- /* harmony import */ var _node_modules_style_loader_dist_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_collapse_item_vue_vue_type_style_index_0_id_30d49ba6_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
1104
+ /* harmony import */ var _node_modules_style_loader_dist_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_collapse_item_vue_vue_type_style_index_0_id_30d49ba6_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
1105
1105
  /* harmony import */ var _node_modules_style_loader_dist_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_collapse_item_vue_vue_type_style_index_0_id_30d49ba6_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_collapse_item_vue_vue_type_style_index_0_id_30d49ba6_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
1106
1106
  /* unused harmony reexport * */
1107
1107
 
1108
1108
 
1109
1109
  /***/ }),
1110
1110
 
1111
- /***/ 96:
1111
+ /***/ 99:
1112
1112
  /***/ (function(module, exports, __webpack_require__) {
1113
1113
 
1114
- exports = module.exports = __webpack_require__(11)(false);
1114
+ exports = module.exports = __webpack_require__(7)(false);
1115
1115
  // Module
1116
1116
  exports.push([module.i, "\n.to-pointer[data-v-30d49ba6] {\n\tcursor: pointer;\n}\n.to-collapse-item-icon-active[data-v-30d49ba6] {\n\ttransform: rotate(-90deg);\n}\n.to-collapse-icon-box .to-icon-unfold[data-v-30d49ba6] {\n\ttext-align: right !important;\n\twidth: 1em !important;\n}\n.to-collapse-item > .to-header > .text[data-v-30d49ba6]{\n\tfont-size: inherit;\n}\n", ""]);
1117
1117