vxe-pc-ui 4.0.20 → 4.0.22-beta.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 (97) hide show
  1. package/es/date-picker/src/date-picker.js +135 -156
  2. package/es/date-picker/style.css +88 -98
  3. package/es/date-picker/style.min.css +1 -1
  4. package/es/form/style.css +10 -7
  5. package/es/form/style.min.css +1 -1
  6. package/es/icon/style.css +1 -1
  7. package/es/input/src/input.js +1 -1
  8. package/es/number-input/src/number-input.js +115 -118
  9. package/es/number-input/style.css +801 -87
  10. package/es/number-input/style.min.css +1 -1
  11. package/es/password-input/src/password-input.js +145 -33
  12. package/es/password-input/style.css +537 -46
  13. package/es/password-input/style.min.css +1 -1
  14. package/es/select/style.css +2 -2
  15. package/es/select/style.min.css +1 -1
  16. package/es/style.css +1 -1
  17. package/es/style.min.css +1 -1
  18. package/es/ui/index.js +5 -2
  19. package/es/ui/src/log.js +1 -1
  20. package/es/upload/src/upload.js +66 -60
  21. package/es/vxe-date-picker/style.css +88 -98
  22. package/es/vxe-date-picker/style.min.css +1 -1
  23. package/es/vxe-form/style.css +10 -7
  24. package/es/vxe-form/style.min.css +1 -1
  25. package/es/vxe-number-input/style.css +801 -87
  26. package/es/vxe-number-input/style.min.css +1 -1
  27. package/es/vxe-password-input/style.css +537 -46
  28. package/es/vxe-password-input/style.min.css +1 -1
  29. package/es/vxe-select/style.css +2 -2
  30. package/es/vxe-select/style.min.css +1 -1
  31. package/lib/date-picker/src/date-picker.js +107 -165
  32. package/lib/date-picker/src/date-picker.min.js +1 -1
  33. package/lib/date-picker/style/style.css +88 -98
  34. package/lib/date-picker/style/style.min.css +1 -1
  35. package/lib/form/style/style.css +10 -7
  36. package/lib/form/style/style.min.css +1 -1
  37. package/lib/icon/style/style.css +1 -1
  38. package/lib/icon/style/style.min.css +1 -1
  39. package/lib/index.umd.js +315 -282
  40. package/lib/index.umd.min.js +1 -1
  41. package/lib/input/src/input.js +1 -1
  42. package/lib/input/src/input.min.js +1 -1
  43. package/lib/number-input/src/number-input.js +64 -94
  44. package/lib/number-input/src/number-input.min.js +1 -1
  45. package/lib/number-input/style/style.css +801 -87
  46. package/lib/number-input/style/style.min.css +1 -1
  47. package/lib/password-input/src/password-input.js +128 -15
  48. package/lib/password-input/src/password-input.min.js +1 -1
  49. package/lib/password-input/style/style.css +537 -46
  50. package/lib/password-input/style/style.min.css +1 -1
  51. package/lib/select/style/style.css +2 -2
  52. package/lib/select/style/style.min.css +1 -1
  53. package/lib/style.css +1 -1
  54. package/lib/style.min.css +1 -1
  55. package/lib/ui/index.js +7 -2
  56. package/lib/ui/index.min.js +1 -1
  57. package/lib/ui/src/log.js +1 -1
  58. package/lib/ui/src/log.min.js +1 -1
  59. package/lib/upload/src/upload.js +6 -2
  60. package/lib/upload/src/upload.min.js +1 -1
  61. package/lib/vxe-date-picker/style/style.css +88 -98
  62. package/lib/vxe-date-picker/style/style.min.css +1 -1
  63. package/lib/vxe-form/style/style.css +10 -7
  64. package/lib/vxe-form/style/style.min.css +1 -1
  65. package/lib/vxe-number-input/style/style.css +801 -87
  66. package/lib/vxe-number-input/style/style.min.css +1 -1
  67. package/lib/vxe-password-input/style/style.css +537 -46
  68. package/lib/vxe-password-input/style/style.min.css +1 -1
  69. package/lib/vxe-select/style/style.css +2 -2
  70. package/lib/vxe-select/style/style.min.css +1 -1
  71. package/package.json +1 -1
  72. package/packages/date-picker/src/date-picker.ts +138 -167
  73. package/packages/input/src/input.ts +1 -1
  74. package/packages/number-input/src/number-input.ts +116 -127
  75. package/packages/password-input/src/password-input.ts +154 -33
  76. package/packages/ui/index.ts +6 -2
  77. package/packages/upload/src/upload.ts +66 -60
  78. package/styles/components/date-picker.scss +100 -161
  79. package/styles/components/form.scss +10 -7
  80. package/styles/components/number-input.scss +614 -133
  81. package/styles/components/password-input.scss +342 -61
  82. package/styles/components/select.scss +1 -3
  83. package/types/components/password-input.d.ts +7 -1
  84. package/types/components/upload.d.ts +2 -0
  85. package/types/ui/renderer.d.ts +15 -5
  86. /package/es/icon/style/{iconfont.1718680843586.ttf → iconfont.1718693158977.ttf} +0 -0
  87. /package/es/icon/style/{iconfont.1718680843586.woff → iconfont.1718693158977.woff} +0 -0
  88. /package/es/icon/style/{iconfont.1718680843586.woff2 → iconfont.1718693158977.woff2} +0 -0
  89. /package/es/{iconfont.1718680843586.ttf → iconfont.1718693158977.ttf} +0 -0
  90. /package/es/{iconfont.1718680843586.woff → iconfont.1718693158977.woff} +0 -0
  91. /package/es/{iconfont.1718680843586.woff2 → iconfont.1718693158977.woff2} +0 -0
  92. /package/lib/icon/style/{iconfont.1718680843586.ttf → iconfont.1718693158977.ttf} +0 -0
  93. /package/lib/icon/style/{iconfont.1718680843586.woff → iconfont.1718693158977.woff} +0 -0
  94. /package/lib/icon/style/{iconfont.1718680843586.woff2 → iconfont.1718693158977.woff2} +0 -0
  95. /package/lib/{iconfont.1718680843586.ttf → iconfont.1718693158977.ttf} +0 -0
  96. /package/lib/{iconfont.1718680843586.woff → iconfont.1718693158977.woff} +0 -0
  97. /package/lib/{iconfont.1718680843586.woff2 → iconfont.1718693158977.woff2} +0 -0
