vft 0.0.89 → 0.0.91
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/attributes.json +1 -1
- package/es/comp-resolver.js +20 -29
- package/es/components/affix/affix.vue2.js +34 -34
- package/es/components/alert/alert.vue2.js +44 -44
- package/es/components/avatar/avatar.vue2.js +28 -28
- package/es/components/backtop/backtop.vue2.js +11 -11
- package/es/components/button/button-group.vue2.js +8 -8
- package/es/components/button/button.vue2.js +39 -39
- package/es/components/card/card.vue2.js +20 -20
- package/es/components/check-tag/check-tag.vue2.js +14 -14
- package/es/components/checkbox/checkbox-button.vue2.js +61 -61
- package/es/components/checkbox/checkbox-group.vue2.js +27 -27
- package/es/components/checkbox/checkbox.vue2.js +81 -81
- package/es/components/clamp/clamp.vue2.js +59 -59
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +25 -25
- package/es/components/col/col.vue2.js +33 -33
- package/es/components/color-picker/color-picker.vue2.js +126 -126
- package/es/components/color-picker/components/alpha-slider.vue2.js +12 -12
- package/es/components/config-provider/config-provider.vue2.js +29 -29
- package/es/components/container/aside.vue2.js +9 -9
- package/es/components/container/container.vue2.js +11 -11
- package/es/components/container/footer.vue2.js +8 -8
- package/es/components/container/header.vue2.js +9 -9
- package/es/components/context-menu/context-menu.vue2.js +29 -29
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +53 -53
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +19 -19
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +32 -32
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +168 -168
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +89 -89
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +38 -38
- package/es/components/descriptions/description-item.vue2.js +16 -16
- package/es/components/descriptions/description.vue2.js +54 -54
- package/es/components/descriptions/descriptions-row.vue2.js +24 -24
- package/es/components/dialog/dialog-content.vue2.js +30 -30
- package/es/components/dialog/dialog.vue2.js +64 -64
- package/es/components/divider/divider.vue2.js +20 -20
- package/es/components/dropdown/dropdown.vue.js +2 -127
- package/es/components/dropdown/dropdown.vue2.js +234 -181
- package/es/components/dropdown/index.js +10 -17
- package/es/components/dropdown/style/css.js +5 -0
- package/es/components/dropdown/style/index.js +5 -0
- package/es/components/dropdown/tokens.js +1 -1
- package/es/components/empty/empty.vue2.js +27 -27
- package/es/components/exception/exception.vue2.js +19 -19
- package/es/components/footer-layout/footer-layout.vue2.js +1 -1
- package/es/components/form/form-item.vue2.js +77 -77
- package/es/components/form/form.vue2.js +37 -37
- package/es/components/full-screen/full-screen.vue2.js +26 -15
- package/es/components/header-layout/header-layout.vue2.js +27 -27
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +43 -43
- package/es/components/icon/icon.vue2.js +24 -24
- package/es/components/icon-text/icon-text.vue2.js +27 -27
- package/es/components/iframe-layout/iframe-layout.vue2.js +18 -18
- package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
- package/es/components/image/image.vue2.js +73 -73
- package/es/components/image-viewer/image-viewer.vue2.js +109 -109
- package/es/components/index.js +145 -150
- package/es/components/input/input.vue2.js +175 -175
- package/es/components/link/link.vue2.js +27 -27
- package/es/components/list-cell/list-cell.vue2.js +8 -8
- package/es/components/logo/logo.vue2.js +27 -27
- package/es/components/md-container/md-container.vue2.js +1 -1
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +16 -16
- package/es/components/menu/menu-item-group.vue2.js +15 -15
- package/es/components/menu/menu-item.vue2.js +56 -56
- package/es/components/menu/menu.vue2.js +20 -20
- package/es/components/menu/sub-menu.vue2.js +16 -16
- package/es/components/message/message.vue2.js +81 -81
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +12 -12
- package/es/components/multiple-tabs/tab-content.vue2.js +16 -16
- package/es/components/overlay/overlay.vue2.js +14 -14
- package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
- package/es/components/pagination/components/jumper.vue2.js +22 -22
- package/es/components/pagination/components/next.vue2.js +12 -12
- package/es/components/pagination/components/pager.vue2.js +75 -75
- package/es/components/pagination/components/prev.vue2.js +13 -13
- package/es/components/pagination/components/sizes.vue2.js +11 -11
- package/es/components/pagination/components/total.vue2.js +8 -8
- package/es/components/pagination/pagination.vue2.js +28 -28
- package/es/components/popconfirm/popconfirm.vue2.js +50 -50
- package/es/components/popover/popover.vue2.js +44 -44
- package/es/components/popper/arrow.vue2.js +2 -2
- package/es/components/popper/content.vue2.js +34 -34
- package/es/components/popper/popper.vue2.js +5 -5
- package/es/components/popper/trigger.vue2.js +48 -48
- package/es/components/qrcode/qrcode.vue2.js +35 -35
- package/es/components/radio/radio-button.vue2.js +28 -28
- package/es/components/radio/radio-group.vue2.js +26 -26
- package/es/components/radio/radio.vue2.js +44 -44
- package/es/components/result/result.vue2.js +10 -10
- package/es/components/router-view-content/router-view-content.vue2.js +20 -20
- package/es/components/row/row.vue2.js +19 -19
- package/es/components/scrollbar/bar.vue2.js +19 -19
- package/es/components/scrollbar/scrollbar.vue2.js +67 -67
- package/es/components/scrollbar/thumb.vue2.js +41 -41
- package/es/components/search/search.vue2.js +65 -65
- package/es/components/side-menu/side-menu.vue2.js +36 -36
- package/es/components/skeleton/skeleton-item.vue2.js +13 -13
- package/es/components/skeleton/skeleton.vue2.js +19 -19
- package/es/components/switch/switch.vue2.js +128 -128
- package/es/components/table/index.js +5 -3
- package/es/components/table/table.vue2.js +70 -70
- package/es/components/tabs/tab-bar.vue2.js +15 -15
- package/es/components/tabs/tab-nav.vue2.js +33 -33
- package/es/components/tabs/tab-pane.vue2.js +21 -21
- package/es/components/tabs/tabs.vue2.js +64 -66
- package/es/components/tag/tag.vue2.js +7 -7
- package/es/components/time-picker/common/picker.vue2.js +14 -14
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +60 -60
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +30 -30
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +57 -57
- package/es/components/time-select/time-select.vue2.js +29 -29
- package/es/components/tooltip/constants.js +1 -1
- package/es/components/tooltip/content.vue2.js +73 -73
- package/es/components/tooltip/tooltip.vue2.js +91 -91
- package/es/components/tooltip/trigger.vue2.js +33 -33
- package/es/components/verify-code/verify-code.vue2.js +25 -25
- package/es/index.js +208 -213
- package/es/package.json.js +1 -1
- package/lib/comp-resolver.cjs +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/button-group.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/card/card.vue2.cjs +1 -1
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
- package/lib/components/clamp/clamp.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/container/aside.vue2.cjs +1 -1
- package/lib/components/container/container.vue2.cjs +1 -1
- package/lib/components/container/footer.vue2.cjs +1 -1
- package/lib/components/container/header.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
- package/lib/components/descriptions/description-item.vue2.cjs +1 -1
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.cjs +1 -1
- package/lib/components/dropdown/style/css.cjs +1 -1
- package/lib/components/dropdown/style/index.cjs +1 -1
- package/lib/components/dropdown/tokens.cjs +1 -1
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/exception/exception.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/form.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
- package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/next.vue2.cjs +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/components/prev.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popper/arrow.vue2.cjs +1 -1
- package/lib/components/popper/content.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue2.cjs +1 -1
- package/lib/components/radio/radio.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/bar.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/index.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/tab-bar.vue2.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/tag/tag.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/tooltip/constants.cjs +1 -1
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/trigger.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/web-types.json +1 -1
- package/theme-style/vft-back-top.css +0 -1
|
@@ -267,7 +267,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
267
267
|
onHide: De
|
|
268
268
|
}), {
|
|
269
269
|
default: q(() => [
|
|
270
|
-
|
|
270
|
+
N.value ? (I(), We("div", {
|
|
271
271
|
key: 1,
|
|
272
272
|
ref_key: "inputRef",
|
|
273
273
|
ref: b,
|
|
@@ -275,7 +275,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
275
275
|
l(h).b("editor"),
|
|
276
276
|
l(h).bm("editor", e.type),
|
|
277
277
|
l(D).e("wrapper"),
|
|
278
|
-
l(h).is("disabled",
|
|
278
|
+
l(h).is("disabled", c.value),
|
|
279
279
|
l(h).is("active", u.value),
|
|
280
280
|
l(g).b("editor"),
|
|
281
281
|
l(Z) ? l(g).bm("editor", l(Z)) : "",
|
|
@@ -288,9 +288,9 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
288
288
|
onTouchstart: z,
|
|
289
289
|
onKeydown: ce
|
|
290
290
|
}, [
|
|
291
|
-
|
|
291
|
+
O.value ? (I(), w(l(L), {
|
|
292
292
|
key: 0,
|
|
293
|
-
icon:
|
|
293
|
+
icon: O.value,
|
|
294
294
|
class: m([l(D).e("icon"), l(g).e("icon")]),
|
|
295
295
|
onMousedown: F(M, ["prevent"]),
|
|
296
296
|
onTouchstart: z
|
|
@@ -300,8 +300,8 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
300
300
|
autocomplete: "off",
|
|
301
301
|
name: e.name && e.name[0],
|
|
302
302
|
placeholder: e.startPlaceholder,
|
|
303
|
-
value:
|
|
304
|
-
disabled:
|
|
303
|
+
value: d.value && d.value[0],
|
|
304
|
+
disabled: c.value,
|
|
305
305
|
readonly: !e.editable || e.readonly,
|
|
306
306
|
class: m(l(g).b("input")),
|
|
307
307
|
onMousedown: M,
|
|
@@ -320,8 +320,8 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
320
320
|
autocomplete: "off",
|
|
321
321
|
name: e.name && e.name[1],
|
|
322
322
|
placeholder: e.endPlaceholder,
|
|
323
|
-
value:
|
|
324
|
-
disabled:
|
|
323
|
+
value: d.value && d.value[1],
|
|
324
|
+
disabled: c.value,
|
|
325
325
|
readonly: !e.editable || e.readonly,
|
|
326
326
|
class: m(l(g).b("input")),
|
|
327
327
|
onMousedown: M,
|
|
@@ -348,14 +348,14 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
348
348
|
ref_key: "inputRef",
|
|
349
349
|
ref: b,
|
|
350
350
|
"container-role": "combobox",
|
|
351
|
-
"model-value":
|
|
351
|
+
"model-value": d.value,
|
|
352
352
|
name: e.name,
|
|
353
353
|
size: l(Z),
|
|
354
|
-
disabled:
|
|
354
|
+
disabled: c.value,
|
|
355
355
|
placeholder: e.placeholder,
|
|
356
356
|
class: m([l(h).b("editor"), l(h).bm("editor", e.type), e.$attrs.class]),
|
|
357
357
|
style: pe(e.$attrs.style),
|
|
358
|
-
readonly: !e.editable || e.readonly ||
|
|
358
|
+
readonly: !e.editable || e.readonly || te.value || e.type === "week",
|
|
359
359
|
label: e.label,
|
|
360
360
|
tabindex: e.tabindex,
|
|
361
361
|
"validate-event": !1,
|
|
@@ -375,9 +375,9 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
375
375
|
}, ["stop"]))
|
|
376
376
|
}, {
|
|
377
377
|
prefix: q(() => [
|
|
378
|
-
|
|
378
|
+
O.value ? (I(), w(l(L), {
|
|
379
379
|
key: 0,
|
|
380
|
-
icon:
|
|
380
|
+
icon: O.value,
|
|
381
381
|
class: m(l(D).e("icon")),
|
|
382
382
|
onMousedown: F(M, ["prevent"]),
|
|
383
383
|
onTouchstart: z
|
|
@@ -398,7 +398,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
398
398
|
de(e.$slots, "default", {
|
|
399
399
|
visible: u.value,
|
|
400
400
|
actualVisible: G.value,
|
|
401
|
-
parsedValue:
|
|
401
|
+
parsedValue: $.value,
|
|
402
402
|
format: e.format,
|
|
403
403
|
unlinkPanels: e.unlinkPanels,
|
|
404
404
|
type: e.type,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ie, ref as k, computed as C, unref as
|
|
1
|
+
import { defineComponent as ie, ref as k, computed as C, unref as r, onMounted as le, nextTick as F, watch as ae, openBlock as l, createElementBlock as a, normalizeClass as m, Fragment as u, renderList as D, createBlock as ue, withCtx as me, createTextVNode as $, toDisplayString as f, createCommentVNode as N, withDirectives as I, createVNode as j, createElementVNode as de } from "vue";
|
|
2
2
|
import { debounce as pe } from "lodash";
|
|
3
3
|
import { vRepeatClick as U } from "@vft/directives";
|
|
4
4
|
import { VftScrollbar as he } from "../../scrollbar/index.js";
|
|
@@ -13,33 +13,33 @@ import { timeUnits as z } from "../constants.js";
|
|
|
13
13
|
import { buildTimeList as V } from "../utils.js";
|
|
14
14
|
import { basicTimeSpinnerProps as be } from "../props/basic-time-spinner.js";
|
|
15
15
|
import { getTimeLists as we } from "../composables/use-time-picker.js";
|
|
16
|
-
const
|
|
16
|
+
const ve = ["onClick"], ge = ["onMouseenter"], Ae = /* @__PURE__ */ ie({
|
|
17
17
|
__name: "basic-time-spinner",
|
|
18
18
|
props: be,
|
|
19
19
|
emits: ["change", "select-range", "set-option"],
|
|
20
|
-
setup(G, { emit:
|
|
20
|
+
setup(G, { emit: v }) {
|
|
21
21
|
const c = G, i = fe("time"), { getHoursList: J, getMinutesList: K, getSecondsList: O } = we(
|
|
22
22
|
c.disabledHours,
|
|
23
23
|
c.disabledMinutes,
|
|
24
24
|
c.disabledSeconds
|
|
25
25
|
);
|
|
26
26
|
let _ = !1;
|
|
27
|
-
const
|
|
27
|
+
const g = k(), Q = k(), W = k(), X = k(), h = {
|
|
28
28
|
hours: Q,
|
|
29
29
|
minutes: W,
|
|
30
30
|
seconds: X
|
|
31
31
|
}, x = C(() => c.showSeconds ? z : z.slice(0, 2)), d = C(() => {
|
|
32
|
-
const { spinnerDate: e } = c, s = e.hour(), o = e.minute(),
|
|
33
|
-
return { hours: s, minutes: o, seconds:
|
|
34
|
-
}),
|
|
35
|
-
const { hours: e, minutes: s } =
|
|
32
|
+
const { spinnerDate: e } = c, s = e.hour(), o = e.minute(), n = e.second();
|
|
33
|
+
return { hours: s, minutes: o, seconds: n };
|
|
34
|
+
}), S = C(() => {
|
|
35
|
+
const { hours: e, minutes: s } = r(d);
|
|
36
36
|
return {
|
|
37
37
|
hours: J(c.role),
|
|
38
38
|
minutes: K(e, c.role),
|
|
39
39
|
seconds: O(e, s, c.role)
|
|
40
40
|
};
|
|
41
41
|
}), Y = C(() => {
|
|
42
|
-
const { hours: e, minutes: s, seconds: o } =
|
|
42
|
+
const { hours: e, minutes: s, seconds: o } = r(d);
|
|
43
43
|
return {
|
|
44
44
|
hours: V(e, 23),
|
|
45
45
|
minutes: V(s, 59),
|
|
@@ -51,8 +51,8 @@ const ge = ["onClick"], Se = ["onMouseenter"], Ae = /* @__PURE__ */ ie({
|
|
|
51
51
|
if (!!!c.amPmMode)
|
|
52
52
|
return "";
|
|
53
53
|
const o = c.amPmMode === "A";
|
|
54
|
-
let
|
|
55
|
-
return o && (
|
|
54
|
+
let n = e < 12 ? " am" : " pm";
|
|
55
|
+
return o && (n = n.toUpperCase()), n;
|
|
56
56
|
}, p = (e) => {
|
|
57
57
|
let s;
|
|
58
58
|
switch (e) {
|
|
@@ -66,41 +66,41 @@ const ge = ["onClick"], Se = ["onMouseenter"], Ae = /* @__PURE__ */ ie({
|
|
|
66
66
|
s = [6, 8];
|
|
67
67
|
break;
|
|
68
68
|
}
|
|
69
|
-
const [o,
|
|
70
|
-
|
|
69
|
+
const [o, n] = s;
|
|
70
|
+
v("select-range", o, n), g.value = e;
|
|
71
71
|
}, b = (e) => {
|
|
72
|
-
R(e,
|
|
72
|
+
R(e, r(d)[e]);
|
|
73
73
|
}, B = () => {
|
|
74
74
|
b("hours"), b("minutes"), b("seconds");
|
|
75
75
|
}, P = (e) => e.querySelector(`.${i.namespace.value}-scrollbar__wrap`), R = (e, s) => {
|
|
76
76
|
if (c.arrowControl)
|
|
77
77
|
return;
|
|
78
|
-
const o =
|
|
78
|
+
const o = r(h[e]);
|
|
79
79
|
o && o.$el && (P(o.$el).scrollTop = Math.max(
|
|
80
80
|
0,
|
|
81
81
|
s * T(e)
|
|
82
82
|
));
|
|
83
83
|
}, T = (e) => {
|
|
84
|
-
const s =
|
|
84
|
+
const s = r(h[e]);
|
|
85
85
|
return (s == null ? void 0 : s.$el.querySelector("li").offsetHeight) || 0;
|
|
86
86
|
}, y = () => {
|
|
87
87
|
L(1);
|
|
88
88
|
}, ee = () => {
|
|
89
89
|
L(-1);
|
|
90
90
|
}, L = (e) => {
|
|
91
|
-
|
|
92
|
-
const s =
|
|
91
|
+
g.value || p("hours");
|
|
92
|
+
const s = g.value, o = r(d)[s], n = g.value === "hours" ? 24 : 60, t = se(s, o, e, n);
|
|
93
93
|
H(s, t), R(s, t), F(() => p(s));
|
|
94
|
-
}, se = (e, s, o,
|
|
95
|
-
let t = (s + o +
|
|
96
|
-
const w =
|
|
94
|
+
}, se = (e, s, o, n) => {
|
|
95
|
+
let t = (s + o + n) % n;
|
|
96
|
+
const w = r(S)[e];
|
|
97
97
|
for (; w[t] && t !== s; )
|
|
98
|
-
t = (t + o +
|
|
98
|
+
t = (t + o + n) % n;
|
|
99
99
|
return t;
|
|
100
100
|
}, H = (e, s) => {
|
|
101
|
-
if (
|
|
101
|
+
if (r(S)[e][s])
|
|
102
102
|
return;
|
|
103
|
-
const { hours: t, minutes: w, seconds: E } =
|
|
103
|
+
const { hours: t, minutes: w, seconds: E } = r(d);
|
|
104
104
|
let M;
|
|
105
105
|
switch (e) {
|
|
106
106
|
case "hours":
|
|
@@ -113,21 +113,21 @@ const ge = ["onClick"], Se = ["onMouseenter"], Ae = /* @__PURE__ */ ie({
|
|
|
113
113
|
M = c.spinnerDate.hour(t).minute(w).second(s);
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
v("change", M);
|
|
117
117
|
}, oe = (e, { value: s, disabled: o }) => {
|
|
118
118
|
o || (H(e, s), p(e), R(e, s));
|
|
119
119
|
}, ne = (e) => {
|
|
120
120
|
_ = !0, Z(e);
|
|
121
121
|
const s = Math.min(
|
|
122
122
|
Math.round(
|
|
123
|
-
(P(
|
|
123
|
+
(P(r(h[e]).$el).scrollTop - (re(e) * 0.5 - 10) / T(e) + 3) / T(e)
|
|
124
124
|
),
|
|
125
125
|
e === "hours" ? 23 : 59
|
|
126
126
|
);
|
|
127
127
|
H(e, s);
|
|
128
|
-
}, re = (e) =>
|
|
128
|
+
}, re = (e) => r(h[e]).$el.offsetHeight, te = () => {
|
|
129
129
|
const e = (s) => {
|
|
130
|
-
const o =
|
|
130
|
+
const o = r(h[s]);
|
|
131
131
|
o && o.$el && (P(o.$el).onscroll = () => {
|
|
132
132
|
ne(s);
|
|
133
133
|
});
|
|
@@ -142,83 +142,83 @@ const ge = ["onClick"], Se = ["onMouseenter"], Ae = /* @__PURE__ */ ie({
|
|
|
142
142
|
const ce = (e, s) => {
|
|
143
143
|
h[s].value = e;
|
|
144
144
|
};
|
|
145
|
-
return
|
|
145
|
+
return v("set-option", [`${c.role}_scrollDown`, L]), v("set-option", [`${c.role}_emitSelectRange`, p]), ae(
|
|
146
146
|
() => c.spinnerDate,
|
|
147
147
|
() => {
|
|
148
148
|
_ || B();
|
|
149
149
|
}
|
|
150
150
|
), (e, s) => (l(), a("div", {
|
|
151
|
-
class: m([
|
|
151
|
+
class: m([r(i).b("spinner"), { "has-seconds": e.showSeconds }])
|
|
152
152
|
}, [
|
|
153
|
-
e.arrowControl ? N("", !0) : (l(!0), a(u, { key: 0 }, D(
|
|
153
|
+
e.arrowControl ? N("", !0) : (l(!0), a(u, { key: 0 }, D(x.value, (o) => (l(), ue(r(he), {
|
|
154
154
|
key: o,
|
|
155
155
|
ref_for: !0,
|
|
156
|
-
ref: (
|
|
157
|
-
class: m(
|
|
156
|
+
ref: (n) => ce(n, o),
|
|
157
|
+
class: m(r(i).be("spinner", "wrapper")),
|
|
158
158
|
"wrap-style": "max-height: inherit;",
|
|
159
|
-
"view-class":
|
|
159
|
+
"view-class": r(i).be("spinner", "list"),
|
|
160
160
|
noresize: "",
|
|
161
161
|
tag: "ul",
|
|
162
|
-
onMouseenter: (
|
|
163
|
-
onMousemove: (
|
|
162
|
+
onMouseenter: (n) => p(o),
|
|
163
|
+
onMousemove: (n) => b(o)
|
|
164
164
|
}, {
|
|
165
165
|
default: me(() => [
|
|
166
|
-
(l(!0), a(u, null, D(
|
|
166
|
+
(l(!0), a(u, null, D(S.value[o], (n, t) => (l(), a("li", {
|
|
167
167
|
key: t,
|
|
168
168
|
class: m([
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
r(i).be("spinner", "item"),
|
|
170
|
+
r(i).is("active", t === d.value[o]),
|
|
171
|
+
r(i).is("disabled", n)
|
|
172
172
|
]),
|
|
173
|
-
onClick: (w) => oe(o, { value: t, disabled:
|
|
173
|
+
onClick: (w) => oe(o, { value: t, disabled: n })
|
|
174
174
|
}, [
|
|
175
175
|
o === "hours" ? (l(), a(u, { key: 0 }, [
|
|
176
176
|
$(f(("0" + (e.amPmMode ? t % 12 || 12 : t)).slice(-2)) + f(A(t)), 1)
|
|
177
177
|
], 64)) : (l(), a(u, { key: 1 }, [
|
|
178
178
|
$(f(("0" + t).slice(-2)), 1)
|
|
179
179
|
], 64))
|
|
180
|
-
], 10,
|
|
180
|
+
], 10, ve))), 128))
|
|
181
181
|
]),
|
|
182
182
|
_: 2
|
|
183
183
|
}, 1032, ["class", "view-class", "onMouseenter", "onMousemove"]))), 128)),
|
|
184
|
-
e.arrowControl ? (l(!0), a(u, { key: 1 }, D(
|
|
184
|
+
e.arrowControl ? (l(!0), a(u, { key: 1 }, D(x.value, (o) => (l(), a("div", {
|
|
185
185
|
key: o,
|
|
186
|
-
class: m([
|
|
187
|
-
onMouseenter: (
|
|
186
|
+
class: m([r(i).be("spinner", "wrapper"), r(i).is("arrow")]),
|
|
187
|
+
onMouseenter: (n) => p(o)
|
|
188
188
|
}, [
|
|
189
|
-
I(j(
|
|
189
|
+
I(j(r(q), {
|
|
190
190
|
icon: "ico-ep:arrow-up",
|
|
191
|
-
class: m(["arrow-up",
|
|
191
|
+
class: m(["arrow-up", r(i).be("spinner", "arrow")])
|
|
192
192
|
}, null, 8, ["class"]), [
|
|
193
|
-
[
|
|
193
|
+
[r(U), ee]
|
|
194
194
|
]),
|
|
195
|
-
I(j(
|
|
195
|
+
I(j(r(q), {
|
|
196
196
|
icon: "ico-ep:arrow-down",
|
|
197
|
-
class: m(["arrow-down",
|
|
197
|
+
class: m(["arrow-down", r(i).be("spinner", "arrow")])
|
|
198
198
|
}, null, 8, ["class"]), [
|
|
199
|
-
[
|
|
199
|
+
[r(U), y]
|
|
200
200
|
]),
|
|
201
201
|
de("ul", {
|
|
202
|
-
class: m(
|
|
202
|
+
class: m(r(i).be("spinner", "list"))
|
|
203
203
|
}, [
|
|
204
|
-
(l(!0), a(u, null, D(
|
|
204
|
+
(l(!0), a(u, null, D(Y.value[o], (n, t) => (l(), a("li", {
|
|
205
205
|
key: t,
|
|
206
206
|
class: m([
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
r(i).be("spinner", "item"),
|
|
208
|
+
r(i).is("active", n === d.value[o]),
|
|
209
|
+
r(i).is("disabled", S.value[o][n])
|
|
210
210
|
])
|
|
211
211
|
}, [
|
|
212
|
-
typeof
|
|
212
|
+
typeof n == "number" ? (l(), a(u, { key: 0 }, [
|
|
213
213
|
o === "hours" ? (l(), a(u, { key: 0 }, [
|
|
214
|
-
$(f(("0" + (e.amPmMode ?
|
|
214
|
+
$(f(("0" + (e.amPmMode ? n % 12 || 12 : n)).slice(-2)) + f(A(n)), 1)
|
|
215
215
|
], 64)) : (l(), a(u, { key: 1 }, [
|
|
216
|
-
$(f(("0" +
|
|
216
|
+
$(f(("0" + n).slice(-2)), 1)
|
|
217
217
|
], 64))
|
|
218
218
|
], 64)) : N("", !0)
|
|
219
219
|
], 2))), 128))
|
|
220
220
|
], 2)
|
|
221
|
-
], 42,
|
|
221
|
+
], 42, ge))), 128)) : N("", !0)
|
|
222
222
|
], 2));
|
|
223
223
|
}
|
|
224
224
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as J, inject as L, ref as C, computed as m, openBlock as w, createBlock as Q, Transition as W,
|
|
1
|
+
import { defineComponent as J, inject as L, ref as C, computed as m, openBlock as w, createBlock as Q, Transition as W, withCtx as X, createElementBlock as Y, normalizeClass as l, unref as s, createElementVNode as u, createVNode as Z, createCommentVNode as ee } from "vue";
|
|
2
2
|
import f from "dayjs";
|
|
3
3
|
import { EVENT_CODE as te } from "../../../constants/aria.js";
|
|
4
4
|
import { useNamespace as ne } from "../../../hooks/use-namespace/index.js";
|
|
@@ -16,31 +16,31 @@ const we = /* @__PURE__ */ J({
|
|
|
16
16
|
__name: "panel-time-pick",
|
|
17
17
|
props: se,
|
|
18
18
|
emits: ["pick", "select-range", "set-picker-option"],
|
|
19
|
-
setup(A, { emit:
|
|
20
|
-
const
|
|
19
|
+
setup(A, { emit: n }) {
|
|
20
|
+
const o = A, R = L("EP_PICKER_BASE"), {
|
|
21
21
|
arrowControl: T,
|
|
22
22
|
disabledHours: b,
|
|
23
23
|
disabledMinutes: g,
|
|
24
|
-
disabledSeconds:
|
|
24
|
+
disabledSeconds: v,
|
|
25
25
|
defaultValue: E
|
|
26
|
-
} = R.props, { getAvailableHours: _, getAvailableMinutes: D, getAvailableSeconds: O } = le(b, g,
|
|
27
|
-
const t = f(e).locale(
|
|
26
|
+
} = R.props, { getAvailableHours: _, getAvailableMinutes: D, getAvailableSeconds: O } = le(b, g, v), r = ne("time"), p = C("zh-cn"), k = C([0, 2]), P = re(o), y = m(() => oe(o.actualVisible) ? `${r.namespace.value}-zoom-in-top` : ""), i = m(() => o.format.includes("ss")), N = m(() => o.format.includes("A") ? "A" : o.format.includes("a") ? "a" : ""), B = (e) => {
|
|
27
|
+
const t = f(e).locale(p.value), a = d(t);
|
|
28
28
|
return t.isSame(a);
|
|
29
29
|
}, I = () => {
|
|
30
|
-
|
|
30
|
+
n("pick", P.value, !1);
|
|
31
31
|
}, x = (e = !1, t = !1) => {
|
|
32
|
-
t ||
|
|
32
|
+
t || n("pick", o.parsedValue, e);
|
|
33
33
|
}, z = (e) => {
|
|
34
|
-
if (!
|
|
34
|
+
if (!o.visible)
|
|
35
35
|
return;
|
|
36
36
|
const t = d(e).millisecond(0);
|
|
37
|
-
|
|
37
|
+
n("pick", t, !0);
|
|
38
38
|
}, K = (e, t) => {
|
|
39
|
-
|
|
39
|
+
n("select-range", e, t), k.value = [e, t];
|
|
40
40
|
}, M = (e) => {
|
|
41
41
|
const t = [0, 3].concat(i.value ? [6] : []), a = ["hours", "minutes"].concat(
|
|
42
42
|
i.value ? ["seconds"] : []
|
|
43
|
-
), c = (t.indexOf(
|
|
43
|
+
), c = (t.indexOf(k.value[0]) + e + t.length) % t.length;
|
|
44
44
|
h.start_emitSelectRange(a[c]);
|
|
45
45
|
}, U = (e) => {
|
|
46
46
|
const t = e.code, { left: a, right: V, up: c, down: F } = te;
|
|
@@ -57,42 +57,42 @@ const we = /* @__PURE__ */ J({
|
|
|
57
57
|
getAvailableHours: _,
|
|
58
58
|
getAvailableMinutes: D,
|
|
59
59
|
getAvailableSeconds: O
|
|
60
|
-
}), d = (e) => j(e,
|
|
61
|
-
return
|
|
60
|
+
}), d = (e) => j(e, o.datetimeRole || "", !0), H = (e) => e ? f(e, o.format).locale(p.value) : null, G = (e) => e ? e.format(o.format) : null, q = () => f(E).locale(p.value);
|
|
61
|
+
return n("set-picker-option", ["isValidValue", B]), n("set-picker-option", ["formatToString", G]), n("set-picker-option", ["parseUserInput", H]), n("set-picker-option", ["handleKeydownInput", U]), n("set-picker-option", ["getRangeAvailableTime", d]), n("set-picker-option", ["getDefaultValue", q]), (e, t) => (w(), Q(W, { name: y.value }, {
|
|
62
62
|
default: X(() => [
|
|
63
63
|
e.actualVisible || e.visible ? (w(), Y("div", {
|
|
64
64
|
key: 0,
|
|
65
|
-
class: l(
|
|
65
|
+
class: l(s(r).b("panel"))
|
|
66
66
|
}, [
|
|
67
|
-
|
|
68
|
-
class: l([
|
|
67
|
+
u("div", {
|
|
68
|
+
class: l([s(r).be("panel", "content"), { "has-seconds": i.value }])
|
|
69
69
|
}, [
|
|
70
70
|
Z(ie, {
|
|
71
71
|
ref: "spinner",
|
|
72
72
|
role: e.datetimeRole || "start",
|
|
73
|
-
"arrow-control":
|
|
74
|
-
"show-seconds":
|
|
75
|
-
"am-pm-mode":
|
|
73
|
+
"arrow-control": s(T),
|
|
74
|
+
"show-seconds": i.value,
|
|
75
|
+
"am-pm-mode": N.value,
|
|
76
76
|
"spinner-date": e.parsedValue,
|
|
77
|
-
"disabled-hours":
|
|
78
|
-
"disabled-minutes":
|
|
79
|
-
"disabled-seconds":
|
|
77
|
+
"disabled-hours": s(b),
|
|
78
|
+
"disabled-minutes": s(g),
|
|
79
|
+
"disabled-seconds": s(v),
|
|
80
80
|
onChange: z,
|
|
81
|
-
onSetOption:
|
|
81
|
+
onSetOption: s($),
|
|
82
82
|
onSelectRange: K
|
|
83
83
|
}, null, 8, ["role", "arrow-control", "show-seconds", "am-pm-mode", "spinner-date", "disabled-hours", "disabled-minutes", "disabled-seconds", "onSetOption"])
|
|
84
84
|
], 2),
|
|
85
|
-
|
|
86
|
-
class: l(
|
|
85
|
+
u("div", {
|
|
86
|
+
class: l(s(r).be("panel", "footer"))
|
|
87
87
|
}, [
|
|
88
|
-
|
|
88
|
+
u("button", {
|
|
89
89
|
type: "button",
|
|
90
|
-
class: l([
|
|
90
|
+
class: l([s(r).be("panel", "btn"), "cancel"]),
|
|
91
91
|
onClick: I
|
|
92
92
|
}, " 取消 ", 2),
|
|
93
|
-
|
|
93
|
+
u("button", {
|
|
94
94
|
type: "button",
|
|
95
|
-
class: l([
|
|
95
|
+
class: l([s(r).be("panel", "btn"), "confirm"]),
|
|
96
96
|
onClick: t[0] || (t[0] = (a) => x())
|
|
97
97
|
}, " 确认 ", 2)
|
|
98
98
|
], 2)
|