vft 0.0.136 → 0.0.138
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/dist/index.css +1 -1
- package/es/comp-resolver.js +1 -3
- package/es/component.js +29 -25
- package/es/components/alert/alert.vue2.js +1 -4
- package/es/components/autocomplete/autocomplete.vue2.js +2 -8
- package/es/components/backtop/backtop.vue2.js +3 -2
- package/es/components/backtop/use-backtop.js +9 -5
- package/es/components/button/constants.js +1 -3
- package/es/components/button/use-button.js +4 -6
- package/es/components/carousel/carousel.vue2.js +3 -13
- package/es/components/carousel/use-carousel-item.js +2 -10
- package/es/components/carousel/use-carousel.js +2 -9
- package/es/components/checkbox/checkbox-button.vue2.js +1 -8
- package/es/components/checkbox/checkbox-group.vue2.js +1 -9
- package/es/components/checkbox/composables/use-checkbox-disabled.js +1 -3
- package/es/components/checkbox/composables/use-checkbox-event.js +2 -8
- package/es/components/checkbox/composables/use-checkbox.js +3 -7
- package/es/components/clamp/clamp.vue2.js +1 -4
- package/es/components/col/col.vue2.js +1 -3
- package/es/components/collection/collection.js +2 -6
- package/es/components/color-picker/color-picker.vue2.js +1 -5
- package/es/components/color-picker/components/hue-slider.vue2.js +4 -12
- package/es/components/color-picker/components/predefine.vue.js +1 -5
- package/es/components/color-picker/composables/use-alpha-slider.js +5 -17
- package/es/components/color-picker/contants.js +1 -3
- package/es/components/color-picker/utils/color.js +9 -29
- package/es/components/config-provider/hooks/use-global-config.js +5 -10
- package/es/components/container/footer.vue2.js +1 -3
- package/es/components/context-menu/context-menu.vue2.js +30 -15
- package/es/components/date-picker/composables/use-shortcut.js +1 -4
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +2 -6
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +3 -11
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +6 -20
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +2 -14
- package/es/components/descriptions/description.vue2.js +4 -6
- package/es/components/descriptions/descriptions-cell.js +1 -3
- package/es/components/dialog/dialog.vue.d.ts +1 -1
- package/es/components/drawer/drawer.vue2.js +1 -3
- package/es/components/dropdown/dropdown-item-impl.vue2.js +2 -9
- package/es/components/dropdown/dropdown-item.vue2.js +1 -4
- package/es/components/dropdown/dropdown-menu.vue2.js +5 -25
- package/es/components/dropdown/dropdown.vue2.js +2 -14
- package/es/components/dropdown/types.js +1 -10
- package/es/components/dropdown/useDropdown.js +1 -3
- package/es/components/exception/exception.vue2.js +6 -3
- package/es/components/focus-trap/focus-trap.vue2.js +4 -19
- package/es/components/footer-layout/footer-layout.vue2.js +3 -2
- package/es/components/form/form-item.vue2.js +7 -15
- package/es/components/form/hooks/use-form-common-props.js +1 -3
- package/es/components/form/types.d.ts +1 -1
- package/es/components/form/types.js +1 -6
- package/es/components/header-layout/header-layout.vue2.js +3 -2
- package/es/components/icon/icon.vue2.js +12 -7
- package/es/components/icon-text/icon-text.vue2.js +9 -6
- package/es/components/image/image.vue2.js +2 -10
- package/es/components/image/index.d.ts +49 -0
- package/es/components/image/index.js +3 -1
- package/es/components/image/p-image.vue.d.ts +51 -0
- package/es/components/image/p-image.vue.js +4 -0
- package/es/components/image/p-image.vue2.js +57 -0
- package/es/components/image/types.d.ts +1 -0
- package/es/components/image-viewer/image-viewer.vue2.js +4 -16
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +277 -274
- package/es/components/infinite-scroll/infinite-scroll.js +1 -3
- package/es/components/input/input.vue2.js +17 -9
- package/es/components/input-number/directives.js +1 -3
- package/es/components/input-number/input-number.vue2.js +2 -9
- package/es/components/link/link.vue2.js +1 -6
- package/es/components/list-cell/list-cell.vue2.js +7 -4
- package/es/components/loading/directive.js +1 -3
- package/es/components/md-code-demo/code-demo/code.js +14 -7
- package/es/components/md-code-demo/md-code-demo.js +97 -85
- package/es/components/md-code-tabs/md-code-tabs.js +3 -1
- package/es/components/md-container/md-container.vue2.js +3 -2
- package/es/components/md-container/toc.js +6 -1
- package/es/components/md-container/use/useActiveHeaderLinks.js +1 -7
- package/es/components/md-tabs/md-tabs.js +3 -1
- package/es/components/menu/menu-item.vue2.js +7 -3
- package/es/components/menu/menu.vue2.js +6 -14
- package/es/components/menu/sub-menu.vue2.js +3 -2
- package/es/components/message/message.vue2.js +1 -3
- package/es/components/message/method.js +5 -1
- package/es/components/modal/modal-footer-action.vue2.js +3 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +45 -36
- package/es/components/overlay/overlay.vue2.js +1 -5
- package/es/components/p-image/style/css.d.ts +0 -0
- package/es/components/p-image/style/css.js +2 -0
- package/es/components/p-image/style/index.d.ts +0 -0
- package/es/components/p-image/style/index.js +2 -0
- package/es/components/pagination/components/next.vue2.js +1 -3
- package/es/components/pagination/components/pager.vue2.js +5 -24
- package/es/components/pagination/components/prev.vue2.js +1 -3
- package/es/components/popconfirm/popconfirm.vue2.js +1 -5
- package/es/components/popper/arrow.vue2.js +1 -4
- package/es/components/popper/composables/use-content-dom.js +3 -16
- package/es/components/popper/composables/use-content.js +7 -11
- package/es/components/popper/content.vue.d.ts +2 -4
- package/es/components/popper/content.vue2.js +8 -12
- package/es/components/popper/trigger.vue2.js +6 -29
- package/es/components/progress/progress.vue2.js +1 -6
- package/es/components/progress-i/index.d.ts +2 -0
- package/es/components/progress-i/index.js +12 -0
- package/es/components/progress-i/progress-i.vue.d.ts +2 -0
- package/es/components/progress-i/progress-i.vue.js +4 -0
- package/es/components/progress-i/progress-i.vue2.js +10 -0
- package/es/components/progress-i/style/css.d.ts +0 -0
- package/es/components/progress-i/style/css.js +2 -0
- package/es/components/progress-i/style/index.d.ts +0 -0
- package/es/components/progress-i/style/index.js +2 -0
- package/es/components/qrcode/drawLogo.js +8 -1
- package/es/components/qrcode/qrcode.vue2.js +7 -3
- package/es/components/radio/radio.vue2.js +2 -9
- package/es/components/result/result.vue2.js +10 -5
- package/es/components/roving-focus-group/roving-focus-group-impl.vue2.js +2 -11
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -10
- package/es/components/roving-focus-group/types.js +1 -6
- package/es/components/scrollbar/constants.js +1 -3
- package/es/components/scrollbar/scrollbar.vue2.js +2 -9
- package/es/components/scrollbar/thumb.vue2.js +2 -12
- package/es/components/search/index.d.ts +2 -0
- package/es/components/search/search.vue.d.ts +1 -1
- package/es/components/select/select.vue.js +5 -20
- package/es/components/select/select.vue2.js +1 -9
- package/es/components/select/token.js +1 -3
- package/es/components/select/useAllowCreate.js +1 -3
- package/es/components/select/useSelect.js +10 -48
- package/es/components/side-menu/side-menu.vue2.js +19 -18
- package/es/components/skeleton/skeleton.vue2.js +5 -5
- package/es/components/slider/composables/use-lifecycle.js +1 -4
- package/es/components/slider/composables/use-slide.js +1 -4
- package/es/components/slider/composables/use-slider-button.js +5 -1
- package/es/components/slider/composables/use-stops.js +2 -6
- package/es/components/slider/composables/use-watch.js +1 -3
- package/es/components/slider/marker.js +1 -3
- package/es/components/slider/slider.vue2.js +2 -8
- package/es/components/space/space.js +25 -39
- package/es/components/super-form/component-map.js +13 -10
- package/es/components/super-form/index.d.ts +10 -7
- package/es/components/super-form/super-form-action.vue2.js +4 -6
- package/es/components/super-form/super-form-item.vue.d.ts +1 -1
- package/es/components/super-form/super-form-item.vue2.js +26 -25
- package/es/components/super-form/super-form.vue.d.ts +4 -3
- package/es/components/super-form/super-form.vue2.js +5 -3
- package/es/components/super-form/use/use-auto-focus.js +1 -6
- package/es/components/super-form/use/use-form-events.js +2 -6
- package/es/components/super-form/use/use-form-values.js +1 -6
- package/es/components/switch/switch.vue2.js +3 -17
- package/es/components/table/field.js +21 -20
- package/es/components/table/index.d.ts +357 -82
- package/es/components/table/table.vue.d.ts +91 -30
- package/es/components/table/table.vue2.js +128 -113
- package/es/components/table/types.d.ts +2 -2
- package/es/components/table/use/use-data-source.js +91 -92
- package/es/components/table/use/use-table.d.ts +1 -4
- package/es/components/table/use/use-table.js +3 -1
- package/es/components/tabs/tab-nav.vue2.js +18 -17
- package/es/components/time-picker/common/picker.vue2.js +8 -26
- package/es/components/time-picker/composables/use-time-panel.js +3 -14
- package/es/components/time-picker/composables/use-time-picker.js +2 -8
- package/es/components/time-picker/constants.d.ts +1 -1
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +2 -9
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +6 -10
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +3 -14
- package/es/components/time-picker/utils.js +1 -5
- package/es/components/tooltip/content.vue2.js +4 -12
- package/es/components/tooltip/trigger.vue2.js +7 -25
- package/es/components/tooltip/utils.js +1 -3
- package/es/components/tree/model/node.js +2 -8
- package/es/components/tree/model/useDragNode.js +2 -12
- package/es/components/tree/model/useKeydown.js +5 -17
- package/es/components/tree/tree-node.vue2.js +2 -12
- package/es/components/tree/tree.vue2.js +2 -10
- package/es/components/upload/upload-content.vue2.js +2 -6
- package/es/components/upload/upload-dragger.vue2.js +1 -4
- package/es/components/upload/upload-list.vue2.js +2 -10
- package/es/components/upload/use-handlers.js +1 -3
- package/es/components/virtual-list/builders/build-grid.js +14 -77
- package/es/components/virtual-list/builders/build-list.js +9 -46
- package/es/components/virtual-list/components/dynamic-size-grid.js +4 -29
- package/es/components/virtual-list/components/dynamic-size-list.js +2 -11
- package/es/components/virtual-list/components/fixed-size-grid.js +9 -40
- package/es/components/virtual-list/components/fixed-size-list.js +1 -3
- package/es/components/virtual-list/components/scrollbar.js +3 -14
- package/es/components/virtual-list/props.js +1 -4
- package/es/constants/date.d.ts +1 -1
- package/es/constants/date.js +1 -9
- package/es/constants/size.d.ts +1 -1
- package/es/hooks/use-draggable/index.js +2 -10
- package/es/hooks/use-lockscreen/index.js +1 -4
- package/es/hooks/use-model-toggle/index.js +1 -3
- package/es/hooks/use-ordered-children/index.js +1 -3
- package/es/hooks/use-popper/index.js +5 -18
- package/es/index.js +408 -405
- package/es/package.json.d.ts +77 -0
- package/es/package.json.js +1 -1
- package/es/plugin.js +1 -5
- package/es/utils/ns-cover.js +16 -7
- package/es/utils/vue/install.d.ts +3 -0
- package/es/utils/vue/props/runtime.js +2 -9
- package/lib/component.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/types.d.ts +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/image/index.cjs +1 -1
- package/lib/components/image/index.d.ts +49 -0
- package/lib/components/image/p-image.vue.cjs +1 -0
- package/lib/components/image/p-image.vue.d.ts +51 -0
- package/lib/components/image/p-image.vue2.cjs +1 -0
- package/lib/components/image/types.d.ts +1 -0
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/p-image/style/css.cjs +1 -0
- package/lib/components/p-image/style/css.d.ts +0 -0
- package/lib/components/p-image/style/index.cjs +1 -0
- package/lib/components/p-image/style/index.d.ts +0 -0
- package/lib/components/popper/content.vue.d.ts +2 -4
- package/lib/components/progress-i/index.cjs +1 -0
- package/lib/components/progress-i/index.d.ts +2 -0
- package/lib/components/progress-i/progress-i.vue.cjs +1 -0
- package/lib/components/progress-i/progress-i.vue.d.ts +2 -0
- package/lib/components/progress-i/progress-i.vue2.cjs +1 -0
- package/lib/components/progress-i/style/css.cjs +1 -0
- package/lib/components/progress-i/style/css.d.ts +0 -0
- package/lib/components/progress-i/style/index.cjs +1 -0
- package/lib/components/progress-i/style/index.d.ts +0 -0
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/search/index.d.ts +2 -0
- package/lib/components/search/search.vue.d.ts +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/index.d.ts +10 -7
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue.d.ts +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue.d.ts +4 -3
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.d.ts +357 -82
- package/lib/components/table/table.vue.d.ts +91 -30
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/types.d.ts +2 -2
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/table/use/use-table.d.ts +1 -4
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/time-picker/constants.d.ts +1 -1
- package/lib/constants/date.d.ts +1 -1
- package/lib/constants/size.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +77 -0
- package/lib/utils/vue/install.d.ts +3 -0
- package/package.json +4 -4
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/index.scss +4 -0
- package/theme-style/src/input.scss +1 -0
- package/theme-style/src/p-image.scss +18 -0
- package/theme-style/src/progress-i.scss +0 -0
- package/theme-style/src/table.scss +7 -0
- package/theme-style/src/tabs.scss +120 -3
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-md-comment.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-md-vue-playground.css +1 -1
- package/theme-style/vft-p-image.css +1 -0
- package/theme-style/vft-progress-i.css +0 -0
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
import { isFunction as D, isBoolean as p, delObjAttrNotExist as Y, isString as $, isEmptyObject as ee, isNullOrUndefined as x, isObject as C, isPlainObject as te, isNumber as ae } from "@vft/utils";
|
|
2
2
|
import { useTimeoutFn as re } from "@vueuse/core";
|
|
3
|
-
import { merge as
|
|
4
|
-
import { ref as O, watchEffect as
|
|
3
|
+
import { merge as ie, get as k } from "lodash";
|
|
4
|
+
import { ref as O, watchEffect as ne, unref as i, watch as M, computed as le, onMounted as ce } from "vue";
|
|
5
5
|
import { PAGE_SIZE as ue } from "../constants.js";
|
|
6
|
-
function
|
|
7
|
-
tableData: q,
|
|
8
|
-
setLoading: j,
|
|
9
|
-
getPaginationInfo: y,
|
|
10
|
-
setPagination: m
|
|
11
|
-
}, A) {
|
|
6
|
+
function he(u, { tableData: q, setLoading: j, getPaginationInfo: y, setPagination: f }, A) {
|
|
12
7
|
const a = O([]), E = O({});
|
|
13
|
-
|
|
14
|
-
q.value =
|
|
15
|
-
}), M(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
ne(() => {
|
|
9
|
+
q.value = i(a);
|
|
10
|
+
}), M(
|
|
11
|
+
() => i(u).data,
|
|
12
|
+
() => {
|
|
13
|
+
const { data: e, api: t } = i(u);
|
|
14
|
+
!t && e && (a.value = e);
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
immediate: !0
|
|
18
|
+
}
|
|
19
|
+
);
|
|
21
20
|
function B(e) {
|
|
22
|
-
|
|
21
|
+
f(e), d({});
|
|
23
22
|
}
|
|
24
|
-
const
|
|
25
|
-
const e =
|
|
26
|
-
return !e || e.length === 0 ?
|
|
23
|
+
const _ = le(() => {
|
|
24
|
+
const e = i(a);
|
|
25
|
+
return !e || e.length === 0 ? i(a) : i(a);
|
|
27
26
|
});
|
|
28
27
|
async function d(e) {
|
|
29
28
|
const {
|
|
30
29
|
api: t,
|
|
31
30
|
fetchSetting: r = {},
|
|
32
|
-
beforeFetch:
|
|
33
|
-
afterFetch:
|
|
31
|
+
beforeFetch: n,
|
|
32
|
+
afterFetch: l,
|
|
34
33
|
pagination: o,
|
|
35
34
|
delEmptyParams: s,
|
|
36
35
|
transformParams: K,
|
|
37
|
-
extraParams:
|
|
38
|
-
} =
|
|
36
|
+
extraParams: v
|
|
37
|
+
} = i(u);
|
|
39
38
|
if (!(!t || !D(t)))
|
|
40
39
|
try {
|
|
41
40
|
j(!0);
|
|
42
|
-
const { pageField:
|
|
41
|
+
const { pageField: b, sizeField: Q, listField: W, totalField: X } = Object.assign(
|
|
43
42
|
{},
|
|
44
43
|
{
|
|
45
44
|
pageField: "page",
|
|
@@ -49,131 +48,131 @@ function ge(u, {
|
|
|
49
48
|
},
|
|
50
49
|
r
|
|
51
50
|
);
|
|
52
|
-
let
|
|
53
|
-
const { currentPage:
|
|
51
|
+
let w = {}, c = e;
|
|
52
|
+
const { currentPage: N = 1, pageSize: P = ue } = i(y);
|
|
54
53
|
if (K) {
|
|
55
|
-
if (p(o) && !o || p(y) ?
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
), i && D(i)) {
|
|
59
|
-
const v = await i(l);
|
|
60
|
-
console.log(v, "000000"), l = { ...l, ...v }, console.log(l, "1111111");
|
|
54
|
+
if (p(o) && !o || p(y) ? w = {} : (w[b] = e && e.page || N, w[Q] = P), c = ie(e, w), n && D(n)) {
|
|
55
|
+
const S = await n(c);
|
|
56
|
+
c = { ...c, ...S };
|
|
61
57
|
}
|
|
62
|
-
s && Y(
|
|
58
|
+
s && Y(c, $(s) ? s === "strict" : !1);
|
|
63
59
|
}
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
let
|
|
67
|
-
const
|
|
68
|
-
if (Number(
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
72
|
-
currentPage:
|
|
60
|
+
c && !ee(c) && !x(v) ? C(c) && C(v) && (c = Object.assign({}, c, v)) : x(v) || (c = v);
|
|
61
|
+
const g = await t(c), R = Array.isArray(g);
|
|
62
|
+
let m = R ? g : k(g, W);
|
|
63
|
+
const F = R ? g.length : k(g, X);
|
|
64
|
+
if (Number(F)) {
|
|
65
|
+
const S = Math.ceil(F / P);
|
|
66
|
+
if (N > S)
|
|
67
|
+
return f({
|
|
68
|
+
currentPage: S
|
|
73
69
|
}), await d(e);
|
|
74
70
|
}
|
|
75
|
-
return
|
|
76
|
-
total:
|
|
77
|
-
}), e && e.page &&
|
|
71
|
+
return l && D(l) && (m = await l(m) || m), a.value = m, E.value = m, f({
|
|
72
|
+
total: F || 0
|
|
73
|
+
}), e && e.page && f({
|
|
78
74
|
currentPage: e.page || 1
|
|
79
75
|
}), A("fetch-success", {
|
|
80
|
-
items:
|
|
81
|
-
total:
|
|
82
|
-
}),
|
|
83
|
-
} catch (
|
|
84
|
-
console.log(
|
|
76
|
+
items: i(m),
|
|
77
|
+
total: F
|
|
78
|
+
}), m;
|
|
79
|
+
} catch (b) {
|
|
80
|
+
console.log(b), A("fetch-error", b), a.value = [], f({
|
|
85
81
|
total: 0
|
|
86
82
|
});
|
|
87
83
|
} finally {
|
|
88
84
|
j(!1);
|
|
89
85
|
}
|
|
90
86
|
}
|
|
91
|
-
function
|
|
87
|
+
function h() {
|
|
92
88
|
return E.value;
|
|
93
89
|
}
|
|
94
90
|
async function G(e) {
|
|
95
|
-
return
|
|
91
|
+
return f({
|
|
96
92
|
currentPage: (e == null ? void 0 : e.page) || 1
|
|
97
93
|
}), await d(e);
|
|
98
94
|
}
|
|
99
|
-
function
|
|
95
|
+
function I(e) {
|
|
100
96
|
if (!a.value || a.value.length === 0)
|
|
101
97
|
return;
|
|
102
|
-
const { rowkey: t } =
|
|
103
|
-
return ((
|
|
104
|
-
let
|
|
105
|
-
return
|
|
98
|
+
const { rowkey: t } = i(u);
|
|
99
|
+
return ((n) => {
|
|
100
|
+
let l;
|
|
101
|
+
return n.some(function(s) {
|
|
106
102
|
if (Reflect.has(s, t) && s[t] === e)
|
|
107
|
-
return
|
|
108
|
-
}),
|
|
103
|
+
return l = s, !0;
|
|
104
|
+
}), l;
|
|
109
105
|
})(a.value);
|
|
110
106
|
}
|
|
111
|
-
async function
|
|
107
|
+
async function L(e, t, r) {
|
|
112
108
|
return a.value[e] && (a.value[e][t] = r), a.value[e];
|
|
113
109
|
}
|
|
114
|
-
function
|
|
115
|
-
const r =
|
|
110
|
+
function U(e, t) {
|
|
111
|
+
const r = I(e);
|
|
116
112
|
if (r) {
|
|
117
|
-
for (const
|
|
118
|
-
Reflect.has(t,
|
|
113
|
+
for (const n in r)
|
|
114
|
+
Reflect.has(t, n) && (r[n] = t[n]);
|
|
119
115
|
return r;
|
|
120
116
|
}
|
|
121
117
|
}
|
|
122
|
-
function
|
|
118
|
+
function V(e, t = 0) {
|
|
123
119
|
const r = te(e) ? [e] : e;
|
|
124
|
-
return a.value.splice(t, 0, ...r),
|
|
120
|
+
return a.value.splice(t, 0, ...r), i(a);
|
|
125
121
|
}
|
|
126
|
-
function
|
|
122
|
+
function Z(e, t) {
|
|
127
123
|
if (!a.value || a.value.length === 0)
|
|
128
124
|
return;
|
|
129
|
-
const { rowkey: r } =
|
|
130
|
-
a.value.splice(
|
|
131
|
-
const { total:
|
|
132
|
-
ae(
|
|
133
|
-
total:
|
|
125
|
+
const { rowkey: r } = i(u), n = a.value.findIndex((o) => o[t || r] === e[t || r]);
|
|
126
|
+
a.value.splice(n, 1);
|
|
127
|
+
const { total: l } = i(y);
|
|
128
|
+
ae(l) && f({
|
|
129
|
+
total: l - 1
|
|
134
130
|
});
|
|
135
131
|
}
|
|
136
132
|
function T(e) {
|
|
137
133
|
a.value = e;
|
|
138
134
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
135
|
+
function H() {
|
|
136
|
+
return _.value;
|
|
141
137
|
}
|
|
142
138
|
function J(e) {
|
|
143
139
|
var r;
|
|
144
140
|
const t = String(e).trim().toLowerCase();
|
|
145
141
|
if (t) {
|
|
146
|
-
const
|
|
142
|
+
const n = (r = h == null ? void 0 : h()) == null ? void 0 : r.filter((l) => {
|
|
147
143
|
var o;
|
|
148
|
-
for (const s in
|
|
149
|
-
if ((o = String(
|
|
144
|
+
for (const s in l)
|
|
145
|
+
if ((o = String(l[s]).trim().toLowerCase()) != null && o.includes(t))
|
|
150
146
|
return !0;
|
|
151
147
|
});
|
|
152
|
-
T(
|
|
148
|
+
T(n);
|
|
153
149
|
} else
|
|
154
|
-
T(
|
|
150
|
+
T(h());
|
|
155
151
|
}
|
|
156
152
|
const z = O(!0);
|
|
157
153
|
return ce(() => {
|
|
158
154
|
re(() => {
|
|
159
|
-
|
|
155
|
+
i(u).immediate && d(), z.value = !1;
|
|
160
156
|
}, 16);
|
|
161
|
-
}), M(
|
|
162
|
-
|
|
163
|
-
|
|
157
|
+
}), M(
|
|
158
|
+
() => i(u).api,
|
|
159
|
+
() => {
|
|
160
|
+
i(u).watchApiFetch && !z.value && i(u).immediate && d();
|
|
161
|
+
}
|
|
162
|
+
), {
|
|
164
163
|
setTableData: T,
|
|
165
|
-
updateTableData:
|
|
166
|
-
updateTableDataRecord:
|
|
167
|
-
insertTableDataRecord:
|
|
168
|
-
deleteTableDataRecord:
|
|
164
|
+
updateTableData: L,
|
|
165
|
+
updateTableDataRecord: U,
|
|
166
|
+
insertTableDataRecord: V,
|
|
167
|
+
deleteTableDataRecord: Z,
|
|
169
168
|
reload: G,
|
|
170
169
|
handleTableChange: B,
|
|
171
|
-
getDataSourceRef:
|
|
172
|
-
getDataSource:
|
|
173
|
-
getRawDataSource:
|
|
170
|
+
getDataSourceRef: _,
|
|
171
|
+
getDataSource: H,
|
|
172
|
+
getRawDataSource: h,
|
|
174
173
|
tableSearch: J
|
|
175
174
|
};
|
|
176
175
|
}
|
|
177
176
|
export {
|
|
178
|
-
|
|
177
|
+
he as useDataSource
|
|
179
178
|
};
|
|
@@ -4,8 +4,5 @@ export type DynamicProps<T> = {
|
|
|
4
4
|
[P in keyof T]: Ref<T[P]> | T[P] | ComputedRef<T[P]>;
|
|
5
5
|
};
|
|
6
6
|
type UseTableMethod = TableActionType;
|
|
7
|
-
export declare function useTable(tableProps?: Partial<TableProps>): [
|
|
8
|
-
(instance: TableActionType, formInstance: UseTableMethod) => void,
|
|
9
|
-
TableActionType
|
|
10
|
-
];
|
|
7
|
+
export declare function useTable(tableProps?: Partial<TableProps>): [(instance: TableActionType, formInstance: UseTableMethod) => void, TableActionType];
|
|
11
8
|
export {};
|
|
@@ -20,7 +20,9 @@ function p(r) {
|
|
|
20
20
|
}
|
|
21
21
|
function t() {
|
|
22
22
|
const e = s(n);
|
|
23
|
-
return e || console.error(
|
|
23
|
+
return e || console.error(
|
|
24
|
+
"The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!"
|
|
25
|
+
), e;
|
|
24
26
|
}
|
|
25
27
|
return [i, {
|
|
26
28
|
reload: async (e) => await t().reload(e),
|
|
@@ -93,6 +93,7 @@ import "@popperjs/core";
|
|
|
93
93
|
import "../../hooks/use-z-index/index.js";
|
|
94
94
|
import "../message/index.js";
|
|
95
95
|
import "../infinite-scroll/index.js";
|
|
96
|
+
import "../progress-i/index.js";
|
|
96
97
|
import { EVENT_CODE as k } from "@vft/constants";
|
|
97
98
|
import { TabsRootContextKey as ct } from "./types.js";
|
|
98
99
|
import ut from "./tab-bar.vue2.js";
|
|
@@ -101,7 +102,7 @@ const mt = (
|
|
|
101
102
|
M("tab-nav")
|
|
102
103
|
), ft = D({
|
|
103
104
|
name: "vft-tab-nav"
|
|
104
|
-
}),
|
|
105
|
+
}), re = /* @__PURE__ */ D({
|
|
105
106
|
...ft,
|
|
106
107
|
props: {
|
|
107
108
|
panes: {},
|
|
@@ -130,7 +131,7 @@ const mt = (
|
|
|
130
131
|
emits: ["tabClick", "tabRemove", "tabAdd", "tabContextmenu"],
|
|
131
132
|
setup(i, {
|
|
132
133
|
expose: q,
|
|
133
|
-
emit:
|
|
134
|
+
emit: g
|
|
134
135
|
}) {
|
|
135
136
|
var W;
|
|
136
137
|
const H = tt(), h = ot(ct);
|
|
@@ -155,7 +156,7 @@ const mt = (
|
|
|
155
156
|
const o = y.value.querySelector(".is-active");
|
|
156
157
|
if (!o)
|
|
157
158
|
return;
|
|
158
|
-
const
|
|
159
|
+
const C = p.value, d = ["top", "bottom"].includes(h.props.tabPosition), a = o.getBoundingClientRect(), r = C.getBoundingClientRect(), m = d ? t.offsetWidth - r.width : t.offsetHeight - r.height, l = u.value;
|
|
159
160
|
let v = l;
|
|
160
161
|
const I = i.fixTabCount ? e.offsetWidth + i.fixExtraScrollWidth : 0;
|
|
161
162
|
d ? (a.left - I < r.left && (v = l - (r.left - a.left + I)), a.right > r.right && (v = l + a.right - r.right)) : (a.top < r.top && (v = l - (r.top - a.top)), a.bottom > r.bottom && (v = l + (a.bottom - r.bottom))), v = Math.max(v, 0), u.value = Math.min(v, m);
|
|
@@ -167,11 +168,11 @@ const mt = (
|
|
|
167
168
|
}, J = (t) => {
|
|
168
169
|
const e = t.code, {
|
|
169
170
|
up: o,
|
|
170
|
-
down:
|
|
171
|
+
down: C,
|
|
171
172
|
left: d,
|
|
172
173
|
right: a
|
|
173
174
|
} = k;
|
|
174
|
-
if (![o,
|
|
175
|
+
if (![o, C, d, a].includes(e))
|
|
175
176
|
return;
|
|
176
177
|
const r = Array.from(t.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")), m = r.indexOf(t.target);
|
|
177
178
|
let l;
|
|
@@ -200,13 +201,13 @@ const mt = (
|
|
|
200
201
|
}, [(e = i.arrowRightIconCfg) != null && e.icon ? s(S, i.arrowRightIconCfg, null) : null])] : null;
|
|
201
202
|
}), Z = B(() => (t = void 0) => {
|
|
202
203
|
var e;
|
|
203
|
-
return (e = i.panes.slice(0, t)) == null ? void 0 : e.map((o,
|
|
204
|
+
return (e = i.panes.slice(0, t)) == null ? void 0 : e.map((o, C) => {
|
|
204
205
|
var L, K, V;
|
|
205
|
-
const d = o.uid, a = o.props.disabled, r = o.props.name ?? o.index ?? `${
|
|
206
|
-
o.index = `${
|
|
206
|
+
const d = o.uid, a = o.props.disabled, r = o.props.name ?? o.index ?? `${C}`, m = !a && (o.isClosable || i.editable);
|
|
207
|
+
o.index = `${C}`;
|
|
207
208
|
const l = m ? s("span", {
|
|
208
209
|
class: "is-icon-close",
|
|
209
|
-
onClick: (f) =>
|
|
210
|
+
onClick: (f) => g("tabRemove", o, f)
|
|
210
211
|
}, [(L = i.closeIconCfg) != null && L.icon ? s(S, i.closeIconCfg, null) : null]) : null, v = ((V = (K = o.slots).label) == null ? void 0 : V.call(K)) || o.props.label, I = !a && o.active ? 0 : -1;
|
|
211
212
|
return s("div", {
|
|
212
213
|
ref: `tab-${d}`,
|
|
@@ -220,26 +221,26 @@ const mt = (
|
|
|
220
221
|
onFocus: () => E(),
|
|
221
222
|
onBlur: () => R(),
|
|
222
223
|
onClick: (f) => {
|
|
223
|
-
R(),
|
|
224
|
+
R(), g("tabClick", o, r, f);
|
|
224
225
|
},
|
|
225
226
|
onContextmenu: (f) => {
|
|
226
|
-
f.preventDefault(),
|
|
227
|
+
f.preventDefault(), g("tabContextmenu", {
|
|
227
228
|
pane: o,
|
|
228
|
-
index:
|
|
229
|
+
index: C,
|
|
229
230
|
event: f
|
|
230
231
|
});
|
|
231
232
|
},
|
|
232
233
|
onKeydown: (f) => {
|
|
233
|
-
m && (f.code === k.delete || f.code === k.backspace) &&
|
|
234
|
+
m && (f.code === k.delete || f.code === k.backspace) && g("tabRemove", o, f);
|
|
234
235
|
}
|
|
235
236
|
}, [v, l]);
|
|
236
237
|
});
|
|
237
238
|
}), _ = i.editable || i.addable ? s("span", {
|
|
238
239
|
class: n.e("new-tab"),
|
|
239
240
|
tabindex: "0",
|
|
240
|
-
onClick: () =>
|
|
241
|
+
onClick: () => g("tabAdd"),
|
|
241
242
|
onKeydown: (t) => {
|
|
242
|
-
t.code === k.enter &&
|
|
243
|
+
t.code === k.enter && g("tabAdd");
|
|
243
244
|
}
|
|
244
245
|
}, [(W = i.addIconCfg) != null && W.icon ? s(S, i.addIconCfg, null) : null]) : null, N = (t = !1) => s("div", {
|
|
245
246
|
class: [n.e("nav"), n.is(h.props.tabPosition), n.is("fixed-nav", t), n.is("stretch", i.stretch && ["top", "bottom"].includes(h.props.tabPosition))],
|
|
@@ -256,9 +257,9 @@ const mt = (
|
|
|
256
257
|
}, [Q.value, s("div", {
|
|
257
258
|
class: [n.e("nav-scroll"), n.is("have-fixed-tab", !!i.fixTabCount)],
|
|
258
259
|
ref: p
|
|
259
|
-
}, [N(), N(!0), _])]);
|
|
260
|
+
}, [N(), i.fixTabCount ? N(!0) : null, _])]);
|
|
260
261
|
}
|
|
261
262
|
});
|
|
262
263
|
export {
|
|
263
|
-
|
|
264
|
+
re as default
|
|
264
265
|
};
|
|
@@ -46,9 +46,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
46
46
|
}, k = (e) => {
|
|
47
47
|
if (!ve(t.modelValue, e)) {
|
|
48
48
|
let a;
|
|
49
|
-
y(e) ? a = e.map(
|
|
50
|
-
(o) => he(o, t.valueFormat, E.value)
|
|
51
|
-
) : e && (a = he(e, t.valueFormat, E.value)), p("update:modelValue", e && a, E.value);
|
|
49
|
+
y(e) ? a = e.map((o) => he(o, t.valueFormat, E.value)) : e && (a = he(e, t.valueFormat, E.value)), p("update:modelValue", e && a, E.value);
|
|
52
50
|
}
|
|
53
51
|
}, Ie = (e) => {
|
|
54
52
|
p("keydown", e);
|
|
@@ -100,15 +98,9 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
100
98
|
oe = a, a();
|
|
101
99
|
}, c = i(() => t.disabled || (W == null ? void 0 : W.disabled)), $ = i(() => {
|
|
102
100
|
let e;
|
|
103
|
-
if (K.value ? s.value.getDefaultValue && (e = s.value.getDefaultValue()) : y(t.modelValue) ? e = t.modelValue.map(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const a = s.value.getRangeAvailableTime(
|
|
107
|
-
e
|
|
108
|
-
);
|
|
109
|
-
Ye(a, e) || (e = a, k(
|
|
110
|
-
y(e) ? e.map((o) => o.toDate()) : e.toDate()
|
|
111
|
-
));
|
|
101
|
+
if (K.value ? s.value.getDefaultValue && (e = s.value.getDefaultValue()) : y(t.modelValue) ? e = t.modelValue.map((a) => me(a, t.valueFormat, E.value)) : e = me(t.modelValue, t.valueFormat, E.value), s.value.getRangeAvailableTime) {
|
|
102
|
+
const a = s.value.getRangeAvailableTime(e);
|
|
103
|
+
Ye(a, e) || (e = a, k(y(e) ? e.map((o) => o.toDate()) : e.toDate()));
|
|
112
104
|
}
|
|
113
105
|
return y(e) && e.some((a) => !a) && (e = []), e;
|
|
114
106
|
}), d = i(() => {
|
|
@@ -119,9 +111,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
119
111
|
n.value[0] || e && e[0] || "",
|
|
120
112
|
n.value[1] || e && e[1] || ""
|
|
121
113
|
] : n.value !== null ? n.value : !Me.value && K.value || !u.value && K.value ? "" : e ? te.value ? e.join(", ") : e : "";
|
|
122
|
-
}), Re = i(() => t.type.includes("time")), Me = i(() => t.type.startsWith("time")), te = i(() => t.type === "dates"), O = i(
|
|
123
|
-
() => t.prefixIcon || (Re.value ? "icon-clock" : "icon-calendar")
|
|
124
|
-
), P = v(!1), ue = (e) => {
|
|
114
|
+
}), Re = i(() => t.type.includes("time")), Me = i(() => t.type.startsWith("time")), te = i(() => t.type === "dates"), O = i(() => t.prefixIcon || (Re.value ? "icon-clock" : "icon-calendar")), P = v(!1), ue = (e) => {
|
|
125
115
|
t.readonly || c.value || P.value && (e.stopPropagation(), Pe(), k(null), X(null, !0), P.value = !1, u.value = !1, s.value.handleClear && s.value.handleClear());
|
|
126
116
|
}, K = i(() => {
|
|
127
117
|
const { modelValue: e } = t;
|
|
@@ -150,9 +140,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
150
140
|
const n = v(null), _ = () => {
|
|
151
141
|
if (n.value) {
|
|
152
142
|
const e = A(d.value);
|
|
153
|
-
e && U(e) && (k(
|
|
154
|
-
y(e) ? e.map((a) => a.toDate()) : e.toDate()
|
|
155
|
-
), n.value = null);
|
|
143
|
+
e && U(e) && (k(y(e) ? e.map((a) => a.toDate()) : e.toDate()), n.value = null);
|
|
156
144
|
}
|
|
157
145
|
n.value === "" && (k(null), X(null), n.value = null);
|
|
158
146
|
}, A = (e) => e ? s.value.parseUserInput(e) : null, x = (e) => e ? s.value.formatToString(e) : null, U = (e) => s.value.isValidValue(e), ce = async (e) => {
|
|
@@ -192,10 +180,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
192
180
|
var r;
|
|
193
181
|
const e = n.value, a = A(e && e[0]), o = l($);
|
|
194
182
|
if (a && a.isValid()) {
|
|
195
|
-
n.value = [
|
|
196
|
-
x(a),
|
|
197
|
-
((r = d.value) == null ? void 0 : r[1]) || null
|
|
198
|
-
];
|
|
183
|
+
n.value = [x(a), ((r = d.value) == null ? void 0 : r[1]) || null];
|
|
199
184
|
const f = [a, o && (o[1] || null)];
|
|
200
185
|
U(f) && (k(f), n.value = null);
|
|
201
186
|
}
|
|
@@ -203,10 +188,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
|
|
|
203
188
|
var r;
|
|
204
189
|
const e = l(n), a = A(e && e[1]), o = l($);
|
|
205
190
|
if (a && a.isValid()) {
|
|
206
|
-
n.value = [
|
|
207
|
-
((r = l(d)) == null ? void 0 : r[0]) || null,
|
|
208
|
-
x(a)
|
|
209
|
-
];
|
|
191
|
+
n.value = [((r = l(d)) == null ? void 0 : r[0]) || null, x(a)];
|
|
210
192
|
const f = [o && o[0], a];
|
|
211
193
|
U(f) && (k(f), n.value = null);
|
|
212
194
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
const k = ({
|
|
2
|
-
getAvailableHours: h,
|
|
3
|
-
getAvailableMinutes: l,
|
|
4
|
-
getAvailableSeconds: a
|
|
5
|
-
}) => {
|
|
1
|
+
const k = ({ getAvailableHours: h, getAvailableMinutes: l, getAvailableSeconds: a }) => {
|
|
6
2
|
const d = (s, t, m, i) => {
|
|
7
3
|
const r = {
|
|
8
4
|
hour: h,
|
|
@@ -16,11 +12,7 @@ const k = ({
|
|
|
16
12
|
const c = r[o];
|
|
17
13
|
switch (o) {
|
|
18
14
|
case "minute": {
|
|
19
|
-
e = c(
|
|
20
|
-
n.hour(),
|
|
21
|
-
t,
|
|
22
|
-
i
|
|
23
|
-
);
|
|
15
|
+
e = c(n.hour(), t, i);
|
|
24
16
|
break;
|
|
25
17
|
}
|
|
26
18
|
case "second": {
|
|
@@ -33,10 +25,7 @@ const k = ({
|
|
|
33
25
|
break;
|
|
34
26
|
}
|
|
35
27
|
default: {
|
|
36
|
-
e = c(
|
|
37
|
-
t,
|
|
38
|
-
i
|
|
39
|
-
);
|
|
28
|
+
e = c(t, i);
|
|
40
29
|
break;
|
|
41
30
|
}
|
|
42
31
|
}
|
|
@@ -5,14 +5,8 @@ const m = (t) => {
|
|
|
5
5
|
return t.map(e).filter(r);
|
|
6
6
|
}, V = (t, e, r) => ({
|
|
7
7
|
getHoursList: (o, g) => l(24, t && (() => t == null ? void 0 : t(o, g))),
|
|
8
|
-
getMinutesList: (o, g, s) => l(
|
|
9
|
-
|
|
10
|
-
e && (() => e == null ? void 0 : e(o, g, s))
|
|
11
|
-
),
|
|
12
|
-
getSecondsList: (o, g, s, n) => l(
|
|
13
|
-
60,
|
|
14
|
-
r && (() => r == null ? void 0 : r(o, g, s, n))
|
|
15
|
-
)
|
|
8
|
+
getMinutesList: (o, g, s) => l(60, e && (() => e == null ? void 0 : e(o, g, s))),
|
|
9
|
+
getSecondsList: (o, g, s, n) => l(60, r && (() => r == null ? void 0 : r(o, g, s, n)))
|
|
16
10
|
}), N = (t, e, r) => {
|
|
17
11
|
const { getHoursList: u, getMinutesList: i, getSecondsList: L } = V(
|
|
18
12
|
t,
|
|
@@ -76,10 +76,7 @@ const ve = ["onClick"], ge = ["onMouseenter"], Ae = /* @__PURE__ */ ie({
|
|
|
76
76
|
if (c.arrowControl)
|
|
77
77
|
return;
|
|
78
78
|
const o = r(h[e]);
|
|
79
|
-
o && o.$el && (P(o.$el).scrollTop = Math.max(
|
|
80
|
-
0,
|
|
81
|
-
s * T(e)
|
|
82
|
-
));
|
|
79
|
+
o && o.$el && (P(o.$el).scrollTop = Math.max(0, s * T(e)));
|
|
83
80
|
}, T = (e) => {
|
|
84
81
|
const s = r(h[e]);
|
|
85
82
|
return (s == null ? void 0 : s.$el.querySelector("li").offsetHeight) || 0;
|
|
@@ -165,11 +162,7 @@ const ve = ["onClick"], ge = ["onMouseenter"], Ae = /* @__PURE__ */ ie({
|
|
|
165
162
|
default: me(() => [
|
|
166
163
|
(l(!0), a(u, null, D(S.value[o], (n, t) => (l(), a("li", {
|
|
167
164
|
key: t,
|
|
168
|
-
class: m([
|
|
169
|
-
r(i).be("spinner", "item"),
|
|
170
|
-
r(i).is("active", t === d.value[o]),
|
|
171
|
-
r(i).is("disabled", n)
|
|
172
|
-
]),
|
|
165
|
+
class: m([r(i).be("spinner", "item"), r(i).is("active", t === d.value[o]), r(i).is("disabled", n)]),
|
|
173
166
|
onClick: (w) => oe(o, { value: t, disabled: n })
|
|
174
167
|
}, [
|
|
175
168
|
o === "hours" ? (l(), a(u, { key: 0 }, [
|
|
@@ -17,13 +17,11 @@ const we = /* @__PURE__ */ J({
|
|
|
17
17
|
props: le,
|
|
18
18
|
emits: ["pick", "select-range", "set-picker-option"],
|
|
19
19
|
setup(A, { emit: n }) {
|
|
20
|
-
const o = A, R = L("EP_PICKER_BASE"), {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
defaultValue: E
|
|
26
|
-
} = R.props, { getAvailableHours: _, getAvailableMinutes: D, getAvailableSeconds: O } = re(b, g, v), r = oe("time"), p = C("zh-cn"), k = C([0, 2]), P = ae(o), y = m(() => te(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) => {
|
|
20
|
+
const o = A, R = L("EP_PICKER_BASE"), { arrowControl: T, disabledHours: b, disabledMinutes: g, disabledSeconds: v, defaultValue: E } = R.props, { getAvailableHours: _, getAvailableMinutes: D, getAvailableSeconds: O } = re(
|
|
21
|
+
b,
|
|
22
|
+
g,
|
|
23
|
+
v
|
|
24
|
+
), r = oe("time"), p = C("zh-cn"), k = C([0, 2]), P = ae(o), y = m(() => te(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
25
|
const t = f(e).locale(p.value), a = d(t);
|
|
28
26
|
return t.isSame(a);
|
|
29
27
|
}, I = () => {
|
|
@@ -38,9 +36,7 @@ const we = /* @__PURE__ */ J({
|
|
|
38
36
|
}, K = (e, t) => {
|
|
39
37
|
n("select-range", e, t), k.value = [e, t];
|
|
40
38
|
}, M = (e) => {
|
|
41
|
-
const t = [0, 3].concat(i.value ? [6] : []), a = ["hours", "minutes"].concat(
|
|
42
|
-
i.value ? ["seconds"] : []
|
|
43
|
-
), c = (t.indexOf(k.value[0]) + e + t.length) % t.length;
|
|
39
|
+
const t = [0, 3].concat(i.value ? [6] : []), a = ["hours", "minutes"].concat(i.value ? ["seconds"] : []), c = (t.indexOf(k.value[0]) + e + t.length) % t.length;
|
|
44
40
|
h.start_emitSelectRange(a[c]);
|
|
45
41
|
}, U = (e) => {
|
|
46
42
|
const t = e.code, { left: a, right: V, up: c, down: F } = ne;
|
|
@@ -22,13 +22,7 @@ const we = ["disabled"], Be = /* @__PURE__ */ de({
|
|
|
22
22
|
for (let a = e; a <= n; a++)
|
|
23
23
|
t.push(a);
|
|
24
24
|
return t;
|
|
25
|
-
}, k = j("zh-cn"), s = U("time"), F = U("picker"), J = me("EP_PICKER_BASE"), {
|
|
26
|
-
arrowControl: D,
|
|
27
|
-
disabledHours: O,
|
|
28
|
-
disabledMinutes: E,
|
|
29
|
-
disabledSeconds: P,
|
|
30
|
-
defaultValue: C
|
|
31
|
-
} = J.props, m = h(() => u.parsedValue[0]), f = h(() => u.parsedValue[1]), L = ke(u), Q = () => {
|
|
25
|
+
}, k = j("zh-cn"), s = U("time"), F = U("picker"), J = me("EP_PICKER_BASE"), { arrowControl: D, disabledHours: O, disabledMinutes: E, disabledSeconds: P, defaultValue: C } = J.props, m = h(() => u.parsedValue[0]), f = h(() => u.parsedValue[1]), L = ke(u), Q = () => {
|
|
32
26
|
c("pick", L.value, !1);
|
|
33
27
|
}, b = h(() => u.format.includes("ss")), H = h(() => u.format.includes("A") ? "A" : u.format.includes("a") ? "a" : ""), W = (e = !1) => {
|
|
34
28
|
c("pick", [m.value, f.value], e);
|
|
@@ -48,9 +42,7 @@ const we = ["disabled"], Be = /* @__PURE__ */ de({
|
|
|
48
42
|
const t = o(y);
|
|
49
43
|
w.value = [e + t, n + t];
|
|
50
44
|
}, oe = (e) => {
|
|
51
|
-
const n = b.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11], t = ["hours", "minutes"].concat(
|
|
52
|
-
b.value ? ["seconds"] : []
|
|
53
|
-
), r = (n.indexOf(w.value[0]) + e + n.length) % n.length, l = n.length / 2;
|
|
45
|
+
const n = b.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11], t = ["hours", "minutes"].concat(b.value ? ["seconds"] : []), r = (n.indexOf(w.value[0]) + e + n.length) % n.length, l = n.length / 2;
|
|
54
46
|
r < l ? x.start_emitSelectRange(t[r]) : x.end_emitSelectRange(t[r - l]);
|
|
55
47
|
}, ae = (e) => {
|
|
56
48
|
const n = e.code, { left: t, right: a, up: r, down: l } = ge;
|
|
@@ -78,10 +70,7 @@ const we = ["disabled"], Be = /* @__PURE__ */ de({
|
|
|
78
70
|
return r;
|
|
79
71
|
const K = p.second(), pe = l ? v(K + 1, 59) : v(0, K - 1);
|
|
80
72
|
return M(r, pe);
|
|
81
|
-
}, B = ([e, n]) => [
|
|
82
|
-
I(e, "start", !0, n),
|
|
83
|
-
I(n, "end", !1, e)
|
|
84
|
-
], { getAvailableHours: se, getAvailableMinutes: re, getAvailableSeconds: le } = Se(
|
|
73
|
+
}, B = ([e, n]) => [I(e, "start", !0, n), I(n, "end", !1, e)], { getAvailableHours: se, getAvailableMinutes: re, getAvailableSeconds: le } = Se(
|
|
85
74
|
V,
|
|
86
75
|
_,
|
|
87
76
|
R
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { isArray as o, isEmpty as u } from "@vft/utils";
|
|
2
2
|
import i from "dayjs";
|
|
3
3
|
import { isDate as c } from "lodash";
|
|
4
|
-
const y = (r, t) => [
|
|
5
|
-
r > 0 ? r - 1 : void 0,
|
|
6
|
-
r,
|
|
7
|
-
r < t ? r + 1 : void 0
|
|
8
|
-
], W = (r) => Array.from(Array.from({ length: r }).keys()), g = (r) => r.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim(), D = (r) => r.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim(), a = function(r, t) {
|
|
4
|
+
const y = (r, t) => [r > 0 ? r - 1 : void 0, r, r < t ? r + 1 : void 0], W = (r) => Array.from(Array.from({ length: r }).keys()), g = (r) => r.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim(), D = (r) => r.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim(), a = function(r, t) {
|
|
9
5
|
const e = c(r), n = c(t);
|
|
10
6
|
return e && n ? r.getTime() === t.getTime() : !e && !n ? r === t : !1;
|
|
11
7
|
}, x = function(r, t) {
|