ai.touchui-vue 1.40.2 → 1.41.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 (127) hide show
  1. package/lib/affix.js +2 -2
  2. package/lib/ai.touchui-vue.common.js +901 -819
  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 +18 -18
  10. package/lib/card.js +2 -2
  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 +12 -12
  17. package/lib/color.js +2 -2
  18. package/lib/countdown.js +2 -2
  19. package/lib/date-picker.js +120 -480
  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 +2 -2
  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 +6 -6
  37. package/lib/index.js +1 -1
  38. package/lib/input.js +2 -2
  39. package/lib/ip.js +2 -2
  40. package/lib/line.js +2 -2
  41. package/lib/loading.js +2 -2
  42. package/lib/longtap.js +2 -2
  43. package/lib/menu-icon.js +670 -673
  44. package/lib/message.js +2 -2
  45. package/lib/msg.js +2 -2
  46. package/lib/org.js +22 -22
  47. package/lib/padding.js +2 -2
  48. package/lib/page.js +2 -2
  49. package/lib/param.js +2 -2
  50. package/lib/pic.js +2 -2
  51. package/lib/popup.js +2 -2
  52. package/lib/progress.js +2 -2
  53. package/lib/range.js +10 -10
  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 +4 -4
  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 +2 -2
  67. package/lib/table.js +4 -4
  68. package/lib/tag.js +2 -2
  69. package/lib/theme/css/theme/B-Design.css +1 -1
  70. package/lib/theme/css/theme/aiplan.css +1 -1
  71. package/lib/theme/css/theme/aiplangd.css +1 -1
  72. package/lib/theme/css/theme/chbn.css +1 -1
  73. package/lib/theme/css/theme/default.css +1 -1
  74. package/lib/theme/css/theme/dt.css +1 -1
  75. package/lib/theme/css/theme/ecloud.css +1 -1
  76. package/lib/theme/css/theme/hongkong.css +1 -1
  77. package/lib/theme/css/theme/logistics.css +1 -1
  78. package/lib/theme/css/theme/narrow.css +1 -1
  79. package/lib/theme/css/theme/sdpf.css +1 -1
  80. package/lib/theme/css/theme/upc.css +1 -1
  81. package/lib/theme/css/theme/website.css +1 -1
  82. package/lib/theme/css/theme/workbench-gz.css +1 -1
  83. package/lib/theme/css/theme/zj.css +1 -1
  84. package/lib/timeline.js +2 -2
  85. package/lib/tip.js +2 -2
  86. package/lib/tooltip.js +2 -2
  87. package/lib/transfer.js +2 -2
  88. package/lib/tree.js +2 -2
  89. package/lib/upload.js +6 -6
  90. package/package.json +1 -1
  91. package/packages/date-picker/src/date-picker.vue +40 -12
  92. package/packages/date-picker/src/picker.vue +5 -1
  93. package/packages/theme/lib/css/theme/B-Design.css +1 -1
  94. package/packages/theme/lib/css/theme/aiplan.css +1 -1
  95. package/packages/theme/lib/css/theme/aiplangd.css +1 -1
  96. package/packages/theme/lib/css/theme/chbn.css +1 -1
  97. package/packages/theme/lib/css/theme/default.css +1 -1
  98. package/packages/theme/lib/css/theme/dt.css +1 -1
  99. package/packages/theme/lib/css/theme/ecloud.css +1 -1
  100. package/packages/theme/lib/css/theme/hongkong.css +1 -1
  101. package/packages/theme/lib/css/theme/logistics.css +1 -1
  102. package/packages/theme/lib/css/theme/narrow.css +1 -1
  103. package/packages/theme/lib/css/theme/sdpf.css +1 -1
  104. package/packages/theme/lib/css/theme/upc.css +1 -1
  105. package/packages/theme/lib/css/theme/website.css +1 -1
  106. package/packages/theme/lib/css/theme/workbench-gz.css +1 -1
  107. package/packages/theme/lib/css/theme/zj.css +1 -1
  108. package/packages/theme/src/less/component/calendar-dark.less +27 -1
  109. package/packages/theme/src/less/component/calendar.less +15 -11
  110. package/packages/theme/src/less/element/datePicker-dark.less +15 -0
  111. package/packages/theme/src/less/element/datePicker.less +17 -0
  112. package/packages/theme/src/less/theme/B-Design.less +2 -0
  113. package/packages/theme/src/less/theme/aiplan.less +2 -0
  114. package/packages/theme/src/less/theme/aiplangd.less +2 -0
  115. package/packages/theme/src/less/theme/chbn.less +2 -0
  116. package/packages/theme/src/less/theme/default.less +2 -0
  117. package/packages/theme/src/less/theme/dt.less +2 -0
  118. package/packages/theme/src/less/theme/ecloud.less +2 -0
  119. package/packages/theme/src/less/theme/hongkong.less +2 -0
  120. package/packages/theme/src/less/theme/logistics.less +2 -0
  121. package/packages/theme/src/less/theme/narrow.less +2 -0
  122. package/packages/theme/src/less/theme/sdpf.less +2 -0
  123. package/packages/theme/src/less/theme/upc.less +2 -0
  124. package/packages/theme/src/less/theme/website.less +2 -0
  125. package/packages/theme/src/less/theme/workbench-gz.less +2 -0
  126. package/packages/theme/src/less/theme/zj.less +2 -0
  127. package/src/index.js +64 -2
