ai.touchui-vue 1.40.2 → 1.41.1

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 (128) hide show
  1. package/lib/affix.js +2 -2
  2. package/lib/ai.touchui-vue.common.js +921 -829
  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 +127 -481
  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 +10 -6
  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 +42 -13
  92. package/packages/date-picker/src/picker.vue +5 -1
  93. package/packages/input/src/input.vue +5 -2
  94. package/packages/theme/lib/css/theme/B-Design.css +1 -1
  95. package/packages/theme/lib/css/theme/aiplan.css +1 -1
  96. package/packages/theme/lib/css/theme/aiplangd.css +1 -1
  97. package/packages/theme/lib/css/theme/chbn.css +1 -1
  98. package/packages/theme/lib/css/theme/default.css +1 -1
  99. package/packages/theme/lib/css/theme/dt.css +1 -1
  100. package/packages/theme/lib/css/theme/ecloud.css +1 -1
  101. package/packages/theme/lib/css/theme/hongkong.css +1 -1
  102. package/packages/theme/lib/css/theme/logistics.css +1 -1
  103. package/packages/theme/lib/css/theme/narrow.css +1 -1
  104. package/packages/theme/lib/css/theme/sdpf.css +1 -1
  105. package/packages/theme/lib/css/theme/upc.css +1 -1
  106. package/packages/theme/lib/css/theme/website.css +1 -1
  107. package/packages/theme/lib/css/theme/workbench-gz.css +1 -1
  108. package/packages/theme/lib/css/theme/zj.css +1 -1
  109. package/packages/theme/src/less/component/calendar-dark.less +27 -1
  110. package/packages/theme/src/less/component/calendar.less +15 -11
  111. package/packages/theme/src/less/element/datePicker-dark.less +15 -0
  112. package/packages/theme/src/less/element/datePicker.less +17 -0
  113. package/packages/theme/src/less/theme/B-Design.less +2 -0
  114. package/packages/theme/src/less/theme/aiplan.less +2 -0
  115. package/packages/theme/src/less/theme/aiplangd.less +2 -0
  116. package/packages/theme/src/less/theme/chbn.less +2 -0
  117. package/packages/theme/src/less/theme/default.less +2 -0
  118. package/packages/theme/src/less/theme/dt.less +2 -0
  119. package/packages/theme/src/less/theme/ecloud.less +2 -0
  120. package/packages/theme/src/less/theme/hongkong.less +2 -0
  121. package/packages/theme/src/less/theme/logistics.less +2 -0
  122. package/packages/theme/src/less/theme/narrow.less +2 -0
  123. package/packages/theme/src/less/theme/sdpf.less +2 -0
  124. package/packages/theme/src/less/theme/upc.less +2 -0
  125. package/packages/theme/src/less/theme/website.less +2 -0
  126. package/packages/theme/src/less/theme/workbench-gz.less +2 -0
  127. package/packages/theme/src/less/theme/zj.less +2 -0
  128. 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=1dcd71ba