@@ -1,8 +1,9 @@
1
- import { defineComponent, h, Teleport, ref, computed, reactive, inject, nextTick, watch, onUnmounted } from 'vue';
1
+ import { defineComponent, h, Teleport, ref, computed, reactive, inject, nextTick, watch, onUnmounted, createCommentVNode } from 'vue';
2
2
  import XEUtils from 'xe-utils';
3
3
  import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize } from '../../ui';
4
4
  import { getFuncText, getLastZIndex, nextZIndex } from '../../ui/src/utils';
5
- import { hasClass, getAbsolutePos, getEventTargetNode } from '../../ui/src/dom';
5
+ import { getAbsolutePos, getEventTargetNode } from '../../ui/src/dom';
6
+ import { getSlotVNs } from '../..//ui/src/vn';
6
7
  const yearSize = 12;
7
8
  const monthSize = 20;
8
9
  const quarterSize = 8;
@@ -52,13 +53,13 @@ export default defineComponent({
52
53
  modelValue: [String, Number, Date],
53
54
  immediate: { type: Boolean, default: true },
54
55
  name: String,
55
- type: { type: String, default: 'date' },
56
+ type: { type: String, default: 'text' },
56
57
  clearable: { type: Boolean, default: () => getConfig().input.clearable },
57
58
  readonly: Boolean,
58
59
  disabled: Boolean,
59
60
  placeholder: {
60
61
  type: String,
61
- default: () => XEUtils.eqNull(getConfig().input.placeholder) ? getI18n('vxe.base.pleaseInput') : getConfig().input.placeholder
62
+ default: () => XEUtils.eqNull(getConfig().input.placeholder) ? getI18n('vxe.base.pleaseDatePicker') : getConfig().input.placeholder
62
63
  },
63
64
  maxlength: [String, Number],
64
65
  autocomplete: { type: String, default: 'off' },
@@ -67,18 +68,6 @@ export default defineComponent({
67
68
  className: String,
68
69
  size: { type: String, default: () => getConfig().input.size || getConfig().size },
69
70
  multiple: Boolean,
70
- // text
71
- showWordCount: Boolean,
72
- countMethod: Function,
73
- // number、integer、float
74
- min: { type: [String, Number], default: null },
75
- max: { type: [String, Number], default: null },
76
- step: [String, Number],
77
- exponential: { type: Boolean, default: () => getConfig().input.exponential },
78
- // number、integer、float、password
79
- controls: { type: Boolean, default: () => getConfig().input.controls },
80
- // float
81
- digits: { type: [String, Number], default: () => getConfig().input.digits },
82
71
  // date、week、month、quarter、year
83
72
  startDate: { type: [String, Number, Date], default: () => getConfig().input.startDate },
84
73
  endDate: { type: [String, Number, Date], default: () => getConfig().input.endDate },
@@ -141,8 +130,8 @@ export default defineComponent({
141
130
  });
142
131
  const refElem = ref();
143
132
  const refInputTarget = ref();
144
- const refInputPanel = ref();
145
- const refInputTimeBody = ref();
133
+ const refDatePickerPanel = ref();
134
+ const refDatePickerTimeBody = ref();
146
135
  const refMaps = {
147
136
  refElem,
148
137
  refInput: refInputTarget
@@ -496,6 +485,9 @@ export default defineComponent({
496
485
  const { type, readonly, editable, multiple } = props;
497
486
  return readonly || multiple || !editable || type === 'week' || type === 'quarter';
498
487
  });
488
+ const computeDatePickerType = computed(() => {
489
+ return 'text';
490
+ });
499
491
  const computeInpPlaceholder = computed(() => {
500
492
  const { placeholder } = props;
501
493
  if (placeholder) {
@@ -523,7 +515,7 @@ export default defineComponent({
523
515
  }
524
516
  }
525
517
  };
526
- const emitInputEvent = (value, evnt) => {
518
+ const emitDatePickerEvent = (value, evnt) => {
527
519
  const isDatePickerType = computeIsDatePickerType.value;
528
520
  const inpImmediate = computeInpImmediate.value;
529
521
  reactData.inputValue = value;
@@ -539,7 +531,7 @@ export default defineComponent({
539
531
  const inputEvent = (evnt) => {
540
532
  const inputElem = evnt.target;
541
533
  const value = inputElem.value;
542
- emitInputEvent(value, evnt);
534
+ emitDatePickerEvent(value, evnt);
543
535
  };
544
536
  const changeEvent = (evnt) => {
545
537
  const inpImmediate = computeInpImmediate.value;
@@ -577,19 +569,14 @@ export default defineComponent({
577
569
  if (isDatePickerType) {
578
570
  hidePanel();
579
571
  }
572
+ emitModel('', evnt);
580
573
  datePickerMethods.dispatchEvent('clear', { value }, evnt);
581
574
  };
582
575
  const clickSuffixEvent = (evnt) => {
583
576
  const { disabled } = props;
584
577
  if (!disabled) {
585
- if (hasClass(evnt.currentTarget, 'is--clear')) {
586
- emitModel('', evnt);
587
- clearValueEvent(evnt, '');
588
- }
589
- else {
590
- const { inputValue } = reactData;
591
- datePickerMethods.dispatchEvent('suffix-click', { value: inputValue }, evnt);
592
- }
578
+ const { inputValue } = reactData;
579
+ datePickerMethods.dispatchEvent('suffix-click', { value: inputValue }, evnt);
593
580
  }
594
581
  };
595
582
  const dateParseValue = (value) => {
@@ -714,50 +701,47 @@ export default defineComponent({
714
701
  const afterCheckValue = () => {
715
702
  const { type } = props;
716
703
  const { inputValue, datetimePanelValue } = reactData;
717
- const isDatePickerType = computeIsDatePickerType.value;
718
704
  const dateLabelFormat = computeDateLabelFormat.value;
719
705
  const inpReadonly = computeInpReadonly.value;
720
706
  if (!inpReadonly) {
721
- if (isDatePickerType) {
722
- if (inputValue) {
723
- let inpDateVal = parseDate(inputValue, dateLabelFormat);
724
- if (XEUtils.isValidDate(inpDateVal)) {
725
- if (type === 'time') {
726
- inpDateVal = XEUtils.toDateString(inpDateVal, dateLabelFormat);
727
- if (inputValue !== inpDateVal) {
728
- emitModel(inpDateVal, { type: 'check' });
729
- }
730
- reactData.inputValue = inpDateVal;
707
+ if (inputValue) {
708
+ let inpDateVal = parseDate(inputValue, dateLabelFormat);
709
+ if (XEUtils.isValidDate(inpDateVal)) {
710
+ if (type === 'time') {
711
+ inpDateVal = XEUtils.toDateString(inpDateVal, dateLabelFormat);
712
+ if (inputValue !== inpDateVal) {
713
+ emitModel(inpDateVal, { type: 'check' });
731
714
  }
732
- else {
733
- let isChange = false;
734
- const firstDayOfWeek = computeFirstDayOfWeek.value;
735
- if (type === 'datetime') {
736
- const dateValue = computeDateValue.value;
737
- if (inputValue !== XEUtils.toDateString(dateValue, dateLabelFormat) || inputValue !== XEUtils.toDateString(inpDateVal, dateLabelFormat)) {
738
- isChange = true;
739
- datetimePanelValue.setHours(inpDateVal.getHours());
740
- datetimePanelValue.setMinutes(inpDateVal.getMinutes());
741
- datetimePanelValue.setSeconds(inpDateVal.getSeconds());
742
- }
743
- }
744
- else {
715
+ reactData.inputValue = inpDateVal;
716
+ }
717
+ else {
718
+ let isChange = false;
719
+ const firstDayOfWeek = computeFirstDayOfWeek.value;
720
+ if (type === 'datetime') {
721
+ const dateValue = computeDateValue.value;
722
+ if (inputValue !== XEUtils.toDateString(dateValue, dateLabelFormat) || inputValue !== XEUtils.toDateString(inpDateVal, dateLabelFormat)) {
745
723
  isChange = true;
746
- }
747
- reactData.inputValue = XEUtils.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
748
- if (isChange) {
749
- dateChange(inpDateVal);
724
+ datetimePanelValue.setHours(inpDateVal.getHours());
725
+ datetimePanelValue.setMinutes(inpDateVal.getMinutes());
726
+ datetimePanelValue.setSeconds(inpDateVal.getSeconds());
750
727
  }
751
728
  }
752
- }
753
- else {
754
- dateRevert();
729
+ else {
730
+ isChange = true;
731
+ }
732
+ reactData.inputValue = XEUtils.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
733
+ if (isChange) {
734
+ dateChange(inpDateVal);
735
+ }
755
736
  }
756
737
  }
757
738
  else {
758
- emitModel('', { type: 'check' });
739
+ dateRevert();
759
740
  }
760
741
  }
742
+ else {
743
+ emitModel('', { type: 'check' });
744
+ }
761
745
  }
762
746
  };
763
747
  const blurEvent = (evnt) => {
@@ -778,6 +762,9 @@ export default defineComponent({
778
762
  const keyupEvent = (evnt) => {
779
763
  triggerEvent(evnt);
780
764
  };
765
+ const wheelEvent = (evnt) => {
766
+ triggerEvent(evnt);
767
+ };
781
768
  // 日期
782
769
  const dateMonthHandle = (date, offsetMonth) => {
783
770
  reactData.selectMonth = XEUtils.getWhatMonth(date, offsetMonth, 'first');
@@ -1150,7 +1137,7 @@ export default defineComponent({
1150
1137
  if (isDateTimeType) {
1151
1138
  reactData.datetimePanelValue = reactData.datePanelValue || XEUtils.getWhatDay(Date.now(), 0, 'first');
1152
1139
  nextTick(() => {
1153
- const timeBodyElem = refInputTimeBody.value;
1140
+ const timeBodyElem = refDatePickerTimeBody.value;
1154
1141
  XEUtils.arrayEach(timeBodyElem.querySelectorAll('li.is--selected'), updateTimePos);
1155
1142
  });
1156
1143
  }
@@ -1167,7 +1154,7 @@ export default defineComponent({
1167
1154
  const { transfer, placement } = props;
1168
1155
  const { panelIndex } = reactData;
1169
1156
  const targetElem = refInputTarget.value;
1170
- const panelElem = refInputPanel.value;
1157
+ const panelElem = refDatePickerPanel.value;
1171
1158
  if (targetElem && panelElem) {
1172
1159
  const targetHeight = targetElem.offsetHeight;
1173
1160
  const targetWidth = targetElem.offsetWidth;
@@ -1273,7 +1260,7 @@ export default defineComponent({
1273
1260
  const { visiblePanel, isActivated } = reactData;
1274
1261
  const isDatePickerType = computeIsDatePickerType.value;
1275
1262
  const el = refElem.value;
1276
- const panelElem = refInputPanel.value;
1263
+ const panelElem = refDatePickerPanel.value;
1277
1264
  if (!disabled && isActivated) {
1278
1265
  reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
1279
1266
  if (!reactData.isActivated) {
@@ -1365,7 +1352,7 @@ export default defineComponent({
1365
1352
  const { visiblePanel } = reactData;
1366
1353
  if (!disabled) {
1367
1354
  if (visiblePanel) {
1368
- const panelElem = refInputPanel.value;
1355
+ const panelElem = refDatePickerPanel.value;
1369
1356
  if (getEventTargetNode(evnt, panelElem).flag) {
1370
1357
  updatePlacement();
1371
1358
  }
@@ -1719,7 +1706,7 @@ export default defineComponent({
1719
1706
  }, getI18n('vxe.button.confirm'))
1720
1707
  ]),
1721
1708
  h('div', {
1722
- ref: refInputTimeBody,
1709
+ ref: refDatePickerTimeBody,
1723
1710
  class: 'vxe-date-picker--time-picker-body'
1724
1711
  }, [
1725
1712
  h('ul', {
@@ -1792,7 +1779,7 @@ export default defineComponent({
1792
1779
  disabled: transfer ? !inited : true
1793
1780
  }, [
1794
1781
  h('div', {
1795
- ref: refInputPanel,
1782
+ ref: refDatePickerPanel,
1796
1783
  class: ['vxe-table--ignore-clear vxe-date-picker--panel', `type--${type}`, {
1797
1784
  [`size--${vSize}`]: vSize,
1798
1785
  'is--transfer': transfer,
@@ -1804,11 +1791,11 @@ export default defineComponent({
1804
1791
  }, renders)
1805
1792
  ]);
1806
1793
  }
1807
- return null;
1794
+ return createCommentVNode();
1808
1795
  };
1809
1796
  const renderDatePickerIcon = () => {
1810
- return h('span', {
1811
- class: 'vxe-date-picker--date-picker-suffix',
1797
+ return h('div', {
1798
+ class: 'vxe-date-picker--control-icon',
1812
1799
  onClick: datePickerOpenEvent
1813
1800
  }, [
1814
1801
  h('i', {
@@ -1816,25 +1803,24 @@ export default defineComponent({
1816
1803
  })
1817
1804
  ]);
1818
1805
  };
1819
- const rendePrefixIcon = () => {
1806
+ const renderPrefixIcon = () => {
1820
1807
  const { prefixIcon } = props;
1821
1808
  const prefixSlot = slots.prefix;
1822
- const icons = [];
1823
- if (prefixSlot) {
1824
- icons.push(h('span', {
1825
- class: 'vxe-date-picker--prefix-icon'
1826
- }, prefixSlot({})));
1827
- }
1828
- else if (prefixIcon) {
1829
- icons.push(h('i', {
1830
- class: ['vxe-date-picker--prefix-icon', prefixIcon]
1831
- }));
1832
- }
1833
- return icons.length
1834
- ? h('span', {
1809
+ return prefixSlot || prefixIcon
1810
+ ? h('div', {
1835
1811
  class: 'vxe-date-picker--prefix',
1836
1812
  onClick: clickPrefixEvent
1837
- }, icons)
1813
+ }, [
1814
+ h('div', {
1815
+ class: 'vxe-date-picker--prefix-icon'
1816
+ }, prefixSlot
1817
+ ? getSlotVNs(prefixSlot({}))
1818
+ : [
1819
+ h('i', {
1820
+ class: prefixIcon
1821
+ })
1822
+ ])
1823
+ ])
1838
1824
  : null;
1839
1825
  };
1840
1826
  const renderSuffixIcon = () => {
@@ -1842,42 +1828,40 @@ export default defineComponent({
1842
1828
  const { inputValue } = reactData;
1843
1829
  const suffixSlot = slots.suffix;
1844
1830
  const isClearable = computeIsClearable.value;
1845
- const icons = [];
1846
- if (suffixSlot) {
1847
- icons.push(h('span', {
1848
- class: 'vxe-date-picker--suffix-icon'
1849
- }, suffixSlot({})));
1850
- }
1851
- else if (suffixIcon) {
1852
- icons.push(h('i', {
1853
- class: ['vxe-date-picker--suffix-icon', suffixIcon]
1854
- }));
1855
- }
1856
- if (isClearable) {
1857
- icons.push(h('i', {
1858
- class: ['vxe-date-picker--clear-icon', getIcon().INPUT_CLEAR]
1859
- }));
1860
- }
1861
- return icons.length
1862
- ? h('span', {
1831
+ return isClearable || suffixSlot || suffixIcon
1832
+ ? h('div', {
1863
1833
  class: ['vxe-date-picker--suffix', {
1864
1834
  'is--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
1865
- }],
1866
- onClick: clickSuffixEvent
1867
- }, icons)
1835
+ }]
1836
+ }, [
1837
+ isClearable
1838
+ ? h('div', {
1839
+ class: 'vxe-date-picker--clear-icon',
1840
+ onClick: clearValueEvent
1841
+ }, [
1842
+ h('i', {
1843
+ class: getIcon().INPUT_CLEAR
1844
+ })
1845
+ ])
1846
+ : createCommentVNode(),
1847
+ renderExtraSuffixIcon(),
1848
+ suffixSlot || suffixIcon
1849
+ ? h('div', {
1850
+ class: 'vxe-date-picker--suffix-icon',
1851
+ onClick: clickSuffixEvent
1852
+ }, suffixSlot
1853
+ ? getSlotVNs(suffixSlot({}))
1854
+ : [
1855
+ h('i', {
1856
+ class: suffixIcon
1857
+ })
1858
+ ])
1859
+ : createCommentVNode()
1860
+ ])
1868
1861
  : null;
1869
1862
  };
1870
1863
  const renderExtraSuffixIcon = () => {
1871
- const isDatePickerType = computeIsDatePickerType.value;
1872
- let icons;
1873
- if (isDatePickerType) {
1874
- icons = renderDatePickerIcon();
1875
- }
1876
- return icons
1877
- ? h('span', {
1878
- class: 'vxe-date-picker--extra-suffix'
1879
- }, [icons])
1880
- : null;
1864
+ return renderDatePickerIcon();
1881
1865
  };
1882
1866
  datePickerMethods = {
1883
1867
  dispatchEvent(type, params, evnt) {
@@ -1944,62 +1928,57 @@ export default defineComponent({
1944
1928
  });
1945
1929
  initValue();
1946
1930
  const renderVN = () => {
1947
- const { className, controls, type, align, name, disabled, readonly, autocomplete } = props;
1931
+ const { className, type, align, name, disabled, readonly, autocomplete } = props;
1948
1932
  const { inputValue, visiblePanel, isActivated } = reactData;
1949
1933
  const vSize = computeSize.value;
1950
- const isDatePickerType = computeIsDatePickerType.value;
1951
1934
  const inpReadonly = computeInpReadonly.value;
1935
+ const inputType = computeDatePickerType.value;
1952
1936
  const inpPlaceholder = computeInpPlaceholder.value;
1953
- const childs = [];
1954
- const prefix = rendePrefixIcon();
1937
+ const isClearable = computeIsClearable.value;
1938
+ const prefix = renderPrefixIcon();
1955
1939
  const suffix = renderSuffixIcon();
1956
- // 前缀图标
1957
- if (prefix) {
1958
- childs.push(prefix);
1959
- }
1960
- // 输入框
1961
- childs.push(h('input', {
1962
- ref: refInputTarget,
1963
- class: 'vxe-date-picker--inner',
1964
- value: inputValue,
1965
- name,
1966
- type: 'text',
1967
- placeholder: inpPlaceholder,
1968
- readonly: inpReadonly,
1969
- disabled,
1970
- autocomplete,
1971
- onKeydown: keydownEvent,
1972
- onKeyup: keyupEvent,
1973
- onClick: clickEvent,
1974
- onInput: inputEvent,
1975
- onChange: changeEvent,
1976
- onFocus: focusEvent,
1977
- onBlur: blurEvent
1978
- }));
1979
- // 后缀图标
1980
- if (suffix) {
1981
- childs.push(suffix);
1982
- }
1983
- // 特殊功能图标
1984
- childs.push(renderExtraSuffixIcon());
1985
- // 面板容器
1986
- if (isDatePickerType) {
1987
- childs.push(renderPanel());
1988
- }
1989
1940
  return h('div', {
1990
1941
  ref: refElem,
1991
1942
  class: ['vxe-date-picker', `type--${type}`, className, {
1992
1943
  [`size--${vSize}`]: vSize,
1993
1944
  [`is--${align}`]: align,
1994
- 'is--controls': controls,
1995
1945
  'is--prefix': !!prefix,
1996
1946
  'is--suffix': !!suffix,
1997
1947
  'is--readonly': readonly,
1998
- 'is--visivle': visiblePanel,
1948
+ 'is--visible': visiblePanel,
1999
1949
  'is--disabled': disabled,
2000
- 'is--active': isActivated
1950
+ 'is--active': isActivated,
1951
+ 'show--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
2001
1952
  }]
2002
- }, childs);
1953
+ }, [
1954
+ prefix || createCommentVNode(),
1955
+ h('div', {
1956
+ class: 'vxe-date-picker--wrapper'
1957
+ }, [
1958
+ h('input', {
1959
+ ref: refInputTarget,
1960
+ class: 'vxe-date-picker--inner',
1961
+ value: inputValue,
1962
+ name,
1963
+ type: inputType,
1964
+ placeholder: inpPlaceholder,
1965
+ readonly: inpReadonly,
1966
+ disabled,
1967
+ autocomplete,
1968
+ onKeydown: keydownEvent,
1969
+ onKeyup: keyupEvent,
1970
+ onWheel: wheelEvent,
1971
+ onClick: clickEvent,
1972
+ onDatePicker: inputEvent,
1973
+ onChange: changeEvent,
1974
+ onFocus: focusEvent,
1975
+ onBlur: blurEvent
1976
+ })
1977
+ ]),
1978
+ suffix || createCommentVNode(),
1979
+ // 下拉面板
1980
+ renderPanel()
1981
+ ]);
2003
1982
  };
2004
1983
  $xeDatePicker.renderVN = renderVN;
2005
1984
  return $xeDatePicker;