@@ -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 = 343);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 340);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -190,415 +190,6 @@ function normalizeComponent(
190
190
  }
191
191
 
192
192
 
193
- /***/ }),
194
-
195
- /***/ 11:
196
- /***/ (function(module, exports, __webpack_require__) {
197
-
198
- "use strict";
199
-
200
-
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
209
-
210
- list.toString = function toString() {
211
- return this.map(function (item) {
212
- var content = cssWithMappingToString(item, useSourceMap);
213
-
214
- if (item[2]) {
215
- return "@media ".concat(item[2], "{").concat(content, "}");
216
- }
217
-
218
- return content;
219
- }).join('');
220
- }; // import a list of modules into the list
221
- // eslint-disable-next-line func-names
222
-
223
-
224
- list.i = function (modules, mediaQuery) {
225
- if (typeof modules === 'string') {
226
- // eslint-disable-next-line no-param-reassign
227
- modules = [[null, modules, '']];
228
- }
229
-
230
- var alreadyImportedModules = {};
231
-
232
- for (var i = 0; i < this.length; i++) {
233
- // eslint-disable-next-line prefer-destructuring
234
- var id = this[i][0];
235
-
236
- if (id != null) {
237
- alreadyImportedModules[id] = true;
238
- }
239
- }
240
-
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
-
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
- }
253
-
254
- list.push(item);
255
- }
256
- }
257
- };
258
-
259
- return list;
260
- };
261
-
262
- function cssWithMappingToString(item, useSourceMap) {
263
- var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
264
-
265
- var cssMapping = item[3];
266
-
267
- if (!cssMapping) {
268
- return content;
269
- }
270
-
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
- }
278
-
279
- return [content].join('\n');
280
- } // Adapted from convert-source-map (MIT)
281
-
282
-
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
- }
289
-
290
- /***/ }),
291
-
292
- /***/ 12:
293
- /***/ (function(module, exports, __webpack_require__) {
294
-
295
- "use strict";
296
-
297
-
298
- var stylesInDom = {};
299
-
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
-
312
- return memo;
313
- };
314
- }();
315
-
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
321
-
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
- }
332
-
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
- }
399
- }
400
-
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
-
407
- if (nonce) {
408
- options.attributes.nonce = nonce;
409
- }
410
- }
411
-
412
- Object.keys(options.attributes).forEach(function (key) {
413
- style.setAttribute(key, options.attributes[key]);
414
- });
415
-
416
- if (typeof options.insert === 'function') {
417
- options.insert(style);
418
- } else {
419
- var target = getTarget(options.insert || 'head');
420
-
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
- }
424
-
425
- target.appendChild(style);
426
- }
427
-
428
- return style;
429
- }
430
-
431
- function removeStyleElement(style) {
432
- // istanbul ignore if
433
- if (style.parentNode === null) {
434
- return false;
435
- }
436
-
437
- style.parentNode.removeChild(style);
438
- }
439
- /* istanbul ignore next */
440
-
441
-
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
-
450
- function applyToSingletonTag(style, index, remove, obj) {
451
- var css = remove ? '' : obj.css; // For old IE
452
-
453
- /* istanbul ignore if */
454
-
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
-
461
- if (childNodes[index]) {
462
- style.removeChild(childNodes[index]);
463
- }
464
-
465
- if (childNodes.length) {
466
- style.insertBefore(cssNode, childNodes[index]);
467
- } else {
468
- style.appendChild(cssNode);
469
- }
470
- }
471
- }
472
-
473
- function applyToTag(style, options, obj) {
474
- var css = obj.css;
475
- var media = obj.media;
476
- var sourceMap = obj.sourceMap;
477
-
478
- if (media) {
479
- style.setAttribute('media', media);
480
- }
481
-
482
- if (sourceMap && btoa) {
483
- css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
484
- } // For old IE
485
-
486
- /* istanbul ignore if */
487
-
488
-
489
- if (style.styleSheet) {
490
- style.styleSheet.cssText = css;
491
- } else {
492
- while (style.firstChild) {
493
- style.removeChild(style.firstChild);
494
- }
495
-
496
- style.appendChild(document.createTextNode(css));
497
- }
498
- }
499
-
500
- var singleton = null;
501
- var singletonCounter = 0;
502
-
503
- function addStyle(obj, options) {
504
- var style;
505
- var update;
506
- var remove;
507
-
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);
516
-
517
- remove = function remove() {
518
- removeStyleElement(style);
519
- };
520
- }
521
-
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;
527
- }
528
-
529
- update(obj = newObj);
530
- } else {
531
- remove();
532
- }
533
- };
534
- }
535
-
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
-
541
- if (!options.singleton && typeof options.singleton !== 'boolean') {
542
- options.singleton = isOldIE();
543
- }
544
-
545
- var styles = listToStyles(list, options);
546
- addStylesToDom(styles, options);
547
- return function update(newList) {
548
- var mayRemove = [];
549
-
550
- for (var i = 0; i < styles.length; i++) {
551
- var item = styles[i];
552
- var domStyle = stylesInDom[item.id];
553
-
554
- if (domStyle) {
555
- domStyle.refs--;
556
- mayRemove.push(domStyle);
557
- }
558
- }
559
-
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];
567
-
568
- if (_domStyle.refs === 0) {
569
- for (var j = 0; j < _domStyle.parts.length; j++) {
570
- _domStyle.parts[j]();
571
- }
572
-
573
- delete stylesInDom[_domStyle.id];
574
- }
575
- }
576
- };
577
- };
578
-
579
- /***/ }),
580
-
581
- /***/ 19:
582
- /***/ (function(module, exports, __webpack_require__) {
583
-
584
- var content = __webpack_require__(96);
585
-
586
- if (typeof content === 'string') {
587
- content = [[module.i, content, '']];
588
- }
589
-
590
- var options = {}
591
-
592
- options.insert = "head";
593
- options.singleton = false;
594
-
595
- var update = __webpack_require__(12)(content, options);
596
-
597
- if (content.locals) {
598
- module.exports = content.locals;
599
- }
600
-
601
-
602
193
  /***/ }),