619
210
  var render = function () {
620
211
  var _vm = this
621
212
  var _h = _vm.$createElement
@@ -642,7 +233,12 @@ var render = function () {
642
233
  readonly: _vm.disabled || !_vm.inputable,
643
234
  "sp-chars": _vm.spChars,
644
235
  link: !_vm.inputable && !_vm.disabled,
645
- clearable: _vm.clearable && !_vm.disabled,
236
+ clearable:
237
+ _vm.clearable && _vm.inputable && !_vm.disabled
238
+ ? true
239
+ : _vm.clearable && !_vm.inputable && !_vm.disabled
240
+ ? "always"
241
+ : false,
646
242
  width: _vm.width,
647
243
  comparable: _vm.comparable,
648
244
  },
@@ -689,12 +285,18 @@ var render = function () {
689
285
  "to-float",
690
286
  {
691
287
  ref: "layer",
288
+ staticClass: "to-date-picker-layer",
692
289
  attrs: {
693
290
  lazy: _vm.lazy,
694
291
  slide: _vm.layerSlide,
695
292
  position: _vm.layerPosition,
696
293
  paddng: 0.5,
697
- width: _vm.$platform === "pc" ? 23 : "",
294
+ width:
295
+ _vm.$platform === "pc"
296
+ ? _vm.shortcuts && _vm.shortcuts.length && _vm.type !== "time"
297
+ ? 29
298
+ : 23
299
+ : "",
698
300
  align: _vm.optionAlign
699
301
  ? _vm.optionAlign
700
302
  : _vm.$pc
@@ -705,35 +307,66 @@ var render = function () {
705
307
  },
706
308
  [
707
309
  _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()
310
+ ? _c("to-scroll", [
311
+ _c(
312
+ "div",
313
+ { staticClass: "wrapper" },
314
+ [
315
+ _vm.shortcuts && _vm.shortcuts.length && _vm.type !== "time"
316
+ ? _c("div", { staticClass: "shortcuts" }, [
317
+ _c(
318
+ "ul",
319
+ _vm._l(_vm.shortcuts, function (item, index) {
320
+ return _c(
321
+ "li",
322
+ {
323
+ key: index,
324
+ on: {
325
+ click: function ($event) {
326
+ return _vm.handleShortcut(item)
327
+ },
328
+ },
329
+ },
330
+ [
331
+ _vm._v(
332
+ "\n\t\t\t\t\t\t\t" +
333
+ _vm._s(item.label) +
334
+ "\n\t\t\t\t\t\t"
335
+ ),
336
+ ]
337
+ )
338
+ }),
339
+ 0
340
+ ),
341
+ ])
342
+ : _vm._e(),
343
+ _c("to-calendar", {
344
+ ref: "calendar",
345
+ attrs: {
346
+ time: _vm.time,
347
+ type: _vm.type,
348
+ min: _vm.min,
349
+ max: _vm.max,
350
+ "before-change": _vm.beforeChange,
724
351
  },
725
- },
726
- model: {
727
- value: _vm.date,
728
- callback: function ($$v) {
729
- _vm.date = $$v
352
+ on: {
353
+ change: _vm.select,
354
+ close: function ($event) {
355
+ return _vm.$refs.layer.close()
356
+ },
730
357
  },
731
- expression: "date",
732
- },
733
- }),
734
- ],
735
- 1
736
- )
358
+ model: {
359
+ value: _vm.date,
360
+ callback: function ($$v) {
361
+ _vm.date = $$v
362
+ },
363
+ expression: "date",
364
+ },
365
+ }),
366
+ ],
367
+ 1
368
+ ),
369
+ ])
737
370
  : _c("picker", {
738
371
  attrs: {
739
372
  time: _vm.time,
@@ -769,7 +402,7 @@ var staticRenderFns = []
769
402
  render._withStripped = true
770
403
 
771
404
 
772
- // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=template&id=051d024a
405
+ // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=template&id=1dcd71ba
773
406
 
774
407
  // EXTERNAL MODULE: external "ai.touchui-vue/lib/locale"
775
408
  var locale_ = __webpack_require__(3);
@@ -778,8 +411,8 @@ var locale_ = __webpack_require__(3);
778
411
  var tip_ = __webpack_require__(5);
779
412
  var tip_default = /*#__PURE__*/__webpack_require__.n(tip_);
780
413
 
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 () {
414
+ // 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
415
+ var pickervue_type_template_id_130f8241_render = function () {
783
416
  var _vm = this
784
417
  var _h = _vm.$createElement
785
418
  var _c = _vm._self._c || _h
@@ -968,11 +601,11 @@ var pickervue_type_template_id_4176400e_render = function () {
968
601
  1
969
602
  )
970
603
  }
971
- var pickervue_type_template_id_4176400e_staticRenderFns = []
972
- pickervue_type_template_id_4176400e_render._withStripped = true
604
+ var pickervue_type_template_id_130f8241_staticRenderFns = []
605
+ pickervue_type_template_id_130f8241_render._withStripped = true
973
606
 
974
607
 
975
- // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=4176400e
608
+ // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=130f8241
976
609
 
977
610
  // 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
611
  //
@@ -1300,7 +933,11 @@ pickervue_type_template_id_4176400e_render._withStripped = true
1300
933
  } else if (this.type === 'time') {
1301
934
  this.$emit('change', this.hour + ':' + this.minute + ':' + this.second);
1302
935
  } else {
1303
- this.$emit('change', this.year + '-' + this.month + '-' + this.day);
936
+ if (this.day) {
937
+ this.$emit('change', this.year + '-' + this.month + '-' + this.day);
938
+ } else {
939
+ this.$emit('change', this.year + '-' + this.month);
940
+ }
1304
941
  }
1305
942
  },
1306
943
  clear: function clear() {
@@ -1354,8 +991,8 @@ var componentNormalizer = __webpack_require__(0);
1354
991
 
1355
992
  var component = Object(componentNormalizer["a" /* default */])(
1356
993
  src_pickervue_type_script_lang_js,
1357
- pickervue_type_template_id_4176400e_render,
1358
- pickervue_type_template_id_4176400e_staticRenderFns,
994
+ pickervue_type_template_id_130f8241_render,
995
+ pickervue_type_template_id_130f8241_staticRenderFns,
1359
996
  false,
1360
997
  null,
1361
998
  null,
@@ -1365,7 +1002,7 @@ var component = Object(componentNormalizer["a" /* default */])(
1365
1002
 
1366
1003
  /* harmony default export */ var picker = (component.exports);
1367
1004
  // EXTERNAL MODULE: external "ai.touchui-vue/lib/utils/date"
1368
- var date_ = __webpack_require__(90);
1005
+ var date_ = __webpack_require__(89);
1369
1006
 
1370
1007
  // 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
1008
  //
@@ -1381,6 +1018,15 @@ var date_ = __webpack_require__(90);
1381
1018
  //
1382
1019
  //
1383
1020
  //
1021
+ //
1022
+ //
1023
+ //
1024
+ //
1025
+ //
1026
+ //
1027
+ //
1028
+ //
1029
+ //
1384
1030
 
1385
1031
 
1386
1032
 
@@ -1530,6 +1176,16 @@ var date_ = __webpack_require__(90);
1530
1176
  clearable: {
1531
1177
  type: Boolean,
1532
1178
  default: true
1179
+ },
1180
+ shortcuts: {
1181
+ type: [Array, Boolean],
1182
+ default: function _default() {
1183
+ if (this.$TouchUI.datePicker && this.$TouchUI.datePicker.shortcuts) {
1184
+ return this.$TouchUI.datePicker.shortcuts(this);
1185
+ } else {
1186
+ return this.$TouchUI.datePicker.shortcuts;
1187
+ }
1188
+ }
1533
1189
  }
1534
1190
  },
1535
1191
  data: function data() {
@@ -1558,8 +1214,10 @@ var date_ = __webpack_require__(90);
1558
1214
  this.datedisplay = '';
1559
1215
  } else {
1560
1216
  // 检查数据是否和 valueFormat 相匹配,避免报错
1217
+ if (this.isDate(val)) {
1218
+ val = this.formatDate(val, this.valueFormat, '');
1219
+ }
1561
1220
  var newValue = val.trim().substring(0, this.valueFormat.length);
1562
-
1563
1221
  if (!Object(date_["matchFormat"])(newValue, this.valueFormat)) {
1564
1222
  return;
1565
1223
  }
@@ -1579,9 +1237,7 @@ var date_ = __webpack_require__(90);
1579
1237
  iValue: {
1580
1238
  handler: function handler(val) {
1581
1239
  this.$emit('change', val);
1582
- },
1583
-
1584
- immediate: true
1240
+ }
1585
1241
  },
1586
1242
  displayFormat: {
1587
1243
  handler: function handler(fmt) {
@@ -1606,6 +1262,9 @@ var date_ = __webpack_require__(90);
1606
1262
  },
1607
1263
 
1608
1264
  methods: {
1265
+ isDate: function isDate(obj) {
1266
+ return Object.prototype.toString.call(obj) === '[object Date]';
1267
+ },
1609
1268
  handleLayerClose: function handleLayerClose() {
1610
1269
  this.$refs.calendar.timeLayer = false;
1611
1270
  this.$refs.calendar.monthLayer = false;
@@ -1803,21 +1462,29 @@ var date_ = __webpack_require__(90);
1803
1462
  },
1804
1463
  focus: function focus() {
1805
1464
  this.$refs.inputBox.focus();
1465
+ },
1466
+ handleShortcut: function handleShortcut(item) {
1467
+ if (item && item.value && typeof item.value === 'function') {
1468
+ var date = item.value.call(this);
1469
+ if (date === null) {
1470
+ this.clear();
1471
+ } else {
1472
+ var formattedDate = this.formatDate(date, this.valueFormat, '');
1473
+ this.date = this.getDateFromValue(formattedDate, this.valueFormat);
1474
+ this.select(formattedDate);
1475
+ }
1476
+ }
1806
1477
  }
1807
1478
  }
1808
1479
  });
1809
1480
  // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=script&lang=js
1810
1481
  /* 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
1482
  // CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue
1815
1483
 
1816
1484
 
1817
1485
 
1818
1486
 
1819
1487
 
1820
-
1821
1488
  /* normalize component */
1822
1489
 
1823
1490
  var date_picker_component = Object(componentNormalizer["a" /* default */])(
@@ -1851,32 +1518,11 @@ module.exports = require("ai.touchui-vue/lib/mixins/tip");
1851
1518
 
1852
1519
  /***/ }),
1853
1520
 
1854
- /***/ 90:
1521
+ /***/ 89:
1855
1522
  /***/ (function(module, exports) {
1856
1523
 
1857
1524
  module.exports = require("ai.touchui-vue/lib/utils/date");
1858
1525
 
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
1526
  /***/ })
1881
1527
 
1882
1528
  /******/ });