vxe-pc-ui 4.5.35 → 4.6.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.
- package/es/calendar/src/calendar.js +1 -1
- package/es/components.js +6 -0
- package/es/date-panel/index.js +12 -0
- package/es/date-panel/src/date-panel.js +1587 -0
- package/es/date-panel/src/util.js +191 -0
- package/es/date-panel/style.css +443 -0
- package/es/date-panel/style.min.css +1 -0
- package/es/date-picker/index.js +0 -1
- package/es/date-picker/src/date-picker.js +274 -1663
- package/es/date-picker/style.css +68 -810
- package/es/date-picker/style.min.css +1 -1
- package/es/date-range-picker/index.js +12 -0
- package/es/date-range-picker/src/date-range-picker.js +1121 -0
- package/es/date-range-picker/style.css +284 -0
- package/es/date-range-picker/style.min.css +1 -0
- package/es/form/render/index.js +21 -15
- package/es/icon/style.css +1 -1
- package/es/input/src/input.js +1 -1
- package/es/language/ar-EG.js +1 -1
- package/es/language/de-DE.js +1 -1
- package/es/language/en-US.js +1 -1
- package/es/language/es-ES.js +1 -1
- package/es/language/fr-FR.d.ts +2 -0
- package/es/language/fr-FR.js +1 -1
- package/es/language/hu-HU.js +1 -1
- package/es/language/hy-AM.d.ts +2 -0
- package/es/language/hy-AM.js +1 -1
- package/es/language/id-ID.d.ts +2 -0
- package/es/language/id-ID.js +1 -1
- package/es/language/it-IT.d.ts +2 -0
- package/es/language/it-IT.js +1 -1
- package/es/language/ja-JP.js +1 -1
- package/es/language/ko-KR.js +1 -1
- package/es/language/ms-MY.d.ts +2 -0
- package/es/language/ms-MY.js +708 -0
- package/es/language/nb-NO.d.ts +2 -0
- package/es/language/nb-NO.js +1 -1
- package/es/language/pt-BR.js +1 -1
- package/es/language/ru-RU.js +1 -1
- package/es/language/th-TH.d.ts +2 -0
- package/es/language/th-TH.js +1 -1
- package/es/language/ug-CN.d.ts +2 -0
- package/es/language/ug-CN.js +1 -1
- package/es/language/uk-UA.js +1 -1
- package/es/language/uz-UZ.d.ts +2 -0
- package/es/language/uz-UZ.js +708 -0
- package/es/language/vi-VN.d.ts +2 -0
- package/es/language/vi-VN.js +1 -1
- package/es/language/zh-CHT.d.ts +2 -0
- package/es/language/zh-CHT.js +1 -1
- package/es/language/zh-CN.js +1 -1
- package/es/print/src/print.js +4 -0
- package/es/print/src/util.js +46 -3
- package/es/pulldown/style.css +15 -0
- package/es/pulldown/style.min.css +1 -1
- package/es/select/style.css +15 -0
- package/es/select/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/style.css +15 -0
- package/es/table-select/style.min.css +1 -1
- package/es/tree-select/style.css +15 -0
- package/es/tree-select/style.min.css +1 -1
- package/es/ui/index.js +31 -6
- package/es/ui/src/log.js +1 -1
- package/es/vxe-date-panel/index.js +3 -0
- package/es/vxe-date-panel/style.css +443 -0
- package/es/vxe-date-panel/style.min.css +1 -0
- package/es/vxe-date-picker/style.css +68 -810
- package/es/vxe-date-picker/style.min.css +1 -1
- package/es/vxe-date-range-picker/index.js +3 -0
- package/es/vxe-date-range-picker/style.css +284 -0
- package/es/vxe-date-range-picker/style.min.css +1 -0
- package/es/vxe-pulldown/style.css +15 -0
- package/es/vxe-pulldown/style.min.css +1 -1
- package/es/vxe-select/style.css +15 -0
- package/es/vxe-select/style.min.css +1 -1
- package/es/vxe-table-select/style.css +15 -0
- package/es/vxe-table-select/style.min.css +1 -1
- package/es/vxe-tree-select/style.css +15 -0
- package/es/vxe-tree-select/style.min.css +1 -1
- package/lib/calendar/src/calendar.js +1 -1
- package/lib/calendar/src/calendar.min.js +1 -1
- package/lib/components.js +25 -1
- package/lib/components.min.js +1 -1
- package/lib/date-panel/index.js +19 -0
- package/lib/date-panel/index.min.js +1 -0
- package/lib/date-panel/src/date-panel.js +1667 -0
- package/lib/date-panel/src/date-panel.min.js +1 -0
- package/lib/date-panel/src/util.js +219 -0
- package/lib/date-panel/src/util.min.js +1 -0
- package/lib/date-panel/style/index.js +1 -0
- package/lib/date-panel/style/style.css +443 -0
- package/lib/date-panel/style/style.min.css +1 -0
- package/lib/date-picker/index.js +0 -1
- package/lib/date-picker/index.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +288 -1717
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-picker/style/style.css +68 -810
- package/lib/date-picker/style/style.min.css +1 -1
- package/lib/date-range-picker/index.js +19 -0
- package/lib/date-range-picker/index.min.js +1 -0
- package/lib/date-range-picker/src/date-range-picker.js +1194 -0
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -0
- package/lib/date-range-picker/style/index.js +1 -0
- package/lib/date-range-picker/style/style.css +284 -0
- package/lib/date-range-picker/style/style.min.css +1 -0
- package/lib/form/render/index.js +21 -15
- package/lib/form/render/index.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +2971 -1254
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +1 -1
- package/lib/input/src/input.min.js +1 -1
- package/lib/language/ar-EG.d.ts +2 -0
- package/lib/language/ar-EG.js +1 -1
- package/lib/language/ar-EG.min.js +1 -1
- package/lib/language/ar-EG.umd.js +728 -0
- package/lib/language/de-DE.d.ts +2 -0
- package/lib/language/de-DE.js +1 -1
- package/lib/language/de-DE.min.js +1 -1
- package/lib/language/de-DE.umd.js +728 -0
- package/lib/language/en-US.js +1 -1
- package/lib/language/en-US.min.js +1 -1
- package/lib/language/en-US.umd.js +1 -1
- package/lib/language/es-ES.js +1 -1
- package/lib/language/es-ES.min.js +1 -1
- package/lib/language/es-ES.umd.js +1 -1
- package/lib/language/fr-FR.d.ts +2 -0
- package/lib/language/fr-FR.js +1 -1
- package/lib/language/fr-FR.min.js +1 -1
- package/lib/language/fr-FR.umd.js +728 -0
- package/lib/language/hu-HU.js +1 -1
- package/lib/language/hu-HU.min.js +1 -1
- package/lib/language/hu-HU.umd.js +1 -1
- package/lib/language/hy-AM.d.ts +2 -0
- package/lib/language/hy-AM.js +1 -1
- package/lib/language/hy-AM.min.js +1 -1
- package/lib/language/hy-AM.umd.js +728 -0
- package/lib/language/id-ID.d.ts +2 -0
- package/lib/language/id-ID.js +1 -1
- package/lib/language/id-ID.min.js +1 -1
- package/lib/language/id-ID.umd.js +728 -0
- package/lib/language/it-IT.d.ts +2 -0
- package/lib/language/it-IT.js +1 -1
- package/lib/language/it-IT.min.js +1 -1
- package/lib/language/it-IT.umd.js +728 -0
- package/lib/language/ja-JP.js +1 -1
- package/lib/language/ja-JP.min.js +1 -1
- package/lib/language/ja-JP.umd.js +1 -1
- package/lib/language/ko-KR.js +1 -1
- package/lib/language/ko-KR.min.js +1 -1
- package/lib/language/ko-KR.umd.js +1 -1
- package/lib/language/ms-MY.d.ts +2 -0
- package/lib/language/ms-MY.js +714 -0
- package/lib/language/ms-MY.min.js +1 -0
- package/lib/language/ms-MY.umd.js +728 -0
- package/lib/language/nb-NO.d.ts +2 -0
- package/lib/language/nb-NO.js +1 -1
- package/lib/language/nb-NO.min.js +1 -1
- package/lib/language/nb-NO.umd.js +728 -0
- package/lib/language/pt-BR.js +1 -1
- package/lib/language/pt-BR.min.js +1 -1
- package/lib/language/pt-BR.umd.js +1 -1
- package/lib/language/ru-RU.js +1 -1
- package/lib/language/ru-RU.min.js +1 -1
- package/lib/language/ru-RU.umd.js +1 -1
- package/lib/language/th-TH.d.ts +2 -0
- package/lib/language/th-TH.js +1 -1
- package/lib/language/th-TH.min.js +1 -1
- package/lib/language/th-TH.umd.js +728 -0
- package/lib/language/ug-CN.d.ts +2 -0
- package/lib/language/ug-CN.js +1 -1
- package/lib/language/ug-CN.min.js +1 -1
- package/lib/language/ug-CN.umd.js +728 -0
- package/lib/language/uk-UA.js +1 -1
- package/lib/language/uk-UA.min.js +1 -1
- package/lib/language/uk-UA.umd.js +1 -1
- package/lib/language/uz-UZ.d.ts +2 -0
- package/lib/language/uz-UZ.js +714 -0
- package/lib/language/uz-UZ.min.js +1 -0
- package/lib/language/uz-UZ.umd.js +728 -0
- package/lib/language/vi-VN.d.ts +2 -0
- package/lib/language/vi-VN.js +1 -1
- package/lib/language/vi-VN.min.js +1 -1
- package/lib/language/vi-VN.umd.js +728 -0
- package/lib/language/zh-CHT.d.ts +2 -0
- package/lib/language/zh-CHT.js +1 -1
- package/lib/language/zh-CHT.min.js +1 -1
- package/lib/language/zh-CHT.umd.js +728 -0
- package/lib/language/zh-CN.js +1 -1
- package/lib/language/zh-CN.min.js +1 -1
- package/lib/language/zh-CN.umd.js +1 -1
- package/lib/language/zh-TC.min.js +1 -1
- package/lib/print/src/print.js +4 -0
- package/lib/print/src/print.min.js +1 -1
- package/lib/print/src/util.js +45 -2
- package/lib/print/src/util.min.js +1 -1
- package/lib/pulldown/style/style.css +15 -0
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/select/style/style.css +15 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/style/style.css +15 -0
- package/lib/table-select/style/style.min.css +1 -1
- package/lib/tree-select/style/style.css +15 -0
- package/lib/tree-select/style/style.min.css +1 -1
- package/lib/ui/index.js +31 -6
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-date-panel/index.js +22 -0
- package/lib/vxe-date-panel/index.min.js +1 -0
- package/lib/vxe-date-panel/style/index.js +1 -0
- package/lib/vxe-date-panel/style/style.css +443 -0
- package/lib/vxe-date-panel/style/style.min.css +1 -0
- package/lib/vxe-date-picker/style/style.css +68 -810
- package/lib/vxe-date-picker/style/style.min.css +1 -1
- package/lib/vxe-date-range-picker/index.js +22 -0
- package/lib/vxe-date-range-picker/index.min.js +1 -0
- package/lib/vxe-date-range-picker/style/index.js +1 -0
- package/lib/vxe-date-range-picker/style/style.css +284 -0
- package/lib/vxe-date-range-picker/style/style.min.css +1 -0
- package/lib/vxe-pulldown/style/style.css +15 -0
- package/lib/vxe-pulldown/style/style.min.css +1 -1
- package/lib/vxe-select/style/style.css +15 -0
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-table-select/style/style.css +15 -0
- package/lib/vxe-table-select/style/style.min.css +1 -1
- package/lib/vxe-tree-select/style/style.css +15 -0
- package/lib/vxe-tree-select/style/style.min.css +1 -1
- package/package.json +4 -5
- package/packages/calendar/src/calendar.ts +10 -10
- package/packages/components.ts +6 -0
- package/packages/date-panel/index.ts +16 -0
- package/packages/date-panel/src/date-panel.ts +1654 -0
- package/packages/date-panel/src/util.ts +212 -0
- package/packages/date-picker/index.ts +0 -1
- package/packages/date-picker/src/date-picker.ts +298 -1697
- package/packages/date-range-picker/index.ts +16 -0
- package/packages/date-range-picker/src/date-range-picker.ts +1196 -0
- package/packages/form/render/index.ts +21 -15
- package/packages/input/src/input.ts +15 -15
- package/packages/language/ar-EG.ts +1 -1
- package/packages/language/de-DE.ts +1 -1
- package/packages/language/en-US.ts +1 -1
- package/packages/language/es-ES.ts +1 -1
- package/packages/language/fr-FR.ts +1 -1
- package/packages/language/hu-HU.ts +1 -1
- package/packages/language/hy-AM.ts +1 -1
- package/packages/language/id-ID.ts +1 -1
- package/packages/language/it-IT.ts +1 -1
- package/packages/language/ja-JP.ts +1 -1
- package/packages/language/ko-KR.ts +1 -1
- package/packages/language/ms-MY.ts +708 -0
- package/packages/language/nb-NO.ts +1 -1
- package/packages/language/pt-BR.ts +1 -1
- package/packages/language/ru-RU.ts +1 -1
- package/packages/language/th-TH.ts +1 -1
- package/packages/language/ug-CN.ts +1 -1
- package/packages/language/uk-UA.ts +1 -1
- package/packages/language/uz-UZ.ts +708 -0
- package/packages/language/vi-VN.ts +1 -1
- package/packages/language/zh-CHT.ts +1 -1
- package/packages/language/zh-CN.ts +1 -1
- package/packages/print/src/print.ts +4 -0
- package/packages/print/src/util.ts +47 -4
- package/packages/ui/index.ts +30 -5
- package/styles/all.scss +2 -0
- package/styles/components/date-panel.scss +491 -0
- package/styles/components/date-picker.scss +62 -652
- package/styles/components/date-range-picker.scss +284 -0
- package/styles/components/pulldown.scss +10 -0
- package/styles/components/select.scss +8 -0
- package/styles/components/table-select.scss +8 -0
- package/styles/components/tree-select.scss +8 -0
- package/styles/helpers/baseMixin.scss +13 -0
- package/types/all.d.ts +6 -0
- package/types/components/button-group.d.ts +1 -1
- package/types/components/date-panel.d.ts +240 -0
- package/types/components/date-picker.d.ts +35 -142
- package/types/components/date-range-picker.d.ts +267 -0
- package/types/components/print.d.ts +8 -0
- package/types/components/table-module/filter.d.ts +8 -0
- package/types/ui/commands.d.ts +28 -2
- package/types/ui/global-config.d.ts +4 -0
- package/es/date-picker/src/util.js +0 -41
- package/lib/date-picker/src/util.js +0 -46
- package/lib/date-picker/src/util.min.js +0 -1
- package/lib/language/zh-TC.umd.js +0 -23
- package/packages/date-picker/src/util.ts +0 -42
- /package/es/icon/{iconfont.1746002850171.ttf → iconfont.1746782659171.ttf} +0 -0
- /package/es/icon/{iconfont.1746002850171.woff → iconfont.1746782659171.woff} +0 -0
- /package/es/icon/{iconfont.1746002850171.woff2 → iconfont.1746782659171.woff2} +0 -0
- /package/es/{iconfont.1746002850171.ttf → iconfont.1746782659171.ttf} +0 -0
- /package/es/{iconfont.1746002850171.woff → iconfont.1746782659171.woff} +0 -0
- /package/es/{iconfont.1746002850171.woff2 → iconfont.1746782659171.woff2} +0 -0
- /package/es/language/{zh-TC.d.ts → ar-EG.d.ts} +0 -0
- /package/{lib/language/zh-TC.d.ts → es/language/de-DE.d.ts} +0 -0
- /package/lib/icon/style/{iconfont.1746002850171.ttf → iconfont.1746782659171.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1746002850171.woff → iconfont.1746782659171.woff} +0 -0
- /package/lib/icon/style/{iconfont.1746002850171.woff2 → iconfont.1746782659171.woff2} +0 -0
- /package/lib/{iconfont.1746002850171.ttf → iconfont.1746782659171.ttf} +0 -0
- /package/lib/{iconfont.1746002850171.woff → iconfont.1746782659171.woff} +0 -0
- /package/lib/{iconfont.1746002850171.woff2 → iconfont.1746782659171.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -1907,7 +1907,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1907
1907
|
CollapsePane: function() { return /* reexport */ CollapsePane; },
|
|
1908
1908
|
ColorPicker: function() { return /* reexport */ ColorPicker; },
|
|
1909
1909
|
Countdown: function() { return /* reexport */ Countdown; },
|
|
1910
|
+
DatePanel: function() { return /* reexport */ DatePanel; },
|
|
1910
1911
|
DatePicker: function() { return /* reexport */ DatePicker; },
|
|
1912
|
+
DateRangePicker: function() { return /* reexport */ DateRangePicker; },
|
|
1911
1913
|
Drawer: function() { return /* reexport */ Drawer; },
|
|
1912
1914
|
DrawerController: function() { return /* reexport */ DrawerController; },
|
|
1913
1915
|
Empty: function() { return /* reexport */ Empty; },
|
|
@@ -1993,7 +1995,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1993
1995
|
VxeColorPicker: function() { return /* reexport */ VxeColorPicker; },
|
|
1994
1996
|
VxeCore: function() { return /* reexport */ VxeCore; },
|
|
1995
1997
|
VxeCountdown: function() { return /* reexport */ VxeCountdown; },
|
|
1998
|
+
VxeDatePanel: function() { return /* reexport */ VxeDatePanel; },
|
|
1996
1999
|
VxeDatePicker: function() { return /* reexport */ VxeDatePicker; },
|
|
2000
|
+
VxeDateRangePicker: function() { return /* reexport */ VxeDateRangePicker; },
|
|
1997
2001
|
VxeDrawer: function() { return /* reexport */ VxeDrawer; },
|
|
1998
2002
|
VxeEmpty: function() { return /* reexport */ VxeEmpty; },
|
|
1999
2003
|
VxeForm: function() { return /* reexport */ VxeForm; },
|
|
@@ -2129,7 +2133,9 @@ __webpack_require__.d(components_namespaceObject, {
|
|
|
2129
2133
|
CollapsePane: function() { return CollapsePane; },
|
|
2130
2134
|
ColorPicker: function() { return ColorPicker; },
|
|
2131
2135
|
Countdown: function() { return Countdown; },
|
|
2136
|
+
DatePanel: function() { return DatePanel; },
|
|
2132
2137
|
DatePicker: function() { return DatePicker; },
|
|
2138
|
+
DateRangePicker: function() { return DateRangePicker; },
|
|
2133
2139
|
Drawer: function() { return Drawer; },
|
|
2134
2140
|
DrawerController: function() { return DrawerController; },
|
|
2135
2141
|
Empty: function() { return Empty; },
|
|
@@ -2215,7 +2221,9 @@ __webpack_require__.d(components_namespaceObject, {
|
|
|
2215
2221
|
VxeColorPicker: function() { return VxeColorPicker; },
|
|
2216
2222
|
VxeCore: function() { return VxeCore; },
|
|
2217
2223
|
VxeCountdown: function() { return VxeCountdown; },
|
|
2224
|
+
VxeDatePanel: function() { return VxeDatePanel; },
|
|
2218
2225
|
VxeDatePicker: function() { return VxeDatePicker; },
|
|
2226
|
+
VxeDateRangePicker: function() { return VxeDateRangePicker; },
|
|
2219
2227
|
VxeDrawer: function() { return VxeDrawer; },
|
|
2220
2228
|
VxeEmpty: function() { return VxeEmpty; },
|
|
2221
2229
|
VxeForm: function() { return VxeForm; },
|
|
@@ -2346,7 +2354,7 @@ if (typeof window !== 'undefined') {
|
|
|
2346
2354
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
2347
2355
|
var es_array_push = __webpack_require__(4114);
|
|
2348
2356
|
;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/core.js
|
|
2349
|
-
const coreVersion = "4.1.
|
|
2357
|
+
const coreVersion = "4.1.2";
|
|
2350
2358
|
const VxeCore = {
|
|
2351
2359
|
coreVersion,
|
|
2352
2360
|
uiVersion: '',
|
|
@@ -2854,6 +2862,7 @@ const i18nConfigStore = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactiv
|
|
|
2854
2862
|
|
|
2855
2863
|
|
|
2856
2864
|
let checkInstall = false;
|
|
2865
|
+
let cacheMaps = {};
|
|
2857
2866
|
function i18n_getI18n(key, args) {
|
|
2858
2867
|
const {
|
|
2859
2868
|
langMaps,
|
|
@@ -2871,10 +2880,24 @@ function i18n_getI18n(key, args) {
|
|
|
2871
2880
|
}
|
|
2872
2881
|
checkInstall = true;
|
|
2873
2882
|
}
|
|
2874
|
-
|
|
2883
|
+
if (!args && cacheMaps[key]) {
|
|
2884
|
+
return cacheMaps[key];
|
|
2885
|
+
}
|
|
2886
|
+
const i18nLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFormatString(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(langMaps[language], key, key), args);
|
|
2887
|
+
if (!args) {
|
|
2888
|
+
cacheMaps[key] = i18nLabel;
|
|
2889
|
+
}
|
|
2890
|
+
return i18nLabel;
|
|
2875
2891
|
}
|
|
2876
2892
|
function setLanguage(locale) {
|
|
2877
|
-
|
|
2893
|
+
const {
|
|
2894
|
+
language
|
|
2895
|
+
} = i18nConfigStore;
|
|
2896
|
+
const targetlang = locale || 'zh-CN';
|
|
2897
|
+
if (language !== targetlang) {
|
|
2898
|
+
i18nConfigStore.language = targetlang;
|
|
2899
|
+
cacheMaps = {};
|
|
2900
|
+
}
|
|
2878
2901
|
return VxeCore;
|
|
2879
2902
|
}
|
|
2880
2903
|
function setI18n(locale, data) {
|
|
@@ -2902,7 +2925,7 @@ function createLog(type, name) {
|
|
|
2902
2925
|
return msg;
|
|
2903
2926
|
};
|
|
2904
2927
|
}
|
|
2905
|
-
const version = "4.1.
|
|
2928
|
+
const version = "4.1.2";
|
|
2906
2929
|
const log = {
|
|
2907
2930
|
create: createLog,
|
|
2908
2931
|
warn: createLog('warn', `v${version}`),
|
|
@@ -3706,7 +3729,7 @@ setTheme();
|
|
|
3706
3729
|
year: 'yyyy'
|
|
3707
3730
|
},
|
|
3708
3731
|
weeks: {
|
|
3709
|
-
w: '
|
|
3732
|
+
w: '',
|
|
3710
3733
|
w0: '周日',
|
|
3711
3734
|
w1: '周一',
|
|
3712
3735
|
w2: '周二',
|
|
@@ -4187,14 +4210,14 @@ function checkDynamic() {
|
|
|
4187
4210
|
}
|
|
4188
4211
|
;// CONCATENATED MODULE: ./packages/ui/src/log.ts
|
|
4189
4212
|
|
|
4190
|
-
const log_version = `ui v${"4.
|
|
4213
|
+
const log_version = `ui v${"4.6.0"}`;
|
|
4191
4214
|
const warnLog = log.create('warn', log_version);
|
|
4192
4215
|
const errLog = log.create('error', log_version);
|
|
4193
4216
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
4194
4217
|
|
|
4195
4218
|
|
|
4196
4219
|
|
|
4197
|
-
const ui_version = "4.
|
|
4220
|
+
const ui_version = "4.6.0";
|
|
4198
4221
|
index_esm_VxeUI.uiVersion = ui_version;
|
|
4199
4222
|
index_esm_VxeUI.dynamicApp = dynamicApp;
|
|
4200
4223
|
function config(options) {
|
|
@@ -4266,22 +4289,45 @@ setConfig({
|
|
|
4266
4289
|
showColorExtractor: true,
|
|
4267
4290
|
showQuick: true
|
|
4268
4291
|
},
|
|
4269
|
-
|
|
4270
|
-
// size: null,
|
|
4271
|
-
// transfer: false
|
|
4292
|
+
datePanel: {
|
|
4272
4293
|
// parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
|
|
4273
4294
|
// labelFormat: '',
|
|
4274
4295
|
// valueFormat: '',
|
|
4275
4296
|
startDate: new Date(1900, 0, 1),
|
|
4276
4297
|
endDate: new Date(2100, 0, 1),
|
|
4277
4298
|
startDay: 1,
|
|
4299
|
+
selectDay: 1
|
|
4300
|
+
},
|
|
4301
|
+
datePicker: {
|
|
4302
|
+
// size: null,
|
|
4303
|
+
// transfer: false,
|
|
4304
|
+
shortcutConfig: {
|
|
4305
|
+
// position: 'left',
|
|
4306
|
+
align: 'left',
|
|
4307
|
+
mode: 'text',
|
|
4308
|
+
autoClose: true
|
|
4309
|
+
},
|
|
4310
|
+
startDay: 1,
|
|
4278
4311
|
selectDay: 1,
|
|
4312
|
+
autoClose: true,
|
|
4313
|
+
showClearButton: null,
|
|
4314
|
+
showConfirmButton: null
|
|
4315
|
+
},
|
|
4316
|
+
dateRangePicker: {
|
|
4317
|
+
// size: null,
|
|
4318
|
+
// transfer: false,
|
|
4279
4319
|
shortcutConfig: {
|
|
4280
4320
|
// position: 'left',
|
|
4281
4321
|
align: 'left',
|
|
4282
4322
|
mode: 'text',
|
|
4283
4323
|
autoClose: true
|
|
4284
|
-
}
|
|
4324
|
+
},
|
|
4325
|
+
startDay: 1,
|
|
4326
|
+
selectDay: 1,
|
|
4327
|
+
separator: ' ~ ',
|
|
4328
|
+
autoClose: true,
|
|
4329
|
+
showClearButton: null,
|
|
4330
|
+
showConfirmButton: null
|
|
4285
4331
|
},
|
|
4286
4332
|
drawer: {
|
|
4287
4333
|
// size: null,
|
|
@@ -4434,7 +4480,9 @@ setConfig({
|
|
|
4434
4480
|
// pageSizes: [10, 15, 20, 50, 100],
|
|
4435
4481
|
// layouts: ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total']
|
|
4436
4482
|
},
|
|
4437
|
-
print: {
|
|
4483
|
+
print: {
|
|
4484
|
+
pageStyle: {}
|
|
4485
|
+
},
|
|
4438
4486
|
passwordInput: {
|
|
4439
4487
|
controls: true
|
|
4440
4488
|
},
|
|
@@ -7167,7 +7215,7 @@ dynamicApp.use(VxeButtonGroup);
|
|
|
7167
7215
|
index_esm_VxeUI.component(button_group);
|
|
7168
7216
|
const ButtonGroup = VxeButtonGroup;
|
|
7169
7217
|
/* harmony default export */ var packages_button_group = (VxeButtonGroup);
|
|
7170
|
-
;// CONCATENATED MODULE: ./packages/date-
|
|
7218
|
+
;// CONCATENATED MODULE: ./packages/date-panel/src/util.ts
|
|
7171
7219
|
|
|
7172
7220
|
function toStringTimeDate(str) {
|
|
7173
7221
|
if (str) {
|
|
@@ -7206,6 +7254,173 @@ function getDateQuarter(date) {
|
|
|
7206
7254
|
}
|
|
7207
7255
|
return 4;
|
|
7208
7256
|
}
|
|
7257
|
+
const parseDateValue = (val, type, options) => {
|
|
7258
|
+
const {
|
|
7259
|
+
valueFormat
|
|
7260
|
+
} = options;
|
|
7261
|
+
if (val) {
|
|
7262
|
+
if (type === 'time') {
|
|
7263
|
+
return toStringTimeDate(val);
|
|
7264
|
+
}
|
|
7265
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val) || /^[0-9]{11,15}$/.test(`${val}`)) {
|
|
7266
|
+
return new Date(Number(val));
|
|
7267
|
+
}
|
|
7268
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val)) {
|
|
7269
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().last(val.split(',')), valueFormat);
|
|
7270
|
+
}
|
|
7271
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(val, valueFormat);
|
|
7272
|
+
}
|
|
7273
|
+
return null;
|
|
7274
|
+
};
|
|
7275
|
+
const parseDateString = (val, type, options) => {
|
|
7276
|
+
const dValue = parseDateValue(val, type, options);
|
|
7277
|
+
return dValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, options.valueFormat) : '';
|
|
7278
|
+
};
|
|
7279
|
+
function parseDateObj(val, type, options) {
|
|
7280
|
+
const {
|
|
7281
|
+
labelFormat,
|
|
7282
|
+
firstDay
|
|
7283
|
+
} = options;
|
|
7284
|
+
let dValue = null;
|
|
7285
|
+
let dLabel = '';
|
|
7286
|
+
if (val) {
|
|
7287
|
+
dValue = parseDateValue(val, type, options);
|
|
7288
|
+
}
|
|
7289
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(dValue)) {
|
|
7290
|
+
dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, labelFormat, {
|
|
7291
|
+
firstDay
|
|
7292
|
+
});
|
|
7293
|
+
// 周选择器,由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年,例如
|
|
7294
|
+
// '2024-12-31' 'yyyy-MM-dd W' >> '2024-12-31 1'
|
|
7295
|
+
// '2025-01-01' 'yyyy-MM-dd W' >> '2025-01-01 1'
|
|
7296
|
+
if (labelFormat && type === 'week') {
|
|
7297
|
+
const weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(dValue, firstDay);
|
|
7298
|
+
const weekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(dValue, 0, weekNum === 1 ? (6 + firstDay) % 7 : firstDay, firstDay);
|
|
7299
|
+
const weekFullYear = weekDate.getFullYear();
|
|
7300
|
+
if (weekFullYear !== dValue.getFullYear()) {
|
|
7301
|
+
const yyIndex = labelFormat.indexOf('yyyy');
|
|
7302
|
+
if (yyIndex > -1) {
|
|
7303
|
+
const yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
|
|
7304
|
+
if (yyNum && !isNaN(yyNum)) {
|
|
7305
|
+
dLabel = dLabel.replace(`${yyNum}`, `${weekFullYear}`);
|
|
7306
|
+
}
|
|
7307
|
+
}
|
|
7308
|
+
}
|
|
7309
|
+
}
|
|
7310
|
+
} else {
|
|
7311
|
+
dValue = null;
|
|
7312
|
+
}
|
|
7313
|
+
return {
|
|
7314
|
+
label: dLabel,
|
|
7315
|
+
value: dValue
|
|
7316
|
+
};
|
|
7317
|
+
}
|
|
7318
|
+
function getDateByCode(code, val, type, options) {
|
|
7319
|
+
const {
|
|
7320
|
+
valueFormat,
|
|
7321
|
+
firstDay
|
|
7322
|
+
} = options;
|
|
7323
|
+
let dValue = null;
|
|
7324
|
+
const value = (code === 'prev' || code === 'next' ? new Date() : val ? parseDateValue(val, type, options) : null) || new Date();
|
|
7325
|
+
switch (code) {
|
|
7326
|
+
case 'prev':
|
|
7327
|
+
case 'next':
|
|
7328
|
+
case 'minus':
|
|
7329
|
+
case 'plus':
|
|
7330
|
+
{
|
|
7331
|
+
const offsetNum = code === 'plus' || code === 'next' ? 1 : -1;
|
|
7332
|
+
switch (type) {
|
|
7333
|
+
case 'date':
|
|
7334
|
+
case 'datetime':
|
|
7335
|
+
dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(value, offsetNum);
|
|
7336
|
+
break;
|
|
7337
|
+
case 'week':
|
|
7338
|
+
dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(value, offsetNum, firstDay, firstDay);
|
|
7339
|
+
break;
|
|
7340
|
+
case 'month':
|
|
7341
|
+
dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(value, offsetNum);
|
|
7342
|
+
break;
|
|
7343
|
+
case 'quarter':
|
|
7344
|
+
dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(value, offsetNum);
|
|
7345
|
+
break;
|
|
7346
|
+
case 'year':
|
|
7347
|
+
dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(value, offsetNum);
|
|
7348
|
+
break;
|
|
7349
|
+
}
|
|
7350
|
+
break;
|
|
7351
|
+
}
|
|
7352
|
+
default:
|
|
7353
|
+
dValue = new Date();
|
|
7354
|
+
break;
|
|
7355
|
+
}
|
|
7356
|
+
return {
|
|
7357
|
+
value: dValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, valueFormat) : ''
|
|
7358
|
+
};
|
|
7359
|
+
}
|
|
7360
|
+
const rangeDateOffsetNumMaps = {
|
|
7361
|
+
last180: -180,
|
|
7362
|
+
last90: -90,
|
|
7363
|
+
last60: -60,
|
|
7364
|
+
last30: -30,
|
|
7365
|
+
last7: -7,
|
|
7366
|
+
last3: -3,
|
|
7367
|
+
last1: -1
|
|
7368
|
+
};
|
|
7369
|
+
function getRangeDateOffsetNum(code) {
|
|
7370
|
+
return rangeDateOffsetNumMaps[code] || 0;
|
|
7371
|
+
}
|
|
7372
|
+
function getRangeDateByCode(code, val, type, options) {
|
|
7373
|
+
const {
|
|
7374
|
+
valueFormat,
|
|
7375
|
+
firstDay
|
|
7376
|
+
} = options;
|
|
7377
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(val)) {
|
|
7378
|
+
val = val.join('');
|
|
7379
|
+
}
|
|
7380
|
+
const value = (val ? parseDateValue(val, type, options) : null) || new Date();
|
|
7381
|
+
let sValue = null;
|
|
7382
|
+
const eValue = value;
|
|
7383
|
+
switch (code) {
|
|
7384
|
+
case 'last1':
|
|
7385
|
+
case 'last3':
|
|
7386
|
+
case 'last7':
|
|
7387
|
+
case 'last30':
|
|
7388
|
+
case 'last60':
|
|
7389
|
+
case 'last90':
|
|
7390
|
+
case 'last180':
|
|
7391
|
+
{
|
|
7392
|
+
const offsetNum = getRangeDateOffsetNum(code);
|
|
7393
|
+
switch (type) {
|
|
7394
|
+
case 'date':
|
|
7395
|
+
case 'datetime':
|
|
7396
|
+
sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(value, offsetNum);
|
|
7397
|
+
break;
|
|
7398
|
+
case 'week':
|
|
7399
|
+
sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(value, offsetNum, firstDay, firstDay);
|
|
7400
|
+
break;
|
|
7401
|
+
case 'month':
|
|
7402
|
+
sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(value, offsetNum);
|
|
7403
|
+
break;
|
|
7404
|
+
case 'quarter':
|
|
7405
|
+
sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(value, offsetNum);
|
|
7406
|
+
break;
|
|
7407
|
+
case 'year':
|
|
7408
|
+
sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(value, offsetNum);
|
|
7409
|
+
break;
|
|
7410
|
+
}
|
|
7411
|
+
break;
|
|
7412
|
+
}
|
|
7413
|
+
default:
|
|
7414
|
+
sValue = new Date();
|
|
7415
|
+
break;
|
|
7416
|
+
}
|
|
7417
|
+
const startValue = sValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(sValue, valueFormat) : '';
|
|
7418
|
+
const endValue = eValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(eValue, valueFormat) : '';
|
|
7419
|
+
return {
|
|
7420
|
+
startValue,
|
|
7421
|
+
endValue
|
|
7422
|
+
};
|
|
7423
|
+
}
|
|
7209
7424
|
;// CONCATENATED MODULE: ./packages/calendar/src/calendar.ts
|
|
7210
7425
|
|
|
7211
7426
|
|
|
@@ -14384,130 +14599,73 @@ dynamicApp.use(VxeCountdown);
|
|
|
14384
14599
|
index_esm_VxeUI.component(countdown);
|
|
14385
14600
|
const Countdown = VxeCountdown;
|
|
14386
14601
|
/* harmony default export */ var packages_countdown = (VxeCountdown);
|
|
14387
|
-
;// CONCATENATED MODULE: ./packages/date-
|
|
14388
|
-
|
|
14602
|
+
;// CONCATENATED MODULE: ./packages/date-panel/src/date-panel.ts
|
|
14389
14603
|
|
|
14390
14604
|
|
|
14391
14605
|
|
|
14392
14606
|
|
|
14393
14607
|
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
/* harmony default export */ var date_picker = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
14398
|
-
name: 'VxeDatePicker',
|
|
14608
|
+
/* harmony default export */ var date_panel = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
14609
|
+
name: 'VxeDatePanel',
|
|
14399
14610
|
props: {
|
|
14400
14611
|
modelValue: [String, Number, Date],
|
|
14401
|
-
immediate: {
|
|
14402
|
-
type: Boolean,
|
|
14403
|
-
default: true
|
|
14404
|
-
},
|
|
14405
|
-
name: String,
|
|
14406
14612
|
type: {
|
|
14407
14613
|
type: String,
|
|
14408
14614
|
default: 'date'
|
|
14409
14615
|
},
|
|
14410
|
-
clearable: {
|
|
14411
|
-
type: Boolean,
|
|
14412
|
-
default: () => getConfig().datePicker.clearable
|
|
14413
|
-
},
|
|
14414
|
-
readonly: {
|
|
14415
|
-
type: Boolean,
|
|
14416
|
-
default: null
|
|
14417
|
-
},
|
|
14418
|
-
disabled: {
|
|
14419
|
-
type: Boolean,
|
|
14420
|
-
default: null
|
|
14421
|
-
},
|
|
14422
|
-
placeholder: String,
|
|
14423
|
-
maxLength: [String, Number],
|
|
14424
|
-
autoComplete: {
|
|
14425
|
-
type: String,
|
|
14426
|
-
default: 'off'
|
|
14427
|
-
},
|
|
14428
|
-
align: String,
|
|
14429
|
-
form: String,
|
|
14430
14616
|
className: String,
|
|
14431
14617
|
size: {
|
|
14432
14618
|
type: String,
|
|
14433
|
-
default: () => getConfig().
|
|
14619
|
+
default: () => getConfig().datePanel.size || getConfig().size
|
|
14434
14620
|
},
|
|
14435
14621
|
multiple: Boolean,
|
|
14436
14622
|
limitCount: {
|
|
14437
14623
|
type: [String, Number],
|
|
14438
|
-
default: () => getConfig().
|
|
14624
|
+
default: () => getConfig().datePanel.limitCount
|
|
14439
14625
|
},
|
|
14440
14626
|
// date、week、month、quarter、year
|
|
14441
14627
|
startDate: {
|
|
14442
14628
|
type: [String, Number, Date],
|
|
14443
|
-
default: () => getConfig().
|
|
14629
|
+
default: () => getConfig().datePanel.startDate
|
|
14444
14630
|
},
|
|
14445
14631
|
endDate: {
|
|
14446
14632
|
type: [String, Number, Date],
|
|
14447
|
-
default: () => getConfig().
|
|
14633
|
+
default: () => getConfig().datePanel.endDate
|
|
14448
14634
|
},
|
|
14449
14635
|
minDate: [String, Number, Date],
|
|
14450
14636
|
maxDate: [String, Number, Date],
|
|
14451
14637
|
startDay: {
|
|
14452
14638
|
type: [String, Number],
|
|
14453
|
-
default: () => getConfig().
|
|
14639
|
+
default: () => getConfig().datePanel.startDay
|
|
14454
14640
|
},
|
|
14455
14641
|
labelFormat: String,
|
|
14456
14642
|
valueFormat: String,
|
|
14457
|
-
editable: {
|
|
14458
|
-
type: Boolean,
|
|
14459
|
-
default: true
|
|
14460
|
-
},
|
|
14461
14643
|
festivalMethod: {
|
|
14462
14644
|
type: Function,
|
|
14463
|
-
default: () => getConfig().
|
|
14645
|
+
default: () => getConfig().datePanel.festivalMethod
|
|
14464
14646
|
},
|
|
14465
14647
|
disabledMethod: {
|
|
14466
14648
|
type: Function,
|
|
14467
|
-
default: () => getConfig().
|
|
14649
|
+
default: () => getConfig().datePanel.disabledMethod
|
|
14468
14650
|
},
|
|
14469
14651
|
// week
|
|
14470
14652
|
selectDay: {
|
|
14471
14653
|
type: [String, Number],
|
|
14472
|
-
default: () => getConfig().
|
|
14473
|
-
}
|
|
14474
|
-
prefixIcon: String,
|
|
14475
|
-
suffixIcon: String,
|
|
14476
|
-
placement: String,
|
|
14477
|
-
transfer: {
|
|
14478
|
-
type: Boolean,
|
|
14479
|
-
default: null
|
|
14480
|
-
},
|
|
14481
|
-
shortcutConfig: Object,
|
|
14482
|
-
// 已废弃 startWeek,被 startDay 替换
|
|
14483
|
-
startWeek: Number,
|
|
14484
|
-
// 已废弃
|
|
14485
|
-
maxlength: [String, Number],
|
|
14486
|
-
// 已废弃
|
|
14487
|
-
autocomplete: String
|
|
14654
|
+
default: () => getConfig().datePanel.selectDay
|
|
14655
|
+
}
|
|
14488
14656
|
},
|
|
14489
|
-
emits: ['update:modelValue', '
|
|
14657
|
+
emits: ['update:modelValue', 'change', 'click', 'clear', 'date-prev', 'date-today', 'date-next', 'confirm'],
|
|
14490
14658
|
setup(props, context) {
|
|
14491
14659
|
const {
|
|
14492
|
-
slots,
|
|
14493
14660
|
emit
|
|
14494
14661
|
} = context;
|
|
14495
|
-
const $xeModal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeModal', null);
|
|
14496
|
-
const $xeDrawer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeDrawer', null);
|
|
14497
|
-
const $xeTable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeTable', null);
|
|
14498
|
-
const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', null);
|
|
14499
|
-
const formItemInfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('xeFormItemInfo', null);
|
|
14500
14662
|
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
14501
14663
|
const {
|
|
14502
14664
|
computeSize
|
|
14503
14665
|
} = useSize(props);
|
|
14504
14666
|
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
14505
|
-
initialized: false,
|
|
14506
|
-
panelIndex: 0,
|
|
14507
14667
|
visiblePanel: false,
|
|
14508
14668
|
isAniVisible: false,
|
|
14509
|
-
panelStyle: {},
|
|
14510
|
-
panelPlacement: '',
|
|
14511
14669
|
isActivated: false,
|
|
14512
14670
|
inputValue: '',
|
|
14513
14671
|
datetimePanelValue: null,
|
|
@@ -14524,15 +14682,12 @@ const Countdown = VxeCountdown;
|
|
|
14524
14682
|
hpTimeout: undefined
|
|
14525
14683
|
};
|
|
14526
14684
|
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
14527
|
-
const refInputTarget = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
14528
|
-
const refInputPanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
14529
14685
|
const refPanelWrapper = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
14530
14686
|
const refInputTimeBody = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
14531
14687
|
const refMaps = {
|
|
14532
|
-
refElem
|
|
14533
|
-
refInput: refInputTarget
|
|
14688
|
+
refElem
|
|
14534
14689
|
};
|
|
14535
|
-
const $
|
|
14690
|
+
const $xeDatePanel = {
|
|
14536
14691
|
xID,
|
|
14537
14692
|
props,
|
|
14538
14693
|
context,
|
|
@@ -14540,76 +14695,30 @@ const Countdown = VxeCountdown;
|
|
|
14540
14695
|
internalData,
|
|
14541
14696
|
getRefMaps: () => refMaps
|
|
14542
14697
|
};
|
|
14543
|
-
let datePickerMethods = {};
|
|
14544
|
-
const computeBtnTransfer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14545
|
-
const {
|
|
14546
|
-
transfer
|
|
14547
|
-
} = props;
|
|
14548
|
-
if (transfer === null) {
|
|
14549
|
-
const globalTransfer = getConfig().datePicker.transfer;
|
|
14550
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
|
|
14551
|
-
return globalTransfer;
|
|
14552
|
-
}
|
|
14553
|
-
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
14554
|
-
return true;
|
|
14555
|
-
}
|
|
14556
|
-
}
|
|
14557
|
-
return transfer;
|
|
14558
|
-
});
|
|
14559
|
-
const computeFormReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14560
|
-
const {
|
|
14561
|
-
readonly
|
|
14562
|
-
} = props;
|
|
14563
|
-
if (readonly === null) {
|
|
14564
|
-
if ($xeForm) {
|
|
14565
|
-
return $xeForm.props.readonly;
|
|
14566
|
-
}
|
|
14567
|
-
return false;
|
|
14568
|
-
}
|
|
14569
|
-
return readonly;
|
|
14570
|
-
});
|
|
14571
|
-
const computeIsDisabled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14572
|
-
const {
|
|
14573
|
-
disabled
|
|
14574
|
-
} = props;
|
|
14575
|
-
if (disabled === null) {
|
|
14576
|
-
if ($xeForm) {
|
|
14577
|
-
return $xeForm.props.disabled;
|
|
14578
|
-
}
|
|
14579
|
-
return false;
|
|
14580
|
-
}
|
|
14581
|
-
return disabled;
|
|
14582
|
-
});
|
|
14583
14698
|
const computeIsDateTimeType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14584
14699
|
const {
|
|
14585
14700
|
type
|
|
14586
14701
|
} = props;
|
|
14587
14702
|
return type === 'time' || type === 'datetime';
|
|
14588
14703
|
});
|
|
14589
|
-
const
|
|
14704
|
+
const computeIsDatePanelType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14590
14705
|
const isDateTimeType = computeIsDateTimeType.value;
|
|
14591
14706
|
return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
14592
14707
|
});
|
|
14593
|
-
const computeIsClearable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14594
|
-
return props.clearable;
|
|
14595
|
-
});
|
|
14596
14708
|
const computeDateStartTime = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14597
14709
|
return props.startDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.startDate) : null;
|
|
14598
14710
|
});
|
|
14599
14711
|
const computeDateEndTime = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14600
14712
|
return props.endDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.endDate) : null;
|
|
14601
14713
|
});
|
|
14602
|
-
const computeSupportMultiples = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14603
|
-
return ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
14604
|
-
});
|
|
14605
14714
|
const computeDateListValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14606
14715
|
const {
|
|
14607
14716
|
modelValue,
|
|
14608
14717
|
multiple
|
|
14609
14718
|
} = props;
|
|
14610
|
-
const
|
|
14719
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
14611
14720
|
const dateValueFormat = computeDateValueFormat.value;
|
|
14612
|
-
if (multiple && modelValue &&
|
|
14721
|
+
if (multiple && modelValue && isDatePanelType) {
|
|
14613
14722
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue).split(',').map(item => {
|
|
14614
14723
|
const date = parseDate(item, dateValueFormat);
|
|
14615
14724
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
|
|
@@ -14664,10 +14773,10 @@ const Countdown = VxeCountdown;
|
|
|
14664
14773
|
const {
|
|
14665
14774
|
modelValue
|
|
14666
14775
|
} = props;
|
|
14667
|
-
const
|
|
14776
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
14668
14777
|
const dateValueFormat = computeDateValueFormat.value;
|
|
14669
14778
|
let val = null;
|
|
14670
|
-
if (modelValue &&
|
|
14779
|
+
if (modelValue && isDatePanelType) {
|
|
14671
14780
|
const date = parseDate(modelValue, dateValueFormat);
|
|
14672
14781
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
|
|
14673
14782
|
val = date;
|
|
@@ -14691,7 +14800,7 @@ const Countdown = VxeCountdown;
|
|
|
14691
14800
|
selectMonth
|
|
14692
14801
|
} = reactData;
|
|
14693
14802
|
if (selectMonth && dateEndTime) {
|
|
14694
|
-
return selectMonth >= dateEndTime;
|
|
14803
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, 0, 'last') >= dateEndTime;
|
|
14695
14804
|
}
|
|
14696
14805
|
return false;
|
|
14697
14806
|
});
|
|
@@ -14700,8 +14809,9 @@ const Countdown = VxeCountdown;
|
|
|
14700
14809
|
datetimePanelValue
|
|
14701
14810
|
} = reactData;
|
|
14702
14811
|
const hasTimeSecond = computeHasTimeSecond.value;
|
|
14812
|
+
const hasTimeMinute = computeHasTimeMinute.value;
|
|
14703
14813
|
if (datetimePanelValue) {
|
|
14704
|
-
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(datetimePanelValue, hasTimeSecond ? 'HH:mm:ss' : 'HH:mm');
|
|
14814
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(datetimePanelValue, hasTimeMinute && hasTimeSecond ? 'HH:mm:ss' : hasTimeMinute ? 'HH:mm' : 'HH');
|
|
14705
14815
|
}
|
|
14706
14816
|
return '';
|
|
14707
14817
|
});
|
|
@@ -14714,11 +14824,11 @@ const Countdown = VxeCountdown;
|
|
|
14714
14824
|
const {
|
|
14715
14825
|
labelFormat
|
|
14716
14826
|
} = props;
|
|
14717
|
-
const
|
|
14718
|
-
if (
|
|
14827
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
14828
|
+
if (isDatePanelType) {
|
|
14719
14829
|
return labelFormat || i18n_getI18n(`vxe.input.date.labelFormat.${props.type}`);
|
|
14720
14830
|
}
|
|
14721
|
-
return
|
|
14831
|
+
return '';
|
|
14722
14832
|
});
|
|
14723
14833
|
const computeYearList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14724
14834
|
const {
|
|
@@ -14749,10 +14859,10 @@ const Countdown = VxeCountdown;
|
|
|
14749
14859
|
return years;
|
|
14750
14860
|
});
|
|
14751
14861
|
const computeSelectDatePanelObj = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14752
|
-
const
|
|
14862
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
14753
14863
|
let y = '';
|
|
14754
14864
|
let m = '';
|
|
14755
|
-
if (
|
|
14865
|
+
if (isDatePanelType) {
|
|
14756
14866
|
const {
|
|
14757
14867
|
datePanelType,
|
|
14758
14868
|
selectMonth
|
|
@@ -14780,15 +14890,14 @@ const Countdown = VxeCountdown;
|
|
|
14780
14890
|
});
|
|
14781
14891
|
const computeFirstDayOfWeek = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14782
14892
|
const {
|
|
14783
|
-
startDay
|
|
14784
|
-
startWeek
|
|
14893
|
+
startDay
|
|
14785
14894
|
} = props;
|
|
14786
|
-
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(
|
|
14895
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(startDay);
|
|
14787
14896
|
});
|
|
14788
14897
|
const computeWeekDatas = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14789
14898
|
const weeks = [];
|
|
14790
|
-
const
|
|
14791
|
-
if (
|
|
14899
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
14900
|
+
if (isDatePanelType) {
|
|
14792
14901
|
let sWeek = computeFirstDayOfWeek.value;
|
|
14793
14902
|
weeks.push(sWeek);
|
|
14794
14903
|
for (let index = 0; index < 6; index++) {
|
|
@@ -14803,8 +14912,8 @@ const Countdown = VxeCountdown;
|
|
|
14803
14912
|
return weeks;
|
|
14804
14913
|
});
|
|
14805
14914
|
const computeDateHeaders = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14806
|
-
const
|
|
14807
|
-
if (
|
|
14915
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
14916
|
+
if (isDatePanelType) {
|
|
14808
14917
|
const weekDatas = computeWeekDatas.value;
|
|
14809
14918
|
return weekDatas.map(day => {
|
|
14810
14919
|
return {
|
|
@@ -14816,8 +14925,8 @@ const Countdown = VxeCountdown;
|
|
|
14816
14925
|
return [];
|
|
14817
14926
|
});
|
|
14818
14927
|
const computeWeekHeaders = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14819
|
-
const
|
|
14820
|
-
if (
|
|
14928
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
14929
|
+
if (isDatePanelType) {
|
|
14821
14930
|
const dateHeaders = computeDateHeaders.value;
|
|
14822
14931
|
return [{
|
|
14823
14932
|
label: i18n_getI18n('vxe.input.date.weeks.w')
|
|
@@ -14992,57 +15101,15 @@ const Countdown = VxeCountdown;
|
|
|
14992
15101
|
const minuteList = computeMinuteList.value;
|
|
14993
15102
|
return minuteList;
|
|
14994
15103
|
});
|
|
14995
|
-
const computeInputReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
14996
|
-
const {
|
|
14997
|
-
type,
|
|
14998
|
-
editable,
|
|
14999
|
-
multiple
|
|
15000
|
-
} = props;
|
|
15001
|
-
const formReadonly = computeFormReadonly.value;
|
|
15002
|
-
return formReadonly || multiple || !editable || type === 'week' || type === 'quarter';
|
|
15003
|
-
});
|
|
15004
|
-
const computeDatePickerType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
15005
|
-
return 'text';
|
|
15006
|
-
});
|
|
15007
|
-
const computeInpPlaceholder = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
15008
|
-
const {
|
|
15009
|
-
placeholder
|
|
15010
|
-
} = props;
|
|
15011
|
-
if (placeholder) {
|
|
15012
|
-
return getFuncText(placeholder);
|
|
15013
|
-
}
|
|
15014
|
-
const globalPlaceholder = getConfig().datePicker.placeholder;
|
|
15015
|
-
if (globalPlaceholder) {
|
|
15016
|
-
return getFuncText(globalPlaceholder);
|
|
15017
|
-
}
|
|
15018
|
-
return i18n_getI18n('vxe.base.pleaseSelect');
|
|
15019
|
-
});
|
|
15020
|
-
const computeInpImmediate = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
15021
|
-
const {
|
|
15022
|
-
immediate
|
|
15023
|
-
} = props;
|
|
15024
|
-
return immediate;
|
|
15025
|
-
});
|
|
15026
|
-
const computeShortcutOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
15027
|
-
return Object.assign({}, getConfig().datePicker.shortcutConfig, props.shortcutConfig);
|
|
15028
|
-
});
|
|
15029
15104
|
const updateModelValue = modelValue => {
|
|
15030
15105
|
const {
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
|
|
15034
|
-
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
} else {
|
|
15039
|
-
val = modelValue;
|
|
15040
|
-
}
|
|
15041
|
-
}
|
|
15042
|
-
reactData.inputValue = val;
|
|
15043
|
-
if (isActivated && visiblePanel) {
|
|
15044
|
-
dateOpenPanel();
|
|
15045
|
-
}
|
|
15106
|
+
type
|
|
15107
|
+
} = props;
|
|
15108
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
15109
|
+
reactData.inputValue = parseDateValue(modelValue, type, {
|
|
15110
|
+
valueFormat: dateValueFormat
|
|
15111
|
+
});
|
|
15112
|
+
dateOpenPanel();
|
|
15046
15113
|
};
|
|
15047
15114
|
const parseDate = (value, format) => {
|
|
15048
15115
|
const {
|
|
@@ -15060,66 +15127,71 @@ const Countdown = VxeCountdown;
|
|
|
15060
15127
|
}
|
|
15061
15128
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(value, format);
|
|
15062
15129
|
};
|
|
15063
|
-
const
|
|
15130
|
+
const dateRevert = () => {
|
|
15131
|
+
reactData.inputValue = props.multiple ? computeDateMultipleLabel.value : reactData.datePanelLabel;
|
|
15132
|
+
};
|
|
15133
|
+
const afterCheckValue = inputLabel => {
|
|
15064
15134
|
const {
|
|
15065
|
-
|
|
15135
|
+
type
|
|
15136
|
+
} = props;
|
|
15137
|
+
const {
|
|
15138
|
+
inputValue,
|
|
15139
|
+
datetimePanelValue
|
|
15066
15140
|
} = reactData;
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15141
|
+
const dateLabelFormat = computeDateLabelFormat.value;
|
|
15142
|
+
if (inputLabel) {
|
|
15143
|
+
let inpDateVal = parseDate(inputLabel, dateLabelFormat);
|
|
15144
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
|
|
15145
|
+
if (type === 'time') {
|
|
15146
|
+
inpDateVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat);
|
|
15147
|
+
if (inputValue !== inpDateVal) {
|
|
15148
|
+
handleChange(inpDateVal, {
|
|
15149
|
+
type: 'check'
|
|
15150
|
+
});
|
|
15151
|
+
}
|
|
15152
|
+
reactData.inputValue = inpDateVal;
|
|
15153
|
+
} else {
|
|
15154
|
+
let isChange = false;
|
|
15155
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
15156
|
+
if (type === 'datetime') {
|
|
15157
|
+
const dateValue = computeDateValue.value;
|
|
15158
|
+
if (inputLabel !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dateValue, dateLabelFormat) || inputLabel !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat)) {
|
|
15159
|
+
isChange = true;
|
|
15160
|
+
if (datetimePanelValue) {
|
|
15161
|
+
datetimePanelValue.setHours(inpDateVal.getHours());
|
|
15162
|
+
datetimePanelValue.setMinutes(inpDateVal.getMinutes());
|
|
15163
|
+
datetimePanelValue.setSeconds(inpDateVal.getSeconds());
|
|
15164
|
+
}
|
|
15165
|
+
}
|
|
15166
|
+
} else {
|
|
15167
|
+
isChange = true;
|
|
15168
|
+
}
|
|
15169
|
+
reactData.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat, {
|
|
15170
|
+
firstDay: firstDayOfWeek
|
|
15171
|
+
});
|
|
15172
|
+
if (isChange) {
|
|
15173
|
+
dateChange(inpDateVal);
|
|
15174
|
+
}
|
|
15175
|
+
}
|
|
15176
|
+
} else {
|
|
15177
|
+
dateRevert();
|
|
15178
|
+
}
|
|
15179
|
+
} else {
|
|
15180
|
+
handleChange('', {
|
|
15181
|
+
type: 'check'
|
|
15182
|
+
});
|
|
15183
|
+
}
|
|
15070
15184
|
};
|
|
15071
15185
|
const handleChange = (value, evnt) => {
|
|
15186
|
+
const {
|
|
15187
|
+
modelValue
|
|
15188
|
+
} = props;
|
|
15072
15189
|
reactData.inputValue = value;
|
|
15073
15190
|
emit('update:modelValue', value);
|
|
15074
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(
|
|
15191
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue) !== value) {
|
|
15075
15192
|
dispatchEvent('change', {
|
|
15076
15193
|
value
|
|
15077
15194
|
}, evnt);
|
|
15078
|
-
// 自动更新校验状态
|
|
15079
|
-
if ($xeForm && formItemInfo) {
|
|
15080
|
-
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
15081
|
-
}
|
|
15082
|
-
}
|
|
15083
|
-
};
|
|
15084
|
-
const inputEvent = evnt => {
|
|
15085
|
-
const isDatePickerType = computeIsDatePickerType.value;
|
|
15086
|
-
const inpImmediate = computeInpImmediate.value;
|
|
15087
|
-
const inputElem = evnt.target;
|
|
15088
|
-
const value = inputElem.value;
|
|
15089
|
-
reactData.inputValue = value;
|
|
15090
|
-
if (!isDatePickerType) {
|
|
15091
|
-
if (inpImmediate) {
|
|
15092
|
-
handleChange(value, evnt);
|
|
15093
|
-
} else {
|
|
15094
|
-
dispatchEvent('input', {
|
|
15095
|
-
value
|
|
15096
|
-
}, evnt);
|
|
15097
|
-
}
|
|
15098
|
-
}
|
|
15099
|
-
};
|
|
15100
|
-
const changeEvent = evnt => {
|
|
15101
|
-
const inpImmediate = computeInpImmediate.value;
|
|
15102
|
-
if (!inpImmediate) {
|
|
15103
|
-
triggerEvent(evnt);
|
|
15104
|
-
}
|
|
15105
|
-
};
|
|
15106
|
-
const focusEvent = evnt => {
|
|
15107
|
-
reactData.isActivated = true;
|
|
15108
|
-
const isDatePickerType = computeIsDatePickerType.value;
|
|
15109
|
-
if (isDatePickerType) {
|
|
15110
|
-
datePickerOpenEvent(evnt);
|
|
15111
|
-
}
|
|
15112
|
-
triggerEvent(evnt);
|
|
15113
|
-
};
|
|
15114
|
-
const clickPrefixEvent = evnt => {
|
|
15115
|
-
const isDisabled = computeIsDisabled.value;
|
|
15116
|
-
if (!isDisabled) {
|
|
15117
|
-
const {
|
|
15118
|
-
inputValue
|
|
15119
|
-
} = reactData;
|
|
15120
|
-
dispatchEvent('prefix-click', {
|
|
15121
|
-
value: inputValue
|
|
15122
|
-
}, evnt);
|
|
15123
15195
|
}
|
|
15124
15196
|
};
|
|
15125
15197
|
const hidePanel = () => {
|
|
@@ -15131,75 +15203,30 @@ const Countdown = VxeCountdown;
|
|
|
15131
15203
|
}, 350);
|
|
15132
15204
|
});
|
|
15133
15205
|
};
|
|
15134
|
-
const
|
|
15135
|
-
const isDatePickerType = computeIsDatePickerType.value;
|
|
15136
|
-
if (isDatePickerType) {
|
|
15137
|
-
hidePanel();
|
|
15138
|
-
}
|
|
15139
|
-
handleChange('', evnt);
|
|
15140
|
-
dispatchEvent('clear', {
|
|
15141
|
-
value
|
|
15142
|
-
}, evnt);
|
|
15143
|
-
};
|
|
15144
|
-
const clickSuffixEvent = evnt => {
|
|
15145
|
-
const isDisabled = computeIsDisabled.value;
|
|
15146
|
-
if (!isDisabled) {
|
|
15147
|
-
const {
|
|
15148
|
-
inputValue
|
|
15149
|
-
} = reactData;
|
|
15150
|
-
dispatchEvent('suffix-click', {
|
|
15151
|
-
value: inputValue
|
|
15152
|
-
}, evnt);
|
|
15153
|
-
}
|
|
15154
|
-
};
|
|
15155
|
-
const dateParseValue = value => {
|
|
15206
|
+
const dateParseValue = val => {
|
|
15156
15207
|
const {
|
|
15157
15208
|
type
|
|
15158
15209
|
} = props;
|
|
15159
15210
|
const dateLabelFormat = computeDateLabelFormat.value;
|
|
15160
15211
|
const dateValueFormat = computeDateValueFormat.value;
|
|
15161
15212
|
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
15162
|
-
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
}
|
|
15167
|
-
|
|
15168
|
-
|
|
15169
|
-
firstDay: firstDayOfWeek
|
|
15170
|
-
});
|
|
15171
|
-
// 周选择器,由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年,例如
|
|
15172
|
-
// '2024-12-31' 'yyyy-MM-dd W' >> '2024-12-31 1'
|
|
15173
|
-
// '2025-01-01' 'yyyy-MM-dd W' >> '2025-01-01 1'
|
|
15174
|
-
if (dateLabelFormat && type === 'week') {
|
|
15175
|
-
const weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(dValue, firstDayOfWeek);
|
|
15176
|
-
const weekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(dValue, 0, weekNum === 1 ? (6 + firstDayOfWeek) % 7 : firstDayOfWeek, firstDayOfWeek);
|
|
15177
|
-
const weekFullYear = weekDate.getFullYear();
|
|
15178
|
-
if (weekFullYear !== dValue.getFullYear()) {
|
|
15179
|
-
const yyIndex = dateLabelFormat.indexOf('yyyy');
|
|
15180
|
-
if (yyIndex > -1) {
|
|
15181
|
-
const yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
|
|
15182
|
-
if (yyNum && !isNaN(yyNum)) {
|
|
15183
|
-
dLabel = dLabel.replace(`${yyNum}`, `${weekFullYear}`);
|
|
15184
|
-
}
|
|
15185
|
-
}
|
|
15186
|
-
}
|
|
15187
|
-
}
|
|
15188
|
-
} else {
|
|
15189
|
-
dValue = null;
|
|
15190
|
-
}
|
|
15191
|
-
reactData.datePanelValue = dValue;
|
|
15192
|
-
reactData.datePanelLabel = dLabel;
|
|
15213
|
+
const dateObj = parseDateObj(val, type, {
|
|
15214
|
+
valueFormat: dateValueFormat,
|
|
15215
|
+
labelFormat: dateLabelFormat,
|
|
15216
|
+
firstDay: firstDayOfWeek
|
|
15217
|
+
});
|
|
15218
|
+
reactData.datePanelValue = dateObj.value;
|
|
15219
|
+
reactData.datePanelLabel = dateObj.label;
|
|
15193
15220
|
};
|
|
15194
15221
|
/**
|
|
15195
15222
|
* 值变化时处理
|
|
15196
15223
|
*/
|
|
15197
15224
|
const changeValue = () => {
|
|
15198
|
-
const
|
|
15225
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
15199
15226
|
const {
|
|
15200
15227
|
inputValue
|
|
15201
15228
|
} = reactData;
|
|
15202
|
-
if (
|
|
15229
|
+
if (isDatePanelType) {
|
|
15203
15230
|
dateParseValue(inputValue);
|
|
15204
15231
|
reactData.inputValue = props.multiple ? computeDateMultipleLabel.value : reactData.datePanelLabel;
|
|
15205
15232
|
}
|
|
@@ -15208,15 +15235,15 @@ const Countdown = VxeCountdown;
|
|
|
15208
15235
|
* 检查初始值
|
|
15209
15236
|
*/
|
|
15210
15237
|
const initValue = () => {
|
|
15211
|
-
const
|
|
15212
|
-
|
|
15213
|
-
|
|
15238
|
+
const {
|
|
15239
|
+
modelValue
|
|
15240
|
+
} = props;
|
|
15241
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
15242
|
+
updateModelValue(modelValue);
|
|
15243
|
+
if (isDatePanelType) {
|
|
15214
15244
|
changeValue();
|
|
15215
15245
|
}
|
|
15216
15246
|
};
|
|
15217
|
-
const dateRevert = () => {
|
|
15218
|
-
reactData.inputValue = props.multiple ? computeDateMultipleLabel.value : reactData.datePanelLabel;
|
|
15219
|
-
};
|
|
15220
15247
|
const dateCheckMonth = date => {
|
|
15221
15248
|
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
15222
15249
|
const weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(date, firstDayOfWeek);
|
|
@@ -15307,88 +15334,6 @@ const Countdown = VxeCountdown;
|
|
|
15307
15334
|
}
|
|
15308
15335
|
}
|
|
15309
15336
|
};
|
|
15310
|
-
const afterCheckValue = () => {
|
|
15311
|
-
const {
|
|
15312
|
-
type
|
|
15313
|
-
} = props;
|
|
15314
|
-
const {
|
|
15315
|
-
inputValue,
|
|
15316
|
-
datetimePanelValue
|
|
15317
|
-
} = reactData;
|
|
15318
|
-
const dateLabelFormat = computeDateLabelFormat.value;
|
|
15319
|
-
const inputReadonly = computeInputReadonly.value;
|
|
15320
|
-
if (!inputReadonly) {
|
|
15321
|
-
if (inputValue) {
|
|
15322
|
-
let inpDateVal = parseDate(inputValue, dateLabelFormat);
|
|
15323
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
|
|
15324
|
-
if (type === 'time') {
|
|
15325
|
-
inpDateVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat);
|
|
15326
|
-
if (inputValue !== inpDateVal) {
|
|
15327
|
-
handleChange(inpDateVal, {
|
|
15328
|
-
type: 'check'
|
|
15329
|
-
});
|
|
15330
|
-
}
|
|
15331
|
-
reactData.inputValue = inpDateVal;
|
|
15332
|
-
} else {
|
|
15333
|
-
let isChange = false;
|
|
15334
|
-
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
15335
|
-
if (type === 'datetime') {
|
|
15336
|
-
const dateValue = computeDateValue.value;
|
|
15337
|
-
if (inputValue !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dateValue, dateLabelFormat) || inputValue !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat)) {
|
|
15338
|
-
isChange = true;
|
|
15339
|
-
if (datetimePanelValue) {
|
|
15340
|
-
datetimePanelValue.setHours(inpDateVal.getHours());
|
|
15341
|
-
datetimePanelValue.setMinutes(inpDateVal.getMinutes());
|
|
15342
|
-
datetimePanelValue.setSeconds(inpDateVal.getSeconds());
|
|
15343
|
-
}
|
|
15344
|
-
}
|
|
15345
|
-
} else {
|
|
15346
|
-
isChange = true;
|
|
15347
|
-
}
|
|
15348
|
-
reactData.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat, {
|
|
15349
|
-
firstDay: firstDayOfWeek
|
|
15350
|
-
});
|
|
15351
|
-
if (isChange) {
|
|
15352
|
-
dateChange(inpDateVal);
|
|
15353
|
-
}
|
|
15354
|
-
}
|
|
15355
|
-
} else {
|
|
15356
|
-
dateRevert();
|
|
15357
|
-
}
|
|
15358
|
-
} else {
|
|
15359
|
-
handleChange('', {
|
|
15360
|
-
type: 'check'
|
|
15361
|
-
});
|
|
15362
|
-
}
|
|
15363
|
-
}
|
|
15364
|
-
};
|
|
15365
|
-
const blurEvent = evnt => {
|
|
15366
|
-
const {
|
|
15367
|
-
inputValue
|
|
15368
|
-
} = reactData;
|
|
15369
|
-
const inpImmediate = computeInpImmediate.value;
|
|
15370
|
-
const value = inputValue;
|
|
15371
|
-
if (!inpImmediate) {
|
|
15372
|
-
handleChange(value, evnt);
|
|
15373
|
-
}
|
|
15374
|
-
afterCheckValue();
|
|
15375
|
-
if (!reactData.visiblePanel) {
|
|
15376
|
-
reactData.isActivated = false;
|
|
15377
|
-
}
|
|
15378
|
-
dispatchEvent('blur', {
|
|
15379
|
-
value
|
|
15380
|
-
}, evnt);
|
|
15381
|
-
// 自动更新校验状态
|
|
15382
|
-
if ($xeForm && formItemInfo) {
|
|
15383
|
-
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
15384
|
-
}
|
|
15385
|
-
};
|
|
15386
|
-
const keydownEvent = evnt => {
|
|
15387
|
-
triggerEvent(evnt);
|
|
15388
|
-
};
|
|
15389
|
-
const keyupEvent = evnt => {
|
|
15390
|
-
triggerEvent(evnt);
|
|
15391
|
-
};
|
|
15392
15337
|
// 日期
|
|
15393
15338
|
const dateMonthHandle = (date, offsetMonth) => {
|
|
15394
15339
|
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
@@ -15548,7 +15493,7 @@ const Countdown = VxeCountdown;
|
|
|
15548
15493
|
type: datePanelType,
|
|
15549
15494
|
viewType: datePanelType,
|
|
15550
15495
|
date,
|
|
15551
|
-
$
|
|
15496
|
+
$datePanel: $xeDatePanel
|
|
15552
15497
|
});
|
|
15553
15498
|
}
|
|
15554
15499
|
return false;
|
|
@@ -15670,6 +15615,9 @@ const Countdown = VxeCountdown;
|
|
|
15670
15615
|
}
|
|
15671
15616
|
}
|
|
15672
15617
|
};
|
|
15618
|
+
const dateMouseleaveEvent = () => {
|
|
15619
|
+
reactData.datePanelValue = null;
|
|
15620
|
+
};
|
|
15673
15621
|
const updateTimePos = liElem => {
|
|
15674
15622
|
if (liElem) {
|
|
15675
15623
|
const height = liElem.offsetHeight;
|
|
@@ -15693,12 +15641,7 @@ const Countdown = VxeCountdown;
|
|
|
15693
15641
|
}
|
|
15694
15642
|
dateTimeChangeEvent(evnt);
|
|
15695
15643
|
};
|
|
15696
|
-
|
|
15697
|
-
// const value = ''
|
|
15698
|
-
// handleChange(value, evnt)
|
|
15699
|
-
// dispatchEvent('clear', { value }, evnt)
|
|
15700
|
-
// }
|
|
15701
|
-
const dateConfirmEvent = () => {
|
|
15644
|
+
const dateConfirmEvent = evnt => {
|
|
15702
15645
|
const {
|
|
15703
15646
|
multiple
|
|
15704
15647
|
} = props;
|
|
@@ -15740,6 +15683,7 @@ const Countdown = VxeCountdown;
|
|
|
15740
15683
|
}
|
|
15741
15684
|
}
|
|
15742
15685
|
hidePanel();
|
|
15686
|
+
dispatchEvent('confirm', {}, evnt);
|
|
15743
15687
|
};
|
|
15744
15688
|
const dateMinuteEvent = (evnt, item) => {
|
|
15745
15689
|
const {
|
|
@@ -15759,92 +15703,6 @@ const Countdown = VxeCountdown;
|
|
|
15759
15703
|
}
|
|
15760
15704
|
dateTimeChangeEvent(evnt);
|
|
15761
15705
|
};
|
|
15762
|
-
const dateOffsetEvent = evnt => {
|
|
15763
|
-
const {
|
|
15764
|
-
isActivated,
|
|
15765
|
-
datePanelValue,
|
|
15766
|
-
datePanelType
|
|
15767
|
-
} = reactData;
|
|
15768
|
-
if (isActivated) {
|
|
15769
|
-
evnt.preventDefault();
|
|
15770
|
-
const isLeftArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
|
|
15771
|
-
const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
|
|
15772
|
-
const isRightArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
|
|
15773
|
-
const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
|
|
15774
|
-
if (datePanelType === 'year') {
|
|
15775
|
-
let offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(datePanelValue || Date.now(), 0, 'first');
|
|
15776
|
-
if (isLeftArrow) {
|
|
15777
|
-
offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, -1);
|
|
15778
|
-
} else if (isUpArrow) {
|
|
15779
|
-
offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, -4);
|
|
15780
|
-
} else if (isRightArrow) {
|
|
15781
|
-
offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, 1);
|
|
15782
|
-
} else if (isDwArrow) {
|
|
15783
|
-
offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, 4);
|
|
15784
|
-
}
|
|
15785
|
-
dateMoveYear(offsetYear);
|
|
15786
|
-
} else if (datePanelType === 'quarter') {
|
|
15787
|
-
let offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(datePanelValue || Date.now(), 0, 'first');
|
|
15788
|
-
if (isLeftArrow) {
|
|
15789
|
-
offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, -1);
|
|
15790
|
-
} else if (isUpArrow) {
|
|
15791
|
-
offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, -2);
|
|
15792
|
-
} else if (isRightArrow) {
|
|
15793
|
-
offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, 1);
|
|
15794
|
-
} else if (isDwArrow) {
|
|
15795
|
-
offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, 2);
|
|
15796
|
-
}
|
|
15797
|
-
dateMoveQuarter(offsetQuarter);
|
|
15798
|
-
} else if (datePanelType === 'month') {
|
|
15799
|
-
let offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(datePanelValue || Date.now(), 0, 'first');
|
|
15800
|
-
if (isLeftArrow) {
|
|
15801
|
-
offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, -1);
|
|
15802
|
-
} else if (isUpArrow) {
|
|
15803
|
-
offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, -4);
|
|
15804
|
-
} else if (isRightArrow) {
|
|
15805
|
-
offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, 1);
|
|
15806
|
-
} else if (isDwArrow) {
|
|
15807
|
-
offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, 4);
|
|
15808
|
-
}
|
|
15809
|
-
dateMoveMonth(offsetMonth);
|
|
15810
|
-
} else if (datePanelType === 'week') {
|
|
15811
|
-
let offsetDay = datePanelValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
|
|
15812
|
-
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
15813
|
-
if (isUpArrow) {
|
|
15814
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(offsetDay, -1, firstDayOfWeek);
|
|
15815
|
-
} else if (isDwArrow) {
|
|
15816
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(offsetDay, 1, firstDayOfWeek);
|
|
15817
|
-
}
|
|
15818
|
-
dateMoveDay(offsetDay);
|
|
15819
|
-
} else {
|
|
15820
|
-
let offsetDay = datePanelValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
|
|
15821
|
-
if (isLeftArrow) {
|
|
15822
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(offsetDay, -1);
|
|
15823
|
-
} else if (isUpArrow) {
|
|
15824
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(offsetDay, -1, offsetDay.getDay());
|
|
15825
|
-
} else if (isRightArrow) {
|
|
15826
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(offsetDay, 1);
|
|
15827
|
-
} else if (isDwArrow) {
|
|
15828
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(offsetDay, 1, offsetDay.getDay());
|
|
15829
|
-
}
|
|
15830
|
-
dateMoveDay(offsetDay);
|
|
15831
|
-
}
|
|
15832
|
-
}
|
|
15833
|
-
};
|
|
15834
|
-
const datePgOffsetEvent = evnt => {
|
|
15835
|
-
const {
|
|
15836
|
-
isActivated
|
|
15837
|
-
} = reactData;
|
|
15838
|
-
if (isActivated) {
|
|
15839
|
-
const isPgUp = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.PAGE_UP);
|
|
15840
|
-
evnt.preventDefault();
|
|
15841
|
-
if (isPgUp) {
|
|
15842
|
-
datePrevEvent(evnt);
|
|
15843
|
-
} else {
|
|
15844
|
-
dateNextEvent(evnt);
|
|
15845
|
-
}
|
|
15846
|
-
}
|
|
15847
|
-
};
|
|
15848
15706
|
const dateOpenPanel = () => {
|
|
15849
15707
|
const {
|
|
15850
15708
|
type
|
|
@@ -15873,281 +15731,2433 @@ const Countdown = VxeCountdown;
|
|
|
15873
15731
|
});
|
|
15874
15732
|
}
|
|
15875
15733
|
};
|
|
15876
|
-
|
|
15877
|
-
|
|
15878
|
-
|
|
15879
|
-
|
|
15880
|
-
reactData.panelIndex = nextZIndex();
|
|
15881
|
-
}
|
|
15734
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
15735
|
+
emit(type, createEvent(evnt, {
|
|
15736
|
+
$datePanel: $xeDatePanel
|
|
15737
|
+
}, params));
|
|
15882
15738
|
};
|
|
15883
|
-
const
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
|
|
15891
|
-
const targetElem = refInputTarget.value;
|
|
15892
|
-
const panelElem = refInputPanel.value;
|
|
15893
|
-
const btnTransfer = computeBtnTransfer.value;
|
|
15894
|
-
if (targetElem && panelElem) {
|
|
15895
|
-
const targetHeight = targetElem.offsetHeight;
|
|
15896
|
-
const targetWidth = targetElem.offsetWidth;
|
|
15897
|
-
const panelHeight = panelElem.offsetHeight;
|
|
15898
|
-
const panelWidth = panelElem.offsetWidth;
|
|
15899
|
-
const marginSize = 5;
|
|
15900
|
-
const panelStyle = {
|
|
15901
|
-
zIndex: panelIndex
|
|
15902
|
-
};
|
|
15903
|
-
const {
|
|
15904
|
-
boundingTop,
|
|
15905
|
-
boundingLeft,
|
|
15906
|
-
visibleHeight,
|
|
15907
|
-
visibleWidth
|
|
15908
|
-
} = getAbsolutePos(targetElem);
|
|
15909
|
-
let panelPlacement = 'bottom';
|
|
15910
|
-
if (btnTransfer) {
|
|
15911
|
-
let left = boundingLeft;
|
|
15912
|
-
let top = boundingTop + targetHeight;
|
|
15913
|
-
if (placement === 'top') {
|
|
15914
|
-
panelPlacement = 'top';
|
|
15915
|
-
top = boundingTop - panelHeight;
|
|
15916
|
-
} else if (!placement) {
|
|
15917
|
-
// 如果下面不够放,则向上
|
|
15918
|
-
if (top + panelHeight + marginSize > visibleHeight) {
|
|
15919
|
-
panelPlacement = 'top';
|
|
15920
|
-
top = boundingTop - panelHeight;
|
|
15921
|
-
}
|
|
15922
|
-
// 如果上面不够放,则向下(优先)
|
|
15923
|
-
if (top < marginSize) {
|
|
15924
|
-
panelPlacement = 'bottom';
|
|
15925
|
-
top = boundingTop + targetHeight;
|
|
15926
|
-
}
|
|
15927
|
-
}
|
|
15928
|
-
// 如果溢出右边
|
|
15929
|
-
if (left + panelWidth + marginSize > visibleWidth) {
|
|
15930
|
-
left -= left + panelWidth + marginSize - visibleWidth;
|
|
15931
|
-
}
|
|
15932
|
-
// 如果溢出左边
|
|
15933
|
-
if (left < marginSize) {
|
|
15934
|
-
left = marginSize;
|
|
15935
|
-
}
|
|
15936
|
-
Object.assign(panelStyle, {
|
|
15937
|
-
left: `${left}px`,
|
|
15938
|
-
top: `${top}px`,
|
|
15939
|
-
minWidth: `${targetWidth}px`
|
|
15940
|
-
});
|
|
15941
|
-
} else {
|
|
15942
|
-
if (placement === 'top') {
|
|
15943
|
-
panelPlacement = 'top';
|
|
15944
|
-
panelStyle.bottom = `${targetHeight}px`;
|
|
15945
|
-
} else if (!placement) {
|
|
15946
|
-
// 如果下面不够放,则向上
|
|
15947
|
-
panelStyle.top = `${targetHeight}px`;
|
|
15948
|
-
if (boundingTop + targetHeight + panelHeight > visibleHeight) {
|
|
15949
|
-
// 如果上面不够放,则向下(优先)
|
|
15950
|
-
if (boundingTop - targetHeight - panelHeight > marginSize) {
|
|
15951
|
-
panelPlacement = 'top';
|
|
15952
|
-
panelStyle.top = '';
|
|
15953
|
-
panelStyle.bottom = `${targetHeight}px`;
|
|
15954
|
-
}
|
|
15955
|
-
}
|
|
15956
|
-
}
|
|
15957
|
-
}
|
|
15958
|
-
reactData.panelStyle = panelStyle;
|
|
15959
|
-
reactData.panelPlacement = panelPlacement;
|
|
15960
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
15739
|
+
const datePanelMethods = {
|
|
15740
|
+
dispatchEvent,
|
|
15741
|
+
getValue() {
|
|
15742
|
+
return reactData.inputValue;
|
|
15743
|
+
},
|
|
15744
|
+
setPanelDate(date) {
|
|
15745
|
+
if (date) {
|
|
15746
|
+
dateCheckMonth(date);
|
|
15961
15747
|
}
|
|
15962
|
-
}
|
|
15748
|
+
},
|
|
15749
|
+
getPanelDate() {
|
|
15750
|
+
return reactData.selectMonth;
|
|
15751
|
+
},
|
|
15752
|
+
checkValue(inputLabel) {
|
|
15753
|
+
afterCheckValue(inputLabel);
|
|
15754
|
+
},
|
|
15755
|
+
confirmByEvent(evnt) {
|
|
15756
|
+
dateConfirmEvent(evnt);
|
|
15757
|
+
}
|
|
15963
15758
|
};
|
|
15964
|
-
|
|
15759
|
+
Object.assign($xeDatePanel, datePanelMethods);
|
|
15760
|
+
const renderDateLabel = (item, label) => {
|
|
15965
15761
|
const {
|
|
15966
|
-
|
|
15967
|
-
} =
|
|
15968
|
-
const
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
|
|
15972
|
-
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15762
|
+
festivalMethod
|
|
15763
|
+
} = props;
|
|
15764
|
+
const labelVNs = [];
|
|
15765
|
+
if (festivalMethod) {
|
|
15766
|
+
const {
|
|
15767
|
+
datePanelType
|
|
15768
|
+
} = reactData;
|
|
15769
|
+
const festivalRest = festivalMethod({
|
|
15770
|
+
type: datePanelType,
|
|
15771
|
+
viewType: datePanelType,
|
|
15772
|
+
date: item.date,
|
|
15773
|
+
$datePanel: $xeDatePanel
|
|
15774
|
+
});
|
|
15775
|
+
const festivalItem = festivalRest ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalRest) ? {
|
|
15776
|
+
label: festivalRest
|
|
15777
|
+
} : festivalRest : {};
|
|
15778
|
+
const extraItem = festivalItem.extra ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalItem.extra) ? {
|
|
15779
|
+
label: festivalItem.extra
|
|
15780
|
+
} : festivalItem.extra : null;
|
|
15781
|
+
labelVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15782
|
+
class: ['vxe-date-panel--label', {
|
|
15783
|
+
'is-notice': festivalItem.notice
|
|
15784
|
+
}]
|
|
15785
|
+
}, extraItem && extraItem.label ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', `${label}`), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15786
|
+
class: ['vxe-date-panel--label--extra', extraItem.important ? 'is-important' : '', extraItem.className],
|
|
15787
|
+
style: extraItem.style
|
|
15788
|
+
}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(extraItem.label))] : `${label}`));
|
|
15789
|
+
const festivalLabel = festivalItem.label;
|
|
15790
|
+
if (festivalLabel) {
|
|
15791
|
+
// 默认最多支持3个节日重叠
|
|
15792
|
+
const festivalLabels = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(festivalLabel).split(',');
|
|
15793
|
+
labelVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15794
|
+
class: ['vxe-date-panel--festival', festivalItem.important ? 'is-important' : '', festivalItem.className],
|
|
15795
|
+
style: festivalItem.style
|
|
15796
|
+
}, [festivalLabels.length > 1 ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15797
|
+
class: ['vxe-date-panel--festival--overlap', `overlap--${festivalLabels.length}`]
|
|
15798
|
+
}, festivalLabels.map(label => (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', label.substring(0, 3)))) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15799
|
+
class: 'vxe-date-panel--festival--label'
|
|
15800
|
+
}, festivalLabels[0].substring(0, 3))]));
|
|
15982
15801
|
}
|
|
15983
|
-
setTimeout(() => {
|
|
15984
|
-
reactData.visiblePanel = true;
|
|
15985
|
-
}, 10);
|
|
15986
|
-
updateZindex();
|
|
15987
|
-
return updatePlacement();
|
|
15988
|
-
}
|
|
15989
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
15990
|
-
};
|
|
15991
|
-
const datePickerOpenEvent = evnt => {
|
|
15992
|
-
const formReadonly = computeFormReadonly.value;
|
|
15993
|
-
if (!formReadonly) {
|
|
15994
|
-
evnt.preventDefault();
|
|
15995
|
-
showPanel();
|
|
15996
15802
|
}
|
|
15803
|
+
return labelVNs;
|
|
15997
15804
|
};
|
|
15998
|
-
const
|
|
15999
|
-
triggerEvent(evnt);
|
|
16000
|
-
};
|
|
16001
|
-
const handleShortcutEvent = ({
|
|
16002
|
-
option,
|
|
16003
|
-
$event
|
|
16004
|
-
}) => {
|
|
16005
|
-
const shortcutOpts = computeShortcutOpts.value;
|
|
15805
|
+
const renderDateDayTable = () => {
|
|
16006
15806
|
const {
|
|
16007
|
-
|
|
16008
|
-
} =
|
|
16009
|
-
const clickMethod = option.clickMethod || shortcutOpts.clickMethod;
|
|
16010
|
-
const shortcutParams = {
|
|
16011
|
-
$datePicker: $xeDatePicker,
|
|
16012
|
-
option: option
|
|
16013
|
-
};
|
|
16014
|
-
if (clickMethod) {
|
|
16015
|
-
clickMethod(shortcutParams);
|
|
16016
|
-
}
|
|
16017
|
-
if (autoClose) {
|
|
16018
|
-
hidePanel();
|
|
16019
|
-
}
|
|
16020
|
-
dispatchEvent('shortcut-click', shortcutParams, $event);
|
|
16021
|
-
};
|
|
16022
|
-
// 全局事件
|
|
16023
|
-
const handleGlobalMousedownEvent = evnt => {
|
|
15807
|
+
multiple
|
|
15808
|
+
} = props;
|
|
16024
15809
|
const {
|
|
16025
|
-
|
|
16026
|
-
|
|
15810
|
+
datePanelType,
|
|
15811
|
+
datePanelValue
|
|
16027
15812
|
} = reactData;
|
|
16028
|
-
const
|
|
16029
|
-
const
|
|
16030
|
-
const
|
|
16031
|
-
const
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16036
|
-
|
|
16037
|
-
|
|
16038
|
-
|
|
16039
|
-
|
|
16040
|
-
|
|
16041
|
-
|
|
16042
|
-
|
|
15813
|
+
const dateValue = computeDateValue.value;
|
|
15814
|
+
const dateHeaders = computeDateHeaders.value;
|
|
15815
|
+
const dayDatas = computeDayDatas.value;
|
|
15816
|
+
const dateListValue = computeDateListValue.value;
|
|
15817
|
+
const overCount = computeOverCount.value;
|
|
15818
|
+
const matchFormat = 'yyyyMMdd';
|
|
15819
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15820
|
+
class: ['vxe-date-panel--view-wrapper', `type--${datePanelType}`]
|
|
15821
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15822
|
+
class: 'vxe-date-panel--view-header'
|
|
15823
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15824
|
+
class: 'vxe-date-panel--view-row'
|
|
15825
|
+
}, dateHeaders.map(item => {
|
|
15826
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15827
|
+
class: 'vxe-date-panel--view-item',
|
|
15828
|
+
style: {
|
|
15829
|
+
width: `${100 / dateHeaders.length}%`
|
|
16043
15830
|
}
|
|
16044
|
-
}
|
|
16045
|
-
|
|
15831
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15832
|
+
class: 'vxe-date-panel--view-item-inner'
|
|
15833
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15834
|
+
class: 'vxe-date-panel--view-item-label'
|
|
15835
|
+
}, item.label)])]);
|
|
15836
|
+
}))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15837
|
+
class: 'vxe-date-panel--view-body'
|
|
15838
|
+
}, dayDatas.map(rows => {
|
|
15839
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15840
|
+
class: 'vxe-date-panel--view-row',
|
|
15841
|
+
style: {
|
|
15842
|
+
height: `${100 / dayDatas.length}%`
|
|
15843
|
+
}
|
|
15844
|
+
}, rows.map(item => {
|
|
15845
|
+
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
15846
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15847
|
+
class: ['vxe-date-panel--view-item', {
|
|
15848
|
+
'is--prev': item.isPrev,
|
|
15849
|
+
'is--current': item.isCurrent,
|
|
15850
|
+
'is--now': item.isNow,
|
|
15851
|
+
'is--next': item.isNext,
|
|
15852
|
+
'is--disabled': isDateDisabled(item),
|
|
15853
|
+
'is--selected': isSelected,
|
|
15854
|
+
'is--over': overCount && !isSelected,
|
|
15855
|
+
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
15856
|
+
}],
|
|
15857
|
+
style: {
|
|
15858
|
+
width: `${100 / rows.length}%`
|
|
15859
|
+
},
|
|
15860
|
+
onClick: () => dateSelectEvent(item),
|
|
15861
|
+
onMouseenter: () => dateMouseenterEvent(item),
|
|
15862
|
+
onMouseleave: dateMouseleaveEvent
|
|
15863
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15864
|
+
class: 'vxe-date-panel--view-item-inner'
|
|
15865
|
+
}, renderDateLabel(item, item.label))]);
|
|
15866
|
+
}));
|
|
15867
|
+
}))])];
|
|
16046
15868
|
};
|
|
16047
|
-
const
|
|
15869
|
+
const renderDateWeekTable = () => {
|
|
16048
15870
|
const {
|
|
16049
|
-
|
|
15871
|
+
multiple
|
|
16050
15872
|
} = props;
|
|
16051
15873
|
const {
|
|
16052
|
-
|
|
15874
|
+
datePanelType,
|
|
15875
|
+
datePanelValue
|
|
16053
15876
|
} = reactData;
|
|
16054
|
-
const
|
|
16055
|
-
const
|
|
16056
|
-
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
|
|
16060
|
-
|
|
16061
|
-
|
|
16062
|
-
|
|
16063
|
-
|
|
16064
|
-
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16071
|
-
afterCheckValue();
|
|
16072
|
-
}
|
|
16073
|
-
isActivated = false;
|
|
16074
|
-
reactData.isActivated = isActivated;
|
|
16075
|
-
} else if (operArrow) {
|
|
16076
|
-
if (isDatePickerType) {
|
|
16077
|
-
if (isActivated) {
|
|
16078
|
-
if (visiblePanel) {
|
|
16079
|
-
dateOffsetEvent(evnt);
|
|
16080
|
-
} else if (isUpArrow || isDwArrow) {
|
|
16081
|
-
datePickerOpenEvent(evnt);
|
|
16082
|
-
}
|
|
16083
|
-
}
|
|
16084
|
-
}
|
|
16085
|
-
} else if (isEnter) {
|
|
16086
|
-
if (isDatePickerType) {
|
|
16087
|
-
if (visiblePanel) {
|
|
16088
|
-
if (reactData.datePanelValue) {
|
|
16089
|
-
dateSelectItem(reactData.datePanelValue);
|
|
16090
|
-
} else {
|
|
16091
|
-
hidePanel();
|
|
16092
|
-
}
|
|
16093
|
-
} else if (isActivated) {
|
|
16094
|
-
datePickerOpenEvent(evnt);
|
|
16095
|
-
}
|
|
16096
|
-
}
|
|
16097
|
-
} else if (isPgUp || isPgDn) {
|
|
16098
|
-
if (isDatePickerType) {
|
|
16099
|
-
if (isActivated) {
|
|
16100
|
-
datePgOffsetEvent(evnt);
|
|
16101
|
-
}
|
|
16102
|
-
}
|
|
16103
|
-
}
|
|
16104
|
-
if (isTab || isEsc) {
|
|
16105
|
-
if (visiblePanel) {
|
|
16106
|
-
hidePanel();
|
|
15877
|
+
const dateValue = computeDateValue.value;
|
|
15878
|
+
const weekHeaders = computeWeekHeaders.value;
|
|
15879
|
+
const weekDates = computeWeekDates.value;
|
|
15880
|
+
const dateListValue = computeDateListValue.value;
|
|
15881
|
+
const overCount = computeOverCount.value;
|
|
15882
|
+
const matchFormat = 'yyyyMMdd';
|
|
15883
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15884
|
+
class: ['vxe-date-panel--view-wrapper', `type--${datePanelType}`]
|
|
15885
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15886
|
+
class: 'vxe-date-panel--view-header'
|
|
15887
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15888
|
+
class: 'vxe-date-panel--view-row'
|
|
15889
|
+
}, weekHeaders.map((item, rIndex) => {
|
|
15890
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15891
|
+
class: 'vxe-date-panel--view-item',
|
|
15892
|
+
style: {
|
|
15893
|
+
width: `${rIndex ? 13 : 9}%`
|
|
16107
15894
|
}
|
|
16108
|
-
}
|
|
16109
|
-
|
|
16110
|
-
|
|
15895
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15896
|
+
class: 'vxe-date-panel--view-item-inner'
|
|
15897
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15898
|
+
class: 'vxe-date-panel--view-item-label'
|
|
15899
|
+
}, item.label)])]);
|
|
15900
|
+
}))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15901
|
+
class: 'vxe-date-panel--view-body'
|
|
15902
|
+
}, weekDates.map(rows => {
|
|
15903
|
+
const isSelected = multiple ? rows.some(item => dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat))) : rows.some(item => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat));
|
|
15904
|
+
const isHover = rows.some(item => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat));
|
|
15905
|
+
const isNowWeek = rows.some(item => item.isNow);
|
|
15906
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15907
|
+
class: 'vxe-date-panel--view-row',
|
|
15908
|
+
style: {
|
|
15909
|
+
height: `${100 / weekDates.length}%`
|
|
16111
15910
|
}
|
|
16112
|
-
}
|
|
16113
|
-
|
|
15911
|
+
}, rows.map((item, rIndex) => {
|
|
15912
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15913
|
+
class: ['vxe-date-panel--view-item', {
|
|
15914
|
+
'is--prev': item.isPrev,
|
|
15915
|
+
'is--current': item.isCurrent,
|
|
15916
|
+
'is--now': rIndex ? item.isNow : isNowWeek,
|
|
15917
|
+
'is--next': item.isNext,
|
|
15918
|
+
'is--disabled': isDateDisabled(item),
|
|
15919
|
+
'is--selected': isSelected,
|
|
15920
|
+
'is--over': overCount && !isSelected,
|
|
15921
|
+
'is--hover': !overCount && isHover
|
|
15922
|
+
}],
|
|
15923
|
+
style: {
|
|
15924
|
+
width: `${rIndex ? 13 : 9}%`
|
|
15925
|
+
},
|
|
15926
|
+
onClick: () => dateSelectEvent(item),
|
|
15927
|
+
onMouseenter: () => dateMouseenterEvent(item),
|
|
15928
|
+
onMouseleave: dateMouseleaveEvent
|
|
15929
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15930
|
+
class: 'vxe-date-panel--view-item-inner'
|
|
15931
|
+
}, renderDateLabel(item, item.label))]);
|
|
15932
|
+
}));
|
|
15933
|
+
}))])];
|
|
16114
15934
|
};
|
|
16115
|
-
const
|
|
15935
|
+
const renderDateMonthTable = () => {
|
|
16116
15936
|
const {
|
|
16117
|
-
|
|
16118
|
-
} =
|
|
16119
|
-
const isDisabled = computeIsDisabled.value;
|
|
16120
|
-
if (!isDisabled) {
|
|
16121
|
-
if (visiblePanel) {
|
|
16122
|
-
const panelWrapperElem = refPanelWrapper.value;
|
|
16123
|
-
if (getEventTargetNode(evnt, panelWrapperElem).flag) {
|
|
16124
|
-
updatePlacement();
|
|
16125
|
-
} else {
|
|
16126
|
-
hidePanel();
|
|
16127
|
-
afterCheckValue();
|
|
16128
|
-
}
|
|
16129
|
-
}
|
|
16130
|
-
}
|
|
16131
|
-
};
|
|
16132
|
-
const handleGlobalBlurEvent = () => {
|
|
15937
|
+
multiple
|
|
15938
|
+
} = props;
|
|
16133
15939
|
const {
|
|
16134
|
-
|
|
16135
|
-
|
|
15940
|
+
datePanelType,
|
|
15941
|
+
datePanelValue
|
|
16136
15942
|
} = reactData;
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
|
|
16147
|
-
|
|
16148
|
-
|
|
16149
|
-
|
|
16150
|
-
|
|
15943
|
+
const dateValue = computeDateValue.value;
|
|
15944
|
+
const monthDatas = computeMonthDatas.value;
|
|
15945
|
+
const dateListValue = computeDateListValue.value;
|
|
15946
|
+
const overCount = computeOverCount.value;
|
|
15947
|
+
const matchFormat = 'yyyyMM';
|
|
15948
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15949
|
+
class: ['vxe-date-panel--view-wrapper', `type--${datePanelType}`]
|
|
15950
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15951
|
+
class: 'vxe-date-panel--view-body'
|
|
15952
|
+
}, monthDatas.map(rows => {
|
|
15953
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15954
|
+
class: 'vxe-date-panel--view-row',
|
|
15955
|
+
style: {
|
|
15956
|
+
height: `${100 / monthDatas.length}%`
|
|
15957
|
+
}
|
|
15958
|
+
}, rows.map(item => {
|
|
15959
|
+
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
15960
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15961
|
+
class: ['vxe-date-panel--view-item', {
|
|
15962
|
+
'is--prev': item.isPrev,
|
|
15963
|
+
'is--current': item.isCurrent,
|
|
15964
|
+
'is--now': item.isNow,
|
|
15965
|
+
'is--next': item.isNext,
|
|
15966
|
+
'is--disabled': isDateDisabled(item),
|
|
15967
|
+
'is--selected': isSelected,
|
|
15968
|
+
'is--over': overCount && !isSelected,
|
|
15969
|
+
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
15970
|
+
}],
|
|
15971
|
+
style: {
|
|
15972
|
+
width: `${100 / rows.length}%`
|
|
15973
|
+
},
|
|
15974
|
+
onClick: () => dateSelectEvent(item),
|
|
15975
|
+
onMouseenter: () => dateMouseenterEvent(item),
|
|
15976
|
+
onMouseleave: dateMouseleaveEvent
|
|
15977
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15978
|
+
class: 'vxe-date-panel--view-item-inner'
|
|
15979
|
+
}, renderDateLabel(item, i18n_getI18n(`vxe.input.date.months.m${item.month}`)))]);
|
|
15980
|
+
}));
|
|
15981
|
+
}))])];
|
|
15982
|
+
};
|
|
15983
|
+
const renderDateQuarterTable = () => {
|
|
15984
|
+
const {
|
|
15985
|
+
multiple
|
|
15986
|
+
} = props;
|
|
15987
|
+
const {
|
|
15988
|
+
datePanelType,
|
|
15989
|
+
datePanelValue
|
|
15990
|
+
} = reactData;
|
|
15991
|
+
const dateValue = computeDateValue.value;
|
|
15992
|
+
const quarterDatas = computeQuarterDatas.value;
|
|
15993
|
+
const dateListValue = computeDateListValue.value;
|
|
15994
|
+
const overCount = computeOverCount.value;
|
|
15995
|
+
const matchFormat = 'yyyyq';
|
|
15996
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15997
|
+
class: ['vxe-date-panel--view-wrapper', `type--${datePanelType}`]
|
|
15998
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
15999
|
+
class: 'vxe-date-panel--view-body'
|
|
16000
|
+
}, quarterDatas.map(rows => {
|
|
16001
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16002
|
+
class: 'vxe-date-panel--view-row',
|
|
16003
|
+
style: {
|
|
16004
|
+
height: `${100 / quarterDatas.length}%`
|
|
16005
|
+
}
|
|
16006
|
+
}, rows.map(item => {
|
|
16007
|
+
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
16008
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16009
|
+
class: ['vxe-date-panel--view-item', {
|
|
16010
|
+
'is--prev': item.isPrev,
|
|
16011
|
+
'is--current': item.isCurrent,
|
|
16012
|
+
'is--now': item.isNow,
|
|
16013
|
+
'is--next': item.isNext,
|
|
16014
|
+
'is--disabled': isDateDisabled(item),
|
|
16015
|
+
'is--selected': isSelected,
|
|
16016
|
+
'is--over': overCount && !isSelected,
|
|
16017
|
+
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
16018
|
+
}],
|
|
16019
|
+
style: {
|
|
16020
|
+
width: `${100 / rows.length}%`
|
|
16021
|
+
},
|
|
16022
|
+
onClick: () => dateSelectEvent(item),
|
|
16023
|
+
onMouseenter: () => dateMouseenterEvent(item),
|
|
16024
|
+
onMouseleave: dateMouseleaveEvent
|
|
16025
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16026
|
+
class: 'vxe-date-panel--view-item-inner'
|
|
16027
|
+
}, renderDateLabel(item, i18n_getI18n(`vxe.input.date.quarters.q${item.quarter}`)))]);
|
|
16028
|
+
}));
|
|
16029
|
+
}))])];
|
|
16030
|
+
};
|
|
16031
|
+
const renderDateYearTable = () => {
|
|
16032
|
+
const {
|
|
16033
|
+
multiple
|
|
16034
|
+
} = props;
|
|
16035
|
+
const {
|
|
16036
|
+
datePanelType,
|
|
16037
|
+
datePanelValue
|
|
16038
|
+
} = reactData;
|
|
16039
|
+
const dateValue = computeDateValue.value;
|
|
16040
|
+
const yearDatas = computeYearDatas.value;
|
|
16041
|
+
const dateListValue = computeDateListValue.value;
|
|
16042
|
+
const overCount = computeOverCount.value;
|
|
16043
|
+
const matchFormat = 'yyyy';
|
|
16044
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16045
|
+
class: ['vxe-date-panel--view-wrapper', `type--${datePanelType}`]
|
|
16046
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16047
|
+
class: 'vxe-date-panel--view-body'
|
|
16048
|
+
}, yearDatas.map(rows => {
|
|
16049
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16050
|
+
class: 'vxe-date-panel--view-row',
|
|
16051
|
+
style: {
|
|
16052
|
+
height: `${100 / yearDatas.length}%`
|
|
16053
|
+
}
|
|
16054
|
+
}, rows.map(item => {
|
|
16055
|
+
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
16056
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16057
|
+
class: ['vxe-date-panel--view-item', {
|
|
16058
|
+
'is--prev': item.isPrev,
|
|
16059
|
+
'is--current': item.isCurrent,
|
|
16060
|
+
'is--now': item.isNow,
|
|
16061
|
+
'is--next': item.isNext,
|
|
16062
|
+
'is--disabled': isDateDisabled(item),
|
|
16063
|
+
'is--selected': isSelected,
|
|
16064
|
+
'is--over': overCount && !isSelected,
|
|
16065
|
+
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
16066
|
+
}],
|
|
16067
|
+
style: {
|
|
16068
|
+
width: `${100 / rows.length}%`
|
|
16069
|
+
},
|
|
16070
|
+
onClick: () => dateSelectEvent(item),
|
|
16071
|
+
onMouseenter: () => dateMouseenterEvent(item),
|
|
16072
|
+
onMouseleave: dateMouseleaveEvent
|
|
16073
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16074
|
+
class: 'vxe-date-panel--view-item-inner'
|
|
16075
|
+
}, renderDateLabel(item, item.year))]);
|
|
16076
|
+
}));
|
|
16077
|
+
}))])];
|
|
16078
|
+
};
|
|
16079
|
+
const renderDateTable = () => {
|
|
16080
|
+
const {
|
|
16081
|
+
datePanelType
|
|
16082
|
+
} = reactData;
|
|
16083
|
+
switch (datePanelType) {
|
|
16084
|
+
case 'week':
|
|
16085
|
+
return renderDateWeekTable();
|
|
16086
|
+
case 'month':
|
|
16087
|
+
return renderDateMonthTable();
|
|
16088
|
+
case 'quarter':
|
|
16089
|
+
return renderDateQuarterTable();
|
|
16090
|
+
case 'year':
|
|
16091
|
+
return renderDateYearTable();
|
|
16092
|
+
}
|
|
16093
|
+
return renderDateDayTable();
|
|
16094
|
+
};
|
|
16095
|
+
const renderDatePanel = () => {
|
|
16096
|
+
const {
|
|
16097
|
+
datePanelType
|
|
16098
|
+
} = reactData;
|
|
16099
|
+
const isDisabledPrevDateBtn = computeIsDisabledPrevDateBtn.value;
|
|
16100
|
+
const isDisabledNextDateBtn = computeIsDisabledNextDateBtn.value;
|
|
16101
|
+
const selectDatePanelObj = computeSelectDatePanelObj.value;
|
|
16102
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16103
|
+
class: 'vxe-date-panel--picker-header'
|
|
16104
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16105
|
+
class: 'vxe-date-panel--picker-type-wrapper'
|
|
16106
|
+
}, [datePanelType === 'year' ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16107
|
+
class: 'vxe-date-panel--picker-label'
|
|
16108
|
+
}, selectDatePanelObj.y) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16109
|
+
class: 'vxe-date-panel--picker-btns'
|
|
16110
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16111
|
+
class: 'vxe-date-panel--picker-btn',
|
|
16112
|
+
onClick: dateToggleYearTypeEvent
|
|
16113
|
+
}, selectDatePanelObj.y), selectDatePanelObj.m ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16114
|
+
class: 'vxe-date-panel--picker-btn',
|
|
16115
|
+
onClick: dateToggleMonthTypeEvent
|
|
16116
|
+
}, selectDatePanelObj.m) : renderEmptyElement($xeDatePanel)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16117
|
+
class: 'vxe-date-panel--picker-btn-wrapper'
|
|
16118
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16119
|
+
class: ['vxe-date-panel--picker-btn vxe-date-panel--picker-prev-btn', {
|
|
16120
|
+
'is--disabled': isDisabledPrevDateBtn
|
|
16121
|
+
}],
|
|
16122
|
+
onClick: datePrevEvent
|
|
16123
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16124
|
+
class: 'vxe-icon-caret-left'
|
|
16125
|
+
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16126
|
+
class: 'vxe-date-panel--picker-btn vxe-date-panel--picker-current-btn',
|
|
16127
|
+
onClick: dateTodayMonthEvent
|
|
16128
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16129
|
+
class: 'vxe-icon-dot'
|
|
16130
|
+
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16131
|
+
class: ['vxe-date-panel--picker-btn vxe-date-panel--picker-next-btn', {
|
|
16132
|
+
'is--disabled': isDisabledNextDateBtn
|
|
16133
|
+
}],
|
|
16134
|
+
onClick: dateNextEvent
|
|
16135
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16136
|
+
class: 'vxe-icon-caret-right'
|
|
16137
|
+
})])])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16138
|
+
class: 'vxe-date-panel--picker-body'
|
|
16139
|
+
}, renderDateTable())];
|
|
16140
|
+
};
|
|
16141
|
+
const renderTimePanel = () => {
|
|
16142
|
+
const {
|
|
16143
|
+
type
|
|
16144
|
+
} = props;
|
|
16145
|
+
const {
|
|
16146
|
+
datetimePanelValue
|
|
16147
|
+
} = reactData;
|
|
16148
|
+
const dateTimeLabel = computeDateTimeLabel.value;
|
|
16149
|
+
const hourList = computeHourList.value;
|
|
16150
|
+
const hasTimeMinute = computeHasTimeMinute.value;
|
|
16151
|
+
const minuteList = computeMinuteList.value;
|
|
16152
|
+
const hasTimeSecond = computeHasTimeSecond.value;
|
|
16153
|
+
const secondList = computeSecondList.value;
|
|
16154
|
+
return [type === 'time' ? renderEmptyElement($xeDatePanel) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16155
|
+
class: 'vxe-date-panel--time-header'
|
|
16156
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16157
|
+
class: 'vxe-date-panel--time-title'
|
|
16158
|
+
}, dateTimeLabel)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16159
|
+
ref: refInputTimeBody,
|
|
16160
|
+
class: 'vxe-date-panel--time-body'
|
|
16161
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
|
|
16162
|
+
class: 'vxe-date-panel--time-hour-list'
|
|
16163
|
+
}, hourList.map((item, index) => {
|
|
16164
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('li', {
|
|
16165
|
+
key: index,
|
|
16166
|
+
class: {
|
|
16167
|
+
'is--selected': datetimePanelValue && datetimePanelValue.getHours() === item.value
|
|
16168
|
+
},
|
|
16169
|
+
onClick: evnt => dateHourEvent(evnt, item)
|
|
16170
|
+
}, item.label);
|
|
16171
|
+
})), hasTimeMinute ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
|
|
16172
|
+
class: 'vxe-date-panel--time-minute-list'
|
|
16173
|
+
}, minuteList.map((item, index) => {
|
|
16174
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('li', {
|
|
16175
|
+
key: index,
|
|
16176
|
+
class: {
|
|
16177
|
+
'is--selected': datetimePanelValue && datetimePanelValue.getMinutes() === item.value
|
|
16178
|
+
},
|
|
16179
|
+
onClick: evnt => dateMinuteEvent(evnt, item)
|
|
16180
|
+
}, item.label);
|
|
16181
|
+
})) : renderEmptyElement($xeDatePanel), hasTimeMinute && hasTimeSecond ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
|
|
16182
|
+
class: 'vxe-date-panel--time-second-list'
|
|
16183
|
+
}, secondList.map((item, index) => {
|
|
16184
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('li', {
|
|
16185
|
+
key: index,
|
|
16186
|
+
class: {
|
|
16187
|
+
'is--selected': datetimePanelValue && datetimePanelValue.getSeconds() === item.value
|
|
16188
|
+
},
|
|
16189
|
+
onClick: evnt => dateSecondEvent(evnt, item)
|
|
16190
|
+
}, item.label);
|
|
16191
|
+
})) : renderEmptyElement($xeDatePanel)])];
|
|
16192
|
+
};
|
|
16193
|
+
const renderPickerPanel = () => {
|
|
16194
|
+
const {
|
|
16195
|
+
type
|
|
16196
|
+
} = props;
|
|
16197
|
+
if (type === 'datetime') {
|
|
16198
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16199
|
+
key: type,
|
|
16200
|
+
ref: refPanelWrapper,
|
|
16201
|
+
class: 'vxe-date-panel--time-layout-wrapper'
|
|
16202
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16203
|
+
class: 'vxe-date-panel--time-left-wrapper'
|
|
16204
|
+
}, renderDatePanel()), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16205
|
+
class: 'vxe-date-panel--time-right-wrapper'
|
|
16206
|
+
}, renderTimePanel())]);
|
|
16207
|
+
} else if (type === 'time') {
|
|
16208
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16209
|
+
key: type,
|
|
16210
|
+
ref: refPanelWrapper,
|
|
16211
|
+
class: 'vxe-date-panel--wrapper'
|
|
16212
|
+
}, renderTimePanel());
|
|
16213
|
+
}
|
|
16214
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16215
|
+
key: type || 'default',
|
|
16216
|
+
ref: refPanelWrapper,
|
|
16217
|
+
class: 'vxe-date-panel--wrapper'
|
|
16218
|
+
}, renderDatePanel());
|
|
16219
|
+
};
|
|
16220
|
+
const renderVN = () => {
|
|
16221
|
+
const {
|
|
16222
|
+
type
|
|
16223
|
+
} = props;
|
|
16224
|
+
const vSize = computeSize.value;
|
|
16225
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16226
|
+
class: ['vxe-date-panel', `type--${type}`, {
|
|
16227
|
+
[`size--${vSize}`]: vSize
|
|
16228
|
+
}]
|
|
16229
|
+
}, [renderPickerPanel()]);
|
|
16230
|
+
};
|
|
16231
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, val => {
|
|
16232
|
+
updateModelValue(val);
|
|
16233
|
+
changeValue();
|
|
16234
|
+
});
|
|
16235
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.type, () => {
|
|
16236
|
+
// 切换类型是重置内置变量
|
|
16237
|
+
Object.assign(reactData, {
|
|
16238
|
+
inputValue: '',
|
|
16239
|
+
datetimePanelValue: null,
|
|
16240
|
+
datePanelValue: null,
|
|
16241
|
+
datePanelLabel: '',
|
|
16242
|
+
datePanelType: 'day',
|
|
16243
|
+
selectMonth: null,
|
|
16244
|
+
currentDate: null
|
|
16245
|
+
});
|
|
16246
|
+
initValue();
|
|
16247
|
+
});
|
|
16248
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeDateLabelFormat, () => {
|
|
16249
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
16250
|
+
if (isDatePanelType) {
|
|
16251
|
+
dateParseValue(reactData.datePanelValue);
|
|
16252
|
+
reactData.inputValue = props.multiple ? computeDateMultipleLabel.value : reactData.datePanelLabel;
|
|
16253
|
+
}
|
|
16254
|
+
});
|
|
16255
|
+
initValue();
|
|
16256
|
+
dateOpenPanel();
|
|
16257
|
+
$xeDatePanel.renderVN = renderVN;
|
|
16258
|
+
return $xeDatePanel;
|
|
16259
|
+
},
|
|
16260
|
+
render() {
|
|
16261
|
+
return this.renderVN();
|
|
16262
|
+
}
|
|
16263
|
+
}));
|
|
16264
|
+
;// CONCATENATED MODULE: ./packages/date-panel/index.ts
|
|
16265
|
+
|
|
16266
|
+
|
|
16267
|
+
|
|
16268
|
+
const VxeDatePanel = Object.assign({}, date_panel, {
|
|
16269
|
+
install(app) {
|
|
16270
|
+
app.component(date_panel.name, date_panel);
|
|
16271
|
+
}
|
|
16272
|
+
});
|
|
16273
|
+
dynamicApp.use(VxeDatePanel);
|
|
16274
|
+
index_esm_VxeUI.component(date_panel);
|
|
16275
|
+
const DatePanel = VxeDatePanel;
|
|
16276
|
+
/* harmony default export */ var packages_date_panel = (VxeDatePanel);
|
|
16277
|
+
;// CONCATENATED MODULE: ./packages/date-picker/src/date-picker.ts
|
|
16278
|
+
|
|
16279
|
+
|
|
16280
|
+
|
|
16281
|
+
|
|
16282
|
+
|
|
16283
|
+
|
|
16284
|
+
|
|
16285
|
+
|
|
16286
|
+
|
|
16287
|
+
|
|
16288
|
+
|
|
16289
|
+
/* harmony default export */ var date_picker = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
16290
|
+
name: 'VxeDatePicker',
|
|
16291
|
+
props: {
|
|
16292
|
+
modelValue: [String, Number, Date],
|
|
16293
|
+
immediate: {
|
|
16294
|
+
type: Boolean,
|
|
16295
|
+
default: true
|
|
16296
|
+
},
|
|
16297
|
+
name: String,
|
|
16298
|
+
type: {
|
|
16299
|
+
type: String,
|
|
16300
|
+
default: 'date'
|
|
16301
|
+
},
|
|
16302
|
+
clearable: {
|
|
16303
|
+
type: Boolean,
|
|
16304
|
+
default: () => getConfig().datePicker.clearable
|
|
16305
|
+
},
|
|
16306
|
+
readonly: {
|
|
16307
|
+
type: Boolean,
|
|
16308
|
+
default: null
|
|
16309
|
+
},
|
|
16310
|
+
disabled: {
|
|
16311
|
+
type: Boolean,
|
|
16312
|
+
default: null
|
|
16313
|
+
},
|
|
16314
|
+
placeholder: String,
|
|
16315
|
+
autoComplete: {
|
|
16316
|
+
type: String,
|
|
16317
|
+
default: 'off'
|
|
16318
|
+
},
|
|
16319
|
+
form: String,
|
|
16320
|
+
className: String,
|
|
16321
|
+
size: {
|
|
16322
|
+
type: String,
|
|
16323
|
+
default: () => getConfig().datePicker.size || getConfig().size
|
|
16324
|
+
},
|
|
16325
|
+
multiple: Boolean,
|
|
16326
|
+
limitCount: {
|
|
16327
|
+
type: [String, Number],
|
|
16328
|
+
default: () => getConfig().upload.limitCount
|
|
16329
|
+
},
|
|
16330
|
+
// date、week、month、quarter、year
|
|
16331
|
+
startDate: {
|
|
16332
|
+
type: [String, Number, Date],
|
|
16333
|
+
default: () => getConfig().datePicker.startDate
|
|
16334
|
+
},
|
|
16335
|
+
endDate: {
|
|
16336
|
+
type: [String, Number, Date],
|
|
16337
|
+
default: () => getConfig().datePicker.endDate
|
|
16338
|
+
},
|
|
16339
|
+
minDate: [String, Number, Date],
|
|
16340
|
+
maxDate: [String, Number, Date],
|
|
16341
|
+
startDay: {
|
|
16342
|
+
type: [String, Number],
|
|
16343
|
+
default: () => getConfig().datePicker.startDay
|
|
16344
|
+
},
|
|
16345
|
+
labelFormat: String,
|
|
16346
|
+
valueFormat: String,
|
|
16347
|
+
editable: {
|
|
16348
|
+
type: Boolean,
|
|
16349
|
+
default: true
|
|
16350
|
+
},
|
|
16351
|
+
festivalMethod: {
|
|
16352
|
+
type: Function,
|
|
16353
|
+
default: () => getConfig().datePicker.festivalMethod
|
|
16354
|
+
},
|
|
16355
|
+
disabledMethod: {
|
|
16356
|
+
type: Function,
|
|
16357
|
+
default: () => getConfig().datePicker.disabledMethod
|
|
16358
|
+
},
|
|
16359
|
+
// week
|
|
16360
|
+
selectDay: {
|
|
16361
|
+
type: [String, Number],
|
|
16362
|
+
default: () => getConfig().datePicker.selectDay
|
|
16363
|
+
},
|
|
16364
|
+
showClearButton: {
|
|
16365
|
+
type: Boolean,
|
|
16366
|
+
default: () => getConfig().datePicker.showClearButton
|
|
16367
|
+
},
|
|
16368
|
+
showConfirmButton: {
|
|
16369
|
+
type: Boolean,
|
|
16370
|
+
default: () => getConfig().datePicker.showConfirmButton
|
|
16371
|
+
},
|
|
16372
|
+
autoClose: {
|
|
16373
|
+
type: Boolean,
|
|
16374
|
+
default: () => getConfig().datePicker.autoClose
|
|
16375
|
+
},
|
|
16376
|
+
prefixIcon: String,
|
|
16377
|
+
suffixIcon: String,
|
|
16378
|
+
placement: String,
|
|
16379
|
+
transfer: {
|
|
16380
|
+
type: Boolean,
|
|
16381
|
+
default: null
|
|
16382
|
+
},
|
|
16383
|
+
shortcutConfig: Object,
|
|
16384
|
+
// 已废弃 startWeek,被 startDay 替换
|
|
16385
|
+
startWeek: Number
|
|
16386
|
+
},
|
|
16387
|
+
emits: ['update:modelValue', 'input', 'change', 'keydown', 'keyup', 'click', 'focus', 'blur', 'clear', 'prefix-click', 'suffix-click', 'date-prev', 'date-today', 'date-next', 'shortcut-click'],
|
|
16388
|
+
setup(props, context) {
|
|
16389
|
+
const {
|
|
16390
|
+
slots,
|
|
16391
|
+
emit
|
|
16392
|
+
} = context;
|
|
16393
|
+
const $xeModal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeModal', null);
|
|
16394
|
+
const $xeDrawer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeDrawer', null);
|
|
16395
|
+
const $xeTable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeTable', null);
|
|
16396
|
+
const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', null);
|
|
16397
|
+
const formItemInfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('xeFormItemInfo', null);
|
|
16398
|
+
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
16399
|
+
const {
|
|
16400
|
+
computeSize
|
|
16401
|
+
} = useSize(props);
|
|
16402
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
16403
|
+
initialized: false,
|
|
16404
|
+
panelIndex: 0,
|
|
16405
|
+
visiblePanel: false,
|
|
16406
|
+
isAniVisible: false,
|
|
16407
|
+
panelStyle: {},
|
|
16408
|
+
panelPlacement: '',
|
|
16409
|
+
isActivated: false,
|
|
16410
|
+
inputValue: '',
|
|
16411
|
+
inputLabel: ''
|
|
16412
|
+
});
|
|
16413
|
+
const internalData = {
|
|
16414
|
+
hpTimeout: undefined
|
|
16415
|
+
};
|
|
16416
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
16417
|
+
const refInputTarget = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
16418
|
+
const refInputPanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
16419
|
+
const refPanelWrapper = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
16420
|
+
const refDatePanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
16421
|
+
const refMaps = {
|
|
16422
|
+
refElem,
|
|
16423
|
+
refInput: refInputTarget
|
|
16424
|
+
};
|
|
16425
|
+
const $xeDatePicker = {
|
|
16426
|
+
xID,
|
|
16427
|
+
props,
|
|
16428
|
+
context,
|
|
16429
|
+
reactData,
|
|
16430
|
+
internalData,
|
|
16431
|
+
getRefMaps: () => refMaps
|
|
16432
|
+
};
|
|
16433
|
+
const computeBtnTransfer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16434
|
+
const {
|
|
16435
|
+
transfer
|
|
16436
|
+
} = props;
|
|
16437
|
+
if (transfer === null) {
|
|
16438
|
+
const globalTransfer = getConfig().datePicker.transfer;
|
|
16439
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
|
|
16440
|
+
return globalTransfer;
|
|
16441
|
+
}
|
|
16442
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
16443
|
+
return true;
|
|
16444
|
+
}
|
|
16445
|
+
}
|
|
16446
|
+
return transfer;
|
|
16447
|
+
});
|
|
16448
|
+
const computeFormReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16449
|
+
const {
|
|
16450
|
+
readonly
|
|
16451
|
+
} = props;
|
|
16452
|
+
if (readonly === null) {
|
|
16453
|
+
if ($xeForm) {
|
|
16454
|
+
return $xeForm.props.readonly;
|
|
16455
|
+
}
|
|
16456
|
+
return false;
|
|
16457
|
+
}
|
|
16458
|
+
return readonly;
|
|
16459
|
+
});
|
|
16460
|
+
const computeIsDisabled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16461
|
+
const {
|
|
16462
|
+
disabled
|
|
16463
|
+
} = props;
|
|
16464
|
+
if (disabled === null) {
|
|
16465
|
+
if ($xeForm) {
|
|
16466
|
+
return $xeForm.props.disabled;
|
|
16467
|
+
}
|
|
16468
|
+
return false;
|
|
16469
|
+
}
|
|
16470
|
+
return disabled;
|
|
16471
|
+
});
|
|
16472
|
+
const computeIsDateTimeType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16473
|
+
const {
|
|
16474
|
+
type
|
|
16475
|
+
} = props;
|
|
16476
|
+
return type === 'time' || type === 'datetime';
|
|
16477
|
+
});
|
|
16478
|
+
const computeIsDatePickerType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16479
|
+
const isDateTimeType = computeIsDateTimeType.value;
|
|
16480
|
+
return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
16481
|
+
});
|
|
16482
|
+
const computeIsClearable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16483
|
+
return props.clearable;
|
|
16484
|
+
});
|
|
16485
|
+
const computeInputReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16486
|
+
const {
|
|
16487
|
+
type,
|
|
16488
|
+
editable,
|
|
16489
|
+
multiple
|
|
16490
|
+
} = props;
|
|
16491
|
+
const formReadonly = computeFormReadonly.value;
|
|
16492
|
+
return formReadonly || multiple || !editable || type === 'week' || type === 'quarter';
|
|
16493
|
+
});
|
|
16494
|
+
const computeInpPlaceholder = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16495
|
+
const {
|
|
16496
|
+
placeholder
|
|
16497
|
+
} = props;
|
|
16498
|
+
if (placeholder) {
|
|
16499
|
+
return getFuncText(placeholder);
|
|
16500
|
+
}
|
|
16501
|
+
const globalPlaceholder = getConfig().datePicker.placeholder;
|
|
16502
|
+
if (globalPlaceholder) {
|
|
16503
|
+
return getFuncText(globalPlaceholder);
|
|
16504
|
+
}
|
|
16505
|
+
return i18n_getI18n('vxe.base.pleaseSelect');
|
|
16506
|
+
});
|
|
16507
|
+
const computeInpImmediate = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16508
|
+
const {
|
|
16509
|
+
immediate
|
|
16510
|
+
} = props;
|
|
16511
|
+
return immediate;
|
|
16512
|
+
});
|
|
16513
|
+
const computeShortcutOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16514
|
+
return Object.assign({}, getConfig().datePicker.shortcutConfig, props.shortcutConfig);
|
|
16515
|
+
});
|
|
16516
|
+
const computeShortcutList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16517
|
+
const shortcutOpts = computeShortcutOpts.value;
|
|
16518
|
+
const {
|
|
16519
|
+
options
|
|
16520
|
+
} = shortcutOpts;
|
|
16521
|
+
if (options) {
|
|
16522
|
+
return options.map((option, index) => {
|
|
16523
|
+
return Object.assign({
|
|
16524
|
+
name: `${option.name || option.code || index}`
|
|
16525
|
+
}, option);
|
|
16526
|
+
});
|
|
16527
|
+
}
|
|
16528
|
+
return [];
|
|
16529
|
+
});
|
|
16530
|
+
const computeDateLabelFormat = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16531
|
+
const {
|
|
16532
|
+
labelFormat
|
|
16533
|
+
} = props;
|
|
16534
|
+
return labelFormat || i18n_getI18n(`vxe.input.date.labelFormat.${props.type}`);
|
|
16535
|
+
});
|
|
16536
|
+
const computeDateValueFormat = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16537
|
+
const {
|
|
16538
|
+
type,
|
|
16539
|
+
valueFormat
|
|
16540
|
+
} = props;
|
|
16541
|
+
if (valueFormat) {
|
|
16542
|
+
return valueFormat;
|
|
16543
|
+
}
|
|
16544
|
+
if (type === 'time') {
|
|
16545
|
+
return 'HH:mm:ss';
|
|
16546
|
+
}
|
|
16547
|
+
if (type === 'datetime') {
|
|
16548
|
+
return 'yyyy-MM-dd HH:mm:ss';
|
|
16549
|
+
}
|
|
16550
|
+
return 'yyyy-MM-dd';
|
|
16551
|
+
});
|
|
16552
|
+
const computeFirstDayOfWeek = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16553
|
+
const {
|
|
16554
|
+
startDay
|
|
16555
|
+
} = props;
|
|
16556
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(startDay);
|
|
16557
|
+
});
|
|
16558
|
+
const computePanelLabel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
16559
|
+
const {
|
|
16560
|
+
type,
|
|
16561
|
+
multiple
|
|
16562
|
+
} = props;
|
|
16563
|
+
const {
|
|
16564
|
+
inputValue
|
|
16565
|
+
} = reactData;
|
|
16566
|
+
const dateLabelFormat = computeDateLabelFormat.value;
|
|
16567
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
16568
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
16569
|
+
const vals = inputValue ? multiple ? inputValue.split(',') : [inputValue] : [];
|
|
16570
|
+
return vals.map(val => {
|
|
16571
|
+
const dateObj = parseDateObj(val, type, {
|
|
16572
|
+
valueFormat: dateValueFormat,
|
|
16573
|
+
labelFormat: dateLabelFormat,
|
|
16574
|
+
firstDay: firstDayOfWeek
|
|
16575
|
+
});
|
|
16576
|
+
return dateObj.label;
|
|
16577
|
+
}).join(', ');
|
|
16578
|
+
});
|
|
16579
|
+
const updateModelValue = () => {
|
|
16580
|
+
const {
|
|
16581
|
+
modelValue
|
|
16582
|
+
} = props;
|
|
16583
|
+
let val = '';
|
|
16584
|
+
if (modelValue) {
|
|
16585
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(modelValue) && /^[0-9]{11,15}$/.test(`${modelValue}`)) {
|
|
16586
|
+
val = new Date(modelValue);
|
|
16587
|
+
} else {
|
|
16588
|
+
val = modelValue;
|
|
16589
|
+
}
|
|
16590
|
+
}
|
|
16591
|
+
reactData.inputValue = val;
|
|
16592
|
+
};
|
|
16593
|
+
const triggerEvent = evnt => {
|
|
16594
|
+
const {
|
|
16595
|
+
inputValue
|
|
16596
|
+
} = reactData;
|
|
16597
|
+
dispatchEvent(evnt.type, {
|
|
16598
|
+
value: inputValue
|
|
16599
|
+
}, evnt);
|
|
16600
|
+
};
|
|
16601
|
+
const handleChange = (value, evnt) => {
|
|
16602
|
+
const {
|
|
16603
|
+
modelValue
|
|
16604
|
+
} = props;
|
|
16605
|
+
reactData.inputValue = value;
|
|
16606
|
+
emit('update:modelValue', value);
|
|
16607
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue) !== value) {
|
|
16608
|
+
dispatchEvent('change', {
|
|
16609
|
+
value
|
|
16610
|
+
}, evnt);
|
|
16611
|
+
// 自动更新校验状态
|
|
16612
|
+
if ($xeForm && formItemInfo) {
|
|
16613
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
16614
|
+
}
|
|
16615
|
+
}
|
|
16616
|
+
};
|
|
16617
|
+
const inputEvent = evnt => {
|
|
16618
|
+
const inputElem = evnt.target;
|
|
16619
|
+
const value = inputElem.value;
|
|
16620
|
+
reactData.inputLabel = value;
|
|
16621
|
+
dispatchEvent('input', {
|
|
16622
|
+
value
|
|
16623
|
+
}, evnt);
|
|
16624
|
+
};
|
|
16625
|
+
const changeEvent = evnt => {
|
|
16626
|
+
const inpImmediate = computeInpImmediate.value;
|
|
16627
|
+
if (!inpImmediate) {
|
|
16628
|
+
triggerEvent(evnt);
|
|
16629
|
+
}
|
|
16630
|
+
};
|
|
16631
|
+
const focusEvent = evnt => {
|
|
16632
|
+
reactData.isActivated = true;
|
|
16633
|
+
const isDatePickerType = computeIsDatePickerType.value;
|
|
16634
|
+
if (isDatePickerType) {
|
|
16635
|
+
datePickerOpenEvent(evnt);
|
|
16636
|
+
}
|
|
16637
|
+
triggerEvent(evnt);
|
|
16638
|
+
};
|
|
16639
|
+
const clickPrefixEvent = evnt => {
|
|
16640
|
+
const isDisabled = computeIsDisabled.value;
|
|
16641
|
+
if (!isDisabled) {
|
|
16642
|
+
const {
|
|
16643
|
+
inputValue
|
|
16644
|
+
} = reactData;
|
|
16645
|
+
dispatchEvent('prefix-click', {
|
|
16646
|
+
value: inputValue
|
|
16647
|
+
}, evnt);
|
|
16648
|
+
}
|
|
16649
|
+
};
|
|
16650
|
+
const hidePanel = () => {
|
|
16651
|
+
return new Promise(resolve => {
|
|
16652
|
+
reactData.visiblePanel = false;
|
|
16653
|
+
internalData.hpTimeout = setTimeout(() => {
|
|
16654
|
+
reactData.isAniVisible = false;
|
|
16655
|
+
resolve();
|
|
16656
|
+
}, 350);
|
|
16657
|
+
});
|
|
16658
|
+
};
|
|
16659
|
+
const clearValueEvent = (evnt, value) => {
|
|
16660
|
+
const isDatePickerType = computeIsDatePickerType.value;
|
|
16661
|
+
if (isDatePickerType) {
|
|
16662
|
+
hidePanel();
|
|
16663
|
+
}
|
|
16664
|
+
handleChange('', evnt);
|
|
16665
|
+
dispatchEvent('clear', {
|
|
16666
|
+
value
|
|
16667
|
+
}, evnt);
|
|
16668
|
+
};
|
|
16669
|
+
const clickSuffixEvent = evnt => {
|
|
16670
|
+
const isDisabled = computeIsDisabled.value;
|
|
16671
|
+
if (!isDisabled) {
|
|
16672
|
+
const {
|
|
16673
|
+
inputValue
|
|
16674
|
+
} = reactData;
|
|
16675
|
+
dispatchEvent('suffix-click', {
|
|
16676
|
+
value: inputValue
|
|
16677
|
+
}, evnt);
|
|
16678
|
+
}
|
|
16679
|
+
};
|
|
16680
|
+
const blurEvent = evnt => {
|
|
16681
|
+
const $datePanel = refDatePanel.value;
|
|
16682
|
+
const {
|
|
16683
|
+
inputValue
|
|
16684
|
+
} = reactData;
|
|
16685
|
+
const inpImmediate = computeInpImmediate.value;
|
|
16686
|
+
const value = inputValue;
|
|
16687
|
+
if (!inpImmediate) {
|
|
16688
|
+
handleChange(value, evnt);
|
|
16689
|
+
}
|
|
16690
|
+
if (!reactData.visiblePanel) {
|
|
16691
|
+
reactData.isActivated = false;
|
|
16692
|
+
}
|
|
16693
|
+
if ($datePanel) {
|
|
16694
|
+
$datePanel.checkValue(reactData.inputLabel);
|
|
16695
|
+
}
|
|
16696
|
+
dispatchEvent('blur', {
|
|
16697
|
+
value
|
|
16698
|
+
}, evnt);
|
|
16699
|
+
// 自动更新校验状态
|
|
16700
|
+
if ($xeForm && formItemInfo) {
|
|
16701
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
16702
|
+
}
|
|
16703
|
+
};
|
|
16704
|
+
const keydownEvent = evnt => {
|
|
16705
|
+
triggerEvent(evnt);
|
|
16706
|
+
};
|
|
16707
|
+
const keyupEvent = evnt => {
|
|
16708
|
+
triggerEvent(evnt);
|
|
16709
|
+
};
|
|
16710
|
+
const confirmEvent = evnt => {
|
|
16711
|
+
const $datePanel = refDatePanel.value;
|
|
16712
|
+
if ($datePanel) {
|
|
16713
|
+
$datePanel.confirmByEvent(evnt);
|
|
16714
|
+
}
|
|
16715
|
+
hidePanel();
|
|
16716
|
+
};
|
|
16717
|
+
const panelChangeEvent = params => {
|
|
16718
|
+
const {
|
|
16719
|
+
multiple
|
|
16720
|
+
} = props;
|
|
16721
|
+
const {
|
|
16722
|
+
value,
|
|
16723
|
+
$event
|
|
16724
|
+
} = params;
|
|
16725
|
+
const isDateTimeType = computeIsDateTimeType.value;
|
|
16726
|
+
handleChange(value, $event);
|
|
16727
|
+
if (!multiple && !isDateTimeType) {
|
|
16728
|
+
hidePanel();
|
|
16729
|
+
}
|
|
16730
|
+
};
|
|
16731
|
+
// 全局事件
|
|
16732
|
+
const handleGlobalMousedownEvent = evnt => {
|
|
16733
|
+
const $datePanel = refDatePanel.value;
|
|
16734
|
+
const {
|
|
16735
|
+
visiblePanel,
|
|
16736
|
+
isActivated
|
|
16737
|
+
} = reactData;
|
|
16738
|
+
const el = refElem.value;
|
|
16739
|
+
const panelWrapperElem = refPanelWrapper.value;
|
|
16740
|
+
const isDisabled = computeIsDisabled.value;
|
|
16741
|
+
if (!isDisabled && isActivated) {
|
|
16742
|
+
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
|
|
16743
|
+
if (!reactData.isActivated) {
|
|
16744
|
+
if (visiblePanel) {
|
|
16745
|
+
hidePanel();
|
|
16746
|
+
if ($datePanel) {
|
|
16747
|
+
$datePanel.checkValue(reactData.inputLabel);
|
|
16748
|
+
}
|
|
16749
|
+
}
|
|
16750
|
+
}
|
|
16751
|
+
}
|
|
16752
|
+
};
|
|
16753
|
+
const handleGlobalMousewheelEvent = evnt => {
|
|
16754
|
+
const {
|
|
16755
|
+
visiblePanel
|
|
16756
|
+
} = reactData;
|
|
16757
|
+
const isDisabled = computeIsDisabled.value;
|
|
16758
|
+
if (!isDisabled) {
|
|
16759
|
+
if (visiblePanel) {
|
|
16760
|
+
const panelWrapperElem = refPanelWrapper.value;
|
|
16761
|
+
if (getEventTargetNode(evnt, panelWrapperElem).flag) {
|
|
16762
|
+
updatePlacement();
|
|
16763
|
+
} else {
|
|
16764
|
+
hidePanel();
|
|
16765
|
+
}
|
|
16766
|
+
}
|
|
16767
|
+
}
|
|
16768
|
+
};
|
|
16769
|
+
const handleGlobalBlurEvent = () => {
|
|
16770
|
+
const $datePanel = refDatePanel.value;
|
|
16771
|
+
const {
|
|
16772
|
+
isActivated,
|
|
16773
|
+
visiblePanel
|
|
16774
|
+
} = reactData;
|
|
16775
|
+
if (visiblePanel) {
|
|
16776
|
+
hidePanel();
|
|
16777
|
+
if ($datePanel) {
|
|
16778
|
+
$datePanel.checkValue(reactData.inputLabel);
|
|
16779
|
+
}
|
|
16780
|
+
} else if (isActivated) {
|
|
16781
|
+
if ($datePanel) {
|
|
16782
|
+
$datePanel.checkValue(reactData.inputLabel);
|
|
16783
|
+
}
|
|
16784
|
+
}
|
|
16785
|
+
};
|
|
16786
|
+
// 弹出面板
|
|
16787
|
+
const updateZindex = () => {
|
|
16788
|
+
if (reactData.panelIndex < getLastZIndex()) {
|
|
16789
|
+
reactData.panelIndex = nextZIndex();
|
|
16790
|
+
}
|
|
16791
|
+
};
|
|
16792
|
+
const updatePlacement = () => {
|
|
16793
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
16794
|
+
const {
|
|
16795
|
+
placement
|
|
16796
|
+
} = props;
|
|
16797
|
+
const {
|
|
16798
|
+
panelIndex
|
|
16799
|
+
} = reactData;
|
|
16800
|
+
const targetElem = refInputTarget.value;
|
|
16801
|
+
const panelElem = refInputPanel.value;
|
|
16802
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
16803
|
+
if (targetElem && panelElem) {
|
|
16804
|
+
const targetHeight = targetElem.offsetHeight;
|
|
16805
|
+
const targetWidth = targetElem.offsetWidth;
|
|
16806
|
+
const panelHeight = panelElem.offsetHeight;
|
|
16807
|
+
const panelWidth = panelElem.offsetWidth;
|
|
16808
|
+
const marginSize = 5;
|
|
16809
|
+
const panelStyle = {
|
|
16810
|
+
zIndex: panelIndex
|
|
16811
|
+
};
|
|
16812
|
+
const {
|
|
16813
|
+
boundingTop,
|
|
16814
|
+
boundingLeft,
|
|
16815
|
+
visibleHeight,
|
|
16816
|
+
visibleWidth
|
|
16817
|
+
} = getAbsolutePos(targetElem);
|
|
16818
|
+
let panelPlacement = 'bottom';
|
|
16819
|
+
if (btnTransfer) {
|
|
16820
|
+
let left = boundingLeft;
|
|
16821
|
+
let top = boundingTop + targetHeight;
|
|
16822
|
+
if (placement === 'top') {
|
|
16823
|
+
panelPlacement = 'top';
|
|
16824
|
+
top = boundingTop - panelHeight;
|
|
16825
|
+
} else if (!placement) {
|
|
16826
|
+
// 如果下面不够放,则向上
|
|
16827
|
+
if (top + panelHeight + marginSize > visibleHeight) {
|
|
16828
|
+
panelPlacement = 'top';
|
|
16829
|
+
top = boundingTop - panelHeight;
|
|
16830
|
+
}
|
|
16831
|
+
// 如果上面不够放,则向下(优先)
|
|
16832
|
+
if (top < marginSize) {
|
|
16833
|
+
panelPlacement = 'bottom';
|
|
16834
|
+
top = boundingTop + targetHeight;
|
|
16835
|
+
}
|
|
16836
|
+
}
|
|
16837
|
+
// 如果溢出右边
|
|
16838
|
+
if (left + panelWidth + marginSize > visibleWidth) {
|
|
16839
|
+
left -= left + panelWidth + marginSize - visibleWidth;
|
|
16840
|
+
}
|
|
16841
|
+
// 如果溢出左边
|
|
16842
|
+
if (left < marginSize) {
|
|
16843
|
+
left = marginSize;
|
|
16844
|
+
}
|
|
16845
|
+
Object.assign(panelStyle, {
|
|
16846
|
+
left: `${left}px`,
|
|
16847
|
+
top: `${top}px`,
|
|
16848
|
+
minWidth: `${targetWidth}px`
|
|
16849
|
+
});
|
|
16850
|
+
} else {
|
|
16851
|
+
if (placement === 'top') {
|
|
16852
|
+
panelPlacement = 'top';
|
|
16853
|
+
panelStyle.bottom = `${targetHeight}px`;
|
|
16854
|
+
} else if (!placement) {
|
|
16855
|
+
// 如果下面不够放,则向上
|
|
16856
|
+
panelStyle.top = `${targetHeight}px`;
|
|
16857
|
+
if (boundingTop + targetHeight + panelHeight > visibleHeight) {
|
|
16858
|
+
// 如果上面不够放,则向下(优先)
|
|
16859
|
+
if (boundingTop - targetHeight - panelHeight > marginSize) {
|
|
16860
|
+
panelPlacement = 'top';
|
|
16861
|
+
panelStyle.top = '';
|
|
16862
|
+
panelStyle.bottom = `${targetHeight}px`;
|
|
16863
|
+
}
|
|
16864
|
+
}
|
|
16865
|
+
}
|
|
16866
|
+
}
|
|
16867
|
+
reactData.panelStyle = panelStyle;
|
|
16868
|
+
reactData.panelPlacement = panelPlacement;
|
|
16869
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
16870
|
+
}
|
|
16871
|
+
});
|
|
16872
|
+
};
|
|
16873
|
+
const showPanel = () => {
|
|
16874
|
+
const {
|
|
16875
|
+
visiblePanel
|
|
16876
|
+
} = reactData;
|
|
16877
|
+
const isDisabled = computeIsDisabled.value;
|
|
16878
|
+
if (!isDisabled && !visiblePanel) {
|
|
16879
|
+
if (!reactData.initialized) {
|
|
16880
|
+
reactData.initialized = true;
|
|
16881
|
+
}
|
|
16882
|
+
if (internalData.hpTimeout) {
|
|
16883
|
+
clearTimeout(internalData.hpTimeout);
|
|
16884
|
+
internalData.hpTimeout = undefined;
|
|
16885
|
+
}
|
|
16886
|
+
reactData.isActivated = true;
|
|
16887
|
+
reactData.isAniVisible = true;
|
|
16888
|
+
setTimeout(() => {
|
|
16889
|
+
reactData.visiblePanel = true;
|
|
16890
|
+
}, 10);
|
|
16891
|
+
updateZindex();
|
|
16892
|
+
return updatePlacement();
|
|
16893
|
+
}
|
|
16894
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
16895
|
+
};
|
|
16896
|
+
const datePickerOpenEvent = evnt => {
|
|
16897
|
+
const formReadonly = computeFormReadonly.value;
|
|
16898
|
+
if (!formReadonly) {
|
|
16899
|
+
evnt.preventDefault();
|
|
16900
|
+
showPanel();
|
|
16901
|
+
}
|
|
16902
|
+
};
|
|
16903
|
+
const clickEvent = evnt => {
|
|
16904
|
+
triggerEvent(evnt);
|
|
16905
|
+
};
|
|
16906
|
+
const handleShortcutEvent = ({
|
|
16907
|
+
option,
|
|
16908
|
+
$event
|
|
16909
|
+
}) => {
|
|
16910
|
+
const {
|
|
16911
|
+
type
|
|
16912
|
+
} = props;
|
|
16913
|
+
const {
|
|
16914
|
+
inputValue
|
|
16915
|
+
} = reactData;
|
|
16916
|
+
const shortcutOpts = computeShortcutOpts.value;
|
|
16917
|
+
const {
|
|
16918
|
+
autoClose
|
|
16919
|
+
} = shortcutOpts;
|
|
16920
|
+
const {
|
|
16921
|
+
code,
|
|
16922
|
+
clickMethod
|
|
16923
|
+
} = option;
|
|
16924
|
+
let value = inputValue;
|
|
16925
|
+
const shortcutParams = {
|
|
16926
|
+
$datePicker: $xeDatePicker,
|
|
16927
|
+
option,
|
|
16928
|
+
value,
|
|
16929
|
+
code
|
|
16930
|
+
};
|
|
16931
|
+
if (!clickMethod && code) {
|
|
16932
|
+
const gCommandOpts = commands.get(code);
|
|
16933
|
+
const dpCommandMethod = gCommandOpts ? gCommandOpts.datePickerCommandMethod : null;
|
|
16934
|
+
if (dpCommandMethod) {
|
|
16935
|
+
dpCommandMethod(shortcutParams);
|
|
16936
|
+
} else {
|
|
16937
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
16938
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
16939
|
+
switch (code) {
|
|
16940
|
+
case 'now':
|
|
16941
|
+
case 'prev':
|
|
16942
|
+
case 'next':
|
|
16943
|
+
case 'minus':
|
|
16944
|
+
case 'plus':
|
|
16945
|
+
{
|
|
16946
|
+
const restObj = getDateByCode(code, value, type, {
|
|
16947
|
+
valueFormat: dateValueFormat,
|
|
16948
|
+
firstDay: firstDayOfWeek
|
|
16949
|
+
});
|
|
16950
|
+
value = restObj.value;
|
|
16951
|
+
shortcutParams.value = value;
|
|
16952
|
+
handleChange(value, $event);
|
|
16953
|
+
break;
|
|
16954
|
+
}
|
|
16955
|
+
default:
|
|
16956
|
+
errLog('vxe.error.notCommands', [code]);
|
|
16957
|
+
break;
|
|
16958
|
+
}
|
|
16959
|
+
}
|
|
16960
|
+
} else {
|
|
16961
|
+
const optClickMethod = clickMethod || shortcutOpts.clickMethod;
|
|
16962
|
+
if (optClickMethod) {
|
|
16963
|
+
optClickMethod(shortcutParams);
|
|
16964
|
+
}
|
|
16965
|
+
}
|
|
16966
|
+
if (autoClose) {
|
|
16967
|
+
hidePanel();
|
|
16968
|
+
}
|
|
16969
|
+
dispatchEvent('shortcut-click', shortcutParams, $event);
|
|
16970
|
+
};
|
|
16971
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
16972
|
+
emit(type, createEvent(evnt, {
|
|
16973
|
+
$datePicker: $xeDatePicker
|
|
16974
|
+
}, params));
|
|
16975
|
+
};
|
|
16976
|
+
const datePickerMethods = {
|
|
16977
|
+
dispatchEvent,
|
|
16978
|
+
setModelValue(value) {
|
|
16979
|
+
reactData.inputValue = value;
|
|
16980
|
+
emit('update:modelValue', value);
|
|
16981
|
+
},
|
|
16982
|
+
setModelValueByEvent(evnt, value) {
|
|
16983
|
+
handleChange(value || '', evnt);
|
|
16984
|
+
},
|
|
16985
|
+
focus() {
|
|
16986
|
+
const inputElem = refInputTarget.value;
|
|
16987
|
+
reactData.isActivated = true;
|
|
16988
|
+
inputElem.focus();
|
|
16989
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
16990
|
+
},
|
|
16991
|
+
blur() {
|
|
16992
|
+
const inputElem = refInputTarget.value;
|
|
16993
|
+
inputElem.blur();
|
|
16994
|
+
reactData.isActivated = false;
|
|
16995
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
16996
|
+
},
|
|
16997
|
+
select() {
|
|
16998
|
+
const inputElem = refInputTarget.value;
|
|
16999
|
+
inputElem.select();
|
|
17000
|
+
reactData.isActivated = false;
|
|
17001
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
17002
|
+
},
|
|
17003
|
+
showPanel,
|
|
17004
|
+
hidePanel,
|
|
17005
|
+
updatePlacement
|
|
17006
|
+
};
|
|
17007
|
+
Object.assign($xeDatePicker, datePickerMethods);
|
|
17008
|
+
const renderShortcutBtn = (pos, isVertical) => {
|
|
17009
|
+
const shortcutOpts = computeShortcutOpts.value;
|
|
17010
|
+
const {
|
|
17011
|
+
position,
|
|
17012
|
+
align,
|
|
17013
|
+
mode
|
|
17014
|
+
} = shortcutOpts;
|
|
17015
|
+
const shortcutList = computeShortcutList.value;
|
|
17016
|
+
if (isEnableConf(shortcutOpts) && shortcutList.length && (position || 'left') === pos) {
|
|
17017
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17018
|
+
class: `vxe-date-picker--layout-${pos}-wrapper`
|
|
17019
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(button_group, {
|
|
17020
|
+
options: shortcutList,
|
|
17021
|
+
mode,
|
|
17022
|
+
align,
|
|
17023
|
+
vertical: isVertical,
|
|
17024
|
+
onClick: handleShortcutEvent
|
|
17025
|
+
})]);
|
|
17026
|
+
}
|
|
17027
|
+
return renderEmptyElement($xeDatePicker);
|
|
17028
|
+
};
|
|
17029
|
+
const renderPanel = () => {
|
|
17030
|
+
const {
|
|
17031
|
+
type,
|
|
17032
|
+
multiple,
|
|
17033
|
+
showClearButton,
|
|
17034
|
+
showConfirmButton
|
|
17035
|
+
} = props;
|
|
17036
|
+
const {
|
|
17037
|
+
initialized,
|
|
17038
|
+
isAniVisible,
|
|
17039
|
+
visiblePanel,
|
|
17040
|
+
panelPlacement,
|
|
17041
|
+
panelStyle,
|
|
17042
|
+
inputValue
|
|
17043
|
+
} = reactData;
|
|
17044
|
+
const vSize = computeSize.value;
|
|
17045
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
17046
|
+
const shortcutOpts = computeShortcutOpts.value;
|
|
17047
|
+
const isClearable = computeIsClearable.value;
|
|
17048
|
+
const isDateTimeType = computeIsDateTimeType.value;
|
|
17049
|
+
const shortcutList = computeShortcutList.value;
|
|
17050
|
+
const {
|
|
17051
|
+
position
|
|
17052
|
+
} = shortcutOpts;
|
|
17053
|
+
const headerSlot = slots.header;
|
|
17054
|
+
const footerSlot = slots.footer;
|
|
17055
|
+
const topSlot = slots.top;
|
|
17056
|
+
const bottomSlot = slots.bottom;
|
|
17057
|
+
const leftSlot = slots.left;
|
|
17058
|
+
const rightSlot = slots.right;
|
|
17059
|
+
const hasShortcutBtn = shortcutList.length > 0;
|
|
17060
|
+
const showConfirmBtn = showConfirmButton === null ? isDateTimeType || multiple : showConfirmButton;
|
|
17061
|
+
const showClearBtn = showClearButton === null ? isClearable && showConfirmBtn && type !== 'time' : showClearButton;
|
|
17062
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.Teleport, {
|
|
17063
|
+
to: 'body',
|
|
17064
|
+
disabled: btnTransfer ? !initialized : true
|
|
17065
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17066
|
+
ref: refInputPanel,
|
|
17067
|
+
class: ['vxe-table--ignore-clear vxe-date-picker--panel', `type--${type}`, {
|
|
17068
|
+
[`size--${vSize}`]: vSize,
|
|
17069
|
+
'is--transfer': btnTransfer,
|
|
17070
|
+
'ani--leave': isAniVisible,
|
|
17071
|
+
'ani--enter': visiblePanel,
|
|
17072
|
+
'show--top': !!(topSlot || headerSlot || hasShortcutBtn && (position === 'top' || position === 'header')),
|
|
17073
|
+
'show--bottom': !!(bottomSlot || footerSlot || hasShortcutBtn && (position === 'bottom' || position === 'footer')),
|
|
17074
|
+
'show--left': !!(leftSlot || hasShortcutBtn && position === 'left'),
|
|
17075
|
+
'show--right': !!(rightSlot || hasShortcutBtn && position === 'right')
|
|
17076
|
+
}],
|
|
17077
|
+
placement: panelPlacement,
|
|
17078
|
+
style: panelStyle
|
|
17079
|
+
}, initialized && (visiblePanel || isAniVisible) ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17080
|
+
ref: refPanelWrapper,
|
|
17081
|
+
class: ['vxe-date-picker--layout-all-wrapper', `type--${type}`, {
|
|
17082
|
+
[`size--${vSize}`]: vSize
|
|
17083
|
+
}]
|
|
17084
|
+
}, [topSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17085
|
+
class: 'vxe-date-picker--layout-top-wrapper'
|
|
17086
|
+
}, topSlot({})) : renderShortcutBtn('top'), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17087
|
+
class: 'vxe-date-picker--layout-body-layout-wrapper'
|
|
17088
|
+
}, [leftSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17089
|
+
class: 'vxe-date-picker--layout-left-wrapper'
|
|
17090
|
+
}, leftSlot({})) : renderShortcutBtn('left', true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17091
|
+
class: 'vxe-date-picker--layout-body-content-wrapper'
|
|
17092
|
+
}, [headerSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17093
|
+
class: 'vxe-date-picker--layout-header-wrapper'
|
|
17094
|
+
}, headerSlot({})) : renderShortcutBtn('header'), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17095
|
+
class: 'vxe-date-picker--layout-body-wrapper'
|
|
17096
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(date_panel, {
|
|
17097
|
+
ref: refDatePanel,
|
|
17098
|
+
modelValue: reactData.inputValue,
|
|
17099
|
+
type: props.type,
|
|
17100
|
+
className: props.className,
|
|
17101
|
+
multiple: props.multiple,
|
|
17102
|
+
limitCount: props.limitCount,
|
|
17103
|
+
startDate: props.startDate,
|
|
17104
|
+
endDate: props.endDate,
|
|
17105
|
+
minDate: props.minDate,
|
|
17106
|
+
maxDate: props.maxDate,
|
|
17107
|
+
startDay: props.startDay,
|
|
17108
|
+
labelFormat: props.labelFormat,
|
|
17109
|
+
valueFormat: props.valueFormat,
|
|
17110
|
+
festivalMethod: props.festivalMethod,
|
|
17111
|
+
disabledMethod: props.disabledMethod,
|
|
17112
|
+
selectDay: props.selectDay,
|
|
17113
|
+
onChange: panelChangeEvent,
|
|
17114
|
+
onDateToday: hidePanel
|
|
17115
|
+
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17116
|
+
class: 'vxe-date-picker--layout-footer-wrapper'
|
|
17117
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17118
|
+
class: 'vxe-date-picker--layout-footer-custom'
|
|
17119
|
+
}, footerSlot ? footerSlot({}) : [renderShortcutBtn('footer')]), showClearBtn || showConfirmBtn ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17120
|
+
class: 'vxe-date-picker--layout-footer-btns'
|
|
17121
|
+
}, [showClearBtn ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
|
|
17122
|
+
size: 'mini',
|
|
17123
|
+
disabled: inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue),
|
|
17124
|
+
content: i18n_getI18n('vxe.button.clear'),
|
|
17125
|
+
onClick: clearValueEvent
|
|
17126
|
+
}) : renderEmptyElement($xeDatePicker), showConfirmBtn ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
|
|
17127
|
+
size: 'mini',
|
|
17128
|
+
status: 'primary',
|
|
17129
|
+
content: i18n_getI18n('vxe.button.confirm'),
|
|
17130
|
+
onClick: confirmEvent
|
|
17131
|
+
}) : renderEmptyElement($xeDatePicker)]) : renderEmptyElement($xeDatePicker)])]), rightSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17132
|
+
class: 'vxe-date-picker--layout-right-wrapper'
|
|
17133
|
+
}, rightSlot({})) : renderShortcutBtn('right', true)]), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17134
|
+
class: 'vxe-date-picker--layout-bottom-wrapper'
|
|
17135
|
+
}, bottomSlot({})) : renderShortcutBtn('bottom')])] : [])]);
|
|
17136
|
+
};
|
|
17137
|
+
const renderPrefixIcon = () => {
|
|
17138
|
+
const {
|
|
17139
|
+
prefixIcon
|
|
17140
|
+
} = props;
|
|
17141
|
+
const prefixSlot = slots.prefix;
|
|
17142
|
+
return prefixSlot || prefixIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17143
|
+
class: 'vxe-date-picker--prefix',
|
|
17144
|
+
onClick: clickPrefixEvent
|
|
17145
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17146
|
+
class: 'vxe-date-picker--prefix-icon'
|
|
17147
|
+
}, prefixSlot ? getSlotVNs(prefixSlot({})) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
17148
|
+
class: prefixIcon
|
|
17149
|
+
})])]) : null;
|
|
17150
|
+
};
|
|
17151
|
+
const renderSuffixIcon = () => {
|
|
17152
|
+
const {
|
|
17153
|
+
suffixIcon
|
|
17154
|
+
} = props;
|
|
17155
|
+
const {
|
|
17156
|
+
inputValue
|
|
17157
|
+
} = reactData;
|
|
17158
|
+
const suffixSlot = slots.suffix;
|
|
17159
|
+
const isDisabled = computeIsDisabled.value;
|
|
17160
|
+
const isClearable = computeIsClearable.value;
|
|
17161
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17162
|
+
class: ['vxe-date-picker--suffix', {
|
|
17163
|
+
'is--clear': isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue))
|
|
17164
|
+
}]
|
|
17165
|
+
}, [isClearable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17166
|
+
class: 'vxe-date-picker--clear-icon',
|
|
17167
|
+
onClick: clearValueEvent
|
|
17168
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
17169
|
+
class: getIcon().INPUT_CLEAR
|
|
17170
|
+
})]) : renderEmptyElement($xeDatePicker), renderExtraSuffixIcon(), suffixSlot || suffixIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17171
|
+
class: 'vxe-date-picker--suffix-icon',
|
|
17172
|
+
onClick: clickSuffixEvent
|
|
17173
|
+
}, suffixSlot ? getSlotVNs(suffixSlot({})) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
17174
|
+
class: suffixIcon
|
|
17175
|
+
})]) : renderEmptyElement($xeDatePicker)]);
|
|
17176
|
+
};
|
|
17177
|
+
const renderExtraSuffixIcon = () => {
|
|
17178
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17179
|
+
class: 'vxe-date-picker--control-icon',
|
|
17180
|
+
onClick: datePickerOpenEvent
|
|
17181
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
17182
|
+
class: ['vxe-date-picker--date-picker-icon', getIcon().DATE_PICKER_DATE]
|
|
17183
|
+
})]);
|
|
17184
|
+
};
|
|
17185
|
+
const renderVN = () => {
|
|
17186
|
+
const {
|
|
17187
|
+
className,
|
|
17188
|
+
type,
|
|
17189
|
+
name,
|
|
17190
|
+
autoComplete
|
|
17191
|
+
} = props;
|
|
17192
|
+
const {
|
|
17193
|
+
inputValue,
|
|
17194
|
+
inputLabel,
|
|
17195
|
+
visiblePanel,
|
|
17196
|
+
isActivated
|
|
17197
|
+
} = reactData;
|
|
17198
|
+
const vSize = computeSize.value;
|
|
17199
|
+
const isDisabled = computeIsDisabled.value;
|
|
17200
|
+
const formReadonly = computeFormReadonly.value;
|
|
17201
|
+
const panelLabel = computePanelLabel.value;
|
|
17202
|
+
if (formReadonly) {
|
|
17203
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17204
|
+
ref: refElem,
|
|
17205
|
+
class: ['vxe-date-picker--readonly', `type--${type}`, className]
|
|
17206
|
+
}, panelLabel);
|
|
17207
|
+
}
|
|
17208
|
+
const inputReadonly = computeInputReadonly.value;
|
|
17209
|
+
const inpPlaceholder = computeInpPlaceholder.value;
|
|
17210
|
+
const isClearable = computeIsClearable.value;
|
|
17211
|
+
const prefix = renderPrefixIcon();
|
|
17212
|
+
const suffix = renderSuffixIcon();
|
|
17213
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17214
|
+
ref: refElem,
|
|
17215
|
+
class: ['vxe-date-picker', `type--${type}`, className, {
|
|
17216
|
+
[`size--${vSize}`]: vSize,
|
|
17217
|
+
'is--prefix': !!prefix,
|
|
17218
|
+
'is--suffix': !!suffix,
|
|
17219
|
+
'is--visible': visiblePanel,
|
|
17220
|
+
'is--disabled': isDisabled,
|
|
17221
|
+
'is--active': isActivated,
|
|
17222
|
+
'show--clear': isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue))
|
|
17223
|
+
}],
|
|
17224
|
+
spellcheck: false
|
|
17225
|
+
}, [prefix || renderEmptyElement($xeDatePicker), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17226
|
+
class: 'vxe-date-picker--wrapper'
|
|
17227
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('input', {
|
|
17228
|
+
ref: refInputTarget,
|
|
17229
|
+
class: 'vxe-date-picker--inner',
|
|
17230
|
+
value: inputLabel,
|
|
17231
|
+
name,
|
|
17232
|
+
type: 'text',
|
|
17233
|
+
placeholder: inpPlaceholder,
|
|
17234
|
+
readonly: inputReadonly,
|
|
17235
|
+
disabled: isDisabled,
|
|
17236
|
+
autocomplete: autoComplete,
|
|
17237
|
+
onKeydown: keydownEvent,
|
|
17238
|
+
onKeyup: keyupEvent,
|
|
17239
|
+
onClick: clickEvent,
|
|
17240
|
+
onInput: inputEvent,
|
|
17241
|
+
onChange: changeEvent,
|
|
17242
|
+
onFocus: focusEvent,
|
|
17243
|
+
onBlur: blurEvent
|
|
17244
|
+
})]), suffix || renderEmptyElement($xeDatePicker),
|
|
17245
|
+
// 下拉面板
|
|
17246
|
+
renderPanel()]);
|
|
17247
|
+
};
|
|
17248
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computePanelLabel, val => {
|
|
17249
|
+
reactData.inputLabel = val;
|
|
17250
|
+
});
|
|
17251
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, () => {
|
|
17252
|
+
updateModelValue();
|
|
17253
|
+
});
|
|
17254
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
17255
|
+
globalEvents.on($xeDatePicker, 'mousewheel', handleGlobalMousewheelEvent);
|
|
17256
|
+
globalEvents.on($xeDatePicker, 'mousedown', handleGlobalMousedownEvent);
|
|
17257
|
+
globalEvents.on($xeDatePicker, 'blur', handleGlobalBlurEvent);
|
|
17258
|
+
});
|
|
17259
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
17260
|
+
globalEvents.off($xeDatePicker, 'mousewheel');
|
|
17261
|
+
globalEvents.off($xeDatePicker, 'mousedown');
|
|
17262
|
+
globalEvents.off($xeDatePicker, 'blur');
|
|
17263
|
+
});
|
|
17264
|
+
updateModelValue();
|
|
17265
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeDatePicker', $xeDatePicker);
|
|
17266
|
+
$xeDatePicker.renderVN = renderVN;
|
|
17267
|
+
return $xeDatePicker;
|
|
17268
|
+
},
|
|
17269
|
+
render() {
|
|
17270
|
+
return this.renderVN();
|
|
17271
|
+
}
|
|
17272
|
+
}));
|
|
17273
|
+
;// CONCATENATED MODULE: ./packages/date-picker/index.ts
|
|
17274
|
+
|
|
17275
|
+
|
|
17276
|
+
|
|
17277
|
+
const VxeDatePicker = Object.assign({}, date_picker, {
|
|
17278
|
+
install(app) {
|
|
17279
|
+
app.component(date_picker.name, date_picker);
|
|
17280
|
+
}
|
|
17281
|
+
});
|
|
17282
|
+
dynamicApp.use(VxeDatePicker);
|
|
17283
|
+
index_esm_VxeUI.component(date_picker);
|
|
17284
|
+
const DatePicker = VxeDatePicker;
|
|
17285
|
+
/* harmony default export */ var packages_date_picker = (VxeDatePicker);
|
|
17286
|
+
;// CONCATENATED MODULE: ./packages/date-range-picker/src/date-range-picker.ts
|
|
17287
|
+
|
|
17288
|
+
|
|
17289
|
+
|
|
17290
|
+
|
|
17291
|
+
|
|
17292
|
+
|
|
17293
|
+
|
|
17294
|
+
|
|
17295
|
+
|
|
17296
|
+
|
|
17297
|
+
|
|
17298
|
+
/* harmony default export */ var date_range_picker = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
17299
|
+
name: 'VxeDateRangePicker',
|
|
17300
|
+
props: {
|
|
17301
|
+
modelValue: [String, Number, Date, Array],
|
|
17302
|
+
startValue: [String, Number, Date],
|
|
17303
|
+
endValue: [String, Number, Date],
|
|
17304
|
+
immediate: {
|
|
17305
|
+
type: Boolean,
|
|
17306
|
+
default: true
|
|
17307
|
+
},
|
|
17308
|
+
name: String,
|
|
17309
|
+
type: {
|
|
17310
|
+
type: String,
|
|
17311
|
+
default: 'date'
|
|
17312
|
+
},
|
|
17313
|
+
clearable: {
|
|
17314
|
+
type: Boolean,
|
|
17315
|
+
default: () => getConfig().dateRangePicker.clearable
|
|
17316
|
+
},
|
|
17317
|
+
readonly: {
|
|
17318
|
+
type: Boolean,
|
|
17319
|
+
default: null
|
|
17320
|
+
},
|
|
17321
|
+
disabled: {
|
|
17322
|
+
type: Boolean,
|
|
17323
|
+
default: null
|
|
17324
|
+
},
|
|
17325
|
+
placeholder: String,
|
|
17326
|
+
autoComplete: {
|
|
17327
|
+
type: String,
|
|
17328
|
+
default: 'off'
|
|
17329
|
+
},
|
|
17330
|
+
form: String,
|
|
17331
|
+
className: String,
|
|
17332
|
+
size: {
|
|
17333
|
+
type: String,
|
|
17334
|
+
default: () => getConfig().dateRangePicker.size || getConfig().size
|
|
17335
|
+
},
|
|
17336
|
+
minDate: [String, Number, Date],
|
|
17337
|
+
maxDate: [String, Number, Date],
|
|
17338
|
+
startDay: {
|
|
17339
|
+
type: [String, Number],
|
|
17340
|
+
default: () => getConfig().dateRangePicker.startDay
|
|
17341
|
+
},
|
|
17342
|
+
labelFormat: String,
|
|
17343
|
+
valueFormat: String,
|
|
17344
|
+
editable: {
|
|
17345
|
+
type: Boolean,
|
|
17346
|
+
default: true
|
|
17347
|
+
},
|
|
17348
|
+
festivalMethod: {
|
|
17349
|
+
type: Function,
|
|
17350
|
+
default: () => getConfig().dateRangePicker.festivalMethod
|
|
17351
|
+
},
|
|
17352
|
+
disabledMethod: {
|
|
17353
|
+
type: Function,
|
|
17354
|
+
default: () => getConfig().dateRangePicker.disabledMethod
|
|
17355
|
+
},
|
|
17356
|
+
separator: {
|
|
17357
|
+
type: [String, Number],
|
|
17358
|
+
default: () => getConfig().dateRangePicker.separator
|
|
17359
|
+
},
|
|
17360
|
+
// week
|
|
17361
|
+
selectDay: {
|
|
17362
|
+
type: [String, Number],
|
|
17363
|
+
default: () => getConfig().dateRangePicker.selectDay
|
|
17364
|
+
},
|
|
17365
|
+
showClearButton: {
|
|
17366
|
+
type: Boolean,
|
|
17367
|
+
default: () => getConfig().dateRangePicker.showClearButton
|
|
17368
|
+
},
|
|
17369
|
+
showConfirmButton: {
|
|
17370
|
+
type: Boolean,
|
|
17371
|
+
default: () => getConfig().dateRangePicker.showConfirmButton
|
|
17372
|
+
},
|
|
17373
|
+
autoClose: {
|
|
17374
|
+
type: Boolean,
|
|
17375
|
+
default: () => getConfig().dateRangePicker.autoClose
|
|
17376
|
+
},
|
|
17377
|
+
prefixIcon: String,
|
|
17378
|
+
suffixIcon: String,
|
|
17379
|
+
placement: String,
|
|
17380
|
+
transfer: {
|
|
17381
|
+
type: Boolean,
|
|
17382
|
+
default: null
|
|
17383
|
+
},
|
|
17384
|
+
shortcutConfig: Object
|
|
17385
|
+
},
|
|
17386
|
+
emits: ['update:modelValue', 'update:startValue', 'update:endValue', 'input', 'change', 'keydown', 'keyup', 'click', 'focus', 'blur', 'clear', 'prefix-click', 'suffix-click', 'date-prev', 'date-today', 'date-next', 'shortcut-click'],
|
|
17387
|
+
setup(props, context) {
|
|
17388
|
+
const {
|
|
17389
|
+
slots,
|
|
17390
|
+
emit
|
|
17391
|
+
} = context;
|
|
17392
|
+
const $xeModal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeModal', null);
|
|
17393
|
+
const $xeDrawer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeDrawer', null);
|
|
17394
|
+
const $xeTable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeTable', null);
|
|
17395
|
+
const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', null);
|
|
17396
|
+
const formItemInfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('xeFormItemInfo', null);
|
|
17397
|
+
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
17398
|
+
const {
|
|
17399
|
+
computeSize
|
|
17400
|
+
} = useSize(props);
|
|
17401
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
17402
|
+
initialized: false,
|
|
17403
|
+
panelIndex: 0,
|
|
17404
|
+
visiblePanel: false,
|
|
17405
|
+
isAniVisible: false,
|
|
17406
|
+
panelStyle: {},
|
|
17407
|
+
panelPlacement: '',
|
|
17408
|
+
isActivated: false,
|
|
17409
|
+
startValue: '',
|
|
17410
|
+
endValue: ''
|
|
17411
|
+
});
|
|
17412
|
+
const internalData = {
|
|
17413
|
+
// selectStatus: false
|
|
17414
|
+
// hpTimeout: undefined
|
|
17415
|
+
};
|
|
17416
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
17417
|
+
const refInputTarget = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
17418
|
+
const refInputPanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
17419
|
+
const refPanelWrapper = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
17420
|
+
const refStartDatePanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
17421
|
+
const refEndDatePanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
17422
|
+
const refMaps = {
|
|
17423
|
+
refElem,
|
|
17424
|
+
refInput: refInputTarget
|
|
17425
|
+
};
|
|
17426
|
+
const $xeDateRangePicker = {
|
|
17427
|
+
xID,
|
|
17428
|
+
props,
|
|
17429
|
+
context,
|
|
17430
|
+
reactData,
|
|
17431
|
+
internalData,
|
|
17432
|
+
getRefMaps: () => refMaps
|
|
17433
|
+
};
|
|
17434
|
+
let dateRangePickerMethods = {};
|
|
17435
|
+
const computeBtnTransfer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17436
|
+
const {
|
|
17437
|
+
transfer
|
|
17438
|
+
} = props;
|
|
17439
|
+
if (transfer === null) {
|
|
17440
|
+
const globalTransfer = getConfig().dateRangePicker.transfer;
|
|
17441
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
|
|
17442
|
+
return globalTransfer;
|
|
17443
|
+
}
|
|
17444
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
17445
|
+
return true;
|
|
17446
|
+
}
|
|
17447
|
+
}
|
|
17448
|
+
return transfer;
|
|
17449
|
+
});
|
|
17450
|
+
const computeFormReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17451
|
+
const {
|
|
17452
|
+
readonly
|
|
17453
|
+
} = props;
|
|
17454
|
+
if (readonly === null) {
|
|
17455
|
+
if ($xeForm) {
|
|
17456
|
+
return $xeForm.props.readonly;
|
|
17457
|
+
}
|
|
17458
|
+
return false;
|
|
17459
|
+
}
|
|
17460
|
+
return readonly;
|
|
17461
|
+
});
|
|
17462
|
+
const computeIsDisabled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17463
|
+
const {
|
|
17464
|
+
disabled
|
|
17465
|
+
} = props;
|
|
17466
|
+
if (disabled === null) {
|
|
17467
|
+
if ($xeForm) {
|
|
17468
|
+
return $xeForm.props.disabled;
|
|
17469
|
+
}
|
|
17470
|
+
return false;
|
|
17471
|
+
}
|
|
17472
|
+
return disabled;
|
|
17473
|
+
});
|
|
17474
|
+
const computeMVal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17475
|
+
const {
|
|
17476
|
+
startValue,
|
|
17477
|
+
endValue
|
|
17478
|
+
} = props;
|
|
17479
|
+
return `${startValue || ''}${endValue || ''}`;
|
|
17480
|
+
});
|
|
17481
|
+
const computeIsDateTimeType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17482
|
+
const {
|
|
17483
|
+
type
|
|
17484
|
+
} = props;
|
|
17485
|
+
return type === 'time' || type === 'datetime';
|
|
17486
|
+
});
|
|
17487
|
+
const computeIsDatePickerType = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17488
|
+
return ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
17489
|
+
});
|
|
17490
|
+
const computeIsClearable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17491
|
+
return props.clearable;
|
|
17492
|
+
});
|
|
17493
|
+
const computeInpPlaceholder = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17494
|
+
const {
|
|
17495
|
+
placeholder
|
|
17496
|
+
} = props;
|
|
17497
|
+
if (placeholder) {
|
|
17498
|
+
return getFuncText(placeholder);
|
|
17499
|
+
}
|
|
17500
|
+
const globalPlaceholder = getConfig().dateRangePicker.placeholder;
|
|
17501
|
+
if (globalPlaceholder) {
|
|
17502
|
+
return getFuncText(globalPlaceholder);
|
|
17503
|
+
}
|
|
17504
|
+
return i18n_getI18n('vxe.base.pleaseSelect');
|
|
17505
|
+
});
|
|
17506
|
+
const computeInpImmediate = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17507
|
+
const {
|
|
17508
|
+
immediate
|
|
17509
|
+
} = props;
|
|
17510
|
+
return immediate;
|
|
17511
|
+
});
|
|
17512
|
+
const computeShortcutOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17513
|
+
return Object.assign({}, getConfig().dateRangePicker.shortcutConfig, props.shortcutConfig);
|
|
17514
|
+
});
|
|
17515
|
+
const computeShortcutList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17516
|
+
const shortcutOpts = computeShortcutOpts.value;
|
|
17517
|
+
const {
|
|
17518
|
+
options
|
|
17519
|
+
} = shortcutOpts;
|
|
17520
|
+
if (options) {
|
|
17521
|
+
return options.map((option, index) => {
|
|
17522
|
+
return Object.assign({
|
|
17523
|
+
name: `${option.name || option.code || index}`
|
|
17524
|
+
}, option);
|
|
17525
|
+
});
|
|
17526
|
+
}
|
|
17527
|
+
return [];
|
|
17528
|
+
});
|
|
17529
|
+
const computeDateLabelFormat = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17530
|
+
const {
|
|
17531
|
+
labelFormat
|
|
17532
|
+
} = props;
|
|
17533
|
+
return labelFormat || i18n_getI18n(`vxe.input.date.labelFormat.${props.type}`);
|
|
17534
|
+
});
|
|
17535
|
+
const computeDateValueFormat = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17536
|
+
const {
|
|
17537
|
+
type,
|
|
17538
|
+
valueFormat
|
|
17539
|
+
} = props;
|
|
17540
|
+
if (valueFormat) {
|
|
17541
|
+
return valueFormat;
|
|
17542
|
+
}
|
|
17543
|
+
if (type === 'time') {
|
|
17544
|
+
return 'HH:mm:ss';
|
|
17545
|
+
}
|
|
17546
|
+
if (type === 'datetime') {
|
|
17547
|
+
return 'yyyy-MM-dd HH:mm:ss';
|
|
17548
|
+
}
|
|
17549
|
+
return 'yyyy-MM-dd';
|
|
17550
|
+
});
|
|
17551
|
+
const computeFirstDayOfWeek = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17552
|
+
const {
|
|
17553
|
+
startDay
|
|
17554
|
+
} = props;
|
|
17555
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(startDay);
|
|
17556
|
+
});
|
|
17557
|
+
const computePanelLabelObj = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17558
|
+
const {
|
|
17559
|
+
startValue,
|
|
17560
|
+
endValue
|
|
17561
|
+
} = reactData;
|
|
17562
|
+
const vals = startValue || endValue ? [startValue || '', endValue || ''] : [];
|
|
17563
|
+
return formatRangeLabel(vals);
|
|
17564
|
+
});
|
|
17565
|
+
const computeInputLabel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
17566
|
+
const panelLabelObj = computePanelLabelObj.value;
|
|
17567
|
+
return panelLabelObj.label;
|
|
17568
|
+
});
|
|
17569
|
+
const formatRangeLabel = vals => {
|
|
17570
|
+
const {
|
|
17571
|
+
type,
|
|
17572
|
+
separator
|
|
17573
|
+
} = props;
|
|
17574
|
+
const dateLabelFormat = computeDateLabelFormat.value;
|
|
17575
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
17576
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
17577
|
+
const startRest = vals[0] ? parseDateObj(vals[0], type, {
|
|
17578
|
+
valueFormat: dateValueFormat,
|
|
17579
|
+
labelFormat: dateLabelFormat,
|
|
17580
|
+
firstDay: firstDayOfWeek
|
|
17581
|
+
}) : null;
|
|
17582
|
+
const endRest = vals[1] ? parseDateObj(vals[1], type, {
|
|
17583
|
+
valueFormat: dateValueFormat,
|
|
17584
|
+
labelFormat: dateLabelFormat,
|
|
17585
|
+
firstDay: firstDayOfWeek
|
|
17586
|
+
}) : null;
|
|
17587
|
+
const startLabel = startRest ? startRest.label : '';
|
|
17588
|
+
const endLabel = endRest ? endRest.label : '';
|
|
17589
|
+
return {
|
|
17590
|
+
label: (startLabel || endLabel ? [startLabel, endLabel] : []).join(`${separator || ' ~ '}`),
|
|
17591
|
+
startLabel,
|
|
17592
|
+
endLabel
|
|
17593
|
+
};
|
|
17594
|
+
};
|
|
17595
|
+
const getRangeValue = (sValue, eValue) => {
|
|
17596
|
+
const {
|
|
17597
|
+
modelValue
|
|
17598
|
+
} = props;
|
|
17599
|
+
const isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue);
|
|
17600
|
+
if (sValue || eValue) {
|
|
17601
|
+
const rest = [sValue || '', eValue || ''];
|
|
17602
|
+
if (isArr) {
|
|
17603
|
+
return rest;
|
|
17604
|
+
}
|
|
17605
|
+
return rest.join(',');
|
|
17606
|
+
}
|
|
17607
|
+
return isArr ? [] : '';
|
|
17608
|
+
};
|
|
17609
|
+
const paraeUpdateModel = () => {
|
|
17610
|
+
const {
|
|
17611
|
+
type,
|
|
17612
|
+
modelValue
|
|
17613
|
+
} = props;
|
|
17614
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
17615
|
+
let sValue = '';
|
|
17616
|
+
let eValue = '';
|
|
17617
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue)) {
|
|
17618
|
+
const date1 = parseDateString(modelValue[0], type, {
|
|
17619
|
+
valueFormat: dateValueFormat
|
|
17620
|
+
});
|
|
17621
|
+
const date2 = parseDateString(modelValue[1], type, {
|
|
17622
|
+
valueFormat: dateValueFormat
|
|
17623
|
+
});
|
|
17624
|
+
if (date1 || date2) {
|
|
17625
|
+
sValue = date1 || '';
|
|
17626
|
+
eValue = date2 || '';
|
|
17627
|
+
}
|
|
17628
|
+
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(modelValue)) {
|
|
17629
|
+
const strArr = modelValue.split(',');
|
|
17630
|
+
if (strArr[0] || strArr[1]) {
|
|
17631
|
+
sValue = strArr[0] || '';
|
|
17632
|
+
eValue = strArr[1] || '';
|
|
17633
|
+
}
|
|
17634
|
+
}
|
|
17635
|
+
return {
|
|
17636
|
+
sValue,
|
|
17637
|
+
eValue
|
|
17638
|
+
};
|
|
17639
|
+
};
|
|
17640
|
+
const parseUpdateData = () => {
|
|
17641
|
+
const {
|
|
17642
|
+
type,
|
|
17643
|
+
startValue,
|
|
17644
|
+
endValue
|
|
17645
|
+
} = props;
|
|
17646
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
17647
|
+
let sValue = '';
|
|
17648
|
+
let eValue = '';
|
|
17649
|
+
sValue = parseDateString(startValue, type, {
|
|
17650
|
+
valueFormat: dateValueFormat
|
|
17651
|
+
});
|
|
17652
|
+
eValue = parseDateString(endValue, type, {
|
|
17653
|
+
valueFormat: dateValueFormat
|
|
17654
|
+
});
|
|
17655
|
+
return {
|
|
17656
|
+
sValue,
|
|
17657
|
+
eValue
|
|
17658
|
+
};
|
|
17659
|
+
};
|
|
17660
|
+
const updateModelValue = isModel => {
|
|
17661
|
+
const {
|
|
17662
|
+
modelValue,
|
|
17663
|
+
startValue,
|
|
17664
|
+
endValue
|
|
17665
|
+
} = props;
|
|
17666
|
+
let restObj = {
|
|
17667
|
+
sValue: '',
|
|
17668
|
+
eValue: ''
|
|
17669
|
+
};
|
|
17670
|
+
if (isModel) {
|
|
17671
|
+
if (modelValue) {
|
|
17672
|
+
restObj = paraeUpdateModel();
|
|
17673
|
+
} else {
|
|
17674
|
+
restObj = parseUpdateData();
|
|
17675
|
+
}
|
|
17676
|
+
} else {
|
|
17677
|
+
if (startValue || endValue) {
|
|
17678
|
+
restObj = parseUpdateData();
|
|
17679
|
+
} else {
|
|
17680
|
+
restObj = paraeUpdateModel();
|
|
17681
|
+
}
|
|
17682
|
+
}
|
|
17683
|
+
reactData.startValue = restObj.sValue;
|
|
17684
|
+
reactData.endValue = restObj.eValue;
|
|
17685
|
+
};
|
|
17686
|
+
const triggerEvent = evnt => {
|
|
17687
|
+
const {
|
|
17688
|
+
startValue,
|
|
17689
|
+
endValue
|
|
17690
|
+
} = reactData;
|
|
17691
|
+
const value = getRangeValue(startValue, endValue);
|
|
17692
|
+
dispatchEvent(evnt.type, {
|
|
17693
|
+
value,
|
|
17694
|
+
startValue,
|
|
17695
|
+
endValue
|
|
17696
|
+
}, evnt);
|
|
17697
|
+
};
|
|
17698
|
+
const handleChange = (sValue, eValue, evnt) => {
|
|
17699
|
+
const {
|
|
17700
|
+
modelValue
|
|
17701
|
+
} = props;
|
|
17702
|
+
reactData.startValue = sValue;
|
|
17703
|
+
reactData.endValue = eValue;
|
|
17704
|
+
const value = getRangeValue(sValue, eValue);
|
|
17705
|
+
emit('update:modelValue', value);
|
|
17706
|
+
emit('update:startValue', sValue || '');
|
|
17707
|
+
emit('update:endValue', eValue || '');
|
|
17708
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue) !== value) {
|
|
17709
|
+
dispatchEvent('change', {
|
|
17710
|
+
value
|
|
17711
|
+
}, evnt);
|
|
17712
|
+
// 自动更新校验状态
|
|
17713
|
+
if ($xeForm && formItemInfo) {
|
|
17714
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
17715
|
+
}
|
|
17716
|
+
}
|
|
17717
|
+
};
|
|
17718
|
+
const changeEvent = evnt => {
|
|
17719
|
+
const inpImmediate = computeInpImmediate.value;
|
|
17720
|
+
if (!inpImmediate) {
|
|
17721
|
+
triggerEvent(evnt);
|
|
17722
|
+
}
|
|
17723
|
+
};
|
|
17724
|
+
const focusEvent = evnt => {
|
|
17725
|
+
reactData.isActivated = true;
|
|
17726
|
+
dateRangePickerOpenEvent(evnt);
|
|
17727
|
+
triggerEvent(evnt);
|
|
17728
|
+
};
|
|
17729
|
+
const clickPrefixEvent = evnt => {
|
|
17730
|
+
const isDisabled = computeIsDisabled.value;
|
|
17731
|
+
if (!isDisabled) {
|
|
17732
|
+
const {
|
|
17733
|
+
startValue,
|
|
17734
|
+
endValue
|
|
17735
|
+
} = reactData;
|
|
17736
|
+
const value = getRangeValue(startValue, endValue);
|
|
17737
|
+
dispatchEvent('prefix-click', {
|
|
17738
|
+
value,
|
|
17739
|
+
startValue,
|
|
17740
|
+
endValue
|
|
17741
|
+
}, evnt);
|
|
17742
|
+
}
|
|
17743
|
+
};
|
|
17744
|
+
const hidePanel = () => {
|
|
17745
|
+
return new Promise(resolve => {
|
|
17746
|
+
reactData.visiblePanel = false;
|
|
17747
|
+
internalData.hpTimeout = setTimeout(() => {
|
|
17748
|
+
reactData.isAniVisible = false;
|
|
17749
|
+
resolve();
|
|
17750
|
+
}, 350);
|
|
17751
|
+
});
|
|
17752
|
+
};
|
|
17753
|
+
const clearValueEvent = (evnt, value) => {
|
|
17754
|
+
const isDatePickerType = computeIsDatePickerType.value;
|
|
17755
|
+
if (isDatePickerType) {
|
|
17756
|
+
hidePanel();
|
|
17757
|
+
}
|
|
17758
|
+
handleChange('', '', evnt);
|
|
17759
|
+
dispatchEvent('clear', {
|
|
17760
|
+
value
|
|
17761
|
+
}, evnt);
|
|
17762
|
+
};
|
|
17763
|
+
const checkValue = () => {
|
|
17764
|
+
const $startDatePanel = refStartDatePanel.value;
|
|
17765
|
+
const $endDatePanel = refEndDatePanel.value;
|
|
17766
|
+
if ($startDatePanel && $endDatePanel) {
|
|
17767
|
+
const startValue = $startDatePanel.getValue();
|
|
17768
|
+
const endValue = $endDatePanel.getValue();
|
|
17769
|
+
if (!startValue || !endValue) {
|
|
17770
|
+
handleChange('', '', {
|
|
17771
|
+
type: 'check'
|
|
17772
|
+
});
|
|
17773
|
+
}
|
|
17774
|
+
}
|
|
17775
|
+
};
|
|
17776
|
+
const handleSelectClose = () => {
|
|
17777
|
+
const {
|
|
17778
|
+
autoClose
|
|
17779
|
+
} = props;
|
|
17780
|
+
const {
|
|
17781
|
+
startValue,
|
|
17782
|
+
endValue
|
|
17783
|
+
} = reactData;
|
|
17784
|
+
const {
|
|
17785
|
+
selectStatus
|
|
17786
|
+
} = internalData;
|
|
17787
|
+
const isDatePickerType = computeIsDatePickerType.value;
|
|
17788
|
+
if (autoClose) {
|
|
17789
|
+
if (selectStatus && isDatePickerType) {
|
|
17790
|
+
if (startValue && endValue) {
|
|
17791
|
+
hidePanel();
|
|
17792
|
+
}
|
|
17793
|
+
}
|
|
17794
|
+
} else {
|
|
17795
|
+
if (startValue && endValue) {
|
|
17796
|
+
internalData.selectStatus = false;
|
|
17797
|
+
}
|
|
17798
|
+
}
|
|
17799
|
+
};
|
|
17800
|
+
const clickSuffixEvent = evnt => {
|
|
17801
|
+
const isDisabled = computeIsDisabled.value;
|
|
17802
|
+
if (!isDisabled) {
|
|
17803
|
+
const {
|
|
17804
|
+
startValue,
|
|
17805
|
+
endValue
|
|
17806
|
+
} = reactData;
|
|
17807
|
+
const value = getRangeValue(startValue, endValue);
|
|
17808
|
+
dispatchEvent('suffix-click', {
|
|
17809
|
+
value,
|
|
17810
|
+
startValue,
|
|
17811
|
+
endValue
|
|
17812
|
+
}, evnt);
|
|
17813
|
+
}
|
|
17814
|
+
};
|
|
17815
|
+
const blurEvent = evnt => {
|
|
17816
|
+
const {
|
|
17817
|
+
startValue,
|
|
17818
|
+
endValue
|
|
17819
|
+
} = reactData;
|
|
17820
|
+
const inpImmediate = computeInpImmediate.value;
|
|
17821
|
+
const value = '';
|
|
17822
|
+
if (!inpImmediate) {
|
|
17823
|
+
handleChange(startValue, endValue, evnt);
|
|
17824
|
+
}
|
|
17825
|
+
if (!reactData.visiblePanel) {
|
|
17826
|
+
reactData.isActivated = false;
|
|
17827
|
+
}
|
|
17828
|
+
dispatchEvent('blur', {
|
|
17829
|
+
value,
|
|
17830
|
+
startValue,
|
|
17831
|
+
endValue
|
|
17832
|
+
}, evnt);
|
|
17833
|
+
// 自动更新校验状态
|
|
17834
|
+
if ($xeForm && formItemInfo) {
|
|
17835
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
17836
|
+
}
|
|
17837
|
+
};
|
|
17838
|
+
const keydownEvent = evnt => {
|
|
17839
|
+
triggerEvent(evnt);
|
|
17840
|
+
};
|
|
17841
|
+
const keyupEvent = evnt => {
|
|
17842
|
+
triggerEvent(evnt);
|
|
17843
|
+
};
|
|
17844
|
+
const confirmEvent = evnt => {
|
|
17845
|
+
const $startDatePanel = refStartDatePanel.value;
|
|
17846
|
+
const $endDatePanel = refEndDatePanel.value;
|
|
17847
|
+
if ($startDatePanel && $endDatePanel) {
|
|
17848
|
+
const startValue = $startDatePanel.getValue();
|
|
17849
|
+
const endValue = $endDatePanel.getValue();
|
|
17850
|
+
if (startValue && endValue) {
|
|
17851
|
+
$startDatePanel.confirmByEvent(evnt);
|
|
17852
|
+
$endDatePanel.confirmByEvent(evnt);
|
|
17853
|
+
} else {
|
|
17854
|
+
handleChange('', '', evnt);
|
|
17855
|
+
}
|
|
17856
|
+
}
|
|
17857
|
+
hidePanel();
|
|
17858
|
+
};
|
|
17859
|
+
const startPanelChangeEvent = params => {
|
|
17860
|
+
const {
|
|
17861
|
+
selectStatus
|
|
17862
|
+
} = internalData;
|
|
17863
|
+
const {
|
|
17864
|
+
value,
|
|
17865
|
+
$event
|
|
17866
|
+
} = params;
|
|
17867
|
+
const endValue = selectStatus ? reactData.endValue : '';
|
|
17868
|
+
handleChange(value, endValue, $event);
|
|
17869
|
+
handleSelectClose();
|
|
17870
|
+
if (!selectStatus) {
|
|
17871
|
+
internalData.selectStatus = true;
|
|
17872
|
+
}
|
|
17873
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
17874
|
+
const $startDatePanel = refStartDatePanel.value;
|
|
17875
|
+
const $endDatePanel = refEndDatePanel.value;
|
|
17876
|
+
if ($startDatePanel && $endDatePanel) {
|
|
17877
|
+
const startValue = $startDatePanel.getValue();
|
|
17878
|
+
if (!endValue && startValue) {
|
|
17879
|
+
$endDatePanel.setPanelDate(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(startValue));
|
|
17880
|
+
}
|
|
17881
|
+
}
|
|
17882
|
+
});
|
|
17883
|
+
};
|
|
17884
|
+
const endPanelChangeEvent = params => {
|
|
17885
|
+
const {
|
|
17886
|
+
selectStatus
|
|
17887
|
+
} = internalData;
|
|
17888
|
+
const {
|
|
17889
|
+
value,
|
|
17890
|
+
$event
|
|
17891
|
+
} = params;
|
|
17892
|
+
const startValue = selectStatus ? reactData.startValue : '';
|
|
17893
|
+
handleChange(startValue, value, $event);
|
|
17894
|
+
handleSelectClose();
|
|
17895
|
+
if (!selectStatus) {
|
|
17896
|
+
internalData.selectStatus = true;
|
|
17897
|
+
}
|
|
17898
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
17899
|
+
const $startDatePanel = refStartDatePanel.value;
|
|
17900
|
+
const $endDatePanel = refEndDatePanel.value;
|
|
17901
|
+
if ($startDatePanel && $endDatePanel) {
|
|
17902
|
+
const endValue = $endDatePanel.getValue();
|
|
17903
|
+
if (!startValue && endValue) {
|
|
17904
|
+
$startDatePanel.setPanelDate(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(endValue));
|
|
17905
|
+
}
|
|
17906
|
+
}
|
|
17907
|
+
});
|
|
17908
|
+
};
|
|
17909
|
+
// 全局事件
|
|
17910
|
+
const handleGlobalMousedownEvent = evnt => {
|
|
17911
|
+
const {
|
|
17912
|
+
visiblePanel,
|
|
17913
|
+
isActivated
|
|
17914
|
+
} = reactData;
|
|
17915
|
+
const el = refElem.value;
|
|
17916
|
+
const panelWrapperElem = refPanelWrapper.value;
|
|
17917
|
+
const isDisabled = computeIsDisabled.value;
|
|
17918
|
+
if (!isDisabled && isActivated) {
|
|
17919
|
+
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
|
|
17920
|
+
if (!reactData.isActivated) {
|
|
17921
|
+
if (visiblePanel) {
|
|
17922
|
+
checkValue();
|
|
17923
|
+
hidePanel();
|
|
17924
|
+
}
|
|
17925
|
+
}
|
|
17926
|
+
}
|
|
17927
|
+
};
|
|
17928
|
+
const handleGlobalMousewheelEvent = evnt => {
|
|
17929
|
+
const {
|
|
17930
|
+
visiblePanel
|
|
17931
|
+
} = reactData;
|
|
17932
|
+
const isDisabled = computeIsDisabled.value;
|
|
17933
|
+
if (!isDisabled) {
|
|
17934
|
+
if (visiblePanel) {
|
|
17935
|
+
const panelWrapperElem = refPanelWrapper.value;
|
|
17936
|
+
if (getEventTargetNode(evnt, panelWrapperElem).flag) {
|
|
17937
|
+
updatePlacement();
|
|
17938
|
+
} else {
|
|
17939
|
+
hidePanel();
|
|
17940
|
+
}
|
|
17941
|
+
}
|
|
17942
|
+
}
|
|
17943
|
+
};
|
|
17944
|
+
const handleGlobalBlurEvent = () => {
|
|
17945
|
+
const {
|
|
17946
|
+
visiblePanel
|
|
17947
|
+
} = reactData;
|
|
17948
|
+
if (visiblePanel) {
|
|
17949
|
+
hidePanel();
|
|
17950
|
+
}
|
|
17951
|
+
};
|
|
17952
|
+
// 弹出面板
|
|
17953
|
+
const updateZindex = () => {
|
|
17954
|
+
if (reactData.panelIndex < getLastZIndex()) {
|
|
17955
|
+
reactData.panelIndex = nextZIndex();
|
|
17956
|
+
}
|
|
17957
|
+
};
|
|
17958
|
+
const updatePlacement = () => {
|
|
17959
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
17960
|
+
const {
|
|
17961
|
+
placement
|
|
17962
|
+
} = props;
|
|
17963
|
+
const {
|
|
17964
|
+
panelIndex
|
|
17965
|
+
} = reactData;
|
|
17966
|
+
const targetElem = refInputTarget.value;
|
|
17967
|
+
const panelElem = refInputPanel.value;
|
|
17968
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
17969
|
+
if (targetElem && panelElem) {
|
|
17970
|
+
const targetHeight = targetElem.offsetHeight;
|
|
17971
|
+
const targetWidth = targetElem.offsetWidth;
|
|
17972
|
+
const panelHeight = panelElem.offsetHeight;
|
|
17973
|
+
const panelWidth = panelElem.offsetWidth;
|
|
17974
|
+
const marginSize = 5;
|
|
17975
|
+
const panelStyle = {
|
|
17976
|
+
zIndex: panelIndex
|
|
17977
|
+
};
|
|
17978
|
+
const {
|
|
17979
|
+
boundingTop,
|
|
17980
|
+
boundingLeft,
|
|
17981
|
+
visibleHeight,
|
|
17982
|
+
visibleWidth
|
|
17983
|
+
} = getAbsolutePos(targetElem);
|
|
17984
|
+
let panelPlacement = 'bottom';
|
|
17985
|
+
if (btnTransfer) {
|
|
17986
|
+
let left = boundingLeft;
|
|
17987
|
+
let top = boundingTop + targetHeight;
|
|
17988
|
+
if (placement === 'top') {
|
|
17989
|
+
panelPlacement = 'top';
|
|
17990
|
+
top = boundingTop - panelHeight;
|
|
17991
|
+
} else if (!placement) {
|
|
17992
|
+
// 如果下面不够放,则向上
|
|
17993
|
+
if (top + panelHeight + marginSize > visibleHeight) {
|
|
17994
|
+
panelPlacement = 'top';
|
|
17995
|
+
top = boundingTop - panelHeight;
|
|
17996
|
+
}
|
|
17997
|
+
// 如果上面不够放,则向下(优先)
|
|
17998
|
+
if (top < marginSize) {
|
|
17999
|
+
panelPlacement = 'bottom';
|
|
18000
|
+
top = boundingTop + targetHeight;
|
|
18001
|
+
}
|
|
18002
|
+
}
|
|
18003
|
+
// 如果溢出右边
|
|
18004
|
+
if (left + panelWidth + marginSize > visibleWidth) {
|
|
18005
|
+
left -= left + panelWidth + marginSize - visibleWidth;
|
|
18006
|
+
}
|
|
18007
|
+
// 如果溢出左边
|
|
18008
|
+
if (left < marginSize) {
|
|
18009
|
+
left = marginSize;
|
|
18010
|
+
}
|
|
18011
|
+
Object.assign(panelStyle, {
|
|
18012
|
+
left: `${left}px`,
|
|
18013
|
+
top: `${top}px`,
|
|
18014
|
+
minWidth: `${targetWidth}px`
|
|
18015
|
+
});
|
|
18016
|
+
} else {
|
|
18017
|
+
if (placement === 'top') {
|
|
18018
|
+
panelPlacement = 'top';
|
|
18019
|
+
panelStyle.bottom = `${targetHeight}px`;
|
|
18020
|
+
} else if (!placement) {
|
|
18021
|
+
// 如果下面不够放,则向上
|
|
18022
|
+
panelStyle.top = `${targetHeight}px`;
|
|
18023
|
+
if (boundingTop + targetHeight + panelHeight > visibleHeight) {
|
|
18024
|
+
// 如果上面不够放,则向下(优先)
|
|
18025
|
+
if (boundingTop - targetHeight - panelHeight > marginSize) {
|
|
18026
|
+
panelPlacement = 'top';
|
|
18027
|
+
panelStyle.top = '';
|
|
18028
|
+
panelStyle.bottom = `${targetHeight}px`;
|
|
18029
|
+
}
|
|
18030
|
+
}
|
|
18031
|
+
}
|
|
18032
|
+
}
|
|
18033
|
+
reactData.panelStyle = panelStyle;
|
|
18034
|
+
reactData.panelPlacement = panelPlacement;
|
|
18035
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
18036
|
+
}
|
|
18037
|
+
});
|
|
18038
|
+
};
|
|
18039
|
+
const showPanel = () => {
|
|
18040
|
+
const {
|
|
18041
|
+
visiblePanel
|
|
18042
|
+
} = reactData;
|
|
18043
|
+
const isDisabled = computeIsDisabled.value;
|
|
18044
|
+
if (!isDisabled && !visiblePanel) {
|
|
18045
|
+
if (!reactData.initialized) {
|
|
18046
|
+
reactData.initialized = true;
|
|
18047
|
+
}
|
|
18048
|
+
if (internalData.hpTimeout) {
|
|
18049
|
+
clearTimeout(internalData.hpTimeout);
|
|
18050
|
+
internalData.hpTimeout = undefined;
|
|
18051
|
+
}
|
|
18052
|
+
internalData.selectStatus = false;
|
|
18053
|
+
reactData.isActivated = true;
|
|
18054
|
+
reactData.isAniVisible = true;
|
|
18055
|
+
setTimeout(() => {
|
|
18056
|
+
reactData.visiblePanel = true;
|
|
18057
|
+
}, 10);
|
|
18058
|
+
updateZindex();
|
|
18059
|
+
return updatePlacement();
|
|
18060
|
+
}
|
|
18061
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
18062
|
+
};
|
|
18063
|
+
const dateRangePickerOpenEvent = evnt => {
|
|
18064
|
+
const formReadonly = computeFormReadonly.value;
|
|
18065
|
+
if (!formReadonly) {
|
|
18066
|
+
evnt.preventDefault();
|
|
18067
|
+
showPanel();
|
|
18068
|
+
}
|
|
18069
|
+
};
|
|
18070
|
+
const clickEvent = evnt => {
|
|
18071
|
+
triggerEvent(evnt);
|
|
18072
|
+
};
|
|
18073
|
+
const handleShortcutEvent = ({
|
|
18074
|
+
option,
|
|
18075
|
+
$event
|
|
18076
|
+
}) => {
|
|
18077
|
+
const {
|
|
18078
|
+
type
|
|
18079
|
+
} = props;
|
|
18080
|
+
const shortcutOpts = computeShortcutOpts.value;
|
|
18081
|
+
const {
|
|
18082
|
+
autoClose
|
|
18083
|
+
} = shortcutOpts;
|
|
18084
|
+
const {
|
|
18085
|
+
code,
|
|
18086
|
+
clickMethod
|
|
18087
|
+
} = option;
|
|
18088
|
+
let startValue = reactData.startValue;
|
|
18089
|
+
let endValue = reactData.endValue;
|
|
18090
|
+
let value = getRangeValue(startValue, endValue);
|
|
18091
|
+
const shortcutParams = {
|
|
18092
|
+
$dateRangePicker: $xeDateRangePicker,
|
|
18093
|
+
option: option,
|
|
18094
|
+
value,
|
|
18095
|
+
startValue,
|
|
18096
|
+
endValue,
|
|
18097
|
+
code
|
|
18098
|
+
};
|
|
18099
|
+
if (!clickMethod && code) {
|
|
18100
|
+
const gCommandOpts = commands.get(code);
|
|
18101
|
+
const drpCommandMethod = gCommandOpts ? gCommandOpts.dateRangePickerCommandMethod : null;
|
|
18102
|
+
if (drpCommandMethod) {
|
|
18103
|
+
drpCommandMethod(shortcutParams);
|
|
18104
|
+
} else {
|
|
18105
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
18106
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
18107
|
+
switch (code) {
|
|
18108
|
+
case 'last1':
|
|
18109
|
+
case 'last3':
|
|
18110
|
+
case 'last7':
|
|
18111
|
+
case 'last30':
|
|
18112
|
+
case 'last60':
|
|
18113
|
+
case 'last90':
|
|
18114
|
+
case 'last180':
|
|
18115
|
+
{
|
|
18116
|
+
const restObj = getRangeDateByCode(code, value, type, {
|
|
18117
|
+
valueFormat: dateValueFormat,
|
|
18118
|
+
firstDay: firstDayOfWeek
|
|
18119
|
+
});
|
|
18120
|
+
startValue = restObj.startValue;
|
|
18121
|
+
endValue = restObj.endValue;
|
|
18122
|
+
value = getRangeValue(startValue, endValue);
|
|
18123
|
+
shortcutParams.value = value;
|
|
18124
|
+
shortcutParams.startValue = startValue;
|
|
18125
|
+
shortcutParams.endValue = endValue;
|
|
18126
|
+
handleChange(startValue, endValue, $event);
|
|
18127
|
+
break;
|
|
18128
|
+
}
|
|
18129
|
+
default:
|
|
18130
|
+
errLog('vxe.error.notCommands', [code]);
|
|
18131
|
+
break;
|
|
18132
|
+
}
|
|
18133
|
+
}
|
|
18134
|
+
} else {
|
|
18135
|
+
const optClickMethod = clickMethod || shortcutOpts.clickMethod;
|
|
18136
|
+
if (optClickMethod) {
|
|
18137
|
+
optClickMethod(shortcutParams);
|
|
18138
|
+
}
|
|
18139
|
+
}
|
|
18140
|
+
if (autoClose) {
|
|
18141
|
+
hidePanel();
|
|
18142
|
+
}
|
|
18143
|
+
dispatchEvent('shortcut-click', shortcutParams, $event);
|
|
18144
|
+
};
|
|
18145
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
18146
|
+
emit(type, createEvent(evnt, {
|
|
18147
|
+
$dateRangePicker: $xeDateRangePicker
|
|
18148
|
+
}, params));
|
|
18149
|
+
};
|
|
18150
|
+
dateRangePickerMethods = {
|
|
18151
|
+
dispatchEvent,
|
|
18152
|
+
setModelValue(startValue, endValue) {
|
|
18153
|
+
reactData.startValue = startValue || '';
|
|
18154
|
+
reactData.endValue = endValue || '';
|
|
18155
|
+
const value = getRangeValue(startValue, endValue);
|
|
18156
|
+
emit('update:modelValue', value);
|
|
18157
|
+
},
|
|
18158
|
+
setModelValueByEvent(evnt, startValue, endValue) {
|
|
18159
|
+
handleChange(startValue || '', endValue || '', evnt);
|
|
18160
|
+
},
|
|
16151
18161
|
focus() {
|
|
16152
18162
|
const inputElem = refInputTarget.value;
|
|
16153
18163
|
reactData.isActivated = true;
|
|
@@ -16170,441 +18180,57 @@ const Countdown = VxeCountdown;
|
|
|
16170
18180
|
hidePanel,
|
|
16171
18181
|
updatePlacement
|
|
16172
18182
|
};
|
|
16173
|
-
Object.assign($
|
|
16174
|
-
const renderDateLabel = (item, label) => {
|
|
16175
|
-
const {
|
|
16176
|
-
festivalMethod
|
|
16177
|
-
} = props;
|
|
16178
|
-
if (festivalMethod) {
|
|
16179
|
-
const {
|
|
16180
|
-
datePanelType
|
|
16181
|
-
} = reactData;
|
|
16182
|
-
const festivalRest = festivalMethod({
|
|
16183
|
-
type: datePanelType,
|
|
16184
|
-
viewType: datePanelType,
|
|
16185
|
-
date: item.date,
|
|
16186
|
-
$datePicker: $xeDatePicker
|
|
16187
|
-
});
|
|
16188
|
-
const festivalItem = festivalRest ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalRest) ? {
|
|
16189
|
-
label: festivalRest
|
|
16190
|
-
} : festivalRest : {};
|
|
16191
|
-
const extraItem = festivalItem.extra ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalItem.extra) ? {
|
|
16192
|
-
label: festivalItem.extra
|
|
16193
|
-
} : festivalItem.extra : null;
|
|
16194
|
-
const labels = [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16195
|
-
class: ['vxe-date-picker--date-label', {
|
|
16196
|
-
'is-notice': festivalItem.notice
|
|
16197
|
-
}]
|
|
16198
|
-
}, extraItem && extraItem.label ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', `${label}`), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16199
|
-
class: ['vxe-date-picker--date-label--extra', extraItem.important ? 'is-important' : '', extraItem.className],
|
|
16200
|
-
style: extraItem.style
|
|
16201
|
-
}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(extraItem.label))] : `${label}`)];
|
|
16202
|
-
const festivalLabel = festivalItem.label;
|
|
16203
|
-
if (festivalLabel) {
|
|
16204
|
-
// 默认最多支持3个节日重叠
|
|
16205
|
-
const festivalLabels = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(festivalLabel).split(',');
|
|
16206
|
-
labels.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16207
|
-
class: ['vxe-date-picker--date-festival', festivalItem.important ? 'is-important' : '', festivalItem.className],
|
|
16208
|
-
style: festivalItem.style
|
|
16209
|
-
}, [festivalLabels.length > 1 ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16210
|
-
class: ['vxe-date-picker--date-festival--overlap', `overlap--${festivalLabels.length}`]
|
|
16211
|
-
}, festivalLabels.map(label => (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', label.substring(0, 3)))) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16212
|
-
class: 'vxe-date-picker--date-festival--label'
|
|
16213
|
-
}, festivalLabels[0].substring(0, 3))]));
|
|
16214
|
-
}
|
|
16215
|
-
return labels;
|
|
16216
|
-
}
|
|
16217
|
-
return label;
|
|
16218
|
-
};
|
|
16219
|
-
const renderDateDayTable = () => {
|
|
16220
|
-
const {
|
|
16221
|
-
multiple
|
|
16222
|
-
} = props;
|
|
16223
|
-
const {
|
|
16224
|
-
datePanelType,
|
|
16225
|
-
datePanelValue
|
|
16226
|
-
} = reactData;
|
|
16227
|
-
const dateValue = computeDateValue.value;
|
|
16228
|
-
const dateHeaders = computeDateHeaders.value;
|
|
16229
|
-
const dayDatas = computeDayDatas.value;
|
|
16230
|
-
const dateListValue = computeDateListValue.value;
|
|
16231
|
-
const overCount = computeOverCount.value;
|
|
16232
|
-
const matchFormat = 'yyyyMMdd';
|
|
16233
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {
|
|
16234
|
-
class: `vxe-date-picker--date-${datePanelType}-view`,
|
|
16235
|
-
cellspacing: 0,
|
|
16236
|
-
cellpadding: 0,
|
|
16237
|
-
border: 0
|
|
16238
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('thead', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', dateHeaders.map(item => {
|
|
16239
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', item.label);
|
|
16240
|
-
}))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tbody', dayDatas.map(rows => {
|
|
16241
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', rows.map(item => {
|
|
16242
|
-
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
16243
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
16244
|
-
class: {
|
|
16245
|
-
'is--prev': item.isPrev,
|
|
16246
|
-
'is--current': item.isCurrent,
|
|
16247
|
-
'is--now': item.isNow,
|
|
16248
|
-
'is--next': item.isNext,
|
|
16249
|
-
'is--disabled': isDateDisabled(item),
|
|
16250
|
-
'is--selected': isSelected,
|
|
16251
|
-
'is--over': overCount && !isSelected,
|
|
16252
|
-
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
16253
|
-
},
|
|
16254
|
-
onClick: () => dateSelectEvent(item),
|
|
16255
|
-
onMouseenter: () => dateMouseenterEvent(item)
|
|
16256
|
-
}, renderDateLabel(item, item.label));
|
|
16257
|
-
}));
|
|
16258
|
-
}))])];
|
|
16259
|
-
};
|
|
16260
|
-
const renderDateWeekTable = () => {
|
|
16261
|
-
const {
|
|
16262
|
-
multiple
|
|
16263
|
-
} = props;
|
|
16264
|
-
const {
|
|
16265
|
-
datePanelType,
|
|
16266
|
-
datePanelValue
|
|
16267
|
-
} = reactData;
|
|
16268
|
-
const dateValue = computeDateValue.value;
|
|
16269
|
-
const weekHeaders = computeWeekHeaders.value;
|
|
16270
|
-
const weekDates = computeWeekDates.value;
|
|
16271
|
-
const dateListValue = computeDateListValue.value;
|
|
16272
|
-
const overCount = computeOverCount.value;
|
|
16273
|
-
const matchFormat = 'yyyyMMdd';
|
|
16274
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {
|
|
16275
|
-
class: `vxe-date-picker--date-${datePanelType}-view`,
|
|
16276
|
-
cellspacing: 0,
|
|
16277
|
-
cellpadding: 0,
|
|
16278
|
-
border: 0
|
|
16279
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('thead', [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', weekHeaders.map(item => {
|
|
16280
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', item.label);
|
|
16281
|
-
}))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tbody', weekDates.map(rows => {
|
|
16282
|
-
const isSelected = multiple ? rows.some(item => dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat))) : rows.some(item => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat));
|
|
16283
|
-
const isHover = rows.some(item => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat));
|
|
16284
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', rows.map(item => {
|
|
16285
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
16286
|
-
class: {
|
|
16287
|
-
'is--prev': item.isPrev,
|
|
16288
|
-
'is--current': item.isCurrent,
|
|
16289
|
-
'is--now': item.isNow,
|
|
16290
|
-
'is--next': item.isNext,
|
|
16291
|
-
'is--disabled': isDateDisabled(item),
|
|
16292
|
-
'is--selected': isSelected,
|
|
16293
|
-
'is--over': overCount && !isSelected,
|
|
16294
|
-
'is--hover': !overCount && isHover
|
|
16295
|
-
},
|
|
16296
|
-
// event
|
|
16297
|
-
onClick: () => dateSelectEvent(item),
|
|
16298
|
-
onMouseenter: () => dateMouseenterEvent(item)
|
|
16299
|
-
}, renderDateLabel(item, item.label));
|
|
16300
|
-
}));
|
|
16301
|
-
}))])];
|
|
16302
|
-
};
|
|
16303
|
-
const renderDateMonthTable = () => {
|
|
16304
|
-
const {
|
|
16305
|
-
multiple
|
|
16306
|
-
} = props;
|
|
16307
|
-
const {
|
|
16308
|
-
datePanelType,
|
|
16309
|
-
datePanelValue
|
|
16310
|
-
} = reactData;
|
|
16311
|
-
const dateValue = computeDateValue.value;
|
|
16312
|
-
const monthDatas = computeMonthDatas.value;
|
|
16313
|
-
const dateListValue = computeDateListValue.value;
|
|
16314
|
-
const overCount = computeOverCount.value;
|
|
16315
|
-
const matchFormat = 'yyyyMM';
|
|
16316
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {
|
|
16317
|
-
class: `vxe-date-picker--date-${datePanelType}-view`,
|
|
16318
|
-
cellspacing: 0,
|
|
16319
|
-
cellpadding: 0,
|
|
16320
|
-
border: 0
|
|
16321
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tbody', monthDatas.map(rows => {
|
|
16322
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', rows.map(item => {
|
|
16323
|
-
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
16324
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
16325
|
-
class: {
|
|
16326
|
-
'is--prev': item.isPrev,
|
|
16327
|
-
'is--current': item.isCurrent,
|
|
16328
|
-
'is--now': item.isNow,
|
|
16329
|
-
'is--next': item.isNext,
|
|
16330
|
-
'is--disabled': isDateDisabled(item),
|
|
16331
|
-
'is--selected': isSelected,
|
|
16332
|
-
'is--over': overCount && !isSelected,
|
|
16333
|
-
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
16334
|
-
},
|
|
16335
|
-
onClick: () => dateSelectEvent(item),
|
|
16336
|
-
onMouseenter: () => dateMouseenterEvent(item)
|
|
16337
|
-
}, renderDateLabel(item, i18n_getI18n(`vxe.input.date.months.m${item.month}`)));
|
|
16338
|
-
}));
|
|
16339
|
-
}))])];
|
|
16340
|
-
};
|
|
16341
|
-
const renderDateQuarterTable = () => {
|
|
16342
|
-
const {
|
|
16343
|
-
multiple
|
|
16344
|
-
} = props;
|
|
16345
|
-
const {
|
|
16346
|
-
datePanelType,
|
|
16347
|
-
datePanelValue
|
|
16348
|
-
} = reactData;
|
|
16349
|
-
const dateValue = computeDateValue.value;
|
|
16350
|
-
const quarterDatas = computeQuarterDatas.value;
|
|
16351
|
-
const dateListValue = computeDateListValue.value;
|
|
16352
|
-
const overCount = computeOverCount.value;
|
|
16353
|
-
const matchFormat = 'yyyyq';
|
|
16354
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {
|
|
16355
|
-
class: `vxe-date-picker--date-${datePanelType}-view`,
|
|
16356
|
-
cellspacing: 0,
|
|
16357
|
-
cellpadding: 0,
|
|
16358
|
-
border: 0
|
|
16359
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tbody', quarterDatas.map(rows => {
|
|
16360
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', rows.map(item => {
|
|
16361
|
-
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
16362
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
16363
|
-
class: {
|
|
16364
|
-
'is--prev': item.isPrev,
|
|
16365
|
-
'is--current': item.isCurrent,
|
|
16366
|
-
'is--now': item.isNow,
|
|
16367
|
-
'is--next': item.isNext,
|
|
16368
|
-
'is--disabled': isDateDisabled(item),
|
|
16369
|
-
'is--selected': isSelected,
|
|
16370
|
-
'is--over': overCount && !isSelected,
|
|
16371
|
-
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
16372
|
-
},
|
|
16373
|
-
onClick: () => dateSelectEvent(item),
|
|
16374
|
-
onMouseenter: () => dateMouseenterEvent(item)
|
|
16375
|
-
}, renderDateLabel(item, i18n_getI18n(`vxe.input.date.quarters.q${item.quarter}`)));
|
|
16376
|
-
}));
|
|
16377
|
-
}))])];
|
|
16378
|
-
};
|
|
16379
|
-
const renderDateYearTable = () => {
|
|
16380
|
-
const {
|
|
16381
|
-
multiple
|
|
16382
|
-
} = props;
|
|
16383
|
-
const {
|
|
16384
|
-
datePanelType,
|
|
16385
|
-
datePanelValue
|
|
16386
|
-
} = reactData;
|
|
16387
|
-
const dateValue = computeDateValue.value;
|
|
16388
|
-
const yearDatas = computeYearDatas.value;
|
|
16389
|
-
const dateListValue = computeDateListValue.value;
|
|
16390
|
-
const overCount = computeOverCount.value;
|
|
16391
|
-
const matchFormat = 'yyyy';
|
|
16392
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {
|
|
16393
|
-
class: `vxe-date-picker--date-${datePanelType}-view`,
|
|
16394
|
-
cellspacing: 0,
|
|
16395
|
-
cellpadding: 0,
|
|
16396
|
-
border: 0
|
|
16397
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tbody', yearDatas.map(rows => {
|
|
16398
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', rows.map(item => {
|
|
16399
|
-
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
16400
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
16401
|
-
class: {
|
|
16402
|
-
'is--prev': item.isPrev,
|
|
16403
|
-
'is--current': item.isCurrent,
|
|
16404
|
-
'is--now': item.isNow,
|
|
16405
|
-
'is--next': item.isNext,
|
|
16406
|
-
'is--disabled': isDateDisabled(item),
|
|
16407
|
-
'is--selected': isSelected,
|
|
16408
|
-
'is--over': overCount && !isSelected,
|
|
16409
|
-
'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
|
|
16410
|
-
},
|
|
16411
|
-
onClick: () => dateSelectEvent(item),
|
|
16412
|
-
onMouseenter: () => dateMouseenterEvent(item)
|
|
16413
|
-
}, renderDateLabel(item, item.year));
|
|
16414
|
-
}));
|
|
16415
|
-
}))])];
|
|
16416
|
-
};
|
|
16417
|
-
const renderDateTable = () => {
|
|
16418
|
-
const {
|
|
16419
|
-
datePanelType
|
|
16420
|
-
} = reactData;
|
|
16421
|
-
switch (datePanelType) {
|
|
16422
|
-
case 'week':
|
|
16423
|
-
return renderDateWeekTable();
|
|
16424
|
-
case 'month':
|
|
16425
|
-
return renderDateMonthTable();
|
|
16426
|
-
case 'quarter':
|
|
16427
|
-
return renderDateQuarterTable();
|
|
16428
|
-
case 'year':
|
|
16429
|
-
return renderDateYearTable();
|
|
16430
|
-
}
|
|
16431
|
-
return renderDateDayTable();
|
|
16432
|
-
};
|
|
16433
|
-
const renderDatePanel = () => {
|
|
16434
|
-
const {
|
|
16435
|
-
multiple
|
|
16436
|
-
} = props;
|
|
16437
|
-
const {
|
|
16438
|
-
datePanelType
|
|
16439
|
-
} = reactData;
|
|
16440
|
-
const isDisabledPrevDateBtn = computeIsDisabledPrevDateBtn.value;
|
|
16441
|
-
const isDisabledNextDateBtn = computeIsDisabledNextDateBtn.value;
|
|
16442
|
-
const selectDatePanelObj = computeSelectDatePanelObj.value;
|
|
16443
|
-
const supportMultiples = computeSupportMultiples.value;
|
|
16444
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16445
|
-
class: 'vxe-date-picker--date-picker-header'
|
|
16446
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16447
|
-
class: 'vxe-date-picker--date-picker-type-wrapper'
|
|
16448
|
-
}, [datePanelType === 'year' ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16449
|
-
class: 'vxe-date-picker--date-picker-label'
|
|
16450
|
-
}, selectDatePanelObj.y) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16451
|
-
class: 'vxe-date-picker--date-picker-btns'
|
|
16452
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16453
|
-
class: 'vxe-date-picker--date-picker-btn',
|
|
16454
|
-
onClick: dateToggleYearTypeEvent
|
|
16455
|
-
}, selectDatePanelObj.y), selectDatePanelObj.m ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16456
|
-
class: 'vxe-date-picker--date-picker-btn',
|
|
16457
|
-
onClick: dateToggleMonthTypeEvent
|
|
16458
|
-
}, selectDatePanelObj.m) : renderEmptyElement($xeDatePicker)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16459
|
-
class: 'vxe-date-picker--date-picker-btn-wrapper'
|
|
16460
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16461
|
-
class: ['vxe-date-picker--date-picker-btn vxe-date-picker--date-picker-prev-btn', {
|
|
16462
|
-
'is--disabled': isDisabledPrevDateBtn
|
|
16463
|
-
}],
|
|
16464
|
-
onClick: datePrevEvent
|
|
16465
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16466
|
-
class: 'vxe-icon-caret-left'
|
|
16467
|
-
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16468
|
-
class: 'vxe-date-picker--date-picker-btn vxe-date-picker--date-picker-current-btn',
|
|
16469
|
-
onClick: dateTodayMonthEvent
|
|
16470
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16471
|
-
class: 'vxe-icon-dot'
|
|
16472
|
-
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16473
|
-
class: ['vxe-date-picker--date-picker-btn vxe-date-picker--date-picker-next-btn', {
|
|
16474
|
-
'is--disabled': isDisabledNextDateBtn
|
|
16475
|
-
}],
|
|
16476
|
-
onClick: dateNextEvent
|
|
16477
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16478
|
-
class: 'vxe-icon-caret-right'
|
|
16479
|
-
})]), multiple && supportMultiples ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16480
|
-
class: 'vxe-date-picker--date-picker-btn vxe-date-picker--date-picker-confirm-btn'
|
|
16481
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('button', {
|
|
16482
|
-
class: 'vxe-date-picker--date-picker-confirm',
|
|
16483
|
-
type: 'button',
|
|
16484
|
-
onClick: dateConfirmEvent
|
|
16485
|
-
}, i18n_getI18n('vxe.button.confirm'))]) : null])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16486
|
-
class: 'vxe-date-picker--date-picker-body'
|
|
16487
|
-
}, renderDateTable())];
|
|
16488
|
-
};
|
|
16489
|
-
const renderTimePanel = () => {
|
|
16490
|
-
const {
|
|
16491
|
-
datetimePanelValue
|
|
16492
|
-
} = reactData;
|
|
16493
|
-
const dateTimeLabel = computeDateTimeLabel.value;
|
|
16494
|
-
const hourList = computeHourList.value;
|
|
16495
|
-
const hasTimeMinute = computeHasTimeMinute.value;
|
|
16496
|
-
const minuteList = computeMinuteList.value;
|
|
16497
|
-
const hasTimeSecond = computeHasTimeSecond.value;
|
|
16498
|
-
const secondList = computeSecondList.value;
|
|
16499
|
-
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16500
|
-
class: 'vxe-date-picker--time-picker-header'
|
|
16501
|
-
}, [hasTimeMinute ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16502
|
-
class: 'vxe-date-picker--time-picker-title'
|
|
16503
|
-
}, dateTimeLabel) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16504
|
-
class: 'vxe-date-picker--time-picker-btn'
|
|
16505
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('button', {
|
|
16506
|
-
class: 'vxe-date-picker--time-picker-confirm',
|
|
16507
|
-
type: 'button',
|
|
16508
|
-
onClick: dateConfirmEvent
|
|
16509
|
-
}, i18n_getI18n('vxe.button.confirm'))])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16510
|
-
ref: refInputTimeBody,
|
|
16511
|
-
class: 'vxe-date-picker--time-picker-body'
|
|
16512
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
|
|
16513
|
-
class: 'vxe-date-picker--time-picker-hour-list'
|
|
16514
|
-
}, hourList.map((item, index) => {
|
|
16515
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('li', {
|
|
16516
|
-
key: index,
|
|
16517
|
-
class: {
|
|
16518
|
-
'is--selected': datetimePanelValue && datetimePanelValue.getHours() === item.value
|
|
16519
|
-
},
|
|
16520
|
-
onClick: evnt => dateHourEvent(evnt, item)
|
|
16521
|
-
}, item.label);
|
|
16522
|
-
})), hasTimeMinute ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
|
|
16523
|
-
class: 'vxe-date-picker--time-picker-minute-list'
|
|
16524
|
-
}, minuteList.map((item, index) => {
|
|
16525
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('li', {
|
|
16526
|
-
key: index,
|
|
16527
|
-
class: {
|
|
16528
|
-
'is--selected': datetimePanelValue && datetimePanelValue.getMinutes() === item.value
|
|
16529
|
-
},
|
|
16530
|
-
onClick: evnt => dateMinuteEvent(evnt, item)
|
|
16531
|
-
}, item.label);
|
|
16532
|
-
})) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), hasTimeMinute && hasTimeSecond ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
|
|
16533
|
-
class: 'vxe-date-picker--time-picker-second-list'
|
|
16534
|
-
}, secondList.map((item, index) => {
|
|
16535
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('li', {
|
|
16536
|
-
key: index,
|
|
16537
|
-
class: {
|
|
16538
|
-
'is--selected': datetimePanelValue && datetimePanelValue.getSeconds() === item.value
|
|
16539
|
-
},
|
|
16540
|
-
onClick: evnt => dateSecondEvent(evnt, item)
|
|
16541
|
-
}, item.label);
|
|
16542
|
-
})) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])];
|
|
16543
|
-
};
|
|
18183
|
+
Object.assign($xeDateRangePicker, dateRangePickerMethods);
|
|
16544
18184
|
const renderShortcutBtn = (pos, isVertical) => {
|
|
16545
18185
|
const shortcutOpts = computeShortcutOpts.value;
|
|
16546
18186
|
const {
|
|
16547
|
-
options,
|
|
16548
18187
|
position,
|
|
16549
18188
|
align,
|
|
16550
18189
|
mode
|
|
16551
18190
|
} = shortcutOpts;
|
|
16552
|
-
|
|
18191
|
+
const shortcutList = computeShortcutList.value;
|
|
18192
|
+
if (isEnableConf(shortcutOpts) && shortcutList.length && (position || 'left') === pos) {
|
|
16553
18193
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16554
|
-
class: `vxe-date-picker--
|
|
18194
|
+
class: `vxe-date-range-picker--layout-${pos}-wrapper`
|
|
16555
18195
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(button_group, {
|
|
16556
|
-
options,
|
|
18196
|
+
options: shortcutList,
|
|
16557
18197
|
mode,
|
|
16558
18198
|
align,
|
|
16559
18199
|
vertical: isVertical,
|
|
16560
18200
|
onClick: handleShortcutEvent
|
|
16561
18201
|
})]);
|
|
16562
18202
|
}
|
|
16563
|
-
return renderEmptyElement($
|
|
16564
|
-
};
|
|
16565
|
-
const renderPickerPanel = () => {
|
|
16566
|
-
const {
|
|
16567
|
-
type
|
|
16568
|
-
} = props;
|
|
16569
|
-
if (type === 'datetime') {
|
|
16570
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16571
|
-
key: type,
|
|
16572
|
-
ref: refPanelWrapper,
|
|
16573
|
-
class: 'vxe-date-picker--panel-datetime-layout-wrapper'
|
|
16574
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16575
|
-
class: 'vxe-date-picker--panel-datetime-left-wrapper'
|
|
16576
|
-
}, renderDatePanel()), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16577
|
-
class: 'vxe-date-picker--panel-datetime-right-wrapper'
|
|
16578
|
-
}, renderTimePanel())]);
|
|
16579
|
-
} else if (type === 'time') {
|
|
16580
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16581
|
-
key: type,
|
|
16582
|
-
ref: refPanelWrapper,
|
|
16583
|
-
class: 'vxe-date-picker--panel-wrapper'
|
|
16584
|
-
}, renderTimePanel());
|
|
16585
|
-
}
|
|
16586
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16587
|
-
key: type || 'default',
|
|
16588
|
-
ref: refPanelWrapper,
|
|
16589
|
-
class: 'vxe-date-picker--panel-wrapper'
|
|
16590
|
-
}, renderDatePanel());
|
|
18203
|
+
return renderEmptyElement($xeDateRangePicker);
|
|
16591
18204
|
};
|
|
16592
18205
|
const renderPanel = () => {
|
|
16593
18206
|
const {
|
|
16594
|
-
type
|
|
18207
|
+
type,
|
|
18208
|
+
separator,
|
|
18209
|
+
autoClose,
|
|
18210
|
+
showConfirmButton,
|
|
18211
|
+
showClearButton
|
|
16595
18212
|
} = props;
|
|
16596
18213
|
const {
|
|
16597
18214
|
initialized,
|
|
16598
18215
|
isAniVisible,
|
|
16599
18216
|
visiblePanel,
|
|
16600
18217
|
panelPlacement,
|
|
16601
|
-
panelStyle
|
|
18218
|
+
panelStyle,
|
|
18219
|
+
startValue,
|
|
18220
|
+
endValue
|
|
16602
18221
|
} = reactData;
|
|
16603
18222
|
const vSize = computeSize.value;
|
|
16604
18223
|
const btnTransfer = computeBtnTransfer.value;
|
|
16605
18224
|
const shortcutOpts = computeShortcutOpts.value;
|
|
18225
|
+
const isClearable = computeIsClearable.value;
|
|
18226
|
+
const panelLabelObj = computePanelLabelObj.value;
|
|
18227
|
+
const shortcutList = computeShortcutList.value;
|
|
18228
|
+
const isDateTimeType = computeIsDateTimeType.value;
|
|
18229
|
+
const {
|
|
18230
|
+
startLabel,
|
|
18231
|
+
endLabel
|
|
18232
|
+
} = panelLabelObj;
|
|
16606
18233
|
const {
|
|
16607
|
-
options,
|
|
16608
18234
|
position
|
|
16609
18235
|
} = shortcutOpts;
|
|
16610
18236
|
const headerSlot = slots.header;
|
|
@@ -16613,13 +18239,15 @@ const Countdown = VxeCountdown;
|
|
|
16613
18239
|
const bottomSlot = slots.bottom;
|
|
16614
18240
|
const leftSlot = slots.left;
|
|
16615
18241
|
const rightSlot = slots.right;
|
|
16616
|
-
const hasShortcutBtn =
|
|
18242
|
+
const hasShortcutBtn = shortcutList.length > 0;
|
|
18243
|
+
const showConfirmBtn = showConfirmButton === null ? isDateTimeType || !autoClose : showConfirmButton;
|
|
18244
|
+
const showClearBtn = showClearButton === null ? isClearable : showClearButton;
|
|
16617
18245
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.Teleport, {
|
|
16618
18246
|
to: 'body',
|
|
16619
18247
|
disabled: btnTransfer ? !initialized : true
|
|
16620
18248
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16621
18249
|
ref: refInputPanel,
|
|
16622
|
-
class: ['vxe-table--ignore-clear vxe-date-picker--panel', `type--${type}`, {
|
|
18250
|
+
class: ['vxe-table--ignore-clear vxe-date-range-picker--panel', `type--${type}`, {
|
|
16623
18251
|
[`size--${vSize}`]: vSize,
|
|
16624
18252
|
'is--transfer': btnTransfer,
|
|
16625
18253
|
'ani--leave': isAniVisible,
|
|
@@ -16632,25 +18260,74 @@ const Countdown = VxeCountdown;
|
|
|
16632
18260
|
placement: panelPlacement,
|
|
16633
18261
|
style: panelStyle
|
|
16634
18262
|
}, initialized && (visiblePanel || isAniVisible) ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16635
|
-
|
|
18263
|
+
ref: refPanelWrapper,
|
|
18264
|
+
class: ['vxe-date-range-picker--layout-all-wrapper', `type--${type}`, {
|
|
18265
|
+
[`size--${vSize}`]: vSize
|
|
18266
|
+
}]
|
|
16636
18267
|
}, [topSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16637
|
-
class: 'vxe-date-picker--
|
|
18268
|
+
class: 'vxe-date-range-picker--layout-top-wrapper'
|
|
16638
18269
|
}, topSlot({})) : renderShortcutBtn('top'), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16639
|
-
class: 'vxe-date-picker--
|
|
18270
|
+
class: 'vxe-date-range-picker--layout-body-layout-wrapper'
|
|
16640
18271
|
}, [leftSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16641
|
-
class: 'vxe-date-picker--
|
|
18272
|
+
class: 'vxe-date-range-picker--layout-left-wrapper'
|
|
16642
18273
|
}, leftSlot({})) : renderShortcutBtn('left', true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16643
|
-
class: 'vxe-date-picker--
|
|
18274
|
+
class: 'vxe-date-range-picker--layout-body-content-wrapper'
|
|
16644
18275
|
}, [headerSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16645
|
-
class: 'vxe-date-picker--
|
|
18276
|
+
class: 'vxe-date-range-picker--layout-header-wrapper'
|
|
16646
18277
|
}, headerSlot({})) : renderShortcutBtn('header'), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16647
|
-
class: 'vxe-date-picker--
|
|
16648
|
-
}, [
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
|
|
18278
|
+
class: 'vxe-date-range-picker--layout-body-wrapper'
|
|
18279
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(date_panel, {
|
|
18280
|
+
ref: refStartDatePanel,
|
|
18281
|
+
modelValue: startValue,
|
|
18282
|
+
type: props.type,
|
|
18283
|
+
className: props.className,
|
|
18284
|
+
minDate: props.minDate,
|
|
18285
|
+
maxDate: props.maxDate,
|
|
18286
|
+
startDay: props.startDay,
|
|
18287
|
+
endDate: endValue,
|
|
18288
|
+
labelFormat: props.labelFormat,
|
|
18289
|
+
valueFormat: props.valueFormat,
|
|
18290
|
+
festivalMethod: props.festivalMethod,
|
|
18291
|
+
disabledMethod: props.disabledMethod,
|
|
18292
|
+
selectDay: props.selectDay,
|
|
18293
|
+
onChange: startPanelChangeEvent
|
|
18294
|
+
}), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(date_panel, {
|
|
18295
|
+
ref: refEndDatePanel,
|
|
18296
|
+
modelValue: endValue,
|
|
18297
|
+
type: props.type,
|
|
18298
|
+
className: props.className,
|
|
18299
|
+
minDate: props.minDate,
|
|
18300
|
+
maxDate: props.maxDate,
|
|
18301
|
+
startDay: props.startDay,
|
|
18302
|
+
startDate: startValue,
|
|
18303
|
+
labelFormat: props.labelFormat,
|
|
18304
|
+
valueFormat: props.valueFormat,
|
|
18305
|
+
festivalMethod: props.festivalMethod,
|
|
18306
|
+
disabledMethod: props.disabledMethod,
|
|
18307
|
+
selectDay: props.selectDay,
|
|
18308
|
+
onChange: endPanelChangeEvent
|
|
18309
|
+
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
18310
|
+
class: 'vxe-date-range-picker--layout-footer-wrapper'
|
|
18311
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
18312
|
+
class: 'vxe-date-range-picker--layout-footer-label'
|
|
18313
|
+
}, startLabel || endLabel ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', startLabel), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', `${separator || ''}`), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', endLabel)] : []), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
18314
|
+
class: 'vxe-date-range-picker--layout-footer-custom'
|
|
18315
|
+
}, footerSlot ? footerSlot({}) : [renderShortcutBtn('footer')]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
18316
|
+
class: 'vxe-date-range-picker--layout-footer-btns'
|
|
18317
|
+
}, [showClearBtn ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
|
|
18318
|
+
size: 'mini',
|
|
18319
|
+
disabled: !(startValue || endValue),
|
|
18320
|
+
content: i18n_getI18n('vxe.button.clear'),
|
|
18321
|
+
onClick: clearValueEvent
|
|
18322
|
+
}) : renderEmptyElement($xeDateRangePicker), showConfirmBtn ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
|
|
18323
|
+
size: 'mini',
|
|
18324
|
+
status: 'primary',
|
|
18325
|
+
content: i18n_getI18n('vxe.button.confirm'),
|
|
18326
|
+
onClick: confirmEvent
|
|
18327
|
+
}) : renderEmptyElement($xeDateRangePicker)])])]), rightSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
18328
|
+
class: 'vxe-date-range-picker--layout-right-wrapper'
|
|
16652
18329
|
}, rightSlot({})) : renderShortcutBtn('right', true)]), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16653
|
-
class: 'vxe-date-picker--
|
|
18330
|
+
class: 'vxe-date-range-picker--layout-bottom-wrapper'
|
|
16654
18331
|
}, bottomSlot({})) : renderShortcutBtn('bottom')])] : [])]);
|
|
16655
18332
|
};
|
|
16656
18333
|
const renderPrefixIcon = () => {
|
|
@@ -16659,10 +18336,10 @@ const Countdown = VxeCountdown;
|
|
|
16659
18336
|
} = props;
|
|
16660
18337
|
const prefixSlot = slots.prefix;
|
|
16661
18338
|
return prefixSlot || prefixIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16662
|
-
class: 'vxe-date-picker--prefix',
|
|
18339
|
+
class: 'vxe-date-range-picker--prefix',
|
|
16663
18340
|
onClick: clickPrefixEvent
|
|
16664
18341
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16665
|
-
class: 'vxe-date-picker--prefix-icon'
|
|
18342
|
+
class: 'vxe-date-range-picker--prefix-icon'
|
|
16666
18343
|
}, prefixSlot ? getSlotVNs(prefixSlot({})) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16667
18344
|
class: prefixIcon
|
|
16668
18345
|
})])]) : null;
|
|
@@ -16672,158 +18349,141 @@ const Countdown = VxeCountdown;
|
|
|
16672
18349
|
suffixIcon
|
|
16673
18350
|
} = props;
|
|
16674
18351
|
const {
|
|
16675
|
-
|
|
18352
|
+
startValue,
|
|
18353
|
+
endValue
|
|
16676
18354
|
} = reactData;
|
|
16677
18355
|
const suffixSlot = slots.suffix;
|
|
16678
18356
|
const isDisabled = computeIsDisabled.value;
|
|
16679
18357
|
const isClearable = computeIsClearable.value;
|
|
16680
18358
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16681
|
-
class: ['vxe-date-picker--suffix', {
|
|
16682
|
-
'is--clear': isClearable && !isDisabled &&
|
|
18359
|
+
class: ['vxe-date-range-picker--suffix', {
|
|
18360
|
+
'is--clear': isClearable && !isDisabled && (startValue || endValue)
|
|
16683
18361
|
}]
|
|
16684
18362
|
}, [isClearable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16685
|
-
class: 'vxe-date-picker--clear-icon',
|
|
18363
|
+
class: 'vxe-date-range-picker--clear-icon',
|
|
16686
18364
|
onClick: clearValueEvent
|
|
16687
18365
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16688
18366
|
class: getIcon().INPUT_CLEAR
|
|
16689
|
-
})]) : (
|
|
16690
|
-
class: 'vxe-date-picker--suffix-icon',
|
|
18367
|
+
})]) : renderEmptyElement($xeDateRangePicker), renderExtraSuffixIcon(), suffixSlot || suffixIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
18368
|
+
class: 'vxe-date-range-picker--suffix-icon',
|
|
16691
18369
|
onClick: clickSuffixEvent
|
|
16692
18370
|
}, suffixSlot ? getSlotVNs(suffixSlot({})) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16693
18371
|
class: suffixIcon
|
|
16694
|
-
})]) : (
|
|
18372
|
+
})]) : renderEmptyElement($xeDateRangePicker)]);
|
|
16695
18373
|
};
|
|
16696
18374
|
const renderExtraSuffixIcon = () => {
|
|
16697
18375
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16698
|
-
class: 'vxe-date-picker--control-icon',
|
|
16699
|
-
onClick:
|
|
18376
|
+
class: 'vxe-date-range-picker--control-icon',
|
|
18377
|
+
onClick: dateRangePickerOpenEvent
|
|
16700
18378
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16701
|
-
class: ['vxe-date-picker--date-picker-icon', getIcon().DATE_PICKER_DATE]
|
|
18379
|
+
class: ['vxe-date-range-picker--date-picker-icon', getIcon().DATE_PICKER_DATE]
|
|
16702
18380
|
})]);
|
|
16703
18381
|
};
|
|
16704
18382
|
const renderVN = () => {
|
|
16705
18383
|
const {
|
|
16706
18384
|
className,
|
|
16707
18385
|
type,
|
|
16708
|
-
align,
|
|
16709
18386
|
name,
|
|
16710
|
-
autocomplete,
|
|
16711
18387
|
autoComplete
|
|
16712
18388
|
} = props;
|
|
16713
18389
|
const {
|
|
16714
|
-
|
|
18390
|
+
startValue,
|
|
18391
|
+
endValue,
|
|
16715
18392
|
visiblePanel,
|
|
16716
18393
|
isActivated
|
|
16717
18394
|
} = reactData;
|
|
16718
18395
|
const vSize = computeSize.value;
|
|
16719
18396
|
const isDisabled = computeIsDisabled.value;
|
|
16720
18397
|
const formReadonly = computeFormReadonly.value;
|
|
18398
|
+
const inputLabel = computeInputLabel.value;
|
|
16721
18399
|
if (formReadonly) {
|
|
16722
18400
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16723
18401
|
ref: refElem,
|
|
16724
|
-
class: ['vxe-date-picker--readonly', `type--${type}`, className]
|
|
16725
|
-
},
|
|
18402
|
+
class: ['vxe-date-range-picker--readonly', `type--${type}`, className]
|
|
18403
|
+
}, inputLabel);
|
|
16726
18404
|
}
|
|
16727
|
-
const inputReadonly = computeInputReadonly.value;
|
|
16728
|
-
const inputType = computeDatePickerType.value;
|
|
16729
18405
|
const inpPlaceholder = computeInpPlaceholder.value;
|
|
16730
18406
|
const isClearable = computeIsClearable.value;
|
|
16731
18407
|
const prefix = renderPrefixIcon();
|
|
16732
18408
|
const suffix = renderSuffixIcon();
|
|
16733
18409
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16734
18410
|
ref: refElem,
|
|
16735
|
-
class: ['vxe-date-picker', `type--${type}`, className, {
|
|
18411
|
+
class: ['vxe-date-range-picker', `type--${type}`, className, {
|
|
16736
18412
|
[`size--${vSize}`]: vSize,
|
|
16737
|
-
[`is--${align}`]: align,
|
|
16738
18413
|
'is--prefix': !!prefix,
|
|
16739
18414
|
'is--suffix': !!suffix,
|
|
16740
18415
|
'is--visible': visiblePanel,
|
|
16741
18416
|
'is--disabled': isDisabled,
|
|
16742
18417
|
'is--active': isActivated,
|
|
16743
|
-
'show--clear': isClearable && !isDisabled &&
|
|
18418
|
+
'show--clear': isClearable && !isDisabled && (startValue || endValue)
|
|
16744
18419
|
}],
|
|
16745
18420
|
spellcheck: false
|
|
16746
|
-
}, [prefix || (
|
|
16747
|
-
class: 'vxe-date-picker--wrapper'
|
|
18421
|
+
}, [prefix || renderEmptyElement($xeDateRangePicker), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
18422
|
+
class: 'vxe-date-range-picker--wrapper'
|
|
16748
18423
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('input', {
|
|
16749
18424
|
ref: refInputTarget,
|
|
16750
|
-
class: 'vxe-date-picker--inner',
|
|
16751
|
-
value:
|
|
18425
|
+
class: 'vxe-date-range-picker--inner',
|
|
18426
|
+
value: inputLabel,
|
|
16752
18427
|
name,
|
|
16753
|
-
type:
|
|
18428
|
+
type: 'text',
|
|
16754
18429
|
placeholder: inpPlaceholder,
|
|
16755
|
-
readonly:
|
|
18430
|
+
readonly: true,
|
|
16756
18431
|
disabled: isDisabled,
|
|
16757
|
-
autocomplete: autoComplete
|
|
18432
|
+
autocomplete: autoComplete,
|
|
16758
18433
|
onKeydown: keydownEvent,
|
|
16759
18434
|
onKeyup: keyupEvent,
|
|
16760
18435
|
onClick: clickEvent,
|
|
16761
|
-
onInput: inputEvent,
|
|
16762
18436
|
onChange: changeEvent,
|
|
16763
18437
|
onFocus: focusEvent,
|
|
16764
18438
|
onBlur: blurEvent
|
|
16765
|
-
})]), suffix || (
|
|
18439
|
+
})]), suffix || renderEmptyElement($xeDateRangePicker),
|
|
16766
18440
|
// 下拉面板
|
|
16767
18441
|
renderPanel()]);
|
|
16768
18442
|
};
|
|
16769
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue,
|
|
16770
|
-
updateModelValue(
|
|
16771
|
-
changeValue();
|
|
16772
|
-
});
|
|
16773
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.type, () => {
|
|
16774
|
-
// 切换类型是重置内置变量
|
|
16775
|
-
Object.assign(reactData, {
|
|
16776
|
-
inputValue: '',
|
|
16777
|
-
datetimePanelValue: null,
|
|
16778
|
-
datePanelValue: null,
|
|
16779
|
-
datePanelLabel: '',
|
|
16780
|
-
datePanelType: 'day',
|
|
16781
|
-
selectMonth: null,
|
|
16782
|
-
currentDate: null
|
|
16783
|
-
});
|
|
16784
|
-
initValue();
|
|
18443
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, () => {
|
|
18444
|
+
updateModelValue(true);
|
|
16785
18445
|
});
|
|
16786
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(
|
|
16787
|
-
|
|
16788
|
-
if (isDatePickerType) {
|
|
16789
|
-
dateParseValue(reactData.datePanelValue);
|
|
16790
|
-
reactData.inputValue = props.multiple ? computeDateMultipleLabel.value : reactData.datePanelLabel;
|
|
16791
|
-
}
|
|
18446
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeMVal, () => {
|
|
18447
|
+
updateModelValue(false);
|
|
16792
18448
|
});
|
|
18449
|
+
updateModelValue(true);
|
|
16793
18450
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
16794
|
-
globalEvents.on($
|
|
16795
|
-
globalEvents.on($
|
|
16796
|
-
globalEvents.on($
|
|
16797
|
-
|
|
18451
|
+
globalEvents.on($xeDateRangePicker, 'mousewheel', handleGlobalMousewheelEvent);
|
|
18452
|
+
globalEvents.on($xeDateRangePicker, 'mousedown', handleGlobalMousedownEvent);
|
|
18453
|
+
globalEvents.on($xeDateRangePicker, 'blur', handleGlobalBlurEvent);
|
|
18454
|
+
});
|
|
18455
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onDeactivated)(() => {
|
|
18456
|
+
checkValue();
|
|
16798
18457
|
});
|
|
16799
18458
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
16800
|
-
globalEvents.off($
|
|
16801
|
-
globalEvents.off($
|
|
16802
|
-
globalEvents.off($
|
|
16803
|
-
globalEvents.off($xeDatePicker, 'blur');
|
|
18459
|
+
globalEvents.off($xeDateRangePicker, 'mousewheel');
|
|
18460
|
+
globalEvents.off($xeDateRangePicker, 'mousedown');
|
|
18461
|
+
globalEvents.off($xeDateRangePicker, 'blur');
|
|
16804
18462
|
});
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
18463
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
18464
|
+
checkValue();
|
|
18465
|
+
});
|
|
18466
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeDateRangePicker', $xeDateRangePicker);
|
|
18467
|
+
$xeDateRangePicker.renderVN = renderVN;
|
|
18468
|
+
return $xeDateRangePicker;
|
|
16808
18469
|
},
|
|
16809
18470
|
render() {
|
|
16810
18471
|
return this.renderVN();
|
|
16811
18472
|
}
|
|
16812
18473
|
}));
|
|
16813
|
-
;// CONCATENATED MODULE: ./packages/date-picker/index.ts
|
|
18474
|
+
;// CONCATENATED MODULE: ./packages/date-range-picker/index.ts
|
|
16814
18475
|
|
|
16815
18476
|
|
|
16816
18477
|
|
|
16817
|
-
const
|
|
18478
|
+
const VxeDateRangePicker = Object.assign({}, date_range_picker, {
|
|
16818
18479
|
install(app) {
|
|
16819
|
-
app.component(
|
|
16820
|
-
app.component('VxeDateInput', date_picker);
|
|
18480
|
+
app.component(date_range_picker.name, date_range_picker);
|
|
16821
18481
|
}
|
|
16822
18482
|
});
|
|
16823
|
-
dynamicApp.use(
|
|
16824
|
-
index_esm_VxeUI.component(
|
|
16825
|
-
const
|
|
16826
|
-
/* harmony default export */ var
|
|
18483
|
+
dynamicApp.use(VxeDateRangePicker);
|
|
18484
|
+
index_esm_VxeUI.component(date_range_picker);
|
|
18485
|
+
const DateRangePicker = VxeDateRangePicker;
|
|
18486
|
+
/* harmony default export */ var packages_date_range_picker = (VxeDateRangePicker);
|
|
16827
18487
|
;// CONCATENATED MODULE: ./packages/loading/index.ts
|
|
16828
18488
|
|
|
16829
18489
|
|
|
@@ -19282,12 +20942,15 @@ function renderNativeOptgroup(renderOpts, params, renderOptionsMethods) {
|
|
|
19282
20942
|
} = renderOpts;
|
|
19283
20943
|
const groupOptions = optionGroupProps.options || 'options';
|
|
19284
20944
|
const groupLabel = optionGroupProps.label || 'label';
|
|
19285
|
-
|
|
19286
|
-
return
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
20945
|
+
if (optionGroups) {
|
|
20946
|
+
return optionGroups.map((group, gIndex) => {
|
|
20947
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('optgroup', {
|
|
20948
|
+
key: gIndex,
|
|
20949
|
+
label: group[groupLabel]
|
|
20950
|
+
}, renderOptionsMethods(group[groupOptions], renderOpts, params));
|
|
20951
|
+
});
|
|
20952
|
+
}
|
|
20953
|
+
return [];
|
|
19291
20954
|
}
|
|
19292
20955
|
/**
|
|
19293
20956
|
* 渲染表单-项
|
|
@@ -19368,15 +21031,18 @@ function renderNativeFormOptions(options, renderOpts, params) {
|
|
|
19368
21031
|
const valueProp = optionProps.value || 'value';
|
|
19369
21032
|
const disabledProp = optionProps.disabled || 'disabled';
|
|
19370
21033
|
const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
|
|
19371
|
-
|
|
19372
|
-
return
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
21034
|
+
if (options) {
|
|
21035
|
+
return options.map((item, oIndex) => {
|
|
21036
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('option', {
|
|
21037
|
+
key: oIndex,
|
|
21038
|
+
value: item[valueProp],
|
|
21039
|
+
disabled: item[disabledProp],
|
|
21040
|
+
/* eslint-disable eqeqeq */
|
|
21041
|
+
selected: item[valueProp] == cellValue
|
|
21042
|
+
}, item[labelProp]);
|
|
21043
|
+
});
|
|
21044
|
+
}
|
|
21045
|
+
return [];
|
|
19380
21046
|
}
|
|
19381
21047
|
/**
|
|
19382
21048
|
* 渲染表单-项
|
|
@@ -44263,6 +45929,7 @@ const PasswordInput = VxePasswordInput;
|
|
|
44263
45929
|
|
|
44264
45930
|
|
|
44265
45931
|
|
|
45932
|
+
|
|
44266
45933
|
const browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
44267
45934
|
// 打印
|
|
44268
45935
|
let printFrame;
|
|
@@ -44297,12 +45964,54 @@ function getExportBlobByString(str, type) {
|
|
|
44297
45964
|
type: `text/${type};charset=utf-8;`
|
|
44298
45965
|
});
|
|
44299
45966
|
}
|
|
44300
|
-
const
|
|
45967
|
+
const defaultPrintMargin = 50;
|
|
45968
|
+
function parseMargin(val) {
|
|
45969
|
+
let mVal = defaultPrintMargin;
|
|
45970
|
+
let top = mVal;
|
|
45971
|
+
let bottom = mVal;
|
|
45972
|
+
let left = mVal;
|
|
45973
|
+
let right = mVal;
|
|
45974
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val)) {
|
|
45975
|
+
mVal = val;
|
|
45976
|
+
top = mVal;
|
|
45977
|
+
bottom = mVal;
|
|
45978
|
+
left = mVal;
|
|
45979
|
+
right = mVal;
|
|
45980
|
+
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isPlainObject(val)) {
|
|
45981
|
+
if (val.margin) {
|
|
45982
|
+
mVal = val.margin;
|
|
45983
|
+
top = mVal;
|
|
45984
|
+
bottom = mVal;
|
|
45985
|
+
left = mVal;
|
|
45986
|
+
right = mVal;
|
|
45987
|
+
}
|
|
45988
|
+
if (val.marginTop) {
|
|
45989
|
+
top = val.marginTop;
|
|
45990
|
+
}
|
|
45991
|
+
if (val.marginBottom) {
|
|
45992
|
+
bottom = val.marginBottom;
|
|
45993
|
+
}
|
|
45994
|
+
if (val.marginLeft) {
|
|
45995
|
+
left = val.marginLeft;
|
|
45996
|
+
}
|
|
45997
|
+
if (val.marginRight) {
|
|
45998
|
+
right = val.marginRight;
|
|
45999
|
+
}
|
|
46000
|
+
}
|
|
46001
|
+
return {
|
|
46002
|
+
top: toCssUnit(top),
|
|
46003
|
+
bottom: toCssUnit(bottom),
|
|
46004
|
+
left: toCssUnit(left),
|
|
46005
|
+
right: toCssUnit(right)
|
|
46006
|
+
};
|
|
46007
|
+
}
|
|
44301
46008
|
function createHtmlPage(opts, printHtml) {
|
|
44302
46009
|
const {
|
|
46010
|
+
pageStyle,
|
|
44303
46011
|
customStyle
|
|
44304
46012
|
} = opts;
|
|
44305
|
-
|
|
46013
|
+
const marginObj = parseMargin(pageStyle);
|
|
46014
|
+
return ['<!DOCTYPE html><html>', '<head>', '<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">', `<title>${opts.title || ''}</title>`, opts._pageBreaks || opts.pageBreaks && opts.pageBreaks.length ? '<style media="print">@page {size: auto;margin: 0mm;}</style>' : '', `<style>.vxe-print-slots{display: none;}.vxe-print-page-break.align--center{text-align:center;}.vxe-print-page-break.align--left{text-align:left;}.vxe-print-page-break.align--right{text-align:right;}.vxe-print-page-break--header-title{font-size:1.8em;line-height:${marginObj.top || 'normal'};text-align:center;}.vxe-print-page-break{page-break-before:always;display:flex;flex-direction:column;height:100vh;overflow:hidden;}.vxe-print-page-break--body{display:flex;flex-direction:row;flex-grow:1;overflow: hidden;}.vxe-print-page-break--left,.vxe-print-page-break--right{flex-shrink:0;height:100%;}.vxe-print-page-break--left{width:${marginObj.left};}.vxe-print-page-break--right{width:${marginObj.right};}.vxe-print-page-break--header,.vxe-print-page-break--footer{flex-shrink:0;width:100%;}.vxe-print-page-break--header{height:${marginObj.top};}.vxe-print-page-break--footer{height:${marginObj.bottom};}.vxe-print-page-break--content{flex-grow: 1;overflow: hidden;}.vxe-print-page-break--footer-page-number{line-height:${marginObj.bottom || 'normal'};text-align:center;}</style>`, '<style>.vxe-table{white-space:pre;}</style>', `<style>${defaultHtmlStyle}</style>`, customStyle ? `<style>${customStyle}</style>` : '', '</head>', '<body>', `${printHtml}`, '</body>', '</html>'].join('');
|
|
44306
46015
|
}
|
|
44307
46016
|
function handlePrint(opts, printHtml = '') {
|
|
44308
46017
|
const {
|
|
@@ -44532,6 +46241,10 @@ const PrintPageBreak = VxePrintPageBreak;
|
|
|
44532
46241
|
type: Boolean,
|
|
44533
46242
|
default: () => getConfig().print.showAllPageTitle
|
|
44534
46243
|
},
|
|
46244
|
+
pageStyle: {
|
|
46245
|
+
type: Object,
|
|
46246
|
+
default: () => getConfig().print.pageStyle
|
|
46247
|
+
},
|
|
44535
46248
|
customStyle: {
|
|
44536
46249
|
type: String,
|
|
44537
46250
|
default: () => getConfig().print.customStyle
|
|
@@ -47938,7 +49651,9 @@ const Watermark = VxeWatermark;
|
|
|
47938
49651
|
|
|
47939
49652
|
|
|
47940
49653
|
|
|
47941
|
-
|
|
49654
|
+
|
|
49655
|
+
|
|
49656
|
+
const components_components = [packages_alert, packages_anchor, packages_anchor_link, packages_avatar, packages_badge, packages_breadcrumb, packages_breadcrumb_item, packages_button, packages_button_group, packages_calendar, packages_card, packages_carousel, packages_carousel_item, packages_checkbox, checkbox_group, packages_col, packages_collapse, packages_collapse_pane, packages_color_picker, packages_countdown, packages_date_panel, packages_date_picker, packages_date_range_picker, packages_drawer, packages_empty, packages_form, packages_form_design, form_gather, packages_form_group, packages_form_item, packages_form_view, packages_icon, packages_icon_picker, packages_image, image_group, image_preview, packages_input, packages_layout_aside, packages_layout_body, packages_layout_container, packages_layout_footer, packages_layout_header, packages_link, packages_list_design, packages_list_view, packages_list, loading, packages_menu, packages_modal, packages_notice_bar, packages_number_input, packages_optgroup, packages_option, packages_pager, packages_password_input, print_page_break, packages_print, packages_pulldown, packages_radio, radio_button, radio_group, packages_rate, packages_result, packages_row, packages_select, packages_split, packages_split_pane, packages_slider, packages_steps, packages_switch, packages_tab_pane, packages_table_select, packages_tabs, packages_tag, packages_text_ellipsis, packages_text, packages_textarea, packages_tip, packages_tooltip, packages_tree, packages_tree_select, packages_upload, packages_watermark];
|
|
47942
49657
|
function install(app, options) {
|
|
47943
49658
|
setConfig(options);
|
|
47944
49659
|
components_components.forEach(component => app.use(component));
|
|
@@ -48036,6 +49751,8 @@ const readFile = readLocalFile;
|
|
|
48036
49751
|
|
|
48037
49752
|
|
|
48038
49753
|
|
|
49754
|
+
|
|
49755
|
+
|
|
48039
49756
|
|
|
48040
49757
|
|
|
48041
49758
|
|