603
194
 
604
195
  /***/ 3:
@@ -608,14 +199,14 @@ module.exports = require("ai.touchui-vue/lib/locale");
608
199
 
609
200
  /***/ }),
610
201
 
611
- /***/ 343:
202
+ /***/ 340:
612
203
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
613
204
 
614
205
  "use strict";
615
206
  // ESM COMPAT FLAG
616
207
  __webpack_require__.r(__webpack_exports__);
617
208
 
618
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/date-picker.vue?vue&type=template&id=051d024a
209
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/date-picker.vue?vue&type=template&id=cce6c116
619
210
  var render = function () {
620
211
  var _vm = this
621
212
  var _h = _vm.$createElement
@@ -689,12 +280,18 @@ var render = function () {
689
280
  "to-float",
690
281
  {
691
282
  ref: "layer",
283
+ staticClass: "to-date-picker-layer",
692
284
  attrs: {
693
285
  lazy: _vm.lazy,
694
286
  slide: _vm.layerSlide,
695
287
  position: _vm.layerPosition,
696
288
  paddng: 0.5,
697
- width: _vm.$platform === "pc" ? 23 : "",
289
+ width:
290
+ _vm.$platform === "pc"
291
+ ? _vm.shortcuts && _vm.shortcuts.length && _vm.type !== "time"
292
+ ? 29
293
+ : 23
294
+ : "",
698
295
  align: _vm.optionAlign
699
296
  ? _vm.optionAlign
700
297
  : _vm.$pc
@@ -705,35 +302,66 @@ var render = function () {
705
302
  },
706
303
  [
707
304
  _vm.$pc || _vm.showCalendar
708
- ? _c(
709
- "to-scroll",
710
- [
711
- _c("to-calendar", {
712
- ref: "calendar",
713
- attrs: {
714
- time: _vm.time,
715
- type: _vm.type,
716
- min: _vm.min,
717
- max: _vm.max,
718
- "before-change": _vm.beforeChange,
719
- },
720
- on: {
721
- change: _vm.select,
722
- close: function ($event) {
723
- return _vm.$refs.layer.close()
305
+ ? _c("to-scroll", [
306
+ _c(
307
+ "div",
308
+ { staticClass: "wrapper" },
309
+ [
310
+ _vm.shortcuts && _vm.shortcuts.length && _vm.type !== "time"
311
+ ? _c("div", { staticClass: "shortcuts" }, [
312
+ _c(
313
+ "ul",
314
+ _vm._l(_vm.shortcuts, function (item, index) {
315
+ return _c(
316
+ "li",
317
+ {
318
+ key: index,
319
+ on: {
320
+ click: function ($event) {
321
+ return _vm.handleShortcut(item)
322
+ },
323
+ },
324
+ },
325
+ [
326
+ _vm._v(
327
+ "\n\t\t\t\t\t\t\t" +
328
+ _vm._s(item.label) +
329
+ "\n\t\t\t\t\t\t"
330
+ ),
331
+ ]
332
+ )
333
+ }),
334
+ 0
335
+ ),
336
+ ])
337
+ : _vm._e(),
338
+ _c("to-calendar", {
339
+ ref: "calendar",
340
+ attrs: {
341
+ time: _vm.time,
342
+ type: _vm.type,
343
+ min: _vm.min,
344
+ max: _vm.max,
345
+ "before-change": _vm.beforeChange,
724
346
  },
725
- },
726
- model: {
727
- value: _vm.date,
728
- callback: function ($$v) {
729
- _vm.date = $$v
347
+ on: {
348
+ change: _vm.select,
349
+ close: function ($event) {
350
+ return _vm.$refs.layer.close()
351
+ },
730
352
  },
731
- expression: "date",
732
- },
733
- }),
734
- ],
735
- 1
736
- )
353
+ model: {
354
+ value: _vm.date,
355
+ callback: function ($$v) {
356
+ _vm.date = $$v
357
+ },
358
+ expression: "date",
359
+ },
360
+ }),
361
+ ],
362
+ 1
363
+ ),
364
+ ])
737
365
  : _c("picker", {
738
366
  attrs: {
739
367
  time: _vm.time,
@@ -769,7 +397,7 @@ var staticRenderFns = []
769
397
  render._withStripped = true
770
398
 
771
399
 
772
- // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=template&id=051d024a
400
+ // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=template&id=cce6c116
773
401
 
774
402
  // EXTERNAL MODULE: external "ai.touchui-vue/lib/locale"
775
403
  var locale_ = __webpack_require__(3);
@@ -778,8 +406,8 @@ var locale_ = __webpack_require__(3);
778
406
  var tip_ = __webpack_require__(5);
779
407
  var tip_default = /*#__PURE__*/__webpack_require__.n(tip_);
780
408
 
781
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=4176400e
782
- var pickervue_type_template_id_4176400e_render = function () {
409
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=130f8241
410
+ var pickervue_type_template_id_130f8241_render = function () {
783
411
  var _vm = this
784
412
  var _h = _vm.$createElement
785
413
  var _c = _vm._self._c || _h
@@ -968,11 +596,11 @@ var pickervue_type_template_id_4176400e_render = function () {
968
596
  1
969
597
  )
970
598
  }
971
- var pickervue_type_template_id_4176400e_staticRenderFns = []
972
- pickervue_type_template_id_4176400e_render._withStripped = true
599
+ var pickervue_type_template_id_130f8241_staticRenderFns = []
600
+ pickervue_type_template_id_130f8241_render._withStripped = true
973
601
 
974
602
 
975
- // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=4176400e
603
+ // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=130f8241
976
604
 
977
605
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=script&lang=js
978
606
  //
@@ -1300,7 +928,11 @@ pickervue_type_template_id_4176400e_render._withStripped = true
1300
928
  } else if (this.type === 'time') {
1301
929
  this.$emit('change', this.hour + ':' + this.minute + ':' + this.second);
1302
930
  } else {
1303
- this.$emit('change', this.year + '-' + this.month + '-' + this.day);
931
+ if (this.day) {
932
+ this.$emit('change', this.year + '-' + this.month + '-' + this.day);
933
+ } else {
934
+ this.$emit('change', this.year + '-' + this.month);
935
+ }
1304
936
  }
1305
937
  },
1306
938
  clear: function clear() {
@@ -1354,8 +986,8 @@ var componentNormalizer = __webpack_require__(0);
1354
986
 
1355
987
  var component = Object(componentNormalizer["a" /* default */])(
1356
988
  src_pickervue_type_script_lang_js,
1357
- pickervue_type_template_id_4176400e_render,
1358
- pickervue_type_template_id_4176400e_staticRenderFns,
989
+ pickervue_type_template_id_130f8241_render,
990
+ pickervue_type_template_id_130f8241_staticRenderFns,
1359
991
  false,
1360
992
  null,
1361
993
  null,
@@ -1365,7 +997,7 @@ var component = Object(componentNormalizer["a" /* default */])(
1365
997
 
1366
998
  /* harmony default export */ var picker = (component.exports);
1367
999
  // EXTERNAL MODULE: external "ai.touchui-vue/lib/utils/date"
1368
- var date_ = __webpack_require__(90);
1000
+ var date_ = __webpack_require__(89);
1369
1001
 
1370
1002
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/date-picker.vue?vue&type=script&lang=js
1371
1003
  //
@@ -1381,6 +1013,14 @@ var date_ = __webpack_require__(90);
1381
1013
  //
1382
1014
  //
1383
1015
  //
1016
+ //
1017
+ //
1018
+ //
1019
+ //
1020
+ //
1021
+ //
1022
+ //
1023
+ //
1384
1024
 
1385
1025
 
1386
1026
 
@@ -1530,6 +1170,16 @@ var date_ = __webpack_require__(90);
1530
1170
  clearable: {
1531
1171
  type: Boolean,
1532
1172
  default: true
1173
+ },
1174
+ shortcuts: {
1175
+ type: [Array, Boolean],
1176
+ default: function _default() {
1177
+ if (this.$TouchUI.datePicker && this.$TouchUI.datePicker.shortcuts) {
1178
+ return this.$TouchUI.datePicker.shortcuts(this);
1179
+ } else {
1180
+ return this.$TouchUI.datePicker.shortcuts;
1181
+ }
1182
+ }
1533
1183
  }
1534
1184
  },
1535
1185
  data: function data() {
@@ -1558,8 +1208,10 @@ var date_ = __webpack_require__(90);
1558
1208
  this.datedisplay = '';
1559
1209
  } else {
1560
1210
  // 检查数据是否和 valueFormat 相匹配,避免报错
1211
+ if (this.isDate(val)) {
1212
+ val = this.formatDate(val, this.valueFormat, '');
1213
+ }
1561
1214
  var newValue = val.trim().substring(0, this.valueFormat.length);
1562
-
1563
1215
  if (!Object(date_["matchFormat"])(newValue, this.valueFormat)) {
1564
1216
  return;
1565
1217
  }
@@ -1579,9 +1231,7 @@ var date_ = __webpack_require__(90);
1579
1231
  iValue: {
1580
1232
  handler: function handler(val) {
1581
1233
  this.$emit('change', val);
1582
- },
1583
-
1584
- immediate: true
1234
+ }
1585
1235
  },
1586
1236
  displayFormat: {
1587
1237
  handler: function handler(fmt) {
@@ -1606,6 +1256,9 @@ var date_ = __webpack_require__(90);
1606
1256
  },
1607
1257
 
1608
1258
  methods: {
1259
+ isDate: function isDate(obj) {
1260
+ return Object.prototype.toString.call(obj) === '[object Date]';
1261
+ },
1609
1262
  handleLayerClose: function handleLayerClose() {
1610
1263
  this.$refs.calendar.timeLayer = false;
1611
1264
  this.$refs.calendar.monthLayer = false;
@@ -1803,21 +1456,29 @@ var date_ = __webpack_require__(90);
1803
1456
  },
1804
1457
  focus: function focus() {
1805
1458
  this.$refs.inputBox.focus();
1459
+ },
1460
+ handleShortcut: function handleShortcut(item) {
1461
+ if (item && item.value && typeof item.value === 'function') {
1462
+ var date = item.value.call(this);
1463
+ if (date === null) {
1464
+ this.clear();
1465
+ } else {
1466
+ var formattedDate = this.formatDate(date, this.valueFormat, '');
1467
+ this.date = this.getDateFromValue(formattedDate, this.valueFormat);
1468
+ this.select(formattedDate);
1469
+ }
1470
+ }
1806
1471
  }
1807
1472
  }
1808
1473
  });
1809
1474
  // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=script&lang=js
1810
1475
  /* harmony default export */ var src_date_pickervue_type_script_lang_js = (date_pickervue_type_script_lang_js);
1811
- // EXTERNAL MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=style&index=0&id=051d024a&prod&lang=css
1812
- var date_pickervue_type_style_index_0_id_051d024a_prod_lang_css = __webpack_require__(95);
1813
-
1814
1476
  // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue
1815
1477
 
1816
1478
 
1817
1479
 
1818
1480
 
1819
1481
 
1820
-
1821
1482
  /* normalize component */
1822
1483
 
1823
1484
  var date_picker_component = Object(componentNormalizer["a" /* default */])(
@@ -1851,32 +1512,11 @@ module.exports = require("ai.touchui-vue/lib/mixins/tip");
1851
1512
 
1852
1513
  /***/ }),
1853
1514
 
1854
- /***/ 90:
1515
+ /***/ 89:
1855
1516
  /***/ (function(module, exports) {
1856
1517
 
1857
1518
  module.exports = require("ai.touchui-vue/lib/utils/date");
1858
1519
 
1859
- /***/ }),
1860
-
1861
- /***/ 95:
1862
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1863
-
1864
- "use strict";
1865
- /* 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_date_picker_vue_vue_type_style_index_0_id_051d024a_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
1866
- /* 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_date_picker_vue_vue_type_style_index_0_id_051d024a_prod_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_date_picker_vue_vue_type_style_index_0_id_051d024a_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
1867
- /* unused harmony reexport * */
1868
-
1869
-
1870
- /***/ }),
1871
-
1872
- /***/ 96:
1873
- /***/ (function(module, exports, __webpack_require__) {
1874
-
1875
- exports = module.exports = __webpack_require__(11)(false);
1876
- // Module
1877
- exports.push([module.i, "\n.to-date-picker.to-dis>.to-icon-date {\n\tpointer-events: none;\n}\n", ""]);
1878
-
1879
-
1880
1520
  /***/ })
1881
1521
 
1882
1522
  /******/ });