bkui-vue 0.0.2-beta.8 → 0.0.2-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +70 -62
- package/dist/index.esm.js +15668 -15161
- package/dist/index.umd.js +73 -65
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.d.ts +1 -1
- package/lib/affix/index.d.ts +4 -4
- package/lib/affix/index.js +1 -1
- package/lib/alert/alert.css +7 -0
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.less +16 -6
- package/lib/alert/alert.variable.css +7 -0
- package/lib/alert/index.d.ts +10 -10
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/index.d.ts +1 -1
- package/lib/animate-number/index.js +1 -1
- package/lib/backtop/backtop.css +8 -8
- package/lib/backtop/backtop.less +3 -1
- package/lib/backtop/backtop.variable.css +11 -11
- package/lib/backtop/index.d.ts +1 -1
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.d.ts +2 -2
- package/lib/badge/index.d.ts +7 -7
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.css +4 -4
- package/lib/breadcrumb/breadcrumb.variable.css +4 -4
- package/lib/breadcrumb/index.d.ts +2 -2
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button.css +20 -0
- package/lib/button/button.less +105 -94
- package/lib/button/button.variable.css +20 -0
- package/lib/button/index.d.ts +2 -2
- package/lib/button/index.js +1 -1
- package/lib/card/card.css +4 -4
- package/lib/card/card.d.ts +1 -1
- package/lib/card/card.variable.css +4 -4
- package/lib/card/index.d.ts +4 -4
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader.css +4 -4
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/cascader.variable.css +4 -4
- package/lib/cascader/index.d.ts +5 -2
- package/lib/cascader/index.js +1 -1
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +6 -3
- package/lib/checkbox/checkbox.d.ts +4 -4
- package/lib/checkbox/index.d.ts +22 -19
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/index.d.ts +1 -1
- package/lib/code-diff/index.js +1 -1
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse/index.js +1 -1
- package/lib/collapse-transition/index.d.ts +128 -2
- package/lib/collapse-transition/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +16 -0
- package/lib/color-picker/components/recommend-colors.d.ts +16 -0
- package/lib/color-picker/index.d.ts +19 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/components.d.ts +1 -1
- package/lib/components.js +1 -1
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/index.d.ts +5 -1
- package/lib/config-provider/index.js +1 -1
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/config-provider/use-global-config.d.ts +2 -0
- package/lib/config-provider/use-prefix.d.ts +2 -0
- package/lib/container/container.css +4 -4
- package/lib/container/container.variable.css +4 -4
- package/lib/container/index.d.ts +2 -2
- package/lib/container/index.js +1 -1
- package/lib/date-picker/date-picker.d.ts +4 -2
- package/lib/date-picker/index.d.ts +15 -8
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/panel/date-range.d.ts +2 -1
- package/lib/date-picker/time-picker.d.ts +1 -1
- package/lib/dialog/dialog.css +2 -0
- package/lib/dialog/dialog.variable.css +2 -0
- package/lib/dialog/index.d.ts +1 -1
- package/lib/dialog/index.js +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +3 -2
- package/lib/dist.index.js +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +1 -1
- package/lib/dropdown/dropdown.css +1 -0
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/dropdown.variable.css +1 -0
- package/lib/dropdown/index.d.ts +7 -7
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/index.d.ts +2 -2
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/index.d.ts +1 -1
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +1 -1
- package/lib/hooks.d.ts +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icon/angle-double-down-line.js +1 -1
- package/lib/icon/angle-double-left-line.js +1 -1
- package/lib/icon/angle-double-left.js +1 -1
- package/lib/icon/angle-double-right-line.js +1 -1
- package/lib/icon/angle-double-right.js +1 -1
- package/lib/icon/angle-double-up-line.js +1 -1
- package/lib/icon/angle-down-fill.js +1 -1
- package/lib/icon/angle-down-line.js +1 -1
- package/lib/icon/angle-down.js +1 -1
- package/lib/icon/angle-left.js +1 -1
- package/lib/icon/angle-right.js +1 -1
- package/lib/icon/angle-up-fill.js +1 -1
- package/lib/icon/angle-up.js +1 -1
- package/lib/icon/archive-fill.js +1 -1
- package/lib/icon/arrows-left.js +1 -1
- package/lib/icon/arrows-right.js +1 -1
- package/lib/icon/assistant.d.ts +4 -0
- package/lib/icon/assistant.js +1 -0
- package/lib/icon/audio-fill.js +1 -1
- package/lib/icon/bk.js +1 -1
- package/lib/icon/circle.js +1 -1
- package/lib/icon/close-line.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/code.js +1 -1
- package/lib/icon/cog-shape.js +1 -1
- package/lib/icon/collapse-left.js +1 -1
- package/lib/icon/copy-shape.js +1 -1
- package/lib/icon/copy.js +1 -1
- package/lib/icon/data-shape.js +1 -1
- package/lib/icon/del.js +1 -1
- package/lib/icon/doc-fill.js +1 -1
- package/lib/icon/done.js +1 -1
- package/lib/icon/down-shape.js +1 -1
- package/lib/icon/down-small.js +1 -1
- package/lib/icon/edit-line.js +1 -1
- package/lib/icon/ellipsis.js +1 -1
- package/lib/icon/enlarge-line.js +1 -1
- package/lib/icon/error.js +1 -1
- package/lib/icon/excel-fill.js +1 -1
- package/lib/icon/exclamation-circle-shape.js +1 -1
- package/lib/icon/eye.js +1 -1
- package/lib/icon/filliscreen-line.js +1 -1
- package/lib/icon/fix-line.js +1 -1
- package/lib/icon/fix-shape.js +1 -1
- package/lib/icon/folder-open.js +1 -1
- package/lib/icon/folder-shape-open.js +1 -1
- package/lib/icon/folder-shape.js +1 -1
- package/lib/icon/folder.js +1 -1
- package/lib/icon/funnel.js +1 -1
- package/lib/icon/help-document-fill.js +1 -1
- package/lib/icon/help-fill.js +1 -1
- package/lib/icon/help.js +1 -1
- package/lib/icon/image-fill.js +1 -1
- package/lib/icon/img-error.js +1 -1
- package/lib/icon/img-placehoulder.js +1 -1
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/icon/info-line.js +1 -1
- package/lib/icon/info.js +1 -1
- package/lib/icon/left-shape.js +1 -1
- package/lib/icon/left-turn-line.js +1 -1
- package/lib/icon/narrow-line.js +1 -1
- package/lib/icon/original.js +1 -1
- package/lib/icon/pdf-fill.js +1 -1
- package/lib/icon/play-shape.js +1 -1
- package/lib/icon/plus.js +1 -1
- package/lib/icon/ppt-fill.js +1 -1
- package/lib/icon/qq.js +1 -1
- package/lib/icon/right-shape.js +1 -1
- package/lib/icon/right-turn-line.js +1 -1
- package/lib/icon/search.js +1 -1
- package/lib/icon/share.js +1 -1
- package/lib/icon/spinner.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/switcher-loading.js +1 -1
- package/lib/icon/text-file.js +1 -1
- package/lib/icon/text-fill.js +1 -1
- package/lib/icon/transfer.js +1 -1
- package/lib/icon/tree-application-shape.js +1 -1
- package/lib/icon/unfull-screen.js +1 -1
- package/lib/icon/unvisible.js +1 -1
- package/lib/icon/up-shape.js +1 -1
- package/lib/icon/upload.js +1 -1
- package/lib/icon/video-fill.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/weixin-pro.js +1 -1
- package/lib/icon/weixin.js +1 -1
- package/lib/image/index.d.ts +1 -1
- package/lib/image/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/info-box/info-box.css +2 -0
- package/lib/info-box/info-box.less +2 -1
- package/lib/info-box/info-box.variable.css +2 -0
- package/lib/input/index.d.ts +146 -50
- package/lib/input/index.js +2 -1
- package/lib/input/index.js.LICENSE.txt +1 -0
- package/lib/input/input.css +38 -10
- package/lib/input/input.d.ts +100 -11
- package/lib/input/input.less +53 -14
- package/lib/input/input.variable.css +38 -10
- package/lib/input/util.d.ts +6 -0
- package/lib/link/index.d.ts +4 -4
- package/lib/link/index.js +1 -1
- package/lib/link/link.d.ts +1 -1
- package/lib/loading/index.d.ts +2 -2
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +4 -4
- package/lib/loading/loading.variable.css +4 -4
- package/lib/locale/index.js +1 -1
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.d.ts +2 -2
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu.css +4 -4
- package/lib/menu/menu.variable.css +4 -4
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +33 -9
- package/lib/message/message.less +78 -54
- package/lib/message/message.variable.css +33 -9
- package/lib/message/messageConstructor.d.ts +30 -8
- package/lib/modal/index.d.ts +2 -2
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +2 -0
- package/lib/modal/modal.variable.css +2 -0
- package/lib/navigation/index.d.ts +4 -1
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.d.ts +1 -0
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/components/overflow-title.d.ts +257 -1
- package/lib/overflow-title/index.d.ts +387 -2
- package/lib/overflow-title/index.js +1 -1
- package/lib/overflow-title/props.d.ts +129 -0
- package/lib/pagination/index.d.ts +2 -2
- package/lib/pagination/index.js +1 -1
- package/lib/plugin-popover/index.js +1 -1
- package/lib/plugins/index.js +1 -1
- package/lib/pop-confirm/index.d.ts +1 -1
- package/lib/pop-confirm/index.js +1 -1
- package/lib/popover/const.d.ts +22 -9
- package/lib/popover/content.d.ts +33 -0
- package/lib/popover/index.d.ts +154 -61
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +1 -0
- package/lib/popover/popover.d.ts +64 -23
- package/lib/popover/popover.less +3 -2
- package/lib/popover/popover.variable.css +1 -0
- package/lib/popover/props.d.ts +29 -4
- package/lib/popover/use-floating.d.ts +2 -2
- package/lib/popover/use-popover-init.d.ts +2 -1
- package/lib/popover2/index.d.ts +1 -1
- package/lib/popover2/index.js +1 -1
- package/lib/preset.d.ts +2 -0
- package/lib/preset.js +1 -1
- package/lib/process/index.d.ts +1 -1
- package/lib/process/index.js +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +4 -4
- package/lib/progress/progress.variable.css +4 -4
- package/lib/radio/index.d.ts +23 -23
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +4 -4
- package/lib/radio/radio-group.d.ts +4 -4
- package/lib/radio/radio.d.ts +4 -4
- package/lib/rate/index.d.ts +8 -4
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +2 -1
- package/lib/resize-layout/index.d.ts +4 -4
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +12 -0
- package/lib/resize-layout/resize-layout.d.ts +1 -1
- package/lib/resize-layout/resize-layout.less +12 -0
- package/lib/resize-layout/resize-layout.variable.css +12 -0
- package/lib/search-select/index.d.ts +62 -29
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/input.d.ts +5 -1
- package/lib/search-select/menu.d.ts +33 -2
- package/lib/search-select/search-select.css +37 -17
- package/lib/search-select/search-select.d.ts +23 -20
- package/lib/search-select/search-select.less +34 -11
- package/lib/search-select/search-select.variable.css +37 -17
- package/lib/search-select/selected.d.ts +5 -1
- package/lib/search-select/utils.d.ts +13 -5
- package/lib/select/common.d.ts +1 -0
- package/lib/select/index.d.ts +203 -84
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +11 -0
- package/lib/select/select.css +13 -5
- package/lib/select/select.d.ts +86 -37
- package/lib/select/select.less +11 -1
- package/lib/select/select.variable.css +37 -29
- package/lib/select/selectTagInput.d.ts +8 -5
- package/lib/shared/helper.d.ts +1 -1
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +3 -4
- package/lib/shared/pop-manager.d.ts +6 -2
- package/lib/shared/popover.d.ts +2 -2
- package/lib/shared/vue-types.d.ts +3 -2
- package/lib/sideslider/index.d.ts +1 -1
- package/lib/sideslider/index.js +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/steps/index.js +1 -1
- package/lib/styles/mixins/animate.css +4 -4
- package/lib/styles/mixins/animate.less +10 -6
- package/lib/styles/mixins/animate.variable.css +126 -4
- package/lib/styles/mixins/mixins.css +4 -4
- package/lib/styles/mixins/mixins.variable.css +4 -4
- package/lib/styles/mixins/popper.less +6 -5
- package/lib/swiper/index.d.ts +1 -1
- package/lib/swiper/index.js +1 -1
- package/lib/swiper/swiper.css +0 -6
- package/lib/swiper/swiper.less +0 -8
- package/lib/swiper/swiper.variable.css +0 -6
- package/lib/switcher/index.d.ts +30 -16
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +4 -4
- package/lib/switcher/switcher.d.ts +74 -5
- package/lib/switcher/switcher.variable.css +4 -4
- package/lib/tab/index.d.ts +3 -3
- package/lib/tab/index.js +1 -1
- package/lib/tab/tab-nav.d.ts +12 -2
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/table/components/table-cell.d.ts +22 -15
- package/lib/table/components/table-column.d.ts +155 -219
- package/lib/table/const.d.ts +40 -56
- package/lib/table/events.d.ts +180 -0
- package/lib/table/index.d.ts +747 -440
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +3 -0
- package/lib/table/plugins/head-filter.d.ts +3 -7
- package/lib/table/plugins/head-filter.less +3 -0
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/head-sort.d.ts +3 -7
- package/lib/table/plugins/settings.d.ts +12 -26
- package/lib/table/plugins/use-column-resize.d.ts +30 -10
- package/lib/table/plugins/use-fixed-column.d.ts +10 -9
- package/lib/table/plugins/use-pagination.d.ts +7 -4
- package/lib/table/props.d.ts +220 -181
- package/lib/table/render.d.ts +12 -20
- package/lib/table/table.css +89 -6
- package/lib/table/table.d.ts +227 -104
- package/lib/table/table.less +79 -9
- package/lib/table/table.variable.css +89 -6
- package/lib/table/use-attributes.d.ts +55 -0
- package/lib/table/use-column.d.ts +177 -3
- package/lib/table/use-common.d.ts +1609 -76
- package/lib/table/use-render.d.ts +11 -0
- package/lib/table/utils.d.ts +30 -28
- package/lib/table-column/index.d.ts +240 -527
- package/lib/table-column/index.js +1 -1
- package/lib/tag/index.d.ts +10 -10
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag-input/index.d.ts +49 -13
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/tag-input.css +9 -1
- package/lib/tag-input/tag-input.d.ts +46 -10
- package/lib/tag-input/tag-input.less +13 -4
- package/lib/tag-input/tag-input.variable.css +9 -1
- package/lib/tag-input/tag-props.d.ts +16 -4
- package/lib/time-picker/index.d.ts +4 -4
- package/lib/time-picker/index.js +1 -1
- package/lib/timeline/index.d.ts +1 -1
- package/lib/timeline/index.js +1 -1
- package/lib/transfer/index.d.ts +1 -1
- package/lib/transfer/index.js +1 -1
- package/lib/tree/constant.d.ts +2 -2
- package/lib/tree/index.d.ts +49 -7
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +16 -2
- package/lib/tree/tree.d.ts +27 -2
- package/lib/tree/use-node-action.d.ts +5 -3
- package/lib/tree/use-node-attribute.d.ts +17 -8
- package/lib/tree/use-search.d.ts +2 -2
- package/lib/tree/use-tree-init.d.ts +1 -2
- package/lib/tree/util.d.ts +8 -3
- package/lib/upload/index.d.ts +1 -1
- package/lib/upload/index.js +1 -1
- package/lib/upload/upload.css +4 -4
- package/lib/upload/upload.variable.css +4 -4
- package/lib/virtual-render/index.d.ts +43 -1
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -0
- package/lib/virtual-render/v-virtual-render.d.ts +19 -1
- package/lib/virtual-render/virtual-render.d.ts +25 -0
- package/lib/volar.components.d.ts +24 -24
- package/package.json +17 -16
@@ -6,10 +6,12 @@ declare const BkVirtualRender: {
|
|
6
6
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
7
7
|
width?: string | number;
|
8
8
|
height?: string | number;
|
9
|
+
maxHeight?: number;
|
9
10
|
enabled?: boolean;
|
10
11
|
list?: unknown[];
|
11
12
|
lineHeight?: any;
|
12
13
|
minHeight?: number;
|
14
|
+
wrapperStyle?: any;
|
13
15
|
className?: string | {
|
14
16
|
[key: string]: any;
|
15
17
|
};
|
@@ -32,10 +34,11 @@ declare const BkVirtualRender: {
|
|
32
34
|
throttleDelay?: number;
|
33
35
|
rowKey?: string;
|
34
36
|
keepAlive?: boolean;
|
37
|
+
autoReset?: boolean;
|
35
38
|
class?: unknown;
|
36
39
|
style?: unknown;
|
37
|
-
key?: string | number | symbol;
|
38
40
|
ref?: import("vue").VNodeRef;
|
41
|
+
key?: string | number | symbol;
|
39
42
|
ref_for?: boolean;
|
40
43
|
ref_key?: string;
|
41
44
|
};
|
@@ -80,6 +83,9 @@ declare const BkVirtualRender: {
|
|
80
83
|
} & {
|
81
84
|
default: number;
|
82
85
|
};
|
86
|
+
maxHeight: import("vue-types").VueTypeValidableDef<number> & {
|
87
|
+
default: number;
|
88
|
+
};
|
83
89
|
height: import("vue-types").VueTypeDef<string | number> & {
|
84
90
|
default: string | number;
|
85
91
|
};
|
@@ -177,6 +183,14 @@ declare const BkVirtualRender: {
|
|
177
183
|
} & {
|
178
184
|
default: boolean;
|
179
185
|
};
|
186
|
+
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
187
|
+
default: boolean;
|
188
|
+
} & {
|
189
|
+
default: boolean;
|
190
|
+
};
|
191
|
+
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
192
|
+
default: any;
|
193
|
+
};
|
180
194
|
}>> & {
|
181
195
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
182
196
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -184,10 +198,12 @@ declare const BkVirtualRender: {
|
|
184
198
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, {
|
185
199
|
width: string | number;
|
186
200
|
height: string | number;
|
201
|
+
maxHeight: number;
|
187
202
|
enabled: boolean;
|
188
203
|
list: unknown[];
|
189
204
|
lineHeight: any;
|
190
205
|
minHeight: number;
|
206
|
+
wrapperStyle: any;
|
191
207
|
className: string | {
|
192
208
|
[key: string]: any;
|
193
209
|
};
|
@@ -210,6 +226,7 @@ declare const BkVirtualRender: {
|
|
210
226
|
throttleDelay: number;
|
211
227
|
rowKey: string;
|
212
228
|
keepAlive: boolean;
|
229
|
+
autoReset: boolean;
|
213
230
|
}, {}, string, import("vue").SlotsType<{
|
214
231
|
default?: any;
|
215
232
|
beforeContent?: any;
|
@@ -260,6 +277,9 @@ declare const BkVirtualRender: {
|
|
260
277
|
} & {
|
261
278
|
default: number;
|
262
279
|
};
|
280
|
+
maxHeight: import("vue-types").VueTypeValidableDef<number> & {
|
281
|
+
default: number;
|
282
|
+
};
|
263
283
|
height: import("vue-types").VueTypeDef<string | number> & {
|
264
284
|
default: string | number;
|
265
285
|
};
|
@@ -357,6 +377,14 @@ declare const BkVirtualRender: {
|
|
357
377
|
} & {
|
358
378
|
default: boolean;
|
359
379
|
};
|
380
|
+
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
381
|
+
default: boolean;
|
382
|
+
} & {
|
383
|
+
default: boolean;
|
384
|
+
};
|
385
|
+
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
386
|
+
default: any;
|
387
|
+
};
|
360
388
|
}>> & {
|
361
389
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
362
390
|
} & import("vue").ShallowUnwrapRef<() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -390,6 +418,9 @@ declare const BkVirtualRender: {
|
|
390
418
|
} & {
|
391
419
|
default: number;
|
392
420
|
};
|
421
|
+
maxHeight: import("vue-types").VueTypeValidableDef<number> & {
|
422
|
+
default: number;
|
423
|
+
};
|
393
424
|
height: import("vue-types").VueTypeDef<string | number> & {
|
394
425
|
default: string | number;
|
395
426
|
};
|
@@ -487,6 +518,14 @@ declare const BkVirtualRender: {
|
|
487
518
|
} & {
|
488
519
|
default: boolean;
|
489
520
|
};
|
521
|
+
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
522
|
+
default: boolean;
|
523
|
+
} & {
|
524
|
+
default: boolean;
|
525
|
+
};
|
526
|
+
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
527
|
+
default: any;
|
528
|
+
};
|
490
529
|
}>> & {
|
491
530
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
492
531
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -494,10 +533,12 @@ declare const BkVirtualRender: {
|
|
494
533
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, {
|
495
534
|
width: string | number;
|
496
535
|
height: string | number;
|
536
|
+
maxHeight: number;
|
497
537
|
enabled: boolean;
|
498
538
|
list: unknown[];
|
499
539
|
lineHeight: any;
|
500
540
|
minHeight: number;
|
541
|
+
wrapperStyle: any;
|
501
542
|
className: string | {
|
502
543
|
[key: string]: any;
|
503
544
|
};
|
@@ -520,6 +561,7 @@ declare const BkVirtualRender: {
|
|
520
561
|
throttleDelay: number;
|
521
562
|
rowKey: string;
|
522
563
|
keepAlive: boolean;
|
564
|
+
autoReset: boolean;
|
523
565
|
}, {}, string, import("vue").SlotsType<{
|
524
566
|
default?: any;
|
525
567
|
beforeContent?: any;
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","lodash"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("lodash")):t(e["../shared"],e.vue,e["../config-provider"],e.lodash);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o,r)=>(()=>{"use strict";var n={2717:e=>{e.exports=o},4212:t=>{t.exports=e},467:e=>{e.exports=r},748:e=>{e.exports=t}},l={};function i(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{i.r(s),i.d(s,{default:()=>g});var e=i(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function o(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n=i(748),l=i(2717),a={onContentScroll:Function},u=Object.assign({list:e.PropTypes.array.def([]),enabled:e.PropTypes.bool.def(!0),scrollEvent:e.PropTypes.bool.def(!1),lineHeight:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.func]).def(30),minHeight:e.PropTypes.number.def(30),height:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),width:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),className:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentClassName:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentStyle:e.PropTypes.object.def({}),scrollXName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-x")),scrollYName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-y")),groupItemCount:e.PropTypes.number.def(1),preloadItemCount:e.PropTypes.number.def(1),renderAs:e.PropTypes.string.def("div"),contentAs:e.PropTypes.string.def("div"),scrollOffsetTop:e.PropTypes.number.def(0),scrollPosition:e.PropTypes.string.def("content"),abosuteHeight:e.PropTypes.oneOfType([e.PropTypes.string.def("auto"),e.PropTypes.number]).def("auto"),throttleDelay:e.PropTypes.number.def(60),rowKey:e.PropTypes.string.def(void 0),keepAlive:e.PropTypes.bool.def(!1)},a),c=i(467);function p(e,t,o,r){for(var n=0,l=0,i=0,s=0;n<e;n++){if(l+(s=r(n,[n*o,(n+1)*o,"virtual"]))>t){i=t-l;break}l+=s}return{startIndex:n,height:l,diffHeight:i}}function f(e,t,o,r,n){if(r){var l=r.scrollTop,i=r.scrollLeft,s=o.scrollTop,a=o.count,u=o.groupItemCount,c=o.startIndex,f=o.endIndex,d=o.scrollLeft,v=r.offsetHeight,y=0,g=0,h=0;if("number"==typeof e&&(y=Math.floor(l/e),g=Math.ceil(v/e)+y,h=l%e),"function"==typeof e){var m=p(a,l,u,e);y=m.startIndex>0?m.startIndex:0,h=m.diffHeight,g=p(a,v,u,e).startIndex+y+1}if(l!==s||y!==c||g!==f||d!==i){var b=r.scrollHeight-r.offsetHeight-r.scrollTop;"function"==typeof t&&t(n,y,g,l,h,i,{bottom:b>=0?b:0})}}}var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;return(0,c.throttle)((function(e,t,o){return function(e,t,o){var r=o.value,n=r.lineHeight,l=void 0===n?30:n,i=r.handleScrollCallback,s=r.pagination,a=void 0===s?{}:s;if(r.onlyScroll){var u=t.scrollTop,c=t.scrollLeft,p=t.scrollHeight-t.offsetHeight-t.scrollTop;i(e,null,null,u,u,c,{bottom:p>=0?p:0})}else{var d=a.startIndex,v=a.endIndex,y=a.groupItemCount,g=a.count;f(l,i,{scrollTop:a.scrollTop,startIndex:d,endIndex:v,groupItemCount:y,count:g,scrollLeft:a.scrollLeft},t,e)}}(e,t,o)}),e)};const v={mounted:function(e,t){var o=e.parentNode,r=t.value.throttleDelay;o.addEventListener("scroll",(function(e){!function(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60;Reflect.apply(d(r),void 0,[e,t,o])}(e,o,t,r)}))},unbind:function(e){if(e){var t=e.parentNode;if(!t)return;t.removeEventListener("scroll",d)}}},y=(0,n.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:v},props:u,emits:["content-scroll"],slots:Object,setup:function(e,t){var i=this,s=e.renderAs,a=e.contentAs,u=function(e){return"string"==typeof e?[e]:"object"!==r(e)||Array.isArray(e)?e:[e]};if(!e.enabled){var c=function(e,t){var o=e.renderAs,r=e.contentAs,l=(0,n.resolveDirective)("bkVirtualRender"),i={lineHeight:e.lineHeight,handleScrollCallback:function(e,o,r,n,l,i,s){t.emit("content-scroll",[e,{translateY:l,translateX:i,pos:s}])},pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent},s=(0,n.ref)(null);return t.expose({scrollTo:function(e){var t=e.left,o=void 0===t?0:t,r=e.top,n=void 0===r?0:r;s.value.scrollTo(o,n)}}),{rendAsTag:function(){var a,u,c,p,f,d,v,y,g,h,m,b;return(0,n.h)(o,{class:e.className,ref:s},[null!==(c=null===(u=(a=t.slots).beforeContent)||void 0===u?void 0:u.call(a))&&void 0!==c?c:"",(0,n.withDirectives)((0,n.h)(r,{class:e.contentClassName,style:e.contentStyle},[null!==(d=null===(f=(p=t.slots).default)||void 0===f?void 0:f.call(p,{data:e.list}))&&void 0!==d?d:""]),[[l,i]]),null!==(g=null===(y=(v=t.slots).afterContent)||void 0===y?void 0:y.call(v))&&void 0!==g?g:"",null!==(b=null===(m=(h=t.slots).afterSection)||void 0===m?void 0:m.call(h))&&void 0!==b?b:""])}}}(e,t);return c.rendAsTag}var p=(0,n.ref)(null),d=(0,n.reactive)({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),v=function(e,o,r,n,l,i,s){d.startIndex=o,d.endIndex=r,d.scrollTop=n,d.translateY=l,d.translateX=i,d.scrollLeft=i,d.pos=s,t.emit("content-scroll",[e,d])};(0,n.onMounted)((function(){(0,n.nextTick)((function(){m(e.list),b()}))})),(0,n.watch)((function(){return e.list}),(function(){var t;t={left:d.scrollLeft,top:d.scrollTop},y(),b(),e.keepAlive&&w(t)}),{deep:!0}),(0,n.watch)((function(){return e.lineHeight}),(function(){y(),b()}));var y=function(){m(e.list)},g=(0,n.ref)(0),h=(0,n.ref)(0),m=function(t){if(g.value=Math.ceil((t||[]).length/e.groupItemCount),d.count=g.value,d.startIndex=0,d.endIndex=0,d.translateY=0,d.scrollTop=0,"string"==typeof e.abosuteHeight&&"auto"===e.abosuteHeight)if("function"==typeof e.lineHeight){h.value=0;for(var o=0,r=0;r<g.value;r++){var n=e.lineHeight.call(i,r,t.slice(r*e.groupItemCount,e.groupItemCount));o+="number"==typeof n?n:0}h.value=o}else h.value=e.lineHeight*g.value;else h.value=e.abosuteHeight},b=function(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},r=null===(t=p.value)||void 0===t?void 0:t.parentNode;f(e.lineHeight,v,d,r,null),o&&p.value&&w(o)},T=(0,n.computed)((function(){return void 0!==e.rowKey?e.list:(e.list||[]).map((function(e,t){return Object.assign(Object.assign({},e),{$index:t})}))})),P=(0,n.computed)((function(){return T.value.slice(d.startIndex*e.groupItemCount,(d.endIndex+e.preloadItemCount)*e.groupItemCount)})),x=(0,n.computed)((function(){return"content"===e.scrollPosition?{top:"".concat(d.scrollTop+e.scrollOffsetTop,"px"),transform:"translateY(-".concat(d.translateY,"px)")}:{}})),I=(0,n.computed)((function(){return Object.assign({height:"number"==typeof e.height?"".concat(e.height,"px"):e.height,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block"},"container"===e.scrollPosition?x.value:{})})),C=(0,n.computed)((function(){var t="number"==typeof e.abosuteHeight&&0===e.abosuteHeight;return{height:"".concat(h.value<e.minHeight?e.minHeight:h.value,"px"),display:t?"none":"block"}})),H=(0,l.usePrefix)().resolveClassName,O=(0,n.computed)((function(){return[H("virtual-render"),e.scrollXName,e.scrollYName].concat(o(u(e.className)),["container"===e.scrollPosition?H("virtual-content"):""])})),S=(0,n.computed)((function(){return["content"===e.scrollPosition?H("virtual-content"):""].concat(o(u(e.contentClassName)))})),j=(0,n.resolveDirective)("bkVirtualRender"),A={lineHeight:e.lineHeight,handleScrollCallback:v,pagination:d,throttleDelay:e.throttleDelay},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},t=e.left,o=e.top;p.value.scrollTo(t,o)};return t.expose({reset:function(){y(),b()},scrollTo:w}),function(){var o,r,l,i,u,c,f,d,v,y,g,h;return(0,n.h)(s||"div",{ref:p,class:O.value,style:I.value},[null!==(l=null===(r=(o=t.slots).beforeContent)||void 0===r?void 0:r.call(o))&&void 0!==l?l:"",(0,n.withDirectives)((0,n.h)(a||"div",{class:S.value,style:Object.assign(Object.assign({},x.value),e.contentStyle)},[null!==(c=null===(u=(i=t.slots).default)||void 0===u?void 0:u.call(i,{data:P.value}))&&void 0!==c?c:""]),[[j,A]]),null!==(v=null===(d=(f=t.slots).afterContent)||void 0===d?void 0:d.call(f))&&void 0!==v?v:"",(0,n.h)("div",{class:[H("virtual-section")],style:C.value}),null!==(h=null===(g=(y=t.slots).afterSection)||void 0===g?void 0:g.call(y))&&void 0!==h?h:""])}}}),g=(0,e.withInstall)(y)})(),s})()));
|
1
|
+
import*as e from"../shared";import*as t from"vue";import*as n from"../config-provider";import*as o from"lodash";var r={d:(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},l={};r.d(l,{Z:()=>I});const i=(a={PropTypes:()=>e.PropTypes,resolveClassName:()=>e.resolveClassName,withInstall:()=>e.withInstall},s={},r.d(s,a),s);var a,s;function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}const d=(e=>{var t={};return r.d(t,e),t})({computed:()=>t.computed,defineComponent:()=>t.defineComponent,h:()=>t.h,nextTick:()=>t.nextTick,onMounted:()=>t.onMounted,onUnmounted:()=>t.onUnmounted,reactive:()=>t.reactive,ref:()=>t.ref,watch:()=>t.watch}),f=(e=>{var t={};return r.d(t,e),t})({usePrefix:()=>n.usePrefix});var v={onContentScroll:Function},y=Object.assign({list:i.PropTypes.array.def([]),enabled:i.PropTypes.bool.def(!0),scrollEvent:i.PropTypes.bool.def(!1),lineHeight:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.func]).def(30),minHeight:i.PropTypes.number.def(30),maxHeight:i.PropTypes.number,height:i.PropTypes.oneOfType([i.PropTypes.string.def("100%"),i.PropTypes.number]).def("100%"),width:i.PropTypes.oneOfType([i.PropTypes.string.def("100%"),i.PropTypes.number]).def("100%"),className:i.PropTypes.oneOfType([i.PropTypes.arrayOf(i.PropTypes.string),i.PropTypes.object,i.PropTypes.arrayOf(i.PropTypes.object),i.PropTypes.string]).def(""),contentClassName:i.PropTypes.oneOfType([i.PropTypes.arrayOf(i.PropTypes.string),i.PropTypes.object,i.PropTypes.arrayOf(i.PropTypes.object),i.PropTypes.string]).def(""),contentStyle:i.PropTypes.object.def({}),scrollXName:i.PropTypes.string.def((0,i.resolveClassName)("F-scroll-x")),scrollYName:i.PropTypes.string.def((0,i.resolveClassName)("F-scroll-y")),groupItemCount:i.PropTypes.number.def(1),preloadItemCount:i.PropTypes.number.def(1),renderAs:i.PropTypes.string.def("div"),contentAs:i.PropTypes.string.def("div"),scrollOffsetTop:i.PropTypes.number.def(0),scrollPosition:i.PropTypes.string.def("content"),abosuteHeight:i.PropTypes.oneOfType([i.PropTypes.string.def("auto"),i.PropTypes.number]).def("auto"),throttleDelay:i.PropTypes.number.def(60),rowKey:i.PropTypes.string.def(void 0),keepAlive:i.PropTypes.bool.def(!1),autoReset:i.PropTypes.bool.def(!0),wrapperStyle:i.PropTypes.any.def({})},v);function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(r=o.key,l=void 0,l=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r),"symbol"===p(l)?l:String(l)),o)}var r,l}const m=(e=>{var t={};return r.d(t,e),t})({throttle:()=>o.throttle});function g(e,t,n,o){for(var r=0,l=0,i=0,a=0;r<e;r++){if(l+(a=o(r,[r*n,(r+1)*n,"virtual"]))>t){i=t-l;break}l+=a}return{startIndex:r,height:l,diffHeight:i}}function b(e,t,n,o,r,l){if(o){var i=o.scrollTop,a=o.scrollLeft,s=n.scrollTop,u=n.count,c=n.groupItemCount,p=n.startIndex,d=n.endIndex,f=n.scrollLeft,v=/^\d+(\.\d*)?$/.test(l)?l:o.offsetHeight,y=0,h=0,m=0;if("number"==typeof e&&(y=Math.floor(i/e),h=Math.ceil(v/e)+y,m=i%e),"function"==typeof e){var b=g(u,i,c,e);y=b.startIndex>0?b.startIndex:0,m=b.diffHeight,h=g(u,v,c,e).startIndex+y+1}if(i!==s||y!==p||h!==d||f!==a){var T=o.scrollHeight-o.offsetHeight-o.scrollTop;"function"==typeof t&&t(r,y,h,i,m,a,{bottom:T>=0?T:0})}return{targetStartIndex:y,targetEndIndex:h,elScrollTop:i,translateY:m,elScrollLeft:a}}}var T=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.binding=t,this.wrapper=n;var o=t.value.throttleDelay;this.delay=o}var t,n;return t=e,(n=[{key:"render",value:function(e){var t=this.binding.value,n=t.lineHeight,o=void 0===n?30:n,r=t.handleScrollCallback,l=t.pagination,i=void 0===l?{}:l;if(t.onlyScroll){var a=this.wrapper.scrollTop,s=this.wrapper.scrollLeft,u=this.wrapper.scrollHeight-this.wrapper.offsetHeight-this.wrapper.scrollTop;r(e,null,null,a,a,s,{bottom:u>=0?u:0})}else{var c=i.startIndex,p=i.endIndex,d=i.groupItemCount,f=i.count,v=i.scrollTop,y=i.scrollLeft,h=this.binding.height;b(o,r,{scrollTop:v,startIndex:c,endIndex:p,groupItemCount:d,count:f,scrollLeft:y},this.wrapper,e,h)}}},{key:"executeThrottledRender",value:function(e){(0,m.throttle)(this.render.bind(this),this.delay)(e)}},{key:"install",value:function(){var e;null===(e=this.wrapper)||void 0===e||e.addEventListener("scroll",this.executeThrottledRender.bind(this))}},{key:"uninstall",value:function(){var e,t;null===(t=null===(e=this.wrapper)||void 0===e?void 0:e.removeListener)||void 0===t||t.call(e,"scroll",this.executeThrottledRender.bind(this))}},{key:"setBinding",value:function(e){this.binding=e}}])&&h(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),P=null;const x={mounted:function(e,t){var n=e.parentNode;P=new T(t,e),n.addEventListener("scroll",P.executeThrottledRender.bind(P))},updated:function(e,t){null==P||P.setBinding(t)},unbind:function(e){if(e){var t=e.parentNode;if(!t||!P)return;t.removeEventListener("scroll",P.executeThrottledRender)}}},w=(0,d.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:x},props:y,emits:["content-scroll"],slots:Object,setup:function(e,t){var n=this,o=e.renderAs,r=e.contentAs,l=function(e){return"string"==typeof e?[e]:"object"!==p(e)||Array.isArray(e)?e:[e]};if(!e.enabled){var i=function(e,t){var n=e.renderAs,o=e.contentAs,r=function(e,n,o,r,l,i,a){t.emit("content-scroll",[e,{translateY:l,translateX:i,pos:a}])},l=null,i=(0,d.computed)((function(){return{lineHeight:e.lineHeight,handleScrollCallback:r,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent}})),a=(0,d.ref)(null),s=(0,d.computed)((function(){var t,n="number"==typeof e.height?"".concat(e.height,"px"):e.height;return Object.assign({height:n,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block",maxHeight:null!==(t=e.maxHeight)&&void 0!==t?t:n},e.wrapperStyle)}));return t.expose({scrollTo:function(e){var t=e.left,n=void 0===t?0:t,o=e.top,r=void 0===o?0:o;a.value.scrollTo(n,r)}}),(0,d.onMounted)((function(){(l=new T(i,a.value)).install()})),(0,d.onUnmounted)((function(){null==l||l.uninstall()})),{rendAsTag:function(){var r,l,i,u,c,p,f,v,y,h,m,g;return(0,d.h)(n,{class:e.className,style:s.value,ref:a},[null!==(i=null===(l=(r=t.slots).beforeContent)||void 0===l?void 0:l.call(r))&&void 0!==i?i:"",(0,d.h)(o,{class:e.contentClassName,style:e.contentStyle},[null!==(p=null===(c=(u=t.slots).default)||void 0===c?void 0:c.call(u,{data:e.list}))&&void 0!==p?p:""]),null!==(y=null===(v=(f=t.slots).afterContent)||void 0===v?void 0:v.call(f))&&void 0!==y?y:"",null!==(g=null===(m=(h=t.slots).afterSection)||void 0===m?void 0:m.call(h))&&void 0!==g?g:""])}}}(e,t);return i.rendAsTag}var a=(0,d.computed)((function(){return{lineHeight:e.lineHeight,handleScrollCallback:y,pagination:v,throttleDelay:e.throttleDelay}})),s=(0,d.ref)(null),u=null,v=(0,d.reactive)({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),y=function(e,n,o,r,l,i,a){v.startIndex=n,v.endIndex=o,v.scrollTop=r,v.translateY=l,v.translateX=i,v.scrollLeft=i,Object.assign(v.pos,a||{}),e&&t.emit("content-scroll",[e,v])};(0,d.onMounted)((function(){(u=new T(a,s.value)).install()})),(0,d.onUnmounted)((function(){null==u||u.uninstall()}));var h=(0,d.computed)((function(){return/^\d+(\.\d*)?(px)?$/.test("".concat(e.height))?Number("".concat(e.height).replace(/px$/,"")):e.height}));(0,d.watch)((function(){return[e.lineHeight,e.height,e.list,e.maxHeight]}),(function(){null==u||u.setBinding(a),m(),(0,d.nextTick)((function(){w()}))}),{deep:!0});var m=function(){x(e.list)},g=(0,d.ref)(0),P=(0,d.ref)(0),x=function(t){if(g.value=Math.ceil((t||[]).length/e.groupItemCount),v.count=g.value,"string"==typeof e.abosuteHeight&&"auto"===e.abosuteHeight)if("function"==typeof e.lineHeight){P.value=0;for(var o=0,r=0;r<g.value;r++){var l=e.lineHeight.call(n,r,t.slice(r*e.groupItemCount,e.groupItemCount));o+="number"==typeof l?l:0}P.value=o}else P.value=e.lineHeight*g.value;else P.value=e.abosuteHeight},w=function(){(0,d.nextTick)((function(){var t=s.value,n=b(e.lineHeight,y,v,t,null,h.value),o=n.targetStartIndex,r=n.targetEndIndex,l=n.elScrollTop,i=n.translateY,a=n.elScrollLeft;y(null,o,r,l,i,a,{})}))},I=(0,d.computed)((function(){return void 0!==e.rowKey?e.list:(e.list||[]).map((function(e,t){return Object.assign(Object.assign({},e),{$index:t})}))})),C=(0,d.computed)((function(){return I.value.slice(v.startIndex*e.groupItemCount,(v.endIndex+e.preloadItemCount)*e.groupItemCount)})),H=(0,d.computed)((function(){return"content"===e.scrollPosition?{top:"".concat(v.scrollTop+e.scrollOffsetTop,"px"),transform:"translateY(-".concat(v.translateY,"px)")}:{}})),S=(0,d.computed)((function(){var t,n="number"==typeof e.height?"".concat(e.height,"px"):e.height;return Object.assign(Object.assign({height:n,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block",maxHeight:null!==(t=e.maxHeight)&&void 0!==t?t:n},"container"===e.scrollPosition?H.value:{}),e.wrapperStyle)})),O=(0,d.computed)((function(){var t="number"==typeof e.abosuteHeight&&0===e.abosuteHeight;return{height:"".concat(P.value<e.minHeight?e.minHeight:P.value,"px"),display:t?"none":"block"}})),j=(0,f.usePrefix)().resolveClassName,k=(0,d.computed)((function(){return[j("virtual-render"),e.scrollXName,e.scrollYName].concat(c(l(e.className)),["container"===e.scrollPosition?j("virtual-content"):""])})),A=(0,d.computed)((function(){return["content"===e.scrollPosition?j("virtual-content"):""].concat(c(l(e.contentClassName)))}));return t.expose({reset:function(){m(),w()},scrollTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},t=e.left,n=e.top;s.value.scrollTo(t,n)}}),function(){var n,l,i,a,u,c,p,f,v,y,h,m;return(0,d.h)(o||"div",{ref:s,class:k.value,style:S.value},[null!==(i=null===(l=(n=t.slots).beforeContent)||void 0===l?void 0:l.call(n))&&void 0!==i?i:"",(0,d.h)(r||"div",{class:A.value,style:Object.assign(Object.assign({},H.value),e.contentStyle)},[null!==(c=null===(u=(a=t.slots).default)||void 0===u?void 0:u.call(a,{data:C.value}))&&void 0!==c?c:""]),null!==(v=null===(f=(p=t.slots).afterContent)||void 0===f?void 0:f.call(p))&&void 0!==v?v:"",(0,d.h)("div",{class:[j("virtual-section")],style:O.value}),null!==(m=null===(h=(y=t.slots).afterSection)||void 0===h?void 0:h.call(y))&&void 0!==m?m:""])}}}),I=(0,i.withInstall)(w);var C=l.Z;export{C as default};
|
@@ -45,6 +45,10 @@ export declare const virtualRenderProps: {
|
|
45
45
|
} & {
|
46
46
|
default: number;
|
47
47
|
};
|
48
|
+
/** 整体最大高度 */
|
49
|
+
maxHeight: import("vue-types").VueTypeValidableDef<number> & {
|
50
|
+
default: number;
|
51
|
+
};
|
48
52
|
/**
|
49
53
|
* 整体高度
|
50
54
|
* 可设置具体值,如果设置为 100%,则组件会自动计算外层DOM元素offsetHeight,用于计算可渲染行数
|
@@ -177,5 +181,16 @@ export declare const virtualRenderProps: {
|
|
177
181
|
} & {
|
178
182
|
default: boolean;
|
179
183
|
};
|
184
|
+
/**
|
185
|
+
* 数据监听改变时,是否自动重置位置到[0, 0]
|
186
|
+
*/
|
187
|
+
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
188
|
+
default: boolean;
|
189
|
+
} & {
|
190
|
+
default: boolean;
|
191
|
+
};
|
192
|
+
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
193
|
+
default: any;
|
194
|
+
};
|
180
195
|
};
|
181
196
|
export type VirtualRenderProps = Readonly<ExtractPropTypes<typeof virtualRenderProps>>;
|
@@ -1,6 +1,24 @@
|
|
1
|
-
export declare function computedVirtualIndex(lineHeight: any, callback: any, pagination: any, el: any, event: any):
|
1
|
+
export declare function computedVirtualIndex(lineHeight: any, callback: any, pagination: any, el: any, event: any, height: any): {
|
2
|
+
targetStartIndex: number;
|
3
|
+
targetEndIndex: number;
|
4
|
+
elScrollTop: any;
|
5
|
+
translateY: number;
|
6
|
+
elScrollLeft: any;
|
7
|
+
};
|
8
|
+
export declare class VisibleRender {
|
9
|
+
private binding;
|
10
|
+
private wrapper;
|
11
|
+
private delay;
|
12
|
+
constructor(binding: any, el: any);
|
13
|
+
render(e: any): void;
|
14
|
+
executeThrottledRender(e: any): void;
|
15
|
+
install(): void;
|
16
|
+
uninstall(): void;
|
17
|
+
setBinding(binding: any): void;
|
18
|
+
}
|
2
19
|
declare const _default: {
|
3
20
|
mounted(el: any, binding: any): void;
|
21
|
+
updated(_el: any, binding: any): void;
|
4
22
|
unbind(el: any): void;
|
5
23
|
};
|
6
24
|
export default _default;
|
@@ -29,6 +29,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
29
29
|
} & {
|
30
30
|
default: number;
|
31
31
|
};
|
32
|
+
maxHeight: import("vue-types").VueTypeValidableDef<number> & {
|
33
|
+
default: number;
|
34
|
+
};
|
32
35
|
height: import("vue-types").VueTypeDef<string | number> & {
|
33
36
|
default: string | number;
|
34
37
|
};
|
@@ -126,6 +129,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
126
129
|
} & {
|
127
130
|
default: boolean;
|
128
131
|
};
|
132
|
+
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
133
|
+
default: boolean;
|
134
|
+
} & {
|
135
|
+
default: boolean;
|
136
|
+
};
|
137
|
+
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
138
|
+
default: any;
|
139
|
+
};
|
129
140
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
130
141
|
[key: string]: any;
|
131
142
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -153,6 +164,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
153
164
|
} & {
|
154
165
|
default: number;
|
155
166
|
};
|
167
|
+
maxHeight: import("vue-types").VueTypeValidableDef<number> & {
|
168
|
+
default: number;
|
169
|
+
};
|
156
170
|
height: import("vue-types").VueTypeDef<string | number> & {
|
157
171
|
default: string | number;
|
158
172
|
};
|
@@ -250,15 +264,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
250
264
|
} & {
|
251
265
|
default: boolean;
|
252
266
|
};
|
267
|
+
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
268
|
+
default: boolean;
|
269
|
+
} & {
|
270
|
+
default: boolean;
|
271
|
+
};
|
272
|
+
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
273
|
+
default: any;
|
274
|
+
};
|
253
275
|
}>> & {
|
254
276
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
255
277
|
}, {
|
256
278
|
width: string | number;
|
257
279
|
height: string | number;
|
280
|
+
maxHeight: number;
|
258
281
|
enabled: boolean;
|
259
282
|
list: unknown[];
|
260
283
|
lineHeight: any;
|
261
284
|
minHeight: number;
|
285
|
+
wrapperStyle: any;
|
262
286
|
className: string | {
|
263
287
|
[key: string]: any;
|
264
288
|
};
|
@@ -281,6 +305,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
281
305
|
throttleDelay: number;
|
282
306
|
rowKey: string;
|
283
307
|
keepAlive: boolean;
|
308
|
+
autoReset: boolean;
|
284
309
|
}, SlotsType<{
|
285
310
|
default?: any;
|
286
311
|
beforeContent?: any;
|
@@ -1,28 +1,28 @@
|
|
1
1
|
/*
|
2
|
-
* Tencent is pleased to support the open source community by making
|
3
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
4
|
-
*
|
5
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
6
|
-
*
|
7
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
8
|
-
*
|
9
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
10
|
-
*
|
11
|
-
* ---------------------------------------------------
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
13
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
14
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
15
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
16
|
-
*
|
17
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
18
|
-
* the Software.
|
19
|
-
*
|
20
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
21
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
23
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
24
|
-
* IN THE SOFTWARE.
|
25
|
-
*/
|
2
|
+
* Tencent is pleased to support the open source community by making
|
3
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
4
|
+
*
|
5
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
6
|
+
*
|
7
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
8
|
+
*
|
9
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
10
|
+
*
|
11
|
+
* ---------------------------------------------------
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
13
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
15
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
16
|
+
*
|
17
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
18
|
+
* the Software.
|
19
|
+
*
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
21
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
23
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
24
|
+
* IN THE SOFTWARE.
|
25
|
+
*/
|
26
26
|
declare module '@vue/runtime-core' {
|
27
27
|
interface GlobalComponents {
|
28
28
|
BkBreadcrumbItem: typeof import('./breadcrumb/breadcrumb-item').default;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "bkui-vue",
|
3
|
-
"version": "0.0.2-beta.
|
3
|
+
"version": "0.0.2-beta.80",
|
4
4
|
"workspaces": {
|
5
5
|
"packages": [
|
6
6
|
"packages/!(**.bak)*",
|
@@ -49,8 +49,8 @@
|
|
49
49
|
"@types/lodash": "~4.14.196",
|
50
50
|
"@types/node": "~20.4.5",
|
51
51
|
"@types/postcss-less": "~4.0.2",
|
52
|
-
"@typescript-eslint/eslint-plugin": "
|
53
|
-
"@typescript-eslint/parser": "
|
52
|
+
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
53
|
+
"@typescript-eslint/parser": "^5.20.0",
|
54
54
|
"@vitejs/plugin-vue": "~4.2.3",
|
55
55
|
"@vitejs/plugin-vue-jsx": "~3.0.1",
|
56
56
|
"@vue/babel-plugin-jsx": "~1.1.5",
|
@@ -65,15 +65,14 @@
|
|
65
65
|
"cross-env": "~7.0.3",
|
66
66
|
"css-loader": "~6.8.1",
|
67
67
|
"cz-lerna-changelog": "~2.0.3",
|
68
|
-
"eslint": "
|
68
|
+
"eslint": "8.26.0",
|
69
|
+
"eslint-config-prettier": "^9.0.0",
|
69
70
|
"eslint-config-tencent": "~1.0.4",
|
70
|
-
"eslint-plugin-codecc": "~0.
|
71
|
+
"eslint-plugin-codecc": "~0.3.0",
|
71
72
|
"eslint-plugin-import": "~2.28.0",
|
72
|
-
"eslint-plugin-
|
73
|
-
"eslint-plugin-
|
74
|
-
"eslint-plugin-
|
75
|
-
"eslint-plugin-simple-import-sort": "~7.0.0",
|
76
|
-
"eslint-plugin-vue": "~8.6.0",
|
73
|
+
"eslint-plugin-prettier": "~5.0.0",
|
74
|
+
"eslint-plugin-simple-import-sort": "~10.0.0",
|
75
|
+
"eslint-plugin-vue": "~9.17.0",
|
77
76
|
"highlight.js": "~11.8.0",
|
78
77
|
"husky": "~7.0.1",
|
79
78
|
"jest": "~29.6.2",
|
@@ -89,21 +88,23 @@
|
|
89
88
|
"postcss": "~8.4.27",
|
90
89
|
"postcss-html": "~1.5.0",
|
91
90
|
"postcss-less": "~6.0.0",
|
92
|
-
"prettier": "~
|
91
|
+
"prettier": "~3.0.3",
|
93
92
|
"prismjs": "~1.29.0",
|
94
93
|
"resize-observer-polyfill": "~1.5.1",
|
95
94
|
"rimraf": "~5.0.1",
|
96
|
-
"stylelint": "
|
97
|
-
"stylelint-config-
|
98
|
-
"stylelint-
|
99
|
-
"stylelint-
|
95
|
+
"stylelint": "^15.10.3",
|
96
|
+
"stylelint-config-recess-order": "^4.3.0",
|
97
|
+
"stylelint-config-recommended-vue": "1.5.0",
|
98
|
+
"stylelint-config-standard": "^34.0.0",
|
99
|
+
"stylelint-order": "^6.0.3",
|
100
|
+
"stylelint-scss": "^5.1.0",
|
100
101
|
"ts-jest": "~29.1.1",
|
101
102
|
"ts-node": "~10.9.1",
|
102
103
|
"typescript": "~4.9.5",
|
103
104
|
"vite": "~4.4.7",
|
104
105
|
"vite-plugin-vue-markdown": "~0.23.7",
|
105
106
|
"vue": "~3.3.4",
|
106
|
-
"vue-eslint-parser": "~
|
107
|
+
"vue-eslint-parser": "~9.3.1",
|
107
108
|
"vue-i18n": "~9.2.2",
|
108
109
|
"vue-router": "~4.2.4",
|
109
110
|
"vue-types": "~4.1.1"
|