bkui-vue 0.0.1-beta.390 → 0.0.1-beta.392
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/dist/index.cjs.js +22 -22
- package/dist/index.esm.js +0 -1
- package/dist/index.umd.js +23 -23
- package/lib/affix/index.js +128 -60
- package/lib/alert/index.js +124 -56
- package/lib/animate-number/index.js +106 -42
- package/lib/backtop/index.js +133 -61
- package/lib/badge/badge.d.ts +1 -1
- package/lib/badge/index.d.ts +4 -4
- package/lib/badge/index.js +114 -50
- package/lib/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +5 -5
- package/lib/breadcrumb/index.js +133 -67
- package/lib/button/index.js +147 -68
- package/lib/card/index.js +154 -69
- package/lib/cascader/cascader.d.ts +3 -3
- package/lib/cascader/index.d.ts +10 -10
- package/lib/cascader/index.js +242 -168
- package/lib/checkbox/index.js +139 -77
- package/lib/code-diff/index.js +121 -79
- package/lib/collapse/index.js +150 -84
- package/lib/color-picker/color-picker.d.ts +1 -1
- package/lib/color-picker/index.d.ts +4 -4
- package/lib/color-picker/index.js +245 -193
- package/lib/components.js +671 -434
- package/lib/container/container.d.ts +1 -1
- package/lib/container/index.d.ts +4 -4
- package/lib/container/index.js +125 -64
- package/lib/date-picker/date-picker.d.ts +2 -2
- package/lib/date-picker/index.d.ts +7 -7
- package/lib/date-picker/index.js +563 -462
- package/lib/date-picker/panel/time-range.d.ts +3 -3
- package/lib/date-picker/panel/time.d.ts +3 -3
- package/lib/date-picker/time-picker.d.ts +3 -3
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/dialog/index.d.ts +7 -7
- package/lib/dialog/index.js +198 -108
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/index.js +139 -86
- package/lib/dist.index.js +133 -48
- package/lib/divider/index.js +118 -50
- package/lib/dropdown/dropdown.d.ts +2 -2
- package/lib/dropdown/index.d.ts +7 -7
- package/lib/dropdown/index.js +155 -73
- package/lib/exception/index.js +145 -97
- package/lib/fixed-navbar/fixed-navbar.d.ts +1 -1
- package/lib/fixed-navbar/index.d.ts +4 -4
- package/lib/fixed-navbar/index.js +107 -43
- package/lib/form/form-item.d.ts +1 -1
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.js +193 -107
- package/lib/icon/angle-double-down-line.js +90 -30
- package/lib/icon/angle-double-left-line.js +90 -30
- package/lib/icon/angle-double-left.js +90 -30
- package/lib/icon/angle-double-right-line.js +90 -30
- package/lib/icon/angle-double-right.js +90 -30
- package/lib/icon/angle-double-up-line.js +90 -30
- package/lib/icon/angle-down-fill.js +90 -30
- package/lib/icon/angle-down-line.js +90 -30
- package/lib/icon/angle-down.js +90 -30
- package/lib/icon/angle-left.js +90 -30
- package/lib/icon/angle-right.js +90 -30
- package/lib/icon/angle-up-fill.js +90 -30
- package/lib/icon/angle-up.js +90 -30
- package/lib/icon/archive-fill.js +90 -30
- package/lib/icon/arrows-left.js +90 -30
- package/lib/icon/arrows-right.js +90 -30
- package/lib/icon/audio-fill.js +90 -30
- package/lib/icon/bk.js +90 -30
- package/lib/icon/circle.js +90 -30
- package/lib/icon/close-line.js +90 -30
- package/lib/icon/close.js +90 -30
- package/lib/icon/code.js +90 -30
- package/lib/icon/cog-shape.js +90 -30
- package/lib/icon/collapse-left.js +90 -30
- package/lib/icon/copy.js +90 -30
- package/lib/icon/data-shape.js +90 -30
- package/lib/icon/del.js +90 -30
- package/lib/icon/doc-fill.js +90 -30
- package/lib/icon/done.js +90 -30
- package/lib/icon/down-shape.js +90 -30
- package/lib/icon/down-small.js +90 -30
- package/lib/icon/edit-line.js +90 -30
- package/lib/icon/ellipsis.js +90 -30
- package/lib/icon/enlarge-line.js +90 -30
- package/lib/icon/error.js +90 -30
- package/lib/icon/excel-fill.js +90 -30
- package/lib/icon/exclamation-circle-shape.js +90 -30
- package/lib/icon/eye.js +90 -30
- package/lib/icon/filliscreen-line.js +90 -30
- package/lib/icon/folder-open.js +90 -30
- package/lib/icon/folder-shape-open.js +90 -30
- package/lib/icon/folder-shape.js +90 -30
- package/lib/icon/folder.js +90 -30
- package/lib/icon/funnel.js +90 -30
- package/lib/icon/help-document-fill.js +90 -30
- package/lib/icon/help-fill.js +90 -30
- package/lib/icon/help.js +90 -30
- package/lib/icon/image-fill.js +90 -30
- package/lib/icon/img-placehoulder.js +88 -52
- package/lib/icon/index.js +255 -267
- package/lib/icon/info-line.js +88 -52
- package/lib/icon/info.js +88 -52
- package/lib/icon/left-shape.js +88 -52
- package/lib/icon/left-turn-line.js +88 -52
- package/lib/icon/narrow-line.js +88 -52
- package/lib/icon/original.js +88 -52
- package/lib/icon/pdf-fill.js +88 -52
- package/lib/icon/play-shape.js +88 -52
- package/lib/icon/plus.js +88 -52
- package/lib/icon/ppt-fill.js +88 -52
- package/lib/icon/qq.js +88 -52
- package/lib/icon/right-shape.js +88 -52
- package/lib/icon/right-turn-line.js +88 -52
- package/lib/icon/search.js +88 -52
- package/lib/icon/share.js +88 -52
- package/lib/icon/spinner.js +88 -52
- package/lib/icon/success.js +88 -52
- package/lib/icon/switcher-loading.js +88 -52
- package/lib/icon/text-file.js +88 -52
- package/lib/icon/text-fill.js +88 -52
- package/lib/icon/transfer.js +88 -52
- package/lib/icon/tree-application-shape.js +88 -52
- package/lib/icon/unfull-screen.js +88 -52
- package/lib/icon/unvisible.js +88 -52
- package/lib/icon/up-shape.js +88 -52
- package/lib/icon/upload.js +88 -52
- package/lib/icon/video-fill.js +88 -52
- package/lib/icon/warn.js +88 -52
- package/lib/icon/weixin.js +88 -52
- package/lib/image/index.js +213 -164
- package/lib/index.js +134 -50
- package/lib/info-box/index.js +206 -152
- package/lib/input/index.d.ts +4 -4
- package/lib/input/index.js +167 -99
- package/lib/input/input.d.ts +1 -1
- package/lib/link/index.d.ts +4 -4
- package/lib/link/index.js +115 -47
- package/lib/link/link.d.ts +1 -1
- package/lib/loading/index.d.ts +4 -4
- package/lib/loading/index.js +127 -67
- package/lib/loading/loading.d.ts +1 -1
- package/lib/menu/index.js +156 -92
- package/lib/message/index.js +148 -76
- package/lib/modal/index.d.ts +4 -4
- package/lib/modal/index.js +151 -85
- package/lib/modal/modal.d.ts +1 -1
- package/lib/navigation/index.js +134 -66
- package/lib/notify/index.js +153 -81
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/index.js +128 -92
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +220 -131
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/plugin-popover/index.js +190 -143
- package/lib/plugins/index.js +100 -33
- package/lib/popover/index.d.ts +10 -10
- package/lib/popover/index.js +193 -148
- package/lib/popover/popover.d.ts +3 -3
- package/lib/popover2/index.js +99 -35
- package/lib/preset.js +104 -37
- package/lib/process/index.d.ts +4 -4
- package/lib/process/index.js +134 -92
- package/lib/process/process.d.ts +1 -1
- package/lib/progress/index.d.ts +7 -7
- package/lib/progress/index.js +127 -63
- package/lib/progress/progress.d.ts +2 -2
- package/lib/radio/index.js +142 -81
- package/lib/rate/index.js +127 -63
- package/lib/resize-layout/index.js +147 -79
- package/lib/search-select/index.js +220 -168
- package/lib/select/index.d.ts +10 -10
- package/lib/select/index.js +394 -315
- package/lib/select/select.d.ts +3 -3
- package/lib/shared/index.js +203 -228
- package/lib/sideslider/index.d.ts +4 -4
- package/lib/sideslider/index.js +137 -88
- package/lib/sideslider/sideslider.d.ts +1 -1
- package/lib/slider/index.d.ts +7 -7
- package/lib/slider/index.js +196 -147
- package/lib/slider/slider.d.ts +2 -2
- package/lib/steps/index.js +152 -105
- package/lib/swiper/index.js +126 -62
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/index.js +133 -65
- package/lib/switcher/switcher.d.ts +1 -1
- package/lib/tab/index.d.ts +4 -4
- package/lib/tab/index.js +188 -118
- package/lib/tab/tab.d.ts +1 -1
- package/lib/table/index.js +572 -457
- package/lib/table-column/index.js +197 -129
- package/lib/tag/index.js +130 -58
- package/lib/tag-input/index.d.ts +7 -7
- package/lib/tag-input/index.js +277 -175
- package/lib/tag-input/tag-input.d.ts +2 -2
- package/lib/time-picker/index.d.ts +10 -10
- package/lib/time-picker/index.js +111 -40
- package/lib/timeline/index.d.ts +4 -4
- package/lib/timeline/index.js +114 -50
- package/lib/timeline/timeline.d.ts +1 -1
- package/lib/transfer/index.js +174 -89
- package/lib/tree/index.js +235 -158
- package/lib/upload/index.d.ts +7 -7
- package/lib/upload/index.js +227 -173
- package/lib/upload/upload-list.d.ts +1 -1
- package/lib/upload/upload-trigger.d.ts +1 -1
- package/lib/upload/upload.d.ts +2 -2
- package/lib/virtual-render/index.js +154 -86
- package/package.json +1 -1
package/lib/date-picker/index.js
CHANGED
@@ -1,45 +1,155 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
/******/
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("../shared"), require("vue"), require("../directives"), require("../icon"), require("../button"), require("js-calendar"), require("date-fns"), require("lodash"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["../shared", "vue", "../directives", "../icon", "../button", "js-calendar", "date-fns", "lodash"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../directives"), require("../icon"), require("../button"), require("js-calendar"), require("date-fns"), require("lodash")) : factory(root["../shared"], root["vue"], root["../directives"], root["../icon"], root["../button"], root["js-calendar"], root["date-fns"], root["lodash"]);
|
8
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
9
|
+
}
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__4061__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__4976__, __WEBPACK_EXTERNAL_MODULE__7926__, __WEBPACK_EXTERNAL_MODULE__7876__, __WEBPACK_EXTERNAL_MODULE__467__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 4976:
|
16
|
+
/***/ ((module) => {
|
17
|
+
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4976__;
|
19
|
+
|
20
|
+
/***/ }),
|
21
|
+
|
22
|
+
/***/ 4061:
|
23
|
+
/***/ ((module) => {
|
24
|
+
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4061__;
|
26
|
+
|
27
|
+
/***/ }),
|
28
|
+
|
29
|
+
/***/ 6870:
|
30
|
+
/***/ ((module) => {
|
31
|
+
|
32
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
|
33
|
+
|
34
|
+
/***/ }),
|
35
|
+
|
36
|
+
/***/ 4212:
|
37
|
+
/***/ ((module) => {
|
38
|
+
|
39
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
|
40
|
+
|
41
|
+
/***/ }),
|
42
|
+
|
43
|
+
/***/ 7876:
|
44
|
+
/***/ ((module) => {
|
45
|
+
|
46
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__7876__;
|
47
|
+
|
48
|
+
/***/ }),
|
49
|
+
|
50
|
+
/***/ 7926:
|
51
|
+
/***/ ((module) => {
|
52
|
+
|
53
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__7926__;
|
54
|
+
|
55
|
+
/***/ }),
|
56
|
+
|
57
|
+
/***/ 467:
|
58
|
+
/***/ ((module) => {
|
59
|
+
|
60
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
|
61
|
+
|
62
|
+
/***/ }),
|
63
|
+
|
64
|
+
/***/ 748:
|
65
|
+
/***/ ((module) => {
|
66
|
+
|
67
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
68
|
+
|
69
|
+
/***/ })
|
70
|
+
|
71
|
+
/******/ });
|
12
72
|
/************************************************************************/
|
13
|
-
/******/
|
14
|
-
/******/
|
15
|
-
/******/
|
16
|
-
/******/
|
17
|
-
/******/
|
18
|
-
/******/
|
19
|
-
/******/
|
20
|
-
/******/
|
73
|
+
/******/ // The module cache
|
74
|
+
/******/ var __webpack_module_cache__ = {};
|
75
|
+
/******/
|
76
|
+
/******/ // The require function
|
77
|
+
/******/ function __webpack_require__(moduleId) {
|
78
|
+
/******/ // Check if module is in cache
|
79
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
80
|
+
/******/ if (cachedModule !== undefined) {
|
81
|
+
/******/ return cachedModule.exports;
|
21
82
|
/******/ }
|
22
|
-
/******/
|
23
|
-
/******/
|
24
|
-
/******/
|
25
|
-
/******/
|
26
|
-
/******/
|
27
|
-
/******/
|
28
|
-
/******/
|
29
|
-
/******/
|
83
|
+
/******/ // Create a new module (and put it into the cache)
|
84
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
85
|
+
/******/ // no module.id needed
|
86
|
+
/******/ // no module.loaded needed
|
87
|
+
/******/ exports: {}
|
88
|
+
/******/ };
|
89
|
+
/******/
|
90
|
+
/******/ // Execute the module function
|
91
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
92
|
+
/******/
|
93
|
+
/******/ // Return the exports of the module
|
94
|
+
/******/ return module.exports;
|
95
|
+
/******/ }
|
96
|
+
/******/
|
97
|
+
/************************************************************************/
|
98
|
+
/******/ /* webpack/runtime/compat get default export */
|
99
|
+
/******/ (() => {
|
100
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
101
|
+
/******/ __webpack_require__.n = (module) => {
|
102
|
+
/******/ var getter = module && module.__esModule ?
|
103
|
+
/******/ () => (module['default']) :
|
104
|
+
/******/ () => (module);
|
105
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
106
|
+
/******/ return getter;
|
107
|
+
/******/ };
|
108
|
+
/******/ })();
|
109
|
+
/******/
|
110
|
+
/******/ /* webpack/runtime/define property getters */
|
111
|
+
/******/ (() => {
|
112
|
+
/******/ // define getter functions for harmony exports
|
113
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
114
|
+
/******/ for(var key in definition) {
|
115
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
116
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
117
|
+
/******/ }
|
118
|
+
/******/ }
|
119
|
+
/******/ };
|
120
|
+
/******/ })();
|
121
|
+
/******/
|
122
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
123
|
+
/******/ (() => {
|
124
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
125
|
+
/******/ })();
|
126
|
+
/******/
|
127
|
+
/******/ /* webpack/runtime/make namespace object */
|
128
|
+
/******/ (() => {
|
129
|
+
/******/ // define __esModule on exports
|
130
|
+
/******/ __webpack_require__.r = (exports) => {
|
131
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
132
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
133
|
+
/******/ }
|
134
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
135
|
+
/******/ };
|
136
|
+
/******/ })();
|
137
|
+
/******/
|
30
138
|
/************************************************************************/
|
31
139
|
var __webpack_exports__ = {};
|
140
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
141
|
+
(() => {
|
142
|
+
// ESM COMPAT FLAG
|
143
|
+
__webpack_require__.r(__webpack_exports__);
|
32
144
|
|
33
145
|
// EXPORTS
|
34
146
|
__webpack_require__.d(__webpack_exports__, {
|
35
|
-
"
|
36
|
-
"
|
147
|
+
"TimePicker": () => (/* reexport */ time_picker),
|
148
|
+
"default": () => (/* binding */ src)
|
37
149
|
});
|
38
150
|
|
39
|
-
|
40
|
-
var
|
41
|
-
var y = x => () => x
|
42
|
-
const external_shared_namespaceObject = x({ ["BKPopover"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.BKPopover, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.bkZIndexManager, ["capitalize"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.capitalize, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.resolveClassName, ["scrollTop"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.scrollTop, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.useFormItem, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
|
151
|
+
// EXTERNAL MODULE: external "../shared"
|
152
|
+
var external_shared_ = __webpack_require__(4212);
|
43
153
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
44
154
|
function _arrayWithHoles(arr) {
|
45
155
|
if (Array.isArray(arr)) return arr;
|
@@ -137,18 +247,12 @@ function _typeof(obj) {
|
|
137
247
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
138
248
|
}, _typeof(obj);
|
139
249
|
}
|
140
|
-
|
141
|
-
var
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
var
|
146
|
-
var external_directives_y = x => () => x
|
147
|
-
const external_directives_namespaceObject = external_directives_x({ ["clickoutside"]: () => __WEBPACK_EXTERNAL_MODULE__directives_9cc9ba10__.clickoutside });
|
148
|
-
;// CONCATENATED MODULE: external "../icon"
|
149
|
-
var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
150
|
-
var external_icon_y = x => () => x
|
151
|
-
const external_icon_namespaceObject = external_icon_x({ ["AngleDoubleLeft"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleDoubleLeft, ["AngleDoubleRight"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleDoubleRight, ["AngleLeft"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleLeft, ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleRight, ["Close"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Close });
|
250
|
+
// EXTERNAL MODULE: external "vue"
|
251
|
+
var external_vue_ = __webpack_require__(748);
|
252
|
+
// EXTERNAL MODULE: external "../directives"
|
253
|
+
var external_directives_ = __webpack_require__(4061);
|
254
|
+
// EXTERNAL MODULE: external "../icon"
|
255
|
+
var external_icon_ = __webpack_require__(6870);
|
152
256
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/base/picker-dropdown.tsx
|
153
257
|
|
154
258
|
|
@@ -208,17 +312,17 @@ var pickerDropdownProps = {
|
|
208
312
|
},
|
209
313
|
onClick: Function
|
210
314
|
};
|
211
|
-
/* harmony default export */ const picker_dropdown = ((0,
|
315
|
+
/* harmony default export */ const picker_dropdown = ((0,external_vue_.defineComponent)({
|
212
316
|
props: pickerDropdownProps,
|
213
317
|
emits: ['changeVisible'],
|
214
318
|
setup: function setup(props, _ref) {
|
215
319
|
var emit = _ref.emit;
|
216
320
|
var popoverInstance = Object.create(null);
|
217
|
-
var refContentRef = (0,
|
218
|
-
(0,
|
321
|
+
var refContentRef = (0,external_vue_.ref)(null);
|
322
|
+
(0,external_vue_.onMounted)(function () {
|
219
323
|
updateDropdown();
|
220
324
|
});
|
221
|
-
(0,
|
325
|
+
(0,external_vue_.onBeforeUnmount)(function () {
|
222
326
|
destoryDropdown();
|
223
327
|
}); // const resetTransformOrigin = (state) => {
|
224
328
|
// if (popoverInstance && Object.keys(popoverInstance).length !== 0) {
|
@@ -313,12 +417,12 @@ var pickerDropdownProps = {
|
|
313
417
|
|
314
418
|
var updateDropdown = function updateDropdown() {
|
315
419
|
if (popoverInstance && Object.keys(popoverInstance).length !== 0) {
|
316
|
-
(0,
|
420
|
+
(0,external_vue_.nextTick)(function () {
|
317
421
|
popoverInstance.update();
|
318
422
|
});
|
319
423
|
} else {
|
320
|
-
(0,
|
321
|
-
popoverInstance = new
|
424
|
+
(0,external_vue_.nextTick)(function () {
|
425
|
+
popoverInstance = new external_shared_.BKPopover(props.triggerRef, refContentRef.value, {
|
322
426
|
placement: props.placement,
|
323
427
|
trigger: 'manual',
|
324
428
|
modifiers: [// matchWidth,
|
@@ -370,19 +474,19 @@ var pickerDropdownProps = {
|
|
370
474
|
}
|
371
475
|
};
|
372
476
|
|
373
|
-
var styles = (0,
|
477
|
+
var styles = (0,external_vue_.computed)(function () {
|
374
478
|
var style = {};
|
375
479
|
|
376
480
|
if (props.appendToBody) {
|
377
|
-
style['z-index'] = 1060 +
|
481
|
+
style['z-index'] = 1060 + external_shared_.bkZIndexManager.getModalNextIndex();
|
378
482
|
}
|
379
483
|
|
380
484
|
return style;
|
381
485
|
});
|
382
|
-
var state = (0,
|
486
|
+
var state = (0,external_vue_.reactive)({
|
383
487
|
styles: styles
|
384
488
|
});
|
385
|
-
return Object.assign(Object.assign({}, (0,
|
489
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
386
490
|
refContentRef: refContentRef,
|
387
491
|
forceUpdate: forceUpdate,
|
388
492
|
updateDropdown: updateDropdown,
|
@@ -392,18 +496,17 @@ var pickerDropdownProps = {
|
|
392
496
|
render: function render() {
|
393
497
|
var _a, _b, _c;
|
394
498
|
|
395
|
-
return (0,
|
499
|
+
return (0,external_vue_.createVNode)("div", {
|
396
500
|
"ref": "refContentRef",
|
397
|
-
"class": [(0,
|
501
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker-dropdown'), this.className, this.extPopoverCls],
|
398
502
|
"style": this.styles,
|
399
503
|
"onClick": this.onClick
|
400
504
|
}, [(_c = (_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '']);
|
401
505
|
}
|
402
506
|
}));
|
403
|
-
|
404
|
-
var
|
405
|
-
var
|
406
|
-
const external_button_namespaceObject = external_button_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__button_59c00871__["default"] });
|
507
|
+
// EXTERNAL MODULE: external "../button"
|
508
|
+
var external_button_ = __webpack_require__(4976);
|
509
|
+
var external_button_default = /*#__PURE__*/__webpack_require__.n(external_button_);
|
407
510
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/base/confirm.tsx
|
408
511
|
|
409
512
|
|
@@ -454,12 +557,12 @@ var confirmProps = {
|
|
454
557
|
"default": true
|
455
558
|
}
|
456
559
|
};
|
457
|
-
/* harmony default export */ const base_confirm = ((0,
|
560
|
+
/* harmony default export */ const base_confirm = ((0,external_vue_.defineComponent)({
|
458
561
|
props: confirmProps,
|
459
562
|
emits: ['pick-clear', 'pick-success', 'pick-toggle-time'],
|
460
563
|
setup: function setup(props, _ref) {
|
461
564
|
var emit = _ref.emit;
|
462
|
-
var labels = (0,
|
565
|
+
var labels = (0,external_vue_.computed)(function () {
|
463
566
|
return {
|
464
567
|
time: props.isTime ? '选择日期' : '选择时间',
|
465
568
|
clear: '清除',
|
@@ -483,7 +586,7 @@ var confirmProps = {
|
|
483
586
|
emit('pick-toggle-time'); // this.dispatch('bk-date-picker', 'focus-input');
|
484
587
|
};
|
485
588
|
|
486
|
-
var elRef = (0,
|
589
|
+
var elRef = (0,external_vue_.ref)(null);
|
487
590
|
|
488
591
|
var handleTab = function handleTab(e) {
|
489
592
|
var tabbables = _toConsumableArray(elRef.value.children);
|
@@ -509,29 +612,29 @@ var confirmProps = {
|
|
509
612
|
|
510
613
|
var _a, _b, _c;
|
511
614
|
|
512
|
-
return (0,
|
513
|
-
"class": (0,
|
615
|
+
return (0,external_vue_.createVNode)("div", {
|
616
|
+
"class": (0,external_shared_.resolveClassName)('picker-confirm'),
|
514
617
|
"ref": "elRef",
|
515
618
|
"onKeydown": this.handleTab
|
516
619
|
}, [this.showTime ? // <a href="javascript: void(0);" class="bk-picker-confirm-time" disabled onClick={this.handleToggleTime}>
|
517
620
|
// {this.labels.time}
|
518
621
|
// </a>
|
519
|
-
(0,
|
622
|
+
(0,external_vue_.createVNode)((external_button_default()), {
|
520
623
|
"text": true,
|
521
|
-
"class": (0,
|
624
|
+
"class": (0,external_shared_.resolveClassName)('picker-confirm-time'),
|
522
625
|
"disabled": this.timeDisabled,
|
523
626
|
"onClick": this.handleToggleTime
|
524
627
|
}, {
|
525
628
|
"default": function _default() {
|
526
629
|
return [_this.labels.time];
|
527
630
|
}
|
528
|
-
}) : '', (_c = (_b = (_a = this.$slots).confirm) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0,
|
529
|
-
"class": (0,
|
530
|
-
}, [this.clearable ? (0,
|
631
|
+
}) : '', (_c = (_b = (_a = this.$slots).confirm) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0,external_vue_.createVNode)("div", {
|
632
|
+
"class": (0,external_shared_.resolveClassName)('picker-confirm-action')
|
633
|
+
}, [this.clearable ? (0,external_vue_.createVNode)("a", {
|
531
634
|
"href": "javascript: void(0);",
|
532
635
|
"onClick": this.handleClear,
|
533
636
|
"onKeydown": this.handleClear
|
534
|
-
}, [this.labels.clear]) : '', (0,
|
637
|
+
}, [this.labels.clear]) : '', (0,external_vue_.createVNode)("a", {
|
535
638
|
"href": "javascript: void(0);",
|
536
639
|
"class": "confirm",
|
537
640
|
"onClick": this.handleSuccess,
|
@@ -554,14 +657,11 @@ function _defineProperty(obj, key, value) {
|
|
554
657
|
|
555
658
|
return obj;
|
556
659
|
}
|
557
|
-
|
558
|
-
var
|
559
|
-
var
|
560
|
-
|
561
|
-
|
562
|
-
var external_date_fns_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
563
|
-
var external_date_fns_y = x => () => x
|
564
|
-
const external_date_fns_namespaceObject = external_date_fns_x({ ["format"]: () => __WEBPACK_EXTERNAL_MODULE_date_fns_f4130be9__.format, ["toDate"]: () => __WEBPACK_EXTERNAL_MODULE_date_fns_f4130be9__.toDate });
|
660
|
+
// EXTERNAL MODULE: external "js-calendar"
|
661
|
+
var external_js_calendar_ = __webpack_require__(7926);
|
662
|
+
var external_js_calendar_default = /*#__PURE__*/__webpack_require__.n(external_js_calendar_);
|
663
|
+
// EXTERNAL MODULE: external "date-fns"
|
664
|
+
var external_date_fns_ = __webpack_require__(7876);
|
565
665
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/fecha.ts
|
566
666
|
/*
|
567
667
|
* Tencent is pleased to support the open source community by making
|
@@ -955,13 +1055,13 @@ var RANGE_SEPARATOR = ' - '; // export const toDate = (date) => {
|
|
955
1055
|
// };
|
956
1056
|
|
957
1057
|
var dateFormat = function dateFormat(_date, format) {
|
958
|
-
var date = (0,
|
1058
|
+
var date = (0,external_date_fns_.toDate)(new Date(_date));
|
959
1059
|
|
960
1060
|
if (!date || isNaN(date.getTime())) {
|
961
1061
|
return '';
|
962
1062
|
}
|
963
1063
|
|
964
|
-
return (0,
|
1064
|
+
return (0,external_date_fns_.format)(date, format || 'yyyy-MM-dd');
|
965
1065
|
};
|
966
1066
|
|
967
1067
|
var rangeFormatter = function rangeFormatter(value, format) {
|
@@ -1252,7 +1352,7 @@ var timePickerKey = Symbol('time-picker');
|
|
1252
1352
|
|
1253
1353
|
function iconBtnCls(direction) {
|
1254
1354
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
1255
|
-
return [(0,
|
1355
|
+
return [(0,external_shared_.resolveClassName)('picker-panel-icon-btn'), (0,external_shared_.resolveClassName)("date-picker-".concat(direction, "-btn")), (0,external_shared_.resolveClassName)("date-picker-".concat(direction, "-btn-arrow").concat(type))];
|
1256
1356
|
}
|
1257
1357
|
var getDayCountOfMonth = function getDayCountOfMonth(year, month) {
|
1258
1358
|
return new Date(year, month + 1, 0).getDate();
|
@@ -1448,27 +1548,27 @@ var dateTableProps = {
|
|
1448
1548
|
required: true
|
1449
1549
|
}
|
1450
1550
|
};
|
1451
|
-
/* harmony default export */ const date_table = ((0,
|
1551
|
+
/* harmony default export */ const date_table = ((0,external_vue_.defineComponent)({
|
1452
1552
|
name: 'DateTable',
|
1453
1553
|
props: dateTableProps,
|
1454
1554
|
emits: ['pick', 'pick-click', 'changeRange'],
|
1455
1555
|
setup: function setup(props, _ref) {
|
1456
1556
|
var emit = _ref.emit;
|
1457
|
-
var calendar = (0,
|
1458
|
-
return new
|
1557
|
+
var calendar = (0,external_vue_.computed)(function () {
|
1558
|
+
return new (external_js_calendar_default()).Generator({
|
1459
1559
|
onlyDays: true,
|
1460
1560
|
weekStart: 0
|
1461
1561
|
});
|
1462
1562
|
});
|
1463
|
-
var headerDays = (0,
|
1563
|
+
var headerDays = (0,external_vue_.computed)(function () {
|
1464
1564
|
var translatedDays = ['日', '一', '二', '三', '四', '五', '六'];
|
1465
1565
|
return translatedDays.splice(0, 7 - 0).concat(translatedDays.splice(0, 0));
|
1466
1566
|
});
|
1467
|
-
var dates = (0,
|
1567
|
+
var dates = (0,external_vue_.computed)(function () {
|
1468
1568
|
var rangeSelecting = props.selectionMode === 'range' && props.rangeState.selecting;
|
1469
1569
|
return rangeSelecting ? [props.rangeState.from] : props.modelValue;
|
1470
1570
|
});
|
1471
|
-
var cells = (0,
|
1571
|
+
var cells = (0,external_vue_.computed)(function () {
|
1472
1572
|
var tableYear = props.tableDate.getFullYear();
|
1473
1573
|
var tableMonth = props.tableDate.getMonth();
|
1474
1574
|
var today = clearHours(new Date());
|
@@ -1527,7 +1627,7 @@ var dateTableProps = {
|
|
1527
1627
|
var getCellCls = function getCellCls(cell) {
|
1528
1628
|
var _ref2;
|
1529
1629
|
|
1530
|
-
return [(0,
|
1630
|
+
return [(0,external_shared_.resolveClassName)('date-picker-cells-cell'), (_ref2 = {}, _defineProperty(_ref2, (0,external_shared_.resolveClassName)('date-picker-cells-cell-selected'), cell.selected || cell.start || cell.end), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('date-picker-cells-cell-disabled'), cell.disabled), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('date-picker-cells-cell-today'), cell.type === 'today'), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('date-picker-cells-cell-prev-month'), cell.type === 'prevMonth'), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('date-picker-cells-cell-next-month'), cell.type === 'nextMonth'), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('date-picker-cells-cell-week-label'), cell.type === 'weekLabel'), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('date-picker-cells-cell-range'), cell.range && !cell.start && !cell.end), _ref2)];
|
1531
1631
|
};
|
1532
1632
|
|
1533
1633
|
return {
|
@@ -1541,14 +1641,14 @@ var dateTableProps = {
|
|
1541
1641
|
render: function render() {
|
1542
1642
|
var _this = this;
|
1543
1643
|
|
1544
|
-
return (0,
|
1545
|
-
"class": (0,
|
1546
|
-
}, [(0,
|
1547
|
-
"class": (0,
|
1644
|
+
return (0,external_vue_.createVNode)("div", {
|
1645
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-cells')
|
1646
|
+
}, [(0,external_vue_.createVNode)("div", {
|
1647
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-cells-header')
|
1548
1648
|
}, [this.headerDays.map(function (day) {
|
1549
|
-
return (0,
|
1649
|
+
return (0,external_vue_.createVNode)("span", null, [day]);
|
1550
1650
|
})]), this.cells.map(function (cell) {
|
1551
|
-
return (0,
|
1651
|
+
return (0,external_vue_.createVNode)("span", {
|
1552
1652
|
"class": _this.getCellCls(cell),
|
1553
1653
|
"onClick": function onClick() {
|
1554
1654
|
return _this.handleClick(cell);
|
@@ -1556,14 +1656,12 @@ var dateTableProps = {
|
|
1556
1656
|
"onMouseenter": function onMouseenter() {
|
1557
1657
|
return _this.handleMouseMove(cell);
|
1558
1658
|
}
|
1559
|
-
}, [(0,
|
1659
|
+
}, [(0,external_vue_.createVNode)("em", null, [cell.desc])]);
|
1560
1660
|
})]);
|
1561
1661
|
}
|
1562
1662
|
}));
|
1563
|
-
|
1564
|
-
var
|
1565
|
-
var external_lodash_y = x => () => x
|
1566
|
-
const external_lodash_namespaceObject = external_lodash_x({ ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE_lodash__.debounce });
|
1663
|
+
// EXTERNAL MODULE: external "lodash"
|
1664
|
+
var external_lodash_ = __webpack_require__(467);
|
1567
1665
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/props.ts
|
1568
1666
|
/*
|
1569
1667
|
* Tencent is pleased to support the open source community by making
|
@@ -1856,7 +1954,7 @@ var timeSpinnerProps = {
|
|
1856
1954
|
}
|
1857
1955
|
};
|
1858
1956
|
var timeParts = ['hours', 'minutes', 'seconds'];
|
1859
|
-
/* harmony default export */ const time_spinner = ((0,
|
1957
|
+
/* harmony default export */ const time_spinner = ((0,external_vue_.defineComponent)({
|
1860
1958
|
name: 'TimeSpinner',
|
1861
1959
|
props: Object.assign(Object.assign({}, timeSpinnerProps), timePanelProps),
|
1862
1960
|
emits: ['change', 'pick-click'],
|
@@ -1864,7 +1962,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
1864
1962
|
var _this = this;
|
1865
1963
|
|
1866
1964
|
var emit = _ref.emit;
|
1867
|
-
var state = (0,
|
1965
|
+
var state = (0,external_vue_.reactive)({
|
1868
1966
|
spinerSteps: [1, 1, 1].map(function (one, i) {
|
1869
1967
|
return Math.abs(props.steps[i]) || one;
|
1870
1968
|
}),
|
@@ -1872,7 +1970,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
1872
1970
|
focusedColumn: -1,
|
1873
1971
|
focusedTime: [0, 0, 0]
|
1874
1972
|
});
|
1875
|
-
var hoursList = (0,
|
1973
|
+
var hoursList = (0,external_vue_.computed)(function () {
|
1876
1974
|
var hours = [];
|
1877
1975
|
var step = state.spinerSteps[0];
|
1878
1976
|
var focusedHour = state.focusedColumn === 0 && state.focusedTime[0];
|
@@ -1905,7 +2003,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
1905
2003
|
|
1906
2004
|
return hours;
|
1907
2005
|
});
|
1908
|
-
var minutesList = (0,
|
2006
|
+
var minutesList = (0,external_vue_.computed)(function () {
|
1909
2007
|
var minutes = [];
|
1910
2008
|
var step = state.spinerSteps[1];
|
1911
2009
|
var focusedMinute = state.focusedColumn === 1 && state.focusedTime[1];
|
@@ -1938,7 +2036,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
1938
2036
|
|
1939
2037
|
return minutes;
|
1940
2038
|
});
|
1941
|
-
var secondsList = (0,
|
2039
|
+
var secondsList = (0,external_vue_.computed)(function () {
|
1942
2040
|
var seconds = [];
|
1943
2041
|
var step = state.spinerSteps[2];
|
1944
2042
|
var focusedMinute = state.focusedColumn === 2 && state.focusedTime[2];
|
@@ -1971,12 +2069,12 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
1971
2069
|
|
1972
2070
|
return seconds;
|
1973
2071
|
});
|
1974
|
-
var styles = (0,
|
2072
|
+
var styles = (0,external_vue_.computed)(function () {
|
1975
2073
|
return {
|
1976
2074
|
width: props.showSeconds ? '33.33%' : '50%'
|
1977
2075
|
};
|
1978
2076
|
});
|
1979
|
-
(0,
|
2077
|
+
(0,external_vue_.watch)(function () {
|
1980
2078
|
return props.hours;
|
1981
2079
|
}, function (val) {
|
1982
2080
|
if (!state.compiled) {
|
@@ -1987,7 +2085,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
1987
2085
|
return obj.text === val;
|
1988
2086
|
}));
|
1989
2087
|
});
|
1990
|
-
(0,
|
2088
|
+
(0,external_vue_.watch)(function () {
|
1991
2089
|
return props.minutes;
|
1992
2090
|
}, function (val) {
|
1993
2091
|
if (!state.compiled) {
|
@@ -1998,7 +2096,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
1998
2096
|
return obj.text === val;
|
1999
2097
|
}));
|
2000
2098
|
});
|
2001
|
-
(0,
|
2099
|
+
(0,external_vue_.watch)(function () {
|
2002
2100
|
return props.seconds;
|
2003
2101
|
}, function (val) {
|
2004
2102
|
if (!state.compiled) {
|
@@ -2009,7 +2107,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2009
2107
|
return obj.text === val;
|
2010
2108
|
}));
|
2011
2109
|
});
|
2012
|
-
(0,
|
2110
|
+
(0,external_vue_.watch)(function () {
|
2013
2111
|
return state.focusedTime;
|
2014
2112
|
}, function (updated, old) {
|
2015
2113
|
timeParts.forEach(function (part, i) {
|
@@ -2024,8 +2122,8 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2024
2122
|
scroll(part, valueIndex);
|
2025
2123
|
});
|
2026
2124
|
});
|
2027
|
-
(0,
|
2028
|
-
(0,
|
2125
|
+
(0,external_vue_.onMounted)(function () {
|
2126
|
+
(0,external_vue_.nextTick)(function () {
|
2029
2127
|
state.compiled = true;
|
2030
2128
|
bindWheelEvent();
|
2031
2129
|
});
|
@@ -2048,13 +2146,13 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2048
2146
|
function getCellCls(cell) {
|
2049
2147
|
var _ref2;
|
2050
2148
|
|
2051
|
-
return [(0,
|
2149
|
+
return [(0,external_shared_.resolveClassName)('time-picker-cells-cell'), (_ref2 = {}, _defineProperty(_ref2, (0,external_shared_.resolveClassName)('time-picker-cells-cell-selected'), cell.selected), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('time-picker-cells-cell-focused'), cell.focused), _defineProperty(_ref2, (0,external_shared_.resolveClassName)('time-picker-cells-cell-disabled'), cell.disabled), _ref2)];
|
2052
2150
|
}
|
2053
2151
|
|
2054
2152
|
function bindWheelEvent() {
|
2055
2153
|
var bindFunction = function bindFunction(type) {
|
2056
2154
|
var domRef = getDomRef(type);
|
2057
|
-
domRef.addEventListener('wheel', (0,
|
2155
|
+
domRef.addEventListener('wheel', (0,external_lodash_.debounce)(function () {
|
2058
2156
|
handleWheel(type);
|
2059
2157
|
}, 32), {
|
2060
2158
|
passive: true
|
@@ -2097,7 +2195,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2097
2195
|
return false;
|
2098
2196
|
}
|
2099
2197
|
|
2100
|
-
(0,
|
2198
|
+
(0,external_vue_.nextTick)(function () {
|
2101
2199
|
emitChange(_defineProperty({}, type, value));
|
2102
2200
|
});
|
2103
2201
|
}
|
@@ -2121,7 +2219,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2121
2219
|
var domRef = getDomRef(type);
|
2122
2220
|
var from = domRef.scrollTop;
|
2123
2221
|
var to = 32 * getScrollIndex(type, index);
|
2124
|
-
(0,
|
2222
|
+
(0,external_shared_.scrollTop)(domRef, from, to, 500);
|
2125
2223
|
}
|
2126
2224
|
|
2127
2225
|
function getScrollIndex(type, index) {
|
@@ -2141,7 +2239,7 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2141
2239
|
}
|
2142
2240
|
|
2143
2241
|
function updateScroll() {
|
2144
|
-
(0,
|
2242
|
+
(0,external_vue_.nextTick)(function () {
|
2145
2243
|
timeParts.forEach(function (type) {
|
2146
2244
|
var domRef = getDomRef(type);
|
2147
2245
|
var list;
|
@@ -2165,10 +2263,10 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2165
2263
|
return text < 10 ? "0".concat(text) : text;
|
2166
2264
|
}
|
2167
2265
|
|
2168
|
-
var hoursRef = (0,
|
2169
|
-
var minutesRef = (0,
|
2170
|
-
var secondsRef = (0,
|
2171
|
-
return Object.assign(Object.assign({}, (0,
|
2266
|
+
var hoursRef = (0,external_vue_.ref)(null);
|
2267
|
+
var minutesRef = (0,external_vue_.ref)(null);
|
2268
|
+
var secondsRef = (0,external_vue_.ref)(null);
|
2269
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
2172
2270
|
hoursList: hoursList,
|
2173
2271
|
minutesList: minutesList,
|
2174
2272
|
secondsList: secondsList,
|
@@ -2185,59 +2283,59 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2185
2283
|
render: function render() {
|
2186
2284
|
var _this2 = this;
|
2187
2285
|
|
2188
|
-
return (0,
|
2189
|
-
"class": [(0,
|
2190
|
-
}, [(0,
|
2191
|
-
"class": (0,
|
2192
|
-
}, [(0,
|
2193
|
-
"class": [(0,
|
2286
|
+
return (0,external_vue_.createVNode)("div", {
|
2287
|
+
"class": [(0,external_shared_.resolveClassName)('time-picker-cells'), this.showSeconds ? (0,external_shared_.resolveClassName)('time-picker-cells-with-seconds') : '']
|
2288
|
+
}, [(0,external_vue_.createVNode)("div", {
|
2289
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-cells-title-wrapper')
|
2290
|
+
}, [(0,external_vue_.createVNode)("div", {
|
2291
|
+
"class": [(0,external_shared_.resolveClassName)('time-picker-cells-title'), this.focusedColumn === 0 ? 'active' : ''],
|
2194
2292
|
"style": this.styles
|
2195
|
-
}, [(0,
|
2196
|
-
"class": [(0,
|
2293
|
+
}, [(0,external_vue_.createTextVNode)("\u65F6")]), (0,external_vue_.createVNode)("div", {
|
2294
|
+
"class": [(0,external_shared_.resolveClassName)('time-picker-cells-title'), this.focusedColumn === 1 ? 'active' : ''],
|
2197
2295
|
"style": this.styles
|
2198
|
-
}, [(0,
|
2199
|
-
"class": [(0,
|
2296
|
+
}, [(0,external_vue_.createTextVNode)("\u5206")]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
2297
|
+
"class": [(0,external_shared_.resolveClassName)('time-picker-cells-title'), this.focusedColumn === 2 ? 'active' : ''],
|
2200
2298
|
"style": this.styles
|
2201
|
-
}, [(0,
|
2202
|
-
"class": (0,
|
2299
|
+
}, [(0,external_vue_.createTextVNode)("\u79D2")]), [[external_vue_.vShow, this.showSeconds]])]), (0,external_vue_.createVNode)("div", {
|
2300
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-cells-list'),
|
2203
2301
|
"ref": "hoursRef",
|
2204
2302
|
"style": this.styles
|
2205
|
-
}, [(0,
|
2206
|
-
"class": (0,
|
2303
|
+
}, [(0,external_vue_.createVNode)("ul", {
|
2304
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-cells-ul')
|
2207
2305
|
}, [this.hoursList.map(function (item) {
|
2208
|
-
return (0,
|
2306
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("li", {
|
2209
2307
|
"class": _this2.getCellCls(item),
|
2210
2308
|
"onClick": function onClick() {
|
2211
2309
|
return _this2.handleClick('hours', item);
|
2212
2310
|
}
|
2213
|
-
}, [_this2.padTime(item.text)]), [[
|
2214
|
-
})])]), (0,
|
2215
|
-
"class": (0,
|
2311
|
+
}, [_this2.padTime(item.text)]), [[external_vue_.vShow, !item.hide]]);
|
2312
|
+
})])]), (0,external_vue_.createVNode)("div", {
|
2313
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-cells-list'),
|
2216
2314
|
"ref": "minutesRef",
|
2217
2315
|
"style": this.styles
|
2218
|
-
}, [(0,
|
2219
|
-
"class": (0,
|
2316
|
+
}, [(0,external_vue_.createVNode)("ul", {
|
2317
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-cells-ul')
|
2220
2318
|
}, [this.minutesList.map(function (item) {
|
2221
|
-
return (0,
|
2319
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("li", {
|
2222
2320
|
"class": _this2.getCellCls(item),
|
2223
2321
|
"onClick": function onClick() {
|
2224
2322
|
return _this2.handleClick('minutes', item);
|
2225
2323
|
}
|
2226
|
-
}, [_this2.padTime(item.text)]), [[
|
2227
|
-
})])]), (0,
|
2228
|
-
"class": (0,
|
2324
|
+
}, [_this2.padTime(item.text)]), [[external_vue_.vShow, !item.hide]]);
|
2325
|
+
})])]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
2326
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-cells-list'),
|
2229
2327
|
"ref": "secondsRef",
|
2230
2328
|
"style": this.styles
|
2231
|
-
}, [(0,
|
2232
|
-
"class": (0,
|
2329
|
+
}, [(0,external_vue_.createVNode)("ul", {
|
2330
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-cells-ul')
|
2233
2331
|
}, [this.secondsList.map(function (item) {
|
2234
|
-
return (0,
|
2332
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("li", {
|
2235
2333
|
"class": _this2.getCellCls(item),
|
2236
2334
|
"onClick": function onClick() {
|
2237
2335
|
return _this2.handleClick('seconds', item);
|
2238
2336
|
}
|
2239
|
-
}, [_this2.padTime(item.text)]), [[
|
2240
|
-
})])]), [[
|
2337
|
+
}, [_this2.padTime(item.text)]), [[external_vue_.vShow, !item.hide]]);
|
2338
|
+
})])]), [[external_vue_.vShow, this.showSeconds]])]);
|
2241
2339
|
}
|
2242
2340
|
}));
|
2243
2341
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/panel/time.tsx
|
@@ -2309,7 +2407,7 @@ var timeProps = {
|
|
2309
2407
|
// return resolved;
|
2310
2408
|
// }
|
2311
2409
|
|
2312
|
-
/* harmony default export */ const time = ((0,
|
2410
|
+
/* harmony default export */ const time = ((0,external_vue_.defineComponent)({
|
2313
2411
|
name: 'TimePanel',
|
2314
2412
|
props: Object.assign(Object.assign(Object.assign({}, datePickerProps), timePanelProps), timeProps),
|
2315
2413
|
emits: ['pick', 'pick-click'],
|
@@ -2317,20 +2415,20 @@ var timeProps = {
|
|
2317
2415
|
var _this = this;
|
2318
2416
|
|
2319
2417
|
var emit = _ref.emit;
|
2320
|
-
var state = (0,
|
2418
|
+
var state = (0,external_vue_.reactive)({
|
2321
2419
|
date: props.value[0] || initTime(),
|
2322
2420
|
showDate: false
|
2323
2421
|
}); // const parentProvide = injectStrict(timePickerKey);
|
2324
2422
|
|
2325
|
-
var parentProvide = (0,
|
2326
|
-
var timeSpinnerRef = (0,
|
2327
|
-
var showSeconds = (0,
|
2423
|
+
var parentProvide = (0,external_vue_.inject)(timePickerKey);
|
2424
|
+
var timeSpinnerRef = (0,external_vue_.ref)(null);
|
2425
|
+
var showSeconds = (0,external_vue_.computed)(function () {
|
2328
2426
|
return !(props.format || '').match(/mm$/);
|
2329
2427
|
});
|
2330
|
-
var visibleDate = (0,
|
2428
|
+
var visibleDate = (0,external_vue_.computed)(function () {
|
2331
2429
|
return src_fecha.format(parentProvide.panelDate, props.format);
|
2332
2430
|
});
|
2333
|
-
var timeSlots = (0,
|
2431
|
+
var timeSlots = (0,external_vue_.computed)(function () {
|
2334
2432
|
if (!props.value[0]) {
|
2335
2433
|
return [];
|
2336
2434
|
}
|
@@ -2339,7 +2437,7 @@ var timeProps = {
|
|
2339
2437
|
return state.date[slot]();
|
2340
2438
|
});
|
2341
2439
|
});
|
2342
|
-
var disabledHMS = (0,
|
2440
|
+
var disabledHMS = (0,external_vue_.computed)(function () {
|
2343
2441
|
var disabledTypes = ['disabledHours', 'disabledMinutes', 'disabledSeconds'];
|
2344
2442
|
|
2345
2443
|
if (props.disabledDate === function () {
|
@@ -2385,14 +2483,14 @@ var timeProps = {
|
|
2385
2483
|
return obj;
|
2386
2484
|
}, {});
|
2387
2485
|
});
|
2388
|
-
(0,
|
2486
|
+
(0,external_vue_.watch)(function () {
|
2389
2487
|
return props.value;
|
2390
2488
|
}, function (dates) {
|
2391
2489
|
var newVal = dates[0] || initTime();
|
2392
2490
|
newVal = new Date(newVal);
|
2393
2491
|
state.date = newVal;
|
2394
2492
|
});
|
2395
|
-
(0,
|
2493
|
+
(0,external_vue_.onMounted)(function () {
|
2396
2494
|
if (parentProvide && parentProvide.parentName === 'DatePanel') {
|
2397
2495
|
state.showDate = true;
|
2398
2496
|
}
|
@@ -2402,7 +2500,7 @@ var timeProps = {
|
|
2402
2500
|
var isEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
2403
2501
|
var newDate = new Date(state.date);
|
2404
2502
|
Object.keys(date).forEach(function (type) {
|
2405
|
-
return newDate["set".concat((0,
|
2503
|
+
return newDate["set".concat((0,external_shared_.capitalize)(type))](date[type]);
|
2406
2504
|
});
|
2407
2505
|
|
2408
2506
|
if (isEmit) {
|
@@ -2414,7 +2512,7 @@ var timeProps = {
|
|
2414
2512
|
emit('pick-click');
|
2415
2513
|
}
|
2416
2514
|
|
2417
|
-
return Object.assign(Object.assign({}, (0,
|
2515
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
2418
2516
|
visibleDate: visibleDate,
|
2419
2517
|
showSeconds: showSeconds,
|
2420
2518
|
timeSlots: timeSlots,
|
@@ -2425,21 +2523,21 @@ var timeProps = {
|
|
2425
2523
|
});
|
2426
2524
|
},
|
2427
2525
|
render: function render() {
|
2428
|
-
return (0,
|
2429
|
-
"class": (0,
|
2526
|
+
return (0,external_vue_.createVNode)("div", {
|
2527
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-body-wrapper'),
|
2430
2528
|
"onMousedown": function onMousedown(e) {
|
2431
2529
|
e.preventDefault();
|
2432
2530
|
}
|
2433
|
-
}, [(0,
|
2434
|
-
"class": (0,
|
2531
|
+
}, [(0,external_vue_.createVNode)("div", {
|
2532
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-body'),
|
2435
2533
|
"style": {
|
2436
2534
|
width: "".concat(this.width, "px")
|
2437
2535
|
}
|
2438
|
-
}, [this.showDate ? (0,
|
2439
|
-
"class": (0,
|
2440
|
-
}, [this.visibleDate]) : '', (0,
|
2441
|
-
"class": (0,
|
2442
|
-
}, [(0,
|
2536
|
+
}, [this.showDate ? (0,external_vue_.createVNode)("div", {
|
2537
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-header')
|
2538
|
+
}, [this.visibleDate]) : '', (0,external_vue_.createVNode)("div", {
|
2539
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-content')
|
2540
|
+
}, [(0,external_vue_.createVNode)(time_spinner, {
|
2443
2541
|
"ref": "timeSpinnerRef",
|
2444
2542
|
"showSeconds": this.showSeconds,
|
2445
2543
|
"steps": this.steps,
|
@@ -2557,7 +2655,7 @@ var datePanelProps = {
|
|
2557
2655
|
}
|
2558
2656
|
}
|
2559
2657
|
};
|
2560
|
-
/* harmony default export */ const date = ((0,
|
2658
|
+
/* harmony default export */ const date = ((0,external_vue_.defineComponent)({
|
2561
2659
|
name: 'DatePanel',
|
2562
2660
|
props: datePanelProps,
|
2563
2661
|
emits: ['pick', 'pick-success', 'pick-clear', 'pick-click', 'selection-mode-change'],
|
@@ -2572,42 +2670,42 @@ var datePanelProps = {
|
|
2572
2670
|
};
|
2573
2671
|
|
2574
2672
|
var dates = props.modelValue.slice().sort();
|
2575
|
-
var state = (0,
|
2673
|
+
var state = (0,external_vue_.reactive)({
|
2576
2674
|
currentView: props.selectionMode || 'date',
|
2577
2675
|
pickerTable: getTableType(props.selectionMode),
|
2578
2676
|
dates: dates,
|
2579
2677
|
panelDate: props.startDate || dates[0] || new Date()
|
2580
2678
|
});
|
2581
2679
|
|
2582
|
-
var _getCurrentInstance = (0,
|
2680
|
+
var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
|
2583
2681
|
proxy = _getCurrentInstance.proxy;
|
2584
2682
|
|
2585
|
-
(0,
|
2683
|
+
(0,external_vue_.provide)(timePickerKey, {
|
2586
2684
|
panelDate: state.panelDate,
|
2587
2685
|
parentName: proxy.$options.name
|
2588
2686
|
});
|
2589
|
-
var timePickerRef = (0,
|
2590
|
-
var timeSpinnerRef = (0,
|
2591
|
-
var timeSpinnerEndRef = (0,
|
2592
|
-
(0,
|
2687
|
+
var timePickerRef = (0,external_vue_.ref)(null);
|
2688
|
+
var timeSpinnerRef = (0,external_vue_.ref)(null);
|
2689
|
+
var timeSpinnerEndRef = (0,external_vue_.ref)(null);
|
2690
|
+
(0,external_vue_.watch)(function () {
|
2593
2691
|
return state.currentView;
|
2594
2692
|
}, function (val) {
|
2595
2693
|
emit('selection-mode-change', val);
|
2596
2694
|
|
2597
2695
|
if (state.currentView === 'time') {
|
2598
|
-
(0,
|
2696
|
+
(0,external_vue_.nextTick)(function () {
|
2599
2697
|
var spinner = timePickerRef.value.timeSpinnerRef;
|
2600
2698
|
spinner.updateScroll();
|
2601
2699
|
});
|
2602
2700
|
}
|
2603
2701
|
});
|
2604
|
-
(0,
|
2702
|
+
(0,external_vue_.watch)(function () {
|
2605
2703
|
return props.selectionMode;
|
2606
2704
|
}, function (type) {
|
2607
2705
|
state.currentView = type;
|
2608
2706
|
state.pickerTable = getTableType(type);
|
2609
2707
|
});
|
2610
|
-
(0,
|
2708
|
+
(0,external_vue_.watch)(function () {
|
2611
2709
|
return props.modelValue;
|
2612
2710
|
}, function (newVal) {
|
2613
2711
|
state.dates = newVal;
|
@@ -2697,10 +2795,10 @@ var datePanelProps = {
|
|
2697
2795
|
}
|
2698
2796
|
};
|
2699
2797
|
|
2700
|
-
var panelPickerHandlers = (0,
|
2798
|
+
var panelPickerHandlers = (0,external_vue_.computed)(function () {
|
2701
2799
|
return state.pickerTable === "".concat(state.currentView, "-table") ? handlePick : handlePreSelection;
|
2702
2800
|
});
|
2703
|
-
var datePanelLabel = (0,
|
2801
|
+
var datePanelLabel = (0,external_vue_.computed)(function () {
|
2704
2802
|
var locale = 'zh-CN';
|
2705
2803
|
var datePanelLabelStr = '[yyyy]-[mm]';
|
2706
2804
|
var date = state.panelDate;
|
@@ -2724,13 +2822,13 @@ var datePanelProps = {
|
|
2724
2822
|
})
|
2725
2823
|
};
|
2726
2824
|
});
|
2727
|
-
var showLabelFirst = (0,
|
2825
|
+
var showLabelFirst = (0,external_vue_.computed)(function () {
|
2728
2826
|
return datePanelLabel.value.labels[0].type === 'year' || state.currentView === 'date';
|
2729
2827
|
});
|
2730
|
-
var showLabelSecond = (0,
|
2828
|
+
var showLabelSecond = (0,external_vue_.computed)(function () {
|
2731
2829
|
return datePanelLabel.value.labels[1].type === 'year' || state.currentView === 'date';
|
2732
2830
|
});
|
2733
|
-
var isTime = (0,
|
2831
|
+
var isTime = (0,external_vue_.computed)(function () {
|
2734
2832
|
return state.currentView === 'time';
|
2735
2833
|
});
|
2736
2834
|
|
@@ -2738,10 +2836,10 @@ var datePanelProps = {
|
|
2738
2836
|
state.currentView = state.currentView === 'time' ? 'date' : 'time';
|
2739
2837
|
};
|
2740
2838
|
|
2741
|
-
var hasShortcuts = (0,
|
2839
|
+
var hasShortcuts = (0,external_vue_.computed)(function () {
|
2742
2840
|
return !!slots.shortcuts;
|
2743
2841
|
});
|
2744
|
-
var timeDisabled = (0,
|
2842
|
+
var timeDisabled = (0,external_vue_.computed)(function () {
|
2745
2843
|
return !state.dates[0];
|
2746
2844
|
});
|
2747
2845
|
|
@@ -2749,7 +2847,7 @@ var datePanelProps = {
|
|
2749
2847
|
emit('pick-click');
|
2750
2848
|
}
|
2751
2849
|
|
2752
|
-
return Object.assign(Object.assign({}, (0,
|
2850
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
2753
2851
|
panelPickerHandlers: panelPickerHandlers,
|
2754
2852
|
datePanelLabel: datePanelLabel,
|
2755
2853
|
showLabelFirst: showLabelFirst,
|
@@ -2775,81 +2873,81 @@ var datePanelProps = {
|
|
2775
2873
|
|
2776
2874
|
var _a, _b, _c;
|
2777
2875
|
|
2778
|
-
return (0,
|
2779
|
-
"class": [(0,
|
2876
|
+
return (0,external_vue_.createVNode)("div", {
|
2877
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-body-wrapper'), this.shortcuts.length || this.hasShortcuts ? (0,external_shared_.resolveClassName)('picker-panel-with-sidebar') : ''],
|
2780
2878
|
"onMousedown": function onMousedown(e) {
|
2781
2879
|
e.preventDefault();
|
2782
2880
|
}
|
2783
|
-
}, [this.shortcuts.length ? (0,
|
2881
|
+
}, [this.shortcuts.length ? (0,external_vue_.createVNode)("div", {
|
2784
2882
|
"class": "bk-picker-panel-sidebar"
|
2785
2883
|
}, [this.shortcuts.map(function (shortcut) {
|
2786
|
-
return (0,
|
2787
|
-
"class": (0,
|
2884
|
+
return (0,external_vue_.createVNode)("div", {
|
2885
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-shortcut'),
|
2788
2886
|
"onClick": function onClick() {
|
2789
2887
|
return _this2.handleShortcutClick(shortcut);
|
2790
2888
|
}
|
2791
2889
|
}, [shortcut.text]);
|
2792
|
-
})]) : '', (0,
|
2793
|
-
"class": (0,
|
2890
|
+
})]) : '', (0,external_vue_.createVNode)("div", {
|
2891
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-body'),
|
2794
2892
|
"style": "width: 261px;"
|
2795
|
-
}, [(0,
|
2796
|
-
"class": (0,
|
2797
|
-
}, [(0,
|
2893
|
+
}, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
2894
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header')
|
2895
|
+
}, [(0,external_vue_.createVNode)("span", {
|
2798
2896
|
"class": iconBtnCls('prev', '-double'),
|
2799
2897
|
"onClick": function onClick() {
|
2800
2898
|
return _this2.changeYear(-1);
|
2801
2899
|
}
|
2802
|
-
}, [(0,
|
2900
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleDoubleLeft, {
|
2803
2901
|
"style": {
|
2804
2902
|
fontSize: '20px',
|
2805
2903
|
lineHeight: 1
|
2806
2904
|
}
|
2807
|
-
}, null)]), this.pickerTable === 'date-table' ? (0,
|
2905
|
+
}, null)]), this.pickerTable === 'date-table' ? (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
2808
2906
|
"class": iconBtnCls('prev'),
|
2809
2907
|
"onClick": function onClick() {
|
2810
2908
|
return _this2.changeMonth(-1);
|
2811
2909
|
}
|
2812
|
-
}, [(0,
|
2910
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleLeft, {
|
2813
2911
|
"style": {
|
2814
2912
|
fontSize: '20px',
|
2815
2913
|
lineHeight: 1
|
2816
2914
|
}
|
2817
|
-
}, null)]), [[
|
2818
|
-
"class": (0,
|
2915
|
+
}, null)]), [[external_vue_.vShow, this.currentView === 'date']]) : '', this.datePanelLabel && Object.keys(this.datePanelLabel).length > 0 ? (0,external_vue_.createVNode)("span", null, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
2916
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header-label'),
|
2819
2917
|
"onClick": function onClick() {
|
2820
2918
|
return _this2.datePanelLabel.labels[0].handler;
|
2821
2919
|
}
|
2822
|
-
}, [this.datePanelLabel.labels[0].label]), [[
|
2823
|
-
"class": (0,
|
2920
|
+
}, [this.datePanelLabel.labels[0].label]), [[external_vue_.vShow, this.showLabelFirst]]), this.currentView === 'date' ? " ".concat(this.datePanelLabel.separator, " ") : ' ', (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
2921
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header-label'),
|
2824
2922
|
"onClick": function onClick() {
|
2825
2923
|
return _this2.datePanelLabel.labels[1].handler;
|
2826
2924
|
}
|
2827
|
-
}, [this.datePanelLabel.labels[1].label]), [[
|
2925
|
+
}, [this.datePanelLabel.labels[1].label]), [[external_vue_.vShow, this.showLabelSecond]])]) : '', (0,external_vue_.createVNode)("span", {
|
2828
2926
|
"class": iconBtnCls('next', '-double'),
|
2829
2927
|
"onClick": function onClick() {
|
2830
2928
|
return _this2.changeYear(+1);
|
2831
2929
|
}
|
2832
|
-
}, [(0,
|
2930
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleDoubleRight, {
|
2833
2931
|
"style": {
|
2834
2932
|
fontSize: '20px',
|
2835
2933
|
lineHeight: 1
|
2836
2934
|
}
|
2837
|
-
}, null)]), this.pickerTable === 'date-table' ? (0,
|
2935
|
+
}, null)]), this.pickerTable === 'date-table' ? (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
2838
2936
|
"class": iconBtnCls('next'),
|
2839
2937
|
"onClick": function onClick() {
|
2840
2938
|
return _this2.changeMonth(+1);
|
2841
2939
|
}
|
2842
|
-
}, [(0,
|
2940
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleRight, {
|
2843
2941
|
"style": {
|
2844
2942
|
fontSize: '20px',
|
2845
2943
|
lineHeight: 1
|
2846
2944
|
}
|
2847
|
-
}, null)]), [[
|
2848
|
-
"class": (0,
|
2945
|
+
}, null)]), [[external_vue_.vShow, this.currentView === 'date']]) : '']), [[external_vue_.vShow, this.currentView !== 'time']]), (0,external_vue_.createVNode)("div", {
|
2946
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-content')
|
2849
2947
|
}, [this.currentView !== 'time' ? function () {
|
2850
2948
|
switch (_this2.pickerTable) {
|
2851
2949
|
case 'date-table':
|
2852
|
-
return (0,
|
2950
|
+
return (0,external_vue_.createVNode)(date_table, {
|
2853
2951
|
"tableDate": _this2.panelDate,
|
2854
2952
|
"disabledDate": _this2.disabledDate,
|
2855
2953
|
"selectionMode": _this2.selectionMode,
|
@@ -2861,7 +2959,7 @@ var datePanelProps = {
|
|
2861
2959
|
default:
|
2862
2960
|
return null;
|
2863
2961
|
}
|
2864
|
-
}() : (0,
|
2962
|
+
}() : (0,external_vue_.createVNode)(time, {
|
2865
2963
|
"ref": "timePickerRef",
|
2866
2964
|
"value": this.dates,
|
2867
2965
|
"format": this.format,
|
@@ -2871,7 +2969,7 @@ var datePanelProps = {
|
|
2871
2969
|
"onPick-clear": this.handlePickClear,
|
2872
2970
|
"onPick-success": this.handlePickSuccess,
|
2873
2971
|
"onPick-toggle-time": this.handleToggleTime
|
2874
|
-
}, null)]), this.confirm ? (0,
|
2972
|
+
}, null)]), this.confirm ? (0,external_vue_.createVNode)(base_confirm, {
|
2875
2973
|
"clearable": this.clearable,
|
2876
2974
|
"showTime": this.showTime,
|
2877
2975
|
"timeDisabled": this.timeDisabled,
|
@@ -2879,8 +2977,8 @@ var datePanelProps = {
|
|
2879
2977
|
"onPick-toggle-time": this.handleToggleTime,
|
2880
2978
|
"onPick-clear": this.handlePickClear,
|
2881
2979
|
"onPick-success": this.handlePickSuccess
|
2882
|
-
}, this.$slots) : '']), this.hasShortcuts ? (0,
|
2883
|
-
"class": (0,
|
2980
|
+
}, this.$slots) : '']), this.hasShortcuts ? (0,external_vue_.createVNode)("div", {
|
2981
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-sidebar')
|
2884
2982
|
}, [(_c = (_b = (_a = this.$slots).shortcuts) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null]) : null]);
|
2885
2983
|
}
|
2886
2984
|
}));
|
@@ -2940,7 +3038,7 @@ var timeRangeProps = {
|
|
2940
3038
|
"default": false
|
2941
3039
|
}
|
2942
3040
|
};
|
2943
|
-
/* harmony default export */ const time_range = ((0,
|
3041
|
+
/* harmony default export */ const time_range = ((0,external_vue_.defineComponent)({
|
2944
3042
|
name: 'TimeRangePanel',
|
2945
3043
|
props: Object.assign(Object.assign(Object.assign({}, datePickerProps), timePanelProps), timeRangeProps),
|
2946
3044
|
emits: ['pick', 'pick-click'],
|
@@ -2952,22 +3050,22 @@ var timeRangeProps = {
|
|
2952
3050
|
dateStart = _props$value$slice2[0],
|
2953
3051
|
dateEnd = _props$value$slice2[1];
|
2954
3052
|
|
2955
|
-
var state = (0,
|
3053
|
+
var state = (0,external_vue_.reactive)({
|
2956
3054
|
showDate: false,
|
2957
3055
|
dateStart: dateStart || initTime(),
|
2958
3056
|
dateEnd: dateEnd || initTime()
|
2959
3057
|
});
|
2960
|
-
var parentProvide = (0,
|
2961
|
-
var showSeconds = (0,
|
3058
|
+
var parentProvide = (0,external_vue_.inject)(timePickerKey);
|
3059
|
+
var showSeconds = (0,external_vue_.computed)(function () {
|
2962
3060
|
return !(props.format || '').match(/mm$/);
|
2963
3061
|
});
|
2964
|
-
var leftDatePanelLabel = (0,
|
3062
|
+
var leftDatePanelLabel = (0,external_vue_.computed)(function () {
|
2965
3063
|
return src_fecha.format(parentProvide.dates[0], props.format);
|
2966
3064
|
});
|
2967
|
-
var rightDatePanelLabel = (0,
|
3065
|
+
var rightDatePanelLabel = (0,external_vue_.computed)(function () {
|
2968
3066
|
return src_fecha.format(parentProvide.dates[1], props.format);
|
2969
3067
|
});
|
2970
|
-
(0,
|
3068
|
+
(0,external_vue_.watch)(function () {
|
2971
3069
|
return props.value;
|
2972
3070
|
}, function (dates) {
|
2973
3071
|
var _dates$slice = dates.slice(),
|
@@ -2978,7 +3076,7 @@ var timeRangeProps = {
|
|
2978
3076
|
state.dateStart = dateStart || initTime();
|
2979
3077
|
state.dateEnd = dateEnd || initTime();
|
2980
3078
|
});
|
2981
|
-
(0,
|
3079
|
+
(0,external_vue_.onMounted)(function () {
|
2982
3080
|
if (parentProvide && parentProvide.parentName === 'DatePanel') {
|
2983
3081
|
state.showDate = true;
|
2984
3082
|
}
|
@@ -3036,10 +3134,10 @@ var timeRangeProps = {
|
|
3036
3134
|
var dateStart = new Date(state.dateStart);
|
3037
3135
|
var dateEnd = new Date(state.dateEnd);
|
3038
3136
|
Object.keys(start).forEach(function (type) {
|
3039
|
-
dateStart["set".concat((0,
|
3137
|
+
dateStart["set".concat((0,external_shared_.capitalize)(type))](start[type]);
|
3040
3138
|
});
|
3041
3139
|
Object.keys(end).forEach(function (type) {
|
3042
|
-
dateEnd["set".concat((0,
|
3140
|
+
dateEnd["set".concat((0,external_shared_.capitalize)(type))](end[type]);
|
3043
3141
|
});
|
3044
3142
|
|
3045
3143
|
if (!props.allowCrossDay && dateEnd < dateStart) {
|
@@ -3067,8 +3165,8 @@ var timeRangeProps = {
|
|
3067
3165
|
handleChange('end', {}, date);
|
3068
3166
|
}
|
3069
3167
|
|
3070
|
-
var timeSpinnerRef = (0,
|
3071
|
-
var timeSpinnerEndRef = (0,
|
3168
|
+
var timeSpinnerRef = (0,external_vue_.ref)(null);
|
3169
|
+
var timeSpinnerEndRef = (0,external_vue_.ref)(null);
|
3072
3170
|
|
3073
3171
|
function updateScroll() {
|
3074
3172
|
var _a, _b;
|
@@ -3077,7 +3175,7 @@ var timeRangeProps = {
|
|
3077
3175
|
(_b = timeSpinnerEndRef === null || timeSpinnerEndRef === void 0 ? void 0 : timeSpinnerEndRef.value) === null || _b === void 0 ? void 0 : _b.updateScroll();
|
3078
3176
|
}
|
3079
3177
|
|
3080
|
-
return Object.assign(Object.assign({}, (0,
|
3178
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
3081
3179
|
showSeconds: showSeconds,
|
3082
3180
|
leftDatePanelLabel: leftDatePanelLabel,
|
3083
3181
|
rightDatePanelLabel: rightDatePanelLabel,
|
@@ -3090,24 +3188,24 @@ var timeRangeProps = {
|
|
3090
3188
|
});
|
3091
3189
|
},
|
3092
3190
|
render: function render() {
|
3093
|
-
return (0,
|
3094
|
-
"class": [(0,
|
3191
|
+
return (0,external_vue_.createVNode)("div", {
|
3192
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-body-wrapper'), (0,external_shared_.resolveClassName)('time-picker-with-range'), this.showSeconds ? (0,external_shared_.resolveClassName)('time-picker-with-seconds') : ''],
|
3095
3193
|
"onMousedown": function onMousedown(e) {
|
3096
3194
|
e.preventDefault();
|
3097
3195
|
}
|
3098
|
-
}, [(0,
|
3099
|
-
"class": (0,
|
3196
|
+
}, [(0,external_vue_.createVNode)("div", {
|
3197
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-body'),
|
3100
3198
|
"style": {
|
3101
3199
|
width: "".concat(this.width * 2, "px")
|
3102
3200
|
}
|
3103
|
-
}, [(0,
|
3104
|
-
"class": [(0,
|
3201
|
+
}, [(0,external_vue_.createVNode)("div", {
|
3202
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-content', (0,external_shared_.resolveClassName)('picker-panel-content-left'))],
|
3105
3203
|
"style": {
|
3106
3204
|
width: "".concat(this.width, "px")
|
3107
3205
|
}
|
3108
|
-
}, [this.showDate ? (0,
|
3206
|
+
}, [this.showDate ? (0,external_vue_.createVNode)("div", {
|
3109
3207
|
"class": "bk-time-picker-header"
|
3110
|
-
}, [this.leftDatePanelLabel]) : '', (0,
|
3208
|
+
}, [this.leftDatePanelLabel]) : '', (0,external_vue_.createVNode)(time_spinner, {
|
3111
3209
|
"ref": "timeSpinnerRef",
|
3112
3210
|
"steps": this.steps,
|
3113
3211
|
"showSeconds": this.showSeconds,
|
@@ -3120,14 +3218,14 @@ var timeRangeProps = {
|
|
3120
3218
|
"hideDisabledOptions": this.hideDisabledOptions,
|
3121
3219
|
"onChange": this.handleStartChange,
|
3122
3220
|
"onPick-click": this.handlePickClick
|
3123
|
-
}, null)]), (0,
|
3124
|
-
"class": [(0,
|
3221
|
+
}, null)]), (0,external_vue_.createVNode)("div", {
|
3222
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-content'), (0,external_shared_.resolveClassName)('picker-panel-content-right')],
|
3125
3223
|
"style": {
|
3126
3224
|
width: "".concat(this.width, "px")
|
3127
3225
|
}
|
3128
|
-
}, [this.showDate ? (0,
|
3129
|
-
"class": (0,
|
3130
|
-
}, [this.rightDatePanelLabel]) : '', (0,
|
3226
|
+
}, [this.showDate ? (0,external_vue_.createVNode)("div", {
|
3227
|
+
"class": (0,external_shared_.resolveClassName)('time-picker-header')
|
3228
|
+
}, [this.rightDatePanelLabel]) : '', (0,external_vue_.createVNode)(time_spinner, {
|
3131
3229
|
"ref": "timeSpinnerEndRef",
|
3132
3230
|
"steps": this.steps,
|
3133
3231
|
"showSeconds": this.showSeconds,
|
@@ -3262,7 +3360,7 @@ var dateRangePanelProps = {
|
|
3262
3360
|
}
|
3263
3361
|
}
|
3264
3362
|
};
|
3265
|
-
/* harmony default export */ const date_range = ((0,
|
3363
|
+
/* harmony default export */ const date_range = ((0,external_vue_.defineComponent)({
|
3266
3364
|
name: 'DateRangePanel',
|
3267
3365
|
props: dateRangePanelProps,
|
3268
3366
|
emits: ['pick', 'pick-success', 'pick-clear', 'pick-click'],
|
@@ -3278,7 +3376,7 @@ var dateRangePanelProps = {
|
|
3278
3376
|
maxDate = _props$modelValue$map2[1];
|
3279
3377
|
|
3280
3378
|
var leftPanelDate = props.startDate ? props.startDate : minDate;
|
3281
|
-
var state = (0,
|
3379
|
+
var state = (0,external_vue_.reactive)({
|
3282
3380
|
currentView: props.selectionMode || 'date',
|
3283
3381
|
leftPickerTable: "".concat(props.selectionMode, "-table"),
|
3284
3382
|
rightPickerTable: "".concat(props.selectionMode, "-table"),
|
@@ -3297,10 +3395,10 @@ var dateRangePanelProps = {
|
|
3297
3395
|
|
3298
3396
|
});
|
3299
3397
|
|
3300
|
-
var _getCurrentInstance = (0,
|
3398
|
+
var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
|
3301
3399
|
proxy = _getCurrentInstance.proxy;
|
3302
3400
|
|
3303
|
-
(0,
|
3401
|
+
(0,external_vue_.provide)(timePickerKey, {
|
3304
3402
|
dates: state.dates,
|
3305
3403
|
parentName: proxy.$options.name
|
3306
3404
|
});
|
@@ -3319,8 +3417,8 @@ var dateRangePanelProps = {
|
|
3319
3417
|
state.rightPickerTable = "".concat(state.currentView, "-table");
|
3320
3418
|
};
|
3321
3419
|
|
3322
|
-
var timeSpinner = (0,
|
3323
|
-
var timeSpinnerEnd = (0,
|
3420
|
+
var timeSpinner = (0,external_vue_.ref)(null);
|
3421
|
+
var timeSpinnerEnd = (0,external_vue_.ref)(null);
|
3324
3422
|
|
3325
3423
|
var onToggleVisibility = function onToggleVisibility(open) {
|
3326
3424
|
var _a, _b;
|
@@ -3552,16 +3650,16 @@ var dateRangePanelProps = {
|
|
3552
3650
|
state.rightPanelDate = props.splitPanels ? new Date(Math.max(splitRightPanelDate, rightPanelDate.getTime())) : rightPanelDate;
|
3553
3651
|
}
|
3554
3652
|
|
3555
|
-
(0,
|
3653
|
+
(0,external_vue_.watch)(function () {
|
3556
3654
|
return props.selectionMode;
|
3557
3655
|
}, function (v) {
|
3558
3656
|
state.currentView = v || 'range';
|
3559
3657
|
});
|
3560
|
-
(0,
|
3658
|
+
(0,external_vue_.watch)(function () {
|
3561
3659
|
return props.modelValue;
|
3562
3660
|
}, function (newVal) {
|
3563
|
-
var minDate = newVal[0] ? (0,
|
3564
|
-
var maxDate = newVal[1] ? (0,
|
3661
|
+
var minDate = newVal[0] ? (0,external_date_fns_.toDate)(newVal[0]) : null;
|
3662
|
+
var maxDate = newVal[1] ? (0,external_date_fns_.toDate)(newVal[1]) : null;
|
3565
3663
|
state.dates = [minDate, maxDate].sort(dateSorter);
|
3566
3664
|
state.rangeState = {
|
3567
3665
|
from: state.dates[0],
|
@@ -3570,7 +3668,7 @@ var dateRangePanelProps = {
|
|
3570
3668
|
};
|
3571
3669
|
setPanelDates(props.startDate || state.dates[0] || new Date());
|
3572
3670
|
});
|
3573
|
-
(0,
|
3671
|
+
(0,external_vue_.watch)(function () {
|
3574
3672
|
return state.currentView;
|
3575
3673
|
}, function (v) {
|
3576
3674
|
var leftMonth = state.leftPanelDate.getMonth();
|
@@ -3590,52 +3688,52 @@ var dateRangePanelProps = {
|
|
3590
3688
|
}
|
3591
3689
|
|
3592
3690
|
if (state.currentView === 'time') {
|
3593
|
-
(0,
|
3691
|
+
(0,external_vue_.nextTick)(function () {
|
3594
3692
|
timePickerRef.value.updateScroll();
|
3595
3693
|
});
|
3596
3694
|
}
|
3597
3695
|
});
|
3598
|
-
var isTime = (0,
|
3696
|
+
var isTime = (0,external_vue_.computed)(function () {
|
3599
3697
|
return state.currentView === 'time';
|
3600
3698
|
});
|
3601
|
-
var leftDatePanelLabel = (0,
|
3699
|
+
var leftDatePanelLabel = (0,external_vue_.computed)(function () {
|
3602
3700
|
return panelLabelConfig('left');
|
3603
3701
|
});
|
3604
|
-
var rightDatePanelLabel = (0,
|
3702
|
+
var rightDatePanelLabel = (0,external_vue_.computed)(function () {
|
3605
3703
|
return panelLabelConfig('right');
|
3606
3704
|
});
|
3607
|
-
var leftDatePanelView = (0,
|
3705
|
+
var leftDatePanelView = (0,external_vue_.computed)(function () {
|
3608
3706
|
return state.leftPickerTable.split('-').shift();
|
3609
3707
|
});
|
3610
|
-
var rightDatePanelView = (0,
|
3708
|
+
var rightDatePanelView = (0,external_vue_.computed)(function () {
|
3611
3709
|
return state.rightPickerTable.split('-').shift();
|
3612
3710
|
});
|
3613
|
-
var leftShowLabelFirst = (0,
|
3711
|
+
var leftShowLabelFirst = (0,external_vue_.computed)(function () {
|
3614
3712
|
return leftDatePanelLabel.value.labels[0].type === 'year' || state.currentView === 'date';
|
3615
3713
|
});
|
3616
|
-
var leftShowLabelSecond = (0,
|
3714
|
+
var leftShowLabelSecond = (0,external_vue_.computed)(function () {
|
3617
3715
|
return leftDatePanelLabel.value.labels[1].type === 'year' || state.currentView === 'date';
|
3618
3716
|
});
|
3619
|
-
var rightShowLabelFirst = (0,
|
3717
|
+
var rightShowLabelFirst = (0,external_vue_.computed)(function () {
|
3620
3718
|
return rightDatePanelLabel.value.labels[0].type === 'year' || state.currentView === 'date';
|
3621
3719
|
});
|
3622
|
-
var rightShowLabelSecond = (0,
|
3720
|
+
var rightShowLabelSecond = (0,external_vue_.computed)(function () {
|
3623
3721
|
return rightDatePanelLabel.value.labels[1].type === 'year' || state.currentView === 'date';
|
3624
3722
|
});
|
3625
|
-
var preSelecting = (0,
|
3723
|
+
var preSelecting = (0,external_vue_.computed)(function () {
|
3626
3724
|
var tableType = "".concat(state.currentView, "-table");
|
3627
3725
|
return {
|
3628
3726
|
left: state.leftPickerTable !== tableType,
|
3629
3727
|
right: state.rightPickerTable !== tableType
|
3630
3728
|
};
|
3631
3729
|
});
|
3632
|
-
var panelPickerHandlers = (0,
|
3730
|
+
var panelPickerHandlers = (0,external_vue_.computed)(function () {
|
3633
3731
|
return {
|
3634
3732
|
left: preSelecting.value.left ? handlePreSelection.bind('left') : handleRangePick,
|
3635
3733
|
right: preSelecting.value.right ? handlePreSelection.bind('right') : handleRangePick
|
3636
3734
|
};
|
3637
3735
|
});
|
3638
|
-
var hasShortcuts = (0,
|
3736
|
+
var hasShortcuts = (0,external_vue_.computed)(function () {
|
3639
3737
|
var _a;
|
3640
3738
|
|
3641
3739
|
return slots.shortcuts || ((_a = props.shortcuts) === null || _a === void 0 ? void 0 : _a.length);
|
@@ -3665,11 +3763,11 @@ var dateRangePanelProps = {
|
|
3665
3763
|
emit('pick-click');
|
3666
3764
|
}
|
3667
3765
|
|
3668
|
-
var timeDisabled = (0,
|
3766
|
+
var timeDisabled = (0,external_vue_.computed)(function () {
|
3669
3767
|
return !(state.dates[0] && state.dates[1]);
|
3670
3768
|
});
|
3671
|
-
var timePickerRef = (0,
|
3672
|
-
return Object.assign(Object.assign({}, (0,
|
3769
|
+
var timePickerRef = (0,external_vue_.ref)(null);
|
3770
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
3673
3771
|
isTime: isTime,
|
3674
3772
|
hasShortcuts: hasShortcuts,
|
3675
3773
|
prevYear: prevYear,
|
@@ -3711,10 +3809,10 @@ var dateRangePanelProps = {
|
|
3711
3809
|
inner = typeof this.$slots.shortcuts === 'function' ? this.$slots.shortcuts() : this.$slots.shortcuts;
|
3712
3810
|
} else {
|
3713
3811
|
if (this.shortcuts.length) {
|
3714
|
-
inner = (0,
|
3715
|
-
"class": (0,
|
3812
|
+
inner = (0,external_vue_.createVNode)("div", {
|
3813
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-shortcuts')
|
3716
3814
|
}, [this.shortcuts.map(function (item, index) {
|
3717
|
-
return (0,
|
3815
|
+
return (0,external_vue_.createVNode)("div", {
|
3718
3816
|
"key": index,
|
3719
3817
|
"class": 'shortcuts-item',
|
3720
3818
|
"onClick": function onClick() {
|
@@ -3725,77 +3823,77 @@ var dateRangePanelProps = {
|
|
3725
3823
|
}
|
3726
3824
|
}
|
3727
3825
|
|
3728
|
-
shortcuts = (0,
|
3729
|
-
"class": (0,
|
3826
|
+
shortcuts = (0,external_vue_.createVNode)("div", {
|
3827
|
+
"class": (0,external_shared_.resolveClassName)('picker-panel-sidebar')
|
3730
3828
|
}, [inner]);
|
3731
3829
|
}
|
3732
3830
|
|
3733
|
-
return (0,
|
3734
|
-
"class": [(0,
|
3831
|
+
return (0,external_vue_.createVNode)("div", {
|
3832
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-body-wrapper'), (0,external_shared_.resolveClassName)('date-picker-with-range'), this.shortcuts.length || this.$slots.shortcuts ? (0,external_shared_.resolveClassName)('picker-panel-with-sidebar') : ''],
|
3735
3833
|
"onMousedown": function onMousedown(e) {
|
3736
3834
|
e.preventDefault();
|
3737
3835
|
}
|
3738
|
-
}, [(0,
|
3739
|
-
"class": [(0,
|
3740
|
-
}, [(0,
|
3741
|
-
"class": [(0,
|
3836
|
+
}, [(0,external_vue_.createVNode)("div", {
|
3837
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-body'), this.showTime ? (0,external_shared_.resolveClassName)('picker-panel-body-time') : (0,external_shared_.resolveClassName)('picker-panel-body-date')]
|
3838
|
+
}, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
3839
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-content'), (0,external_shared_.resolveClassName)('picker-panel-content-left')],
|
3742
3840
|
"style": 'width: 261px;'
|
3743
|
-
}, [(0,
|
3744
|
-
"class": (0,
|
3745
|
-
}, [(0,
|
3841
|
+
}, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
3842
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header')
|
3843
|
+
}, [(0,external_vue_.createVNode)("span", {
|
3746
3844
|
"class": iconBtnCls('prev', '-double'),
|
3747
3845
|
"onClick": function onClick() {
|
3748
3846
|
return _this.prevYear('left');
|
3749
3847
|
}
|
3750
|
-
}, [(0,
|
3848
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleDoubleLeft, {
|
3751
3849
|
"style": {
|
3752
3850
|
fontSize: '20px',
|
3753
3851
|
lineHeight: 1
|
3754
3852
|
}
|
3755
|
-
}, null)]), this.leftPickerTable === 'date-table' ? (0,
|
3853
|
+
}, null)]), this.leftPickerTable === 'date-table' ? (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3756
3854
|
"class": iconBtnCls('prev'),
|
3757
3855
|
"onClick": function onClick() {
|
3758
3856
|
return _this.prevMonth('left');
|
3759
3857
|
}
|
3760
|
-
}, [(0,
|
3858
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleLeft, {
|
3761
3859
|
"style": {
|
3762
3860
|
fontSize: '20px',
|
3763
3861
|
lineHeight: 1
|
3764
3862
|
}
|
3765
|
-
}, null)]), [[
|
3766
|
-
"class": (0,
|
3863
|
+
}, null)]), [[external_vue_.vShow, this.currentView === 'date']]) : '', this.leftDatePanelLabel && Object.keys(this.leftDatePanelLabel).length > 0 ? (0,external_vue_.createVNode)("span", null, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3864
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header-label'),
|
3767
3865
|
"onClick": function onClick() {
|
3768
3866
|
return _this.leftDatePanelLabel.labels[0].handler;
|
3769
3867
|
}
|
3770
|
-
}, [this.leftDatePanelLabel.labels[0].label]), [[
|
3771
|
-
"class": (0,
|
3868
|
+
}, [this.leftDatePanelLabel.labels[0].label]), [[external_vue_.vShow, this.leftShowLabelFirst]]), this.leftDatePanelView === 'date' ? " ".concat(this.leftDatePanelLabel.separator, " ") : ' ', (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3869
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header-label'),
|
3772
3870
|
"onClick": function onClick() {
|
3773
3871
|
return _this.leftDatePanelLabel.labels[1].handler;
|
3774
3872
|
}
|
3775
|
-
}, [this.leftDatePanelLabel.labels[1].label]), [[
|
3873
|
+
}, [this.leftDatePanelLabel.labels[1].label]), [[external_vue_.vShow, this.leftShowLabelSecond]])]) : '', this.splitPanels || this.leftPickerTable !== 'date-table' ? (0,external_vue_.createVNode)("span", {
|
3776
3874
|
"class": iconBtnCls('next', '-double'),
|
3777
3875
|
"onClick": function onClick() {
|
3778
3876
|
return _this.nextYear('left');
|
3779
3877
|
}
|
3780
|
-
}, [(0,
|
3878
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleDoubleRight, {
|
3781
3879
|
"style": {
|
3782
3880
|
fontSize: '20px',
|
3783
3881
|
lineHeight: 1
|
3784
3882
|
}
|
3785
|
-
}, null)]) : '', this.splitPanels || this.leftPickerTable === 'date-table' ? (0,
|
3883
|
+
}, null)]) : '', this.splitPanels || this.leftPickerTable === 'date-table' ? (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3786
3884
|
"class": iconBtnCls('next'),
|
3787
3885
|
"onClick": function onClick() {
|
3788
3886
|
return _this.nextMonth('left');
|
3789
3887
|
}
|
3790
|
-
}, [(0,
|
3888
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleRight, {
|
3791
3889
|
"style": {
|
3792
3890
|
fontSize: '20px',
|
3793
3891
|
lineHeight: 1
|
3794
3892
|
}
|
3795
|
-
}, null)]), [[
|
3893
|
+
}, null)]), [[external_vue_.vShow, this.currentView === 'date']]) : '']), [[external_vue_.vShow, this.currentView !== 'time']]), this.currentView !== 'time' ? function () {
|
3796
3894
|
switch (_this.leftPickerTable) {
|
3797
3895
|
case 'date-table':
|
3798
|
-
return (0,
|
3896
|
+
return (0,external_vue_.createVNode)(date_table, {
|
3799
3897
|
"selectionMode": 'range',
|
3800
3898
|
"tableDate": _this.leftPanelDate,
|
3801
3899
|
"disabledDate": _this.disabledDate,
|
@@ -3809,78 +3907,78 @@ var dateRangePanelProps = {
|
|
3809
3907
|
default:
|
3810
3908
|
return null;
|
3811
3909
|
}
|
3812
|
-
}() : '']), [[
|
3813
|
-
"class": [(0,
|
3910
|
+
}() : '']), [[external_vue_.vShow, !this.isTime]]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
3911
|
+
"class": [(0,external_shared_.resolveClassName)('picker-panel-content'), (0,external_shared_.resolveClassName)('picker-panel-content-right')],
|
3814
3912
|
"style": 'width: 261px;'
|
3815
|
-
}, [(0,
|
3816
|
-
"class": (0,
|
3817
|
-
}, [this.splitPanels || this.rightPickerTable !== 'date-table' ? (0,
|
3913
|
+
}, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
3914
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header')
|
3915
|
+
}, [this.splitPanels || this.rightPickerTable !== 'date-table' ? (0,external_vue_.createVNode)("span", {
|
3818
3916
|
"class": iconBtnCls('prev', '-double'),
|
3819
3917
|
"onClick": function onClick() {
|
3820
3918
|
return _this.prevYear('right');
|
3821
3919
|
}
|
3822
|
-
}, [(0,
|
3920
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleDoubleLeft, {
|
3823
3921
|
"style": {
|
3824
3922
|
fontSize: '20px',
|
3825
3923
|
lineHeight: 1
|
3826
3924
|
}
|
3827
|
-
}, null)]) : '', this.splitPanels && this.rightPickerTable === 'date-table' ? (0,
|
3925
|
+
}, null)]) : '', this.splitPanels && this.rightPickerTable === 'date-table' ? (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3828
3926
|
"class": iconBtnCls('prev', '-double'),
|
3829
3927
|
"onClick": function onClick() {
|
3830
3928
|
return _this.prevMonth('right');
|
3831
3929
|
}
|
3832
|
-
}, [(0,
|
3930
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleLeft, {
|
3833
3931
|
"style": {
|
3834
3932
|
fontSize: '20px',
|
3835
3933
|
lineHeight: 1
|
3836
3934
|
}
|
3837
|
-
}, null)]), [[
|
3838
|
-
"class": (0,
|
3935
|
+
}, null)]), [[external_vue_.vShow, this.currentView === 'date']]) : '', this.rightDatePanelLabel && Object.keys(this.rightDatePanelLabel).length > 0 ? (0,external_vue_.createVNode)("span", null, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3936
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header-label'),
|
3839
3937
|
"onClick": function onClick() {
|
3840
3938
|
return _this.rightDatePanelLabel.labels[0].handler;
|
3841
3939
|
}
|
3842
|
-
}, [this.rightDatePanelLabel.labels[0].label]), [[
|
3843
|
-
"class": (0,
|
3940
|
+
}, [this.rightDatePanelLabel.labels[0].label]), [[external_vue_.vShow, this.rightShowLabelFirst]]), this.rightDatePanelView === 'date' ? " ".concat(this.rightDatePanelLabel.separator, " ") : ' ', (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3941
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-header-label'),
|
3844
3942
|
"onClick": function onClick() {
|
3845
3943
|
return _this.rightDatePanelLabel.labels[1].handler;
|
3846
3944
|
}
|
3847
|
-
}, [this.rightDatePanelLabel.labels[1].label]), [[
|
3945
|
+
}, [this.rightDatePanelLabel.labels[1].label]), [[external_vue_.vShow, this.rightShowLabelSecond]])]) : '', this.upToNow ? function () {
|
3848
3946
|
if ((_this.rangeState.selecting || _this.currentView === 'time') && _this.upToNowEnable) {
|
3849
|
-
return (0,
|
3947
|
+
return (0,external_vue_.createVNode)("span", {
|
3850
3948
|
"class": 'up-to-now',
|
3851
3949
|
"onClick": function onClick() {
|
3852
3950
|
return _this.handleRangePick(new Date(), 'upToNow');
|
3853
3951
|
}
|
3854
|
-
}, [(0,
|
3952
|
+
}, [(0,external_vue_.createTextVNode)("\u81F3\u4ECA")]);
|
3855
3953
|
}
|
3856
3954
|
|
3857
|
-
return (0,
|
3955
|
+
return (0,external_vue_.createVNode)("span", {
|
3858
3956
|
"class": 'up-to-now disabled'
|
3859
|
-
}, [(0,
|
3860
|
-
}() : '', (0,
|
3957
|
+
}, [(0,external_vue_.createTextVNode)("\u81F3\u4ECA")]);
|
3958
|
+
}() : '', (0,external_vue_.createVNode)("span", {
|
3861
3959
|
"class": iconBtnCls('next', '-double'),
|
3862
3960
|
"onClick": function onClick() {
|
3863
3961
|
return _this.nextYear('right');
|
3864
3962
|
}
|
3865
|
-
}, [(0,
|
3963
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleDoubleRight, {
|
3866
3964
|
"style": {
|
3867
3965
|
fontSize: '20px',
|
3868
3966
|
lineHeight: 1
|
3869
3967
|
}
|
3870
|
-
}, null)]), this.rightPickerTable === 'date-table' ? (0,
|
3968
|
+
}, null)]), this.rightPickerTable === 'date-table' ? (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
3871
3969
|
"class": iconBtnCls('next'),
|
3872
3970
|
"onClick": function onClick() {
|
3873
3971
|
return _this.nextMonth('right');
|
3874
3972
|
}
|
3875
|
-
}, [(0,
|
3973
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleRight, {
|
3876
3974
|
"style": {
|
3877
3975
|
fontSize: '20px',
|
3878
3976
|
lineHeight: 1
|
3879
3977
|
}
|
3880
|
-
}, null)]), [[
|
3978
|
+
}, null)]), [[external_vue_.vShow, this.currentView === 'date']]) : '']), [[external_vue_.vShow, this.currentView !== 'time']]), this.currentView !== 'time' ? function () {
|
3881
3979
|
switch (_this.rightPickerTable) {
|
3882
3980
|
case 'date-table':
|
3883
|
-
return (0,
|
3981
|
+
return (0,external_vue_.createVNode)(date_table, {
|
3884
3982
|
"selectionMode": 'range',
|
3885
3983
|
"tableDate": _this.rightPanelDate,
|
3886
3984
|
"disabledDate": _this.disabledDate,
|
@@ -3894,7 +3992,7 @@ var dateRangePanelProps = {
|
|
3894
3992
|
default:
|
3895
3993
|
return null;
|
3896
3994
|
}
|
3897
|
-
}() : '']), [[
|
3995
|
+
}() : '']), [[external_vue_.vShow, !this.isTime]]), this.isTime ? (0,external_vue_.createVNode)(time_range, {
|
3898
3996
|
"ref": "timePickerRef",
|
3899
3997
|
"value": this.dates,
|
3900
3998
|
"format": this.format,
|
@@ -3904,7 +4002,7 @@ var dateRangePanelProps = {
|
|
3904
4002
|
"onPick-clear": this.handlePickClear,
|
3905
4003
|
"onPick-success": this.handlePickSuccess,
|
3906
4004
|
"onPick-toggle-time": this.handleToggleTime
|
3907
|
-
}, null) : '', this.confirm ? (0,
|
4005
|
+
}, null) : '', this.confirm ? (0,external_vue_.createVNode)(base_confirm, {
|
3908
4006
|
"clearable": this.clearable,
|
3909
4007
|
"showTime": this.showTime,
|
3910
4008
|
"timeDisabled": this.timeDisabled,
|
@@ -3955,10 +4053,10 @@ var dateRangePanelProps = {
|
|
3955
4053
|
|
3956
4054
|
|
3957
4055
|
|
3958
|
-
/* harmony default export */ const date_picker = ((0,
|
4056
|
+
/* harmony default export */ const date_picker = ((0,external_vue_.defineComponent)({
|
3959
4057
|
name: 'DatePicker',
|
3960
4058
|
directives: {
|
3961
|
-
clickoutside:
|
4059
|
+
clickoutside: external_directives_.clickoutside
|
3962
4060
|
},
|
3963
4061
|
props: datePickerProps,
|
3964
4062
|
emits: ['open-change', 'input', 'change', 'update:modelValue', 'clear', 'shortcut-change', 'pick-success'],
|
@@ -3966,7 +4064,7 @@ var dateRangePanelProps = {
|
|
3966
4064
|
setup: function setup(props, _ref) {
|
3967
4065
|
var slots = _ref.slots,
|
3968
4066
|
emit = _ref.emit;
|
3969
|
-
var formItem = (0,
|
4067
|
+
var formItem = (0,external_shared_.useFormItem)();
|
3970
4068
|
var isRange = props.type.includes('range');
|
3971
4069
|
var emptyArray = isRange ? [null, null] : [null];
|
3972
4070
|
var initialArr = isRange ? props.value || props.modelValue : [props.value || props.modelValue];
|
@@ -3981,7 +4079,7 @@ var dateRangePanelProps = {
|
|
3981
4079
|
}
|
3982
4080
|
}
|
3983
4081
|
|
3984
|
-
var state = (0,
|
4082
|
+
var state = (0,external_vue_.reactive)({
|
3985
4083
|
showClose: false,
|
3986
4084
|
visible: false,
|
3987
4085
|
internalValue: initialValue,
|
@@ -4016,7 +4114,7 @@ var dateRangePanelProps = {
|
|
4016
4114
|
}
|
4017
4115
|
|
4018
4116
|
;
|
4019
|
-
var publicVModelValue = (0,
|
4117
|
+
var publicVModelValue = (0,external_vue_.computed)(function () {
|
4020
4118
|
if (props.multiple) {
|
4021
4119
|
return state.internalValue.slice();
|
4022
4120
|
}
|
@@ -4034,7 +4132,7 @@ var dateRangePanelProps = {
|
|
4034
4132
|
|
4035
4133
|
return isRange || props.multiple ? val : val[0];
|
4036
4134
|
});
|
4037
|
-
var publicStringValue = (0,
|
4135
|
+
var publicStringValue = (0,external_vue_.computed)(function () {
|
4038
4136
|
if (props.type.match(/^time/)) {
|
4039
4137
|
return publicVModelValue.value;
|
4040
4138
|
}
|
@@ -4047,17 +4145,17 @@ var dateRangePanelProps = {
|
|
4047
4145
|
return formatDate(v, props.type, props.multiple, props.format);
|
4048
4146
|
}) : formatDate(publicVModelValue.value, props.type, props.multiple, props.format);
|
4049
4147
|
});
|
4050
|
-
var panel = (0,
|
4148
|
+
var panel = (0,external_vue_.computed)(function () {
|
4051
4149
|
var isRange = props.type === 'daterange' || props.type === 'datetimerange';
|
4052
4150
|
return isRange ? 'DateRangePanel' : 'DatePanel';
|
4053
4151
|
});
|
4054
|
-
var opened = (0,
|
4152
|
+
var opened = (0,external_vue_.computed)(function () {
|
4055
4153
|
return props.open === null ? state.visible : props.open;
|
4056
4154
|
});
|
4057
|
-
var visualValue = (0,
|
4155
|
+
var visualValue = (0,external_vue_.computed)(function () {
|
4058
4156
|
return formatDate(state.internalValue, props.type, props.multiple, props.format);
|
4059
4157
|
});
|
4060
|
-
var displayValue = (0,
|
4158
|
+
var displayValue = (0,external_vue_.computed)(function () {
|
4061
4159
|
var _a; // 展示快捷文案
|
4062
4160
|
|
4063
4161
|
|
@@ -4067,22 +4165,22 @@ var dateRangePanelProps = {
|
|
4067
4165
|
|
4068
4166
|
return visualValue.value;
|
4069
4167
|
});
|
4070
|
-
var isConfirm = (0,
|
4168
|
+
var isConfirm = (0,external_vue_.computed)(function () {
|
4071
4169
|
return !!slots.trigger || props.type === 'datetime' || props.type === 'datetimerange' || props.multiple;
|
4072
4170
|
});
|
4073
|
-
var hasHeader = (0,
|
4171
|
+
var hasHeader = (0,external_vue_.computed)(function () {
|
4074
4172
|
return !!slots.header;
|
4075
4173
|
});
|
4076
|
-
var hasFooter = (0,
|
4174
|
+
var hasFooter = (0,external_vue_.computed)(function () {
|
4077
4175
|
return !!slots.footer;
|
4078
4176
|
});
|
4079
|
-
var hasShortcuts = (0,
|
4177
|
+
var hasShortcuts = (0,external_vue_.computed)(function () {
|
4080
4178
|
return !!slots.shortcuts;
|
4081
4179
|
});
|
4082
|
-
var hasConfirm = (0,
|
4180
|
+
var hasConfirm = (0,external_vue_.computed)(function () {
|
4083
4181
|
return !!slots.confirm;
|
4084
4182
|
});
|
4085
|
-
var fontSizeCls = (0,
|
4183
|
+
var fontSizeCls = (0,external_vue_.computed)(function () {
|
4086
4184
|
var cls = '';
|
4087
4185
|
|
4088
4186
|
if (props.fontSize === 'medium') {
|
@@ -4093,7 +4191,7 @@ var dateRangePanelProps = {
|
|
4093
4191
|
|
4094
4192
|
return cls;
|
4095
4193
|
});
|
4096
|
-
var longWidthCls = (0,
|
4194
|
+
var longWidthCls = (0,external_vue_.computed)(function () {
|
4097
4195
|
var cls = '';
|
4098
4196
|
|
4099
4197
|
if (props.fontSize === 'medium') {
|
@@ -4104,7 +4202,7 @@ var dateRangePanelProps = {
|
|
4104
4202
|
|
4105
4203
|
return cls;
|
4106
4204
|
});
|
4107
|
-
var localReadonly = (0,
|
4205
|
+
var localReadonly = (0,external_vue_.computed)(function () {
|
4108
4206
|
var _a; // 如果当前使用快捷选择,且配置展示快捷文案,则输入框不允许编辑
|
4109
4207
|
|
4110
4208
|
|
@@ -4114,14 +4212,14 @@ var dateRangePanelProps = {
|
|
4114
4212
|
|
4115
4213
|
return !props.editable || props.readonly;
|
4116
4214
|
});
|
4117
|
-
var ownPickerProps = (0,
|
4215
|
+
var ownPickerProps = (0,external_vue_.computed)(function () {
|
4118
4216
|
return props.options;
|
4119
4217
|
}); // 限制 allow-cross-day 属性只在 time-picker 组件 type 为 timerange 时生效
|
4120
4218
|
|
4121
|
-
var allowCrossDayProp = (0,
|
4219
|
+
var allowCrossDayProp = (0,external_vue_.computed)(function () {
|
4122
4220
|
return panel.value === 'RangeTimePickerPanel' ? props.allowCrossDay : false;
|
4123
4221
|
});
|
4124
|
-
var inputRef = (0,
|
4222
|
+
var inputRef = (0,external_vue_.ref)(null);
|
4125
4223
|
|
4126
4224
|
var inputFocus = function inputFocus() {
|
4127
4225
|
var _a;
|
@@ -4129,7 +4227,7 @@ var dateRangePanelProps = {
|
|
4129
4227
|
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.value) === null || _a === void 0 ? void 0 : _a.focus();
|
4130
4228
|
};
|
4131
4229
|
|
4132
|
-
(0,
|
4230
|
+
(0,external_vue_.watch)(function () {
|
4133
4231
|
return state.visible;
|
4134
4232
|
}, function (visible) {
|
4135
4233
|
var _a, _b;
|
@@ -4145,8 +4243,8 @@ var dateRangePanelProps = {
|
|
4145
4243
|
|
4146
4244
|
emit('open-change', visible);
|
4147
4245
|
});
|
4148
|
-
var pickerDropdownRef = (0,
|
4149
|
-
(0,
|
4246
|
+
var pickerDropdownRef = (0,external_vue_.ref)(null);
|
4247
|
+
(0,external_vue_.watch)(function () {
|
4150
4248
|
return props.modelValue;
|
4151
4249
|
}, function (modelValue) {
|
4152
4250
|
var _a;
|
@@ -4157,17 +4255,17 @@ var dateRangePanelProps = {
|
|
4157
4255
|
(_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
|
4158
4256
|
}
|
4159
4257
|
});
|
4160
|
-
(0,
|
4258
|
+
(0,external_vue_.watch)(function () {
|
4161
4259
|
return props.open;
|
4162
4260
|
}, function (open) {
|
4163
4261
|
state.visible = open === true;
|
4164
4262
|
});
|
4165
|
-
(0,
|
4263
|
+
(0,external_vue_.watch)(function () {
|
4166
4264
|
return props.type;
|
4167
4265
|
}, function (type) {
|
4168
4266
|
onSelectionModeChange(type);
|
4169
4267
|
});
|
4170
|
-
(0,
|
4268
|
+
(0,external_vue_.watch)(function () {
|
4171
4269
|
return publicVModelValue;
|
4172
4270
|
}, function (now, before) {
|
4173
4271
|
var newValue = JSON.stringify(now);
|
@@ -4179,7 +4277,7 @@ var dateRangePanelProps = {
|
|
4179
4277
|
emit('input', now);
|
4180
4278
|
}
|
4181
4279
|
});
|
4182
|
-
(0,
|
4280
|
+
(0,external_vue_.onMounted)(function () {
|
4183
4281
|
// 如果是 date-picker 那么 time-picker 就是回车模式
|
4184
4282
|
if (props.type.indexOf('date') > -1) {
|
4185
4283
|
state.timeEnterMode = true;
|
@@ -4201,14 +4299,14 @@ var dateRangePanelProps = {
|
|
4201
4299
|
} // this.$on('focus-input', () => this.focus())
|
4202
4300
|
|
4203
4301
|
|
4204
|
-
(0,
|
4302
|
+
(0,external_vue_.provide)(datePickerKey, {
|
4205
4303
|
props: props,
|
4206
4304
|
focus: function focus() {
|
4207
4305
|
return inputFocus();
|
4208
4306
|
}
|
4209
4307
|
});
|
4210
4308
|
});
|
4211
|
-
var pickerPanelRef = (0,
|
4309
|
+
var pickerPanelRef = (0,external_vue_.ref)(null);
|
4212
4310
|
|
4213
4311
|
var handleClose = function handleClose(e) {
|
4214
4312
|
var _a;
|
@@ -4266,7 +4364,7 @@ var dateRangePanelProps = {
|
|
4266
4364
|
};
|
4267
4365
|
|
4268
4366
|
var emitChange = function emitChange(type) {
|
4269
|
-
(0,
|
4367
|
+
(0,external_vue_.nextTick)(function () {
|
4270
4368
|
var _a; // 使用 :value 或 :model-value 的时候才需要 handleChange,此时没有触发 update:modelValue
|
4271
4369
|
// 使用 v-model 时才会触发 update:modelValue 事件
|
4272
4370
|
|
@@ -4353,7 +4451,7 @@ var dateRangePanelProps = {
|
|
4353
4451
|
e.preventDefault();
|
4354
4452
|
|
4355
4453
|
if (isConfirm.value) {
|
4356
|
-
var selector = ".".concat((0,
|
4454
|
+
var selector = ".".concat((0,external_shared_.resolveClassName)('picker-confirm'), " > *");
|
4357
4455
|
var tabbable = pickerDropdownRef.value.$el.querySelectorAll(selector);
|
4358
4456
|
state.internalFocus = true;
|
4359
4457
|
|
@@ -4430,7 +4528,7 @@ var dateRangePanelProps = {
|
|
4430
4528
|
state.visible = false; // 点击 shortcuts 会关闭弹层时,如果不在 nextTick 里触发 pick-success,那么会导致触发 pick-success 的时候,
|
4431
4529
|
// v-model 的值还是之前的值
|
4432
4530
|
|
4433
|
-
(0,
|
4531
|
+
(0,external_vue_.nextTick)(function () {
|
4434
4532
|
emit('pick-success');
|
4435
4533
|
});
|
4436
4534
|
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.value) === null || _a === void 0 ? void 0 : _a.blur();
|
@@ -4494,7 +4592,7 @@ var dateRangePanelProps = {
|
|
4494
4592
|
emit('shortcut-change', state.shortcut, shortcutIndex);
|
4495
4593
|
};
|
4496
4594
|
|
4497
|
-
var triggerRef = (0,
|
4595
|
+
var triggerRef = (0,external_vue_.ref)(null);
|
4498
4596
|
|
4499
4597
|
var handleToggleTime = function handleToggleTime() {
|
4500
4598
|
var _a, _b;
|
@@ -4502,7 +4600,7 @@ var dateRangePanelProps = {
|
|
4502
4600
|
(_b = (_a = pickerPanelRef.value).handleToggleTime) === null || _b === void 0 ? void 0 : _b.call(_a);
|
4503
4601
|
};
|
4504
4602
|
|
4505
|
-
return Object.assign(Object.assign({}, (0,
|
4603
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
4506
4604
|
panel: panel,
|
4507
4605
|
publicStringValue: publicStringValue,
|
4508
4606
|
opened: opened,
|
@@ -4541,56 +4639,56 @@ var dateRangePanelProps = {
|
|
4541
4639
|
|
4542
4640
|
var _a, _b, _c, _d, _f, _g, _h, _j, _k;
|
4543
4641
|
|
4544
|
-
var defaultTrigger = (0,
|
4642
|
+
var defaultTrigger = (0,external_vue_.createVNode)("div", null, [(0,external_vue_.createVNode)("span", {
|
4545
4643
|
"class": ['icon-wrapper', this.disabled ? 'disabled' : ''],
|
4546
4644
|
"onClick": this.handleIconClick
|
4547
|
-
}, [this.type === 'time' || this.type === 'timerange' ? (0,
|
4645
|
+
}, [this.type === 'time' || this.type === 'timerange' ? (0,external_vue_.createVNode)("svg", {
|
4548
4646
|
"class": 'picker-icon',
|
4549
4647
|
"x": '0px',
|
4550
4648
|
"y": '0px',
|
4551
4649
|
"viewBox": '0 0 1024 1024'
|
4552
|
-
}, [(0,
|
4650
|
+
}, [(0,external_vue_.createVNode)("g", {
|
4553
4651
|
"id": 'time'
|
4554
|
-
}, [(0,
|
4652
|
+
}, [(0,external_vue_.createVNode)("path", {
|
4555
4653
|
"fill": '#c4c6cc',
|
4556
4654
|
"d": 'M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z'
|
4557
|
-
}, null), (0,
|
4655
|
+
}, null), (0,external_vue_.createVNode)("polygon", {
|
4558
4656
|
"fill": '#c4c6cc',
|
4559
4657
|
"points": '512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512'
|
4560
|
-
}, null)])]) : (0,
|
4658
|
+
}, null)])]) : (0,external_vue_.createVNode)("svg", {
|
4561
4659
|
"class": 'picker-icon',
|
4562
4660
|
"x": '0px',
|
4563
4661
|
"y": '0px',
|
4564
4662
|
"viewBox": '0 0 1024 1024'
|
4565
|
-
}, [(0,
|
4663
|
+
}, [(0,external_vue_.createVNode)("g", {
|
4566
4664
|
"id": 'date'
|
4567
|
-
}, [(0,
|
4665
|
+
}, [(0,external_vue_.createVNode)("path", {
|
4568
4666
|
"fill": '#c4c6cc',
|
4569
4667
|
"d": 'M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z'
|
4570
|
-
}, null), (0,
|
4668
|
+
}, null), (0,external_vue_.createVNode)("rect", {
|
4571
4669
|
"x": '416',
|
4572
4670
|
"y": '128',
|
4573
4671
|
"fill": '#c4c6cc',
|
4574
4672
|
"width": '192',
|
4575
4673
|
"height": '64'
|
4576
|
-
}, null), (0,
|
4674
|
+
}, null), (0,external_vue_.createVNode)("rect", {
|
4577
4675
|
"x": '288',
|
4578
4676
|
"y": '96',
|
4579
4677
|
"fill": '#c4c6cc',
|
4580
4678
|
"width": '64',
|
4581
4679
|
"height": '128'
|
4582
|
-
}, null), (0,
|
4680
|
+
}, null), (0,external_vue_.createVNode)("rect", {
|
4583
4681
|
"x": '672',
|
4584
4682
|
"y": '96',
|
4585
4683
|
"fill": '#c4c6cc',
|
4586
4684
|
"width": '64',
|
4587
4685
|
"height": '128'
|
4588
|
-
}, null), (0,
|
4686
|
+
}, null), (0,external_vue_.createVNode)("polygon", {
|
4589
4687
|
"fill": '#c4c6cc',
|
4590
4688
|
"points": '403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5'
|
4591
|
-
}, null)])])]), (0,
|
4689
|
+
}, null)])])]), (0,external_vue_.createVNode)("input", {
|
4592
4690
|
"type": 'text',
|
4593
|
-
"class": [(0,
|
4691
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker-editor'), this.readonly ? 'readonly' : '', this.fontSizeCls, this.behavior === 'simplicity' ? 'only-bottom-border' : ''],
|
4594
4692
|
"ref": 'inputRef',
|
4595
4693
|
"key": this.forceInputRerender,
|
4596
4694
|
"readonly": this.localReadonly,
|
@@ -4602,7 +4700,7 @@ var dateRangePanelProps = {
|
|
4602
4700
|
"onBlur": this.handleBlur,
|
4603
4701
|
"onKeydown": this.handleKeydown,
|
4604
4702
|
"onChange": this.handleInputChange
|
4605
|
-
}, null), this.clearable && this.showClose ? (0,
|
4703
|
+
}, null), this.clearable && this.showClose ? (0,external_vue_.createVNode)(external_icon_.Close, {
|
4606
4704
|
"onClick": this.handleClear,
|
4607
4705
|
"class": 'clear-action'
|
4608
4706
|
}, null) : '']); // const shortcutsSlot = this.hasShortcuts ? { shortcuts: () => this.$slots.shortcuts?.() || null } : {};
|
@@ -4621,24 +4719,24 @@ var dateRangePanelProps = {
|
|
4621
4719
|
confirm: this.$slots.confirm
|
4622
4720
|
} : {};
|
4623
4721
|
var slots = Object.assign(Object.assign({}, shortcutsSlot), confirmSlot);
|
4624
|
-
return (0,
|
4625
|
-
"class": [(0,
|
4626
|
-
}, [(0,
|
4722
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
4723
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker'), this.type === 'datetimerange' ? 'long' : '', this.longWidthCls]
|
4724
|
+
}, [(0,external_vue_.createVNode)("div", {
|
4627
4725
|
"ref": 'triggerRef',
|
4628
|
-
"class": (0,
|
4726
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-rel'),
|
4629
4727
|
"onMouseenter": this.handleInputMouseenter,
|
4630
4728
|
"onMouseleave": this.handleInputMouseleave
|
4631
|
-
}, [(_c = (_b = (_a = this.$slots).trigger) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : defaultTrigger]), (0,
|
4729
|
+
}, [(_c = (_b = (_a = this.$slots).trigger) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : defaultTrigger]), (0,external_vue_.createVNode)(external_vue_.Teleport, {
|
4632
4730
|
"to": 'body',
|
4633
4731
|
"disabled": !this.appendToBody
|
4634
4732
|
}, {
|
4635
4733
|
"default": function _default() {
|
4636
|
-
return [(0,
|
4637
|
-
"name": (0,
|
4734
|
+
return [(0,external_vue_.createVNode)(external_vue_.Transition, {
|
4735
|
+
"name": (0,external_shared_.resolveClassName)('fade-down-transition')
|
4638
4736
|
}, {
|
4639
4737
|
"default": function _default() {
|
4640
|
-
return [(0,
|
4641
|
-
"class": [_this.appendToBody ? (0,
|
4738
|
+
return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)(picker_dropdown, {
|
4739
|
+
"class": [_this.appendToBody ? (0,external_shared_.resolveClassName)('date-picker-transfer') : ''],
|
4642
4740
|
"ref": 'pickerDropdownRef',
|
4643
4741
|
"triggerRef": _this.triggerRef,
|
4644
4742
|
"placement": _this.placement,
|
@@ -4646,9 +4744,9 @@ var dateRangePanelProps = {
|
|
4646
4744
|
"appendToBody": _this.appendToBody
|
4647
4745
|
}, {
|
4648
4746
|
"default": function _default() {
|
4649
|
-
return [_this.hasHeader ? (0,
|
4650
|
-
"class": [(0,
|
4651
|
-
}, [(_g = (_f = (_d = _this.$slots).header) === null || _f === void 0 ? void 0 : _f.call(_d)) !== null && _g !== void 0 ? _g : null]) : null, _this.panel === 'DateRangePanel' ? (0,
|
4747
|
+
return [_this.hasHeader ? (0,external_vue_.createVNode)("div", {
|
4748
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker-top-wrapper'), _this.headerSlotCls]
|
4749
|
+
}, [(_g = (_f = (_d = _this.$slots).header) === null || _f === void 0 ? void 0 : _f.call(_d)) !== null && _g !== void 0 ? _g : null]) : null, _this.panel === 'DateRangePanel' ? (0,external_vue_.createVNode)(date_range, {
|
4652
4750
|
"ref": 'pickerPanelRef',
|
4653
4751
|
"type": _this.type,
|
4654
4752
|
"showTime": _this.type === 'datetime' || _this.type === 'datetimerange',
|
@@ -4665,7 +4763,7 @@ var dateRangePanelProps = {
|
|
4665
4763
|
"onPick-clear": _this.handleClear,
|
4666
4764
|
"onPick-success": _this.onPickSuccess,
|
4667
4765
|
"onSelection-mode-change": _this.onSelectionModeChange
|
4668
|
-
}, slots) : (0,
|
4766
|
+
}, slots) : (0,external_vue_.createVNode)(date, {
|
4669
4767
|
"ref": 'pickerPanelRef',
|
4670
4768
|
"clearable": _this.clearable,
|
4671
4769
|
"showTime": _this.type === 'datetime' || _this.type === 'datetimerange',
|
@@ -4683,15 +4781,15 @@ var dateRangePanelProps = {
|
|
4683
4781
|
"onPick-clear": _this.handleClear,
|
4684
4782
|
"onPick-success": _this.onPickSuccess,
|
4685
4783
|
"onSelection-mode-change": _this.onSelectionModeChange
|
4686
|
-
}, slots), _this.hasFooter ? (0,
|
4687
|
-
"class": [(0,
|
4784
|
+
}, slots), _this.hasFooter ? (0,external_vue_.createVNode)("div", {
|
4785
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker-footer-wrapper'), _this.footerSlotCls]
|
4688
4786
|
}, [(_k = (_j = (_h = _this.$slots).footer) === null || _j === void 0 ? void 0 : _j.call(_h)) !== null && _k !== void 0 ? _k : null]) : null];
|
4689
4787
|
}
|
4690
|
-
}), [[
|
4788
|
+
}), [[external_vue_.vShow, _this.opened]])];
|
4691
4789
|
}
|
4692
4790
|
})];
|
4693
4791
|
}
|
4694
|
-
})]), [[(0,
|
4792
|
+
})]), [[(0,external_vue_.resolveDirective)("clickoutside"), this.handleClose]]);
|
4695
4793
|
}
|
4696
4794
|
}));
|
4697
4795
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/time-picker.tsx
|
@@ -4734,10 +4832,10 @@ var dateRangePanelProps = {
|
|
4734
4832
|
|
4735
4833
|
|
4736
4834
|
|
4737
|
-
/* harmony default export */ const time_picker = ((0,
|
4835
|
+
/* harmony default export */ const time_picker = ((0,external_vue_.defineComponent)({
|
4738
4836
|
name: 'TimePicker',
|
4739
4837
|
directives: {
|
4740
|
-
clickoutside:
|
4838
|
+
clickoutside: external_directives_.clickoutside
|
4741
4839
|
},
|
4742
4840
|
props: Object.assign(Object.assign(Object.assign({}, datePickerProps), timePickerProps), timePanelProps),
|
4743
4841
|
emits: ['open-change', 'input', 'change', 'update:modelValue', 'clear', 'shortcut-change', 'pick-success'],
|
@@ -4745,7 +4843,7 @@ var dateRangePanelProps = {
|
|
4745
4843
|
setup: function setup(props, _ref) {
|
4746
4844
|
var slots = _ref.slots,
|
4747
4845
|
emit = _ref.emit;
|
4748
|
-
var formItem = (0,
|
4846
|
+
var formItem = (0,external_shared_.useFormItem)();
|
4749
4847
|
var isRange = props.type.includes('range');
|
4750
4848
|
var emptyArray = isRange ? [null, null] : [null];
|
4751
4849
|
var initialValue = isAllEmptyArr((isRange ? props.modelValue : [props.modelValue]) || []) ? emptyArray : parseDate(props.modelValue, props.type, props.multiple, props.format);
|
@@ -4759,7 +4857,7 @@ var dateRangePanelProps = {
|
|
4759
4857
|
}
|
4760
4858
|
}
|
4761
4859
|
|
4762
|
-
var state = (0,
|
4860
|
+
var state = (0,external_vue_.reactive)({
|
4763
4861
|
showClose: false,
|
4764
4862
|
visible: false,
|
4765
4863
|
internalValue: initialValue,
|
@@ -4794,7 +4892,7 @@ var dateRangePanelProps = {
|
|
4794
4892
|
}
|
4795
4893
|
|
4796
4894
|
;
|
4797
|
-
var publicVModelValue = (0,
|
4895
|
+
var publicVModelValue = (0,external_vue_.computed)(function () {
|
4798
4896
|
if (props.multiple) {
|
4799
4897
|
return state.internalValue.slice();
|
4800
4898
|
}
|
@@ -4812,7 +4910,7 @@ var dateRangePanelProps = {
|
|
4812
4910
|
|
4813
4911
|
return isRange || props.multiple ? val : val[0];
|
4814
4912
|
});
|
4815
|
-
var publicStringValue = (0,
|
4913
|
+
var publicStringValue = (0,external_vue_.computed)(function () {
|
4816
4914
|
if (props.type.match(/^time/)) {
|
4817
4915
|
return publicVModelValue.value;
|
4818
4916
|
}
|
@@ -4825,17 +4923,17 @@ var dateRangePanelProps = {
|
|
4825
4923
|
return formatDate(v, props.type, props.multiple, props.format);
|
4826
4924
|
}) : formatDate(publicVModelValue.value, props.type, props.multiple, props.format);
|
4827
4925
|
});
|
4828
|
-
var panel = (0,
|
4926
|
+
var panel = (0,external_vue_.computed)(function () {
|
4829
4927
|
var isRange = props.type === 'timerange';
|
4830
4928
|
return isRange ? 'RangeTimePickerPanel' : 'TimePickerPanel';
|
4831
4929
|
});
|
4832
|
-
var opened = (0,
|
4930
|
+
var opened = (0,external_vue_.computed)(function () {
|
4833
4931
|
return props.open === null ? state.visible : props.open;
|
4834
4932
|
});
|
4835
|
-
var visualValue = (0,
|
4933
|
+
var visualValue = (0,external_vue_.computed)(function () {
|
4836
4934
|
return formatDate(state.internalValue, props.type, props.multiple, props.format);
|
4837
4935
|
});
|
4838
|
-
var displayValue = (0,
|
4936
|
+
var displayValue = (0,external_vue_.computed)(function () {
|
4839
4937
|
var _a; // 展示快捷文案
|
4840
4938
|
|
4841
4939
|
|
@@ -4845,19 +4943,19 @@ var dateRangePanelProps = {
|
|
4845
4943
|
|
4846
4944
|
return visualValue.value;
|
4847
4945
|
});
|
4848
|
-
var isConfirm = (0,
|
4946
|
+
var isConfirm = (0,external_vue_.computed)(function () {
|
4849
4947
|
return !!slots.trigger || props.type === 'datetime' || props.type === 'datetimerange' || props.multiple;
|
4850
4948
|
});
|
4851
|
-
var hasHeader = (0,
|
4949
|
+
var hasHeader = (0,external_vue_.computed)(function () {
|
4852
4950
|
return !!slots.header;
|
4853
4951
|
});
|
4854
|
-
var hasFooter = (0,
|
4952
|
+
var hasFooter = (0,external_vue_.computed)(function () {
|
4855
4953
|
return !!slots.footer;
|
4856
4954
|
});
|
4857
|
-
var hasShortcuts = (0,
|
4955
|
+
var hasShortcuts = (0,external_vue_.computed)(function () {
|
4858
4956
|
return !!slots.shortcuts;
|
4859
4957
|
});
|
4860
|
-
var fontSizeCls = (0,
|
4958
|
+
var fontSizeCls = (0,external_vue_.computed)(function () {
|
4861
4959
|
var cls = '';
|
4862
4960
|
|
4863
4961
|
if (props.fontSize === 'medium') {
|
@@ -4868,7 +4966,7 @@ var dateRangePanelProps = {
|
|
4868
4966
|
|
4869
4967
|
return cls;
|
4870
4968
|
});
|
4871
|
-
var longWidthCls = (0,
|
4969
|
+
var longWidthCls = (0,external_vue_.computed)(function () {
|
4872
4970
|
var cls = '';
|
4873
4971
|
|
4874
4972
|
if (props.fontSize === 'medium') {
|
@@ -4879,7 +4977,7 @@ var dateRangePanelProps = {
|
|
4879
4977
|
|
4880
4978
|
return cls;
|
4881
4979
|
});
|
4882
|
-
var localReadonly = (0,
|
4980
|
+
var localReadonly = (0,external_vue_.computed)(function () {
|
4883
4981
|
var _a; // 如果当前使用快捷选择,且配置展示快捷文案,则输入框不允许编辑
|
4884
4982
|
|
4885
4983
|
|
@@ -4889,7 +4987,7 @@ var dateRangePanelProps = {
|
|
4889
4987
|
|
4890
4988
|
return !props.editable || props.readonly;
|
4891
4989
|
});
|
4892
|
-
var ownPickerProps = (0,
|
4990
|
+
var ownPickerProps = (0,external_vue_.computed)(function () {
|
4893
4991
|
return {
|
4894
4992
|
disabledHours: props.disabledHours,
|
4895
4993
|
disabledMinutes: props.disabledMinutes,
|
@@ -4898,10 +4996,10 @@ var dateRangePanelProps = {
|
|
4898
4996
|
};
|
4899
4997
|
}); // 限制 allow-cross-day 属性只在 time-picker 组件 type 为 timerange 时生效
|
4900
4998
|
|
4901
|
-
var allowCrossDayProp = (0,
|
4999
|
+
var allowCrossDayProp = (0,external_vue_.computed)(function () {
|
4902
5000
|
return panel.value === 'RangeTimePickerPanel' ? props.allowCrossDay : false;
|
4903
5001
|
});
|
4904
|
-
var inputRef = (0,
|
5002
|
+
var inputRef = (0,external_vue_.ref)(null);
|
4905
5003
|
|
4906
5004
|
var inputFocus = function inputFocus() {
|
4907
5005
|
var _a;
|
@@ -4909,25 +5007,25 @@ var dateRangePanelProps = {
|
|
4909
5007
|
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.value) === null || _a === void 0 ? void 0 : _a.focus();
|
4910
5008
|
};
|
4911
5009
|
|
4912
|
-
var _getCurrentInstance = (0,
|
5010
|
+
var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
|
4913
5011
|
proxy = _getCurrentInstance.proxy;
|
4914
5012
|
|
4915
|
-
var pickerDropdownRef = (0,
|
4916
|
-
(0,
|
5013
|
+
var pickerDropdownRef = (0,external_vue_.ref)(null);
|
5014
|
+
(0,external_vue_.watch)(function () {
|
4917
5015
|
return state.visible;
|
4918
5016
|
}, function (visible) {
|
4919
5017
|
var _a, _b;
|
4920
5018
|
|
4921
5019
|
if (visible) {
|
4922
5020
|
(_b = (_a = pickerDropdownRef.value) === null || _a === void 0 ? void 0 : _a.forceUpdate) === null || _b === void 0 ? void 0 : _b.call(_a);
|
4923
|
-
(0,
|
5021
|
+
(0,external_vue_.nextTick)(function () {
|
4924
5022
|
var _a, _b;
|
4925
5023
|
|
4926
5024
|
(_b = (_a = proxy.pickerPanelRef) === null || _a === void 0 ? void 0 : _a.timeSpinnerRef) === null || _b === void 0 ? void 0 : _b.updateScroll();
|
4927
5025
|
});
|
4928
5026
|
}
|
4929
5027
|
});
|
4930
|
-
(0,
|
5028
|
+
(0,external_vue_.watch)(function () {
|
4931
5029
|
return props.modelValue;
|
4932
5030
|
}, function (modelValue) {
|
4933
5031
|
var _a;
|
@@ -4938,17 +5036,17 @@ var dateRangePanelProps = {
|
|
4938
5036
|
(_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
|
4939
5037
|
}
|
4940
5038
|
});
|
4941
|
-
(0,
|
5039
|
+
(0,external_vue_.watch)(function () {
|
4942
5040
|
return props.open;
|
4943
5041
|
}, function (open) {
|
4944
5042
|
state.visible = open === true;
|
4945
5043
|
});
|
4946
|
-
(0,
|
5044
|
+
(0,external_vue_.watch)(function () {
|
4947
5045
|
return props.type;
|
4948
5046
|
}, function (type) {
|
4949
5047
|
onSelectionModeChange(type);
|
4950
5048
|
});
|
4951
|
-
(0,
|
5049
|
+
(0,external_vue_.watch)(function () {
|
4952
5050
|
return publicVModelValue;
|
4953
5051
|
}, function (now, before) {
|
4954
5052
|
var newValue = JSON.stringify(now);
|
@@ -4960,7 +5058,7 @@ var dateRangePanelProps = {
|
|
4960
5058
|
emit('input', now);
|
4961
5059
|
}
|
4962
5060
|
});
|
4963
|
-
(0,
|
5061
|
+
(0,external_vue_.onMounted)(function () {
|
4964
5062
|
// 如果是 date-picker 那么 time-picker 就是回车模式
|
4965
5063
|
if (props.type.indexOf('date') > -1) {
|
4966
5064
|
state.timeEnterMode = true;
|
@@ -4982,14 +5080,14 @@ var dateRangePanelProps = {
|
|
4982
5080
|
} // this.$on('focus-input', () => this.focus())
|
4983
5081
|
|
4984
5082
|
|
4985
|
-
(0,
|
5083
|
+
(0,external_vue_.provide)(datePickerKey, {
|
4986
5084
|
props: props,
|
4987
5085
|
focus: function focus() {
|
4988
5086
|
return inputFocus();
|
4989
5087
|
}
|
4990
5088
|
});
|
4991
5089
|
});
|
4992
|
-
var pickerPanelRef = (0,
|
5090
|
+
var pickerPanelRef = (0,external_vue_.ref)(null);
|
4993
5091
|
|
4994
5092
|
var handleClose = function handleClose(e) {
|
4995
5093
|
var _a;
|
@@ -5047,7 +5145,7 @@ var dateRangePanelProps = {
|
|
5047
5145
|
};
|
5048
5146
|
|
5049
5147
|
var emitChange = function emitChange(type) {
|
5050
|
-
(0,
|
5148
|
+
(0,external_vue_.nextTick)(function () {
|
5051
5149
|
var _a; // 使用 :value 或 :model-value 的时候才需要 handleChange,此时没有触发 update:modelValue
|
5052
5150
|
// 使用 v-model 时才会触发 update:modelValue 事件
|
5053
5151
|
|
@@ -5217,7 +5315,7 @@ var dateRangePanelProps = {
|
|
5217
5315
|
state.visible = false; // 点击 shortcuts 会关闭弹层时,如果不在 nextTick 里触发 pick-success,那么会导致触发 pick-success 的时候,
|
5218
5316
|
// v-model 的值还是之前的值
|
5219
5317
|
|
5220
|
-
(0,
|
5318
|
+
(0,external_vue_.nextTick)(function () {
|
5221
5319
|
emit('pick-success');
|
5222
5320
|
});
|
5223
5321
|
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.value) === null || _a === void 0 ? void 0 : _a.blur();
|
@@ -5281,8 +5379,8 @@ var dateRangePanelProps = {
|
|
5281
5379
|
emit('shortcut-change', state.shortcut, shortcutIndex);
|
5282
5380
|
};
|
5283
5381
|
|
5284
|
-
var triggerRef = (0,
|
5285
|
-
return Object.assign(Object.assign({}, (0,
|
5382
|
+
var triggerRef = (0,external_vue_.ref)(null);
|
5383
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
5286
5384
|
panel: panel,
|
5287
5385
|
publicStringValue: publicStringValue,
|
5288
5386
|
opened: opened,
|
@@ -5320,56 +5418,56 @@ var dateRangePanelProps = {
|
|
5320
5418
|
|
5321
5419
|
var _a, _b, _c, _d, _f, _g, _h, _j, _k;
|
5322
5420
|
|
5323
|
-
var defaultTrigger = (0,
|
5421
|
+
var defaultTrigger = (0,external_vue_.createVNode)("div", null, [(0,external_vue_.createVNode)("span", {
|
5324
5422
|
"class": ['icon-wrapper', this.disabled ? 'disabled' : ''],
|
5325
5423
|
"onClick": this.handleIconClick
|
5326
|
-
}, [this.type === 'time' || this.type === 'timerange' ? (0,
|
5424
|
+
}, [this.type === 'time' || this.type === 'timerange' ? (0,external_vue_.createVNode)("svg", {
|
5327
5425
|
"class": "picker-icon",
|
5328
5426
|
"x": "0px",
|
5329
5427
|
"y": "0px",
|
5330
5428
|
"viewBox": "0 0 1024 1024"
|
5331
|
-
}, [(0,
|
5429
|
+
}, [(0,external_vue_.createVNode)("g", {
|
5332
5430
|
"id": "time"
|
5333
|
-
}, [(0,
|
5431
|
+
}, [(0,external_vue_.createVNode)("path", {
|
5334
5432
|
"fill": "#c4c6cc",
|
5335
5433
|
"d": "M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"
|
5336
|
-
}, null), (0,
|
5434
|
+
}, null), (0,external_vue_.createVNode)("polygon", {
|
5337
5435
|
"fill": "#c4c6cc",
|
5338
5436
|
"points": "512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"
|
5339
|
-
}, null)])]) : (0,
|
5437
|
+
}, null)])]) : (0,external_vue_.createVNode)("svg", {
|
5340
5438
|
"class": "picker-icon",
|
5341
5439
|
"x": "0px",
|
5342
5440
|
"y": "0px",
|
5343
5441
|
"viewBox": "0 0 1024 1024"
|
5344
|
-
}, [(0,
|
5442
|
+
}, [(0,external_vue_.createVNode)("g", {
|
5345
5443
|
"id": "date"
|
5346
|
-
}, [(0,
|
5444
|
+
}, [(0,external_vue_.createVNode)("path", {
|
5347
5445
|
"fill": "#c4c6cc",
|
5348
5446
|
"d": "M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"
|
5349
|
-
}, null), (0,
|
5447
|
+
}, null), (0,external_vue_.createVNode)("rect", {
|
5350
5448
|
"x": "416",
|
5351
5449
|
"y": "128",
|
5352
5450
|
"fill": "#c4c6cc",
|
5353
5451
|
"width": "192",
|
5354
5452
|
"height": "64"
|
5355
|
-
}, null), (0,
|
5453
|
+
}, null), (0,external_vue_.createVNode)("rect", {
|
5356
5454
|
"x": "288",
|
5357
5455
|
"y": "96",
|
5358
5456
|
"fill": "#c4c6cc",
|
5359
5457
|
"width": "64",
|
5360
5458
|
"height": "128"
|
5361
|
-
}, null), (0,
|
5459
|
+
}, null), (0,external_vue_.createVNode)("rect", {
|
5362
5460
|
"x": "672",
|
5363
5461
|
"y": "96",
|
5364
5462
|
"fill": "#c4c6cc",
|
5365
5463
|
"width": "64",
|
5366
5464
|
"height": "128"
|
5367
|
-
}, null), (0,
|
5465
|
+
}, null), (0,external_vue_.createVNode)("polygon", {
|
5368
5466
|
"fill": "#c4c6cc",
|
5369
5467
|
"points": "403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"
|
5370
|
-
}, null)])])]), (0,
|
5468
|
+
}, null)])])]), (0,external_vue_.createVNode)("input", {
|
5371
5469
|
"type": "text",
|
5372
|
-
"class": [(0,
|
5470
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker-editor'), this.readonly ? 'readonly' : '', this.fontSizeCls, this.behavior === 'simplicity' ? 'only-bottom-border' : ''],
|
5373
5471
|
"ref": "inputRef",
|
5374
5472
|
"key": this.forceInputRerender,
|
5375
5473
|
"readonly": this.localReadonly,
|
@@ -5381,7 +5479,7 @@ var dateRangePanelProps = {
|
|
5381
5479
|
"onBlur": this.handleBlur,
|
5382
5480
|
"onKeydown": this.handleKeydown,
|
5383
5481
|
"onChange": this.handleInputChange
|
5384
|
-
}, null), this.clearable && this.showClose ? (0,
|
5482
|
+
}, null), this.clearable && this.showClose ? (0,external_vue_.createVNode)(external_icon_.Close, {
|
5385
5483
|
"onClick": this.handleClear,
|
5386
5484
|
"class": "clear-action"
|
5387
5485
|
}, null) : '']);
|
@@ -5393,24 +5491,24 @@ var dateRangePanelProps = {
|
|
5393
5491
|
return ((_b = (_a = _this.$slots).shortcuts) === null || _b === void 0 ? void 0 : _b.call(_a)) || null;
|
5394
5492
|
}
|
5395
5493
|
} : {};
|
5396
|
-
return (0,
|
5397
|
-
"class": [(0,
|
5398
|
-
}, [(0,
|
5494
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
5495
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker'), this.type === 'datetimerange' ? 'long' : '', this.longWidthCls]
|
5496
|
+
}, [(0,external_vue_.createVNode)("div", {
|
5399
5497
|
"ref": "triggerRef",
|
5400
|
-
"class": (0,
|
5498
|
+
"class": (0,external_shared_.resolveClassName)('date-picker-rel'),
|
5401
5499
|
"onMouseenter": this.handleInputMouseenter,
|
5402
5500
|
"onMouseleave": this.handleInputMouseleave
|
5403
|
-
}, [(_c = (_b = (_a = this.$slots).trigger) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : defaultTrigger]), (0,
|
5501
|
+
}, [(_c = (_b = (_a = this.$slots).trigger) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : defaultTrigger]), (0,external_vue_.createVNode)(external_vue_.Teleport, {
|
5404
5502
|
"to": "body",
|
5405
5503
|
"disabled": !this.appendToBody
|
5406
5504
|
}, {
|
5407
5505
|
"default": function _default() {
|
5408
|
-
return [(0,
|
5506
|
+
return [(0,external_vue_.createVNode)(external_vue_.Transition, {
|
5409
5507
|
"name": "bk-fade-down-transition"
|
5410
5508
|
}, {
|
5411
5509
|
"default": function _default() {
|
5412
|
-
return [(0,
|
5413
|
-
"class": [_this.appendToBody ? (0,
|
5510
|
+
return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)(picker_dropdown, {
|
5511
|
+
"class": [_this.appendToBody ? (0,external_shared_.resolveClassName)('date-picker-transfer') : ''],
|
5414
5512
|
"ref": "pickerDropdownRef",
|
5415
5513
|
"triggerRef": _this.triggerRef,
|
5416
5514
|
"placement": _this.placement,
|
@@ -5419,9 +5517,9 @@ var dateRangePanelProps = {
|
|
5419
5517
|
"onClick": _this.handleTransferClick
|
5420
5518
|
}, {
|
5421
5519
|
"default": function _default() {
|
5422
|
-
return [_this.hasHeader ? (0,
|
5423
|
-
"class": [(0,
|
5424
|
-
}, [(_g = (_f = (_d = _this.$slots).header) === null || _f === void 0 ? void 0 : _f.call(_d)) !== null && _g !== void 0 ? _g : null]) : null, _this.panel === 'RangeTimePickerPanel' ? (0,
|
5520
|
+
return [_this.hasHeader ? (0,external_vue_.createVNode)("div", {
|
5521
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker-top-wrapper'), _this.headerSlotCls]
|
5522
|
+
}, [(_g = (_f = (_d = _this.$slots).header) === null || _f === void 0 ? void 0 : _f.call(_d)) !== null && _g !== void 0 ? _g : null]) : null, _this.panel === 'RangeTimePickerPanel' ? (0,external_vue_.createVNode)(time_range, {
|
5425
5523
|
"ref": "pickerPanelRef",
|
5426
5524
|
"clearable": _this.clearable,
|
5427
5525
|
"shortcuts": _this.shortcuts,
|
@@ -5436,7 +5534,7 @@ var dateRangePanelProps = {
|
|
5436
5534
|
"disabledHours": _this.ownPickerProps.disabledHours,
|
5437
5535
|
"disabledMinutes": _this.ownPickerProps.disabledMinutes,
|
5438
5536
|
"disabledSeconds": _this.ownPickerProps.disabledSeconds
|
5439
|
-
}, shortcutsSlot) : (0,
|
5537
|
+
}, shortcutsSlot) : (0,external_vue_.createVNode)(time, {
|
5440
5538
|
"ref": "pickerPanelRef",
|
5441
5539
|
"clearable": _this.clearable,
|
5442
5540
|
"confirm": _this.isConfirm,
|
@@ -5452,15 +5550,15 @@ var dateRangePanelProps = {
|
|
5452
5550
|
"disabledHours": _this.ownPickerProps.disabledHours,
|
5453
5551
|
"disabledMinutes": _this.ownPickerProps.disabledMinutes,
|
5454
5552
|
"disabledSeconds": _this.ownPickerProps.disabledSeconds
|
5455
|
-
}, shortcutsSlot), _this.hasFooter ? (0,
|
5456
|
-
"class": [(0,
|
5553
|
+
}, shortcutsSlot), _this.hasFooter ? (0,external_vue_.createVNode)("div", {
|
5554
|
+
"class": [(0,external_shared_.resolveClassName)('date-picker-footer-wrapper'), _this.footerSlotCls]
|
5457
5555
|
}, [(_k = (_j = (_h = _this.$slots).footer) === null || _j === void 0 ? void 0 : _j.call(_h)) !== null && _k !== void 0 ? _k : null]) : null];
|
5458
5556
|
}
|
5459
|
-
}), [[
|
5557
|
+
}), [[external_vue_.vShow, _this.opened]])];
|
5460
5558
|
}
|
5461
5559
|
})];
|
5462
5560
|
}
|
5463
|
-
})]), [[(0,
|
5561
|
+
})]), [[(0,external_vue_.resolveDirective)("clickoutside"), this.handleClose]]);
|
5464
5562
|
}
|
5465
5563
|
}));
|
5466
5564
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/index.ts
|
@@ -5492,9 +5590,12 @@ var dateRangePanelProps = {
|
|
5492
5590
|
|
5493
5591
|
|
5494
5592
|
|
5495
|
-
var BkDatePicker = (0,
|
5593
|
+
var BkDatePicker = (0,external_shared_.withInstall)(date_picker);
|
5496
5594
|
/* harmony default export */ const src = (BkDatePicker);
|
5497
5595
|
|
5498
|
-
|
5499
|
-
|
5500
|
-
|
5596
|
+
})();
|
5597
|
+
|
5598
|
+
/******/ return __webpack_exports__;
|
5599
|
+
/******/ })()
|
5600
|
+
;
|
5601
|
+
});
|