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
|
@@ -8,25 +8,13 @@ import S from "../builders/build-grid.js";
|
|
|
8
8
|
import { AUTO_ALIGNMENT as M, CENTERED_ALIGNMENT as c, END_ALIGNMENT as x, START_ALIGNMENT as O, SMART_ALIGNMENT as l } from "../defaults.js";
|
|
9
9
|
const p = "ElFixedSizeGrid", T = S({
|
|
10
10
|
name: "ElFixedSizeGrid",
|
|
11
|
-
getColumnPosition: ({ columnWidth: t }, e) => [
|
|
12
|
-
|
|
13
|
-
e * t
|
|
14
|
-
],
|
|
15
|
-
getRowPosition: ({ rowHeight: t }, e) => [
|
|
16
|
-
t,
|
|
17
|
-
e * t
|
|
18
|
-
],
|
|
11
|
+
getColumnPosition: ({ columnWidth: t }, e) => [t, e * t],
|
|
12
|
+
getRowPosition: ({ rowHeight: t }, e) => [t, e * t],
|
|
19
13
|
getEstimatedTotalHeight: ({ totalRow: t, rowHeight: e }) => e * t,
|
|
20
14
|
getEstimatedTotalWidth: ({ totalColumn: t, columnWidth: e }) => e * t,
|
|
21
15
|
getColumnOffset: ({ totalColumn: t, columnWidth: e, width: a }, o, n, s, u, d) => {
|
|
22
16
|
a = Number(a);
|
|
23
|
-
const i = Math.max(
|
|
24
|
-
0,
|
|
25
|
-
t * e - a
|
|
26
|
-
), f = Math.min(
|
|
27
|
-
i,
|
|
28
|
-
o * e
|
|
29
|
-
), r = Math.max(
|
|
17
|
+
const i = Math.max(0, t * e - a), f = Math.min(i, o * e), r = Math.max(
|
|
30
18
|
0,
|
|
31
19
|
o * e - a + d + e
|
|
32
20
|
);
|
|
@@ -46,10 +34,7 @@ const p = "ElFixedSizeGrid", T = S({
|
|
|
46
34
|
},
|
|
47
35
|
getRowOffset: ({ rowHeight: t, height: e, totalRow: a }, o, n, s, u, d) => {
|
|
48
36
|
e = Number(e);
|
|
49
|
-
const i = Math.max(0, a * t - e), f = Math.min(i, o * t), r = Math.max(
|
|
50
|
-
0,
|
|
51
|
-
o * t - e + d + t
|
|
52
|
-
);
|
|
37
|
+
const i = Math.max(0, a * t - e), f = Math.min(i, o * t), r = Math.max(0, o * t - e + d + t);
|
|
53
38
|
switch (n === l && (s >= r - e && s <= f + e ? n = M : n = c), n) {
|
|
54
39
|
case O:
|
|
55
40
|
return f;
|
|
@@ -64,30 +49,14 @@ const p = "ElFixedSizeGrid", T = S({
|
|
|
64
49
|
return s >= r && s <= f ? s : r > f || s < r ? r : f;
|
|
65
50
|
}
|
|
66
51
|
},
|
|
67
|
-
getColumnStartIndexForOffset: ({ columnWidth: t, totalColumn: e }, a) => Math.max(
|
|
68
|
-
0,
|
|
69
|
-
Math.min(
|
|
70
|
-
e - 1,
|
|
71
|
-
Math.floor(a / t)
|
|
72
|
-
)
|
|
73
|
-
),
|
|
52
|
+
getColumnStartIndexForOffset: ({ columnWidth: t, totalColumn: e }, a) => Math.max(0, Math.min(e - 1, Math.floor(a / t))),
|
|
74
53
|
getColumnStopIndexForStartIndex: ({ columnWidth: t, totalColumn: e, width: a }, o, n) => {
|
|
75
|
-
const s = o * t, u = Math.ceil(
|
|
76
|
-
|
|
77
|
-
);
|
|
78
|
-
return Math.max(
|
|
79
|
-
0,
|
|
80
|
-
Math.min(e - 1, o + u - 1)
|
|
81
|
-
);
|
|
54
|
+
const s = o * t, u = Math.ceil((a + n - s) / t);
|
|
55
|
+
return Math.max(0, Math.min(e - 1, o + u - 1));
|
|
82
56
|
},
|
|
83
|
-
getRowStartIndexForOffset: ({ rowHeight: t, totalRow: e }, a) => Math.max(
|
|
84
|
-
0,
|
|
85
|
-
Math.min(e - 1, Math.floor(a / t))
|
|
86
|
-
),
|
|
57
|
+
getRowStartIndexForOffset: ({ rowHeight: t, totalRow: e }, a) => Math.max(0, Math.min(e - 1, Math.floor(a / t))),
|
|
87
58
|
getRowStopIndexForStartIndex: ({ rowHeight: t, totalRow: e, height: a }, o, n) => {
|
|
88
|
-
const s = o * t, u = Math.ceil(
|
|
89
|
-
(a + n - s) / t
|
|
90
|
-
);
|
|
59
|
+
const s = o * t, u = Math.ceil((a + n - s) / t);
|
|
91
60
|
return Math.max(
|
|
92
61
|
0,
|
|
93
62
|
Math.min(
|
|
@@ -40,9 +40,7 @@ const F = l({
|
|
|
40
40
|
},
|
|
41
41
|
getStartIndexForOffset: ({ total: t, itemSize: e }, o) => Math.max(0, Math.min(t - 1, Math.floor(o / e))),
|
|
42
42
|
getStopIndexForStartIndex: ({ height: t, total: e, itemSize: o, layout: h, width: u }, n, s) => {
|
|
43
|
-
const i = n * o, r = d(h) ? u : t, m = Math.ceil(
|
|
44
|
-
(r + s - i) / o
|
|
45
|
-
);
|
|
43
|
+
const i = n * o, r = d(h) ? u : t, m = Math.ceil((r + s - i) / o);
|
|
46
44
|
return Math.max(
|
|
47
45
|
0,
|
|
48
46
|
Math.min(
|
|
@@ -37,12 +37,7 @@ const lt = C({
|
|
|
37
37
|
if (t >= 50)
|
|
38
38
|
return t * r / 100;
|
|
39
39
|
const i = r / 3;
|
|
40
|
-
return Math.floor(
|
|
41
|
-
Math.min(
|
|
42
|
-
Math.max(t * r, V),
|
|
43
|
-
i
|
|
44
|
-
)
|
|
45
|
-
);
|
|
40
|
+
return Math.floor(Math.min(Math.max(t * r, V), i));
|
|
46
41
|
}), B = a(() => {
|
|
47
42
|
if (!Number.isFinite(g.value))
|
|
48
43
|
return {
|
|
@@ -57,9 +52,7 @@ const lt = C({
|
|
|
57
52
|
},
|
|
58
53
|
e.layout
|
|
59
54
|
);
|
|
60
|
-
}), s = a(
|
|
61
|
-
() => Math.floor(e.clientSize - g.value - d(b))
|
|
62
|
-
), T = () => {
|
|
55
|
+
}), s = a(() => Math.floor(e.clientSize - g.value - d(b))), T = () => {
|
|
63
56
|
window.addEventListener("mousemove", m), window.addEventListener("mouseup", c);
|
|
64
57
|
const t = d(l);
|
|
65
58
|
t && (h = document.onselectstart, document.onselectstart = () => !1, t.addEventListener("touchmove", m), t.addEventListener("touchend", c));
|
|
@@ -108,11 +101,7 @@ const lt = C({
|
|
|
108
101
|
{
|
|
109
102
|
role: "presentation",
|
|
110
103
|
ref: f,
|
|
111
|
-
class: [
|
|
112
|
-
z.b(),
|
|
113
|
-
e.class,
|
|
114
|
-
(e.alwaysOn || n.isDragging) && "always-on"
|
|
115
|
-
],
|
|
104
|
+
class: [z.b(), e.class, (e.alwaysOn || n.isDragging) && "always-on"],
|
|
116
105
|
style: A.value,
|
|
117
106
|
onMousedown: _(D, ["stop", "prevent"]),
|
|
118
107
|
onTouchstartPrevent: w
|
|
@@ -102,10 +102,7 @@ const o = e({
|
|
|
102
102
|
initScrollTop: u,
|
|
103
103
|
itemKey: {
|
|
104
104
|
type: t(Function),
|
|
105
|
-
default: ({
|
|
106
|
-
columnIndex: m,
|
|
107
|
-
rowIndex: y
|
|
108
|
-
}) => `${y}:${m}`
|
|
105
|
+
default: ({ columnIndex: m, rowIndex: y }) => `${y}:${m}`
|
|
109
106
|
},
|
|
110
107
|
rowCache: a,
|
|
111
108
|
rowHeight: o,
|
package/es/constants/date.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const datePickTypes: readonly ["year", "month", "date", "dates", "week", "datetime", "datetimerange", "daterange", "monthrange"];
|
|
2
2
|
export declare const WEEK_DAYS: readonly ["日", "一", "二", "三", "四", "五", "六"];
|
|
3
|
-
export type DatePickType = typeof datePickTypes[number];
|
|
3
|
+
export type DatePickType = (typeof datePickTypes)[number];
|
package/es/constants/date.js
CHANGED
package/es/constants/size.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const componentSizes: readonly ["", "default", "small", "large"];
|
|
2
|
-
export type ComponentSize = typeof componentSizes[number];
|
|
2
|
+
export type ComponentSize = (typeof componentSizes)[number];
|
|
3
3
|
export declare const componentSizeMap: {
|
|
4
4
|
readonly large: 40;
|
|
5
5
|
readonly default: 32;
|
|
@@ -7,19 +7,11 @@ const C = (t, e, p) => {
|
|
|
7
7
|
};
|
|
8
8
|
const m = (u) => {
|
|
9
9
|
const L = u.clientX, M = u.clientY, { offsetX: n, offsetY: s } = c, o = t.value.getBoundingClientRect(), a = o.left, l = o.top, w = o.width, X = o.height, Y = document.documentElement.clientWidth, x = document.documentElement.clientHeight, b = -a + n, D = -l + s, H = Y - a - w + n, T = x - l - X + s, d = (f) => {
|
|
10
|
-
const r = Math.min(
|
|
11
|
-
Math.max(n + f.clientX - L, b),
|
|
12
|
-
H
|
|
13
|
-
), h = Math.min(
|
|
14
|
-
Math.max(s + f.clientY - M, D),
|
|
15
|
-
T
|
|
16
|
-
);
|
|
10
|
+
const r = Math.min(Math.max(n + f.clientX - L, b), H), h = Math.min(Math.max(s + f.clientY - M, D), T);
|
|
17
11
|
c = {
|
|
18
12
|
offsetX: r,
|
|
19
13
|
offsetY: h
|
|
20
|
-
}, t.value.style.transform = `translate(${g(
|
|
21
|
-
r
|
|
22
|
-
)}, ${g(h)})`;
|
|
14
|
+
}, t.value.style.transform = `translate(${g(r)}, ${g(h)})`;
|
|
23
15
|
}, v = () => {
|
|
24
16
|
document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", v);
|
|
25
17
|
};
|
|
@@ -7,10 +7,7 @@ import "lodash";
|
|
|
7
7
|
import { isRef as v, computed as w, watch as C, onScopeDispose as H } from "vue";
|
|
8
8
|
import { useNamespace as S } from "../use-namespace/index.js";
|
|
9
9
|
const O = (s, l = {}) => {
|
|
10
|
-
v(s) || b(
|
|
11
|
-
"[useLockscreen]",
|
|
12
|
-
"You need to pass a ref param to this function"
|
|
13
|
-
);
|
|
10
|
+
v(s) || b("[useLockscreen]", "You need to pass a ref param to this function");
|
|
14
11
|
const d = l.ns || S("popup"), o = w(() => d.bm("parent", "hidden"));
|
|
15
12
|
if (!y || r(document.body, o.value))
|
|
16
13
|
return;
|
|
@@ -12,9 +12,7 @@ const U = (s) => {
|
|
|
12
12
|
onShow: v,
|
|
13
13
|
onHide: m
|
|
14
14
|
}) => {
|
|
15
|
-
const n = B(), { emit: a } = n, t = n.props, r = $(
|
|
16
|
-
() => f(t[w])
|
|
17
|
-
), M = $(() => t[s] === null), T = (e) => {
|
|
15
|
+
const n = B(), { emit: a } = n, t = n.props, r = $(() => f(t[w])), M = $(() => t[s] === null), T = (e) => {
|
|
18
16
|
o.value !== !0 && (o.value = !0, i && (i.value = e), f(v) && v(e));
|
|
19
17
|
}, E = (e) => {
|
|
20
18
|
o.value !== !1 && (o.value = !1, i && (i.value = e), f(m) && m(e));
|
|
@@ -17,9 +17,7 @@ const c = (t, i, d) => p(t.subTree).filter(
|
|
|
17
17
|
d[r.uid] = r, o.value = c(t, i, d);
|
|
18
18
|
},
|
|
19
19
|
removeChild: (r) => {
|
|
20
|
-
delete d[r], o.value = o.value.filter(
|
|
21
|
-
(l) => l.uid !== r
|
|
22
|
-
);
|
|
20
|
+
delete d[r], o.value = o.value.filter((l) => l.uid !== r);
|
|
23
21
|
}
|
|
24
22
|
};
|
|
25
23
|
};
|
|
@@ -17,11 +17,7 @@ const P = (a, i, p = {}) => {
|
|
|
17
17
|
onFirstUpdate: t,
|
|
18
18
|
placement: r || "bottom",
|
|
19
19
|
strategy: m || "absolute",
|
|
20
|
-
modifiers: [
|
|
21
|
-
...y || [],
|
|
22
|
-
u,
|
|
23
|
-
{ name: "applyStyles", enabled: !1 }
|
|
24
|
-
]
|
|
20
|
+
modifiers: [...y || [], u, { name: "applyStyles", enabled: !1 }]
|
|
25
21
|
};
|
|
26
22
|
}), o = v(), c = S({
|
|
27
23
|
styles: {
|
|
@@ -47,16 +43,9 @@ const P = (a, i, p = {}) => {
|
|
|
47
43
|
{
|
|
48
44
|
deep: !0
|
|
49
45
|
}
|
|
50
|
-
), d(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
l(), !(!t || !r) && (o.value = b(
|
|
54
|
-
t,
|
|
55
|
-
r,
|
|
56
|
-
e(s)
|
|
57
|
-
));
|
|
58
|
-
}
|
|
59
|
-
), U(() => {
|
|
46
|
+
), d([a, i], ([t, r]) => {
|
|
47
|
+
l(), !(!t || !r) && (o.value = b(t, r, e(s)));
|
|
48
|
+
}), U(() => {
|
|
60
49
|
l();
|
|
61
50
|
}), {
|
|
62
51
|
state: n(() => {
|
|
@@ -79,9 +68,7 @@ const P = (a, i, p = {}) => {
|
|
|
79
68
|
};
|
|
80
69
|
function g(a) {
|
|
81
70
|
const i = Object.keys(a.elements), p = f(
|
|
82
|
-
i.map(
|
|
83
|
-
(s) => [s, a.styles[s] || {}]
|
|
84
|
-
)
|
|
71
|
+
i.map((s) => [s, a.styles[s] || {}])
|
|
85
72
|
), u = f(
|
|
86
73
|
i.map(
|
|
87
74
|
(s) => [s, a.attributes[s]]
|