bkui-vue 1.0.3-beta.4 → 1.0.3-beta.40
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 +71 -71
- package/dist/index.esm.js +15481 -14247
- package/dist/index.umd.js +70 -70
- 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.variable.css +3 -0
- package/lib/alert/alert.variable.css +3 -0
- package/lib/backtop/backtop.variable.css +3 -0
- package/lib/badge/badge.variable.css +3 -0
- package/lib/breadcrumb/breadcrumb.variable.css +3 -0
- package/lib/button/button.variable.css +3 -0
- package/lib/card/card.variable.css +3 -0
- package/lib/cascader/cascader.variable.css +3 -0
- package/lib/checkbox/checkbox.variable.css +3 -0
- package/lib/code-diff/code-diff.variable.css +3 -0
- package/lib/collapse/collapse.variable.css +3 -0
- package/lib/collapse-transition/collapse-transition.variable.css +3 -0
- package/lib/color-picker/color-picker.variable.css +3 -0
- package/lib/components.js +0 -4
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/config-provider.variable.css +3 -0
- package/lib/config-provider/index.d.ts +4 -0
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.variable.css +3 -0
- package/lib/date-picker/base/month-table.d.ts +2 -2
- package/lib/date-picker/date-picker.d.ts +1 -0
- package/lib/date-picker/date-picker.variable.css +3 -0
- package/lib/date-picker/index.d.ts +3 -0
- package/lib/date-picker/index.js +69 -31
- package/lib/date-picker/interface.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +1 -0
- package/lib/date-picker/utils.d.ts +4 -0
- package/lib/dialog/dialog.css +28 -31
- package/lib/dialog/dialog.d.ts +11 -0
- package/lib/dialog/dialog.less +18 -17
- package/lib/dialog/dialog.variable.css +31 -31
- package/lib/dialog/index.d.ts +23 -0
- package/lib/dialog/index.js +15 -9
- package/lib/dialog/props.d.ts +5 -0
- package/lib/dist.index.js +0 -1
- package/lib/divider/divider.variable.css +3 -0
- package/lib/dropdown/dropdown.css +3 -1
- package/lib/dropdown/dropdown.variable.css +6 -1
- package/lib/exception/exception.variable.css +3 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +3 -0
- package/lib/form/form.variable.css +3 -0
- package/lib/hooks.js +1 -8
- package/lib/icon/image-fill.js +82 -167
- package/lib/icon/img-error.js +82 -167
- package/lib/icon/img-placehoulder.js +82 -167
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +87 -2427
- package/lib/icon/info-line.js +82 -167
- package/lib/icon/info.js +82 -167
- package/lib/icon/left-shape.js +82 -167
- package/lib/icon/left-turn-line.js +82 -167
- package/lib/icon/loading.js +82 -167
- package/lib/icon/narrow-line.js +82 -167
- package/lib/icon/original.js +82 -167
- package/lib/icon/pdf-fill.js +82 -167
- package/lib/icon/play-shape.js +82 -167
- package/lib/icon/plus.js +82 -167
- package/lib/icon/ppt-fill.js +82 -167
- package/lib/icon/qq.js +82 -167
- package/lib/icon/right-shape.js +82 -167
- package/lib/icon/right-turn-line.js +82 -167
- package/lib/icon/search.js +82 -167
- package/lib/icon/share.js +82 -167
- package/lib/icon/spinner.js +82 -167
- package/lib/icon/success.js +82 -167
- package/lib/icon/switcher-loading.js +82 -167
- package/lib/icon/text-all.d.ts +4 -0
- package/lib/icon/text-all.js +191 -0
- package/lib/icon/text-file.js +82 -167
- package/lib/icon/text-fill.js +82 -167
- package/lib/icon/transfer.js +82 -167
- package/lib/icon/tree-application-shape.js +82 -167
- package/lib/icon/unfull-screen.js +82 -167
- package/lib/icon/unvisible.js +82 -167
- package/lib/icon/up-shape.js +82 -167
- package/lib/icon/upload.js +82 -167
- package/lib/icon/video-fill.js +82 -167
- package/lib/icon/warn.js +82 -167
- package/lib/icon/weixin-pro.js +82 -167
- package/lib/icon/weixin.js +82 -167
- package/lib/image/image-viewer.variable.css +3 -0
- package/lib/image/image.variable.css +3 -0
- package/lib/image/index.js +5 -2
- package/lib/index.js +0 -1
- package/lib/info-box/index.js +40 -455
- package/lib/info-box/info-box.css +6 -11
- package/lib/info-box/info-box.d.ts +1 -1
- package/lib/info-box/info-box.less +6 -10
- package/lib/info-box/info-box.variable.css +9 -11
- package/lib/input/index.js +5 -0
- package/lib/input/input.variable.css +3 -0
- package/lib/link/link.variable.css +3 -0
- package/lib/loading/loading.variable.css +3 -0
- package/lib/locale/index.js +4 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/menu.variable.css +3 -0
- package/lib/menu/submenu.variable.css +3 -0
- package/lib/message/message.variable.css +3 -0
- package/lib/modal/index.d.ts +34 -6
- package/lib/modal/index.js +15 -15
- package/lib/modal/modal.css +10 -15
- package/lib/modal/modal.d.ts +13 -2
- package/lib/modal/modal.less +5 -5
- package/lib/modal/modal.variable.css +13 -15
- package/lib/modal/props.mixin.d.ts +5 -0
- package/lib/navigation/navigation.variable.css +3 -0
- package/lib/notify/notify.variable.css +3 -0
- package/lib/pagination/index.js +2 -1
- package/lib/pagination/pagination.variable.css +3 -0
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +55 -31
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.js +55 -31
- package/lib/popover/plugin-popover.d.ts +4 -1
- package/lib/popover/popover.css +3 -1
- package/lib/popover/popover.less +4 -1
- package/lib/popover/popover.variable.css +6 -1
- package/lib/preset.d.ts +2 -0
- package/lib/preset.js +14 -20
- package/lib/process/process.variable.css +3 -0
- package/lib/progress/progress.variable.css +3 -0
- package/lib/radio/radio.variable.css +3 -0
- package/lib/rate/rate.variable.css +3 -0
- package/lib/rate/star.variable.css +3 -0
- package/lib/resize-layout/resize-layout.variable.css +3 -0
- package/lib/search-select/search-select.variable.css +3 -0
- package/lib/select/index.d.ts +68 -6
- package/lib/select/index.js +1326 -68
- package/lib/select/option.d.ts +3 -1
- package/lib/select/pinyin/core.d.ts +14 -0
- package/lib/select/pinyin/dict.d.ts +34 -0
- package/lib/select/pinyin/index.d.ts +2 -0
- package/lib/select/select.css +36 -7
- package/lib/select/select.d.ts +28 -2
- package/lib/select/select.less +43 -13
- package/lib/select/select.variable.css +39 -7
- package/lib/select/type.d.ts +2 -3
- package/lib/shared/index.js +44 -3
- package/lib/shared/utils.d.ts +12 -0
- package/lib/sideslider/index.d.ts +29 -6
- package/lib/sideslider/index.js +5 -2
- package/lib/sideslider/sideslider.d.ts +13 -2
- package/lib/sideslider/sideslider.variable.css +3 -0
- package/lib/slider/slider.variable.css +3 -0
- package/lib/steps/steps.variable.css +3 -0
- package/lib/styles/mixins/animate.variable.css +3 -0
- package/lib/styles/mixins/popper.variable.css +3 -0
- package/lib/styles/mixins/scroll.variable.css +3 -0
- package/lib/styles/reset.css +1 -3
- package/lib/styles/reset.less +3 -6
- package/lib/styles/reset.variable.css +4 -3
- package/lib/styles/themes/themes.less +5 -0
- package/lib/swiper/swiper.variable.css +3 -0
- package/lib/switcher/switcher.variable.css +3 -0
- package/lib/tab/tab.variable.css +3 -0
- package/lib/table/cache.d.ts +11 -3
- package/lib/table/components/table-column.d.ts +111 -5
- package/lib/table/index.d.ts +66 -5
- package/lib/table/index.js +857 -561
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/head-sort.d.ts +7 -0
- package/lib/table/plugins/head-sort.variable.css +3 -0
- package/lib/table/plugins/settings.variable.css +3 -0
- package/lib/table/plugins/use-draggable.d.ts +2 -2
- package/lib/table/plugins/use-observer-resize.d.ts +5 -0
- package/lib/table/props.d.ts +15 -4
- package/lib/table/table.css +6 -12
- package/lib/table/table.d.ts +7 -0
- package/lib/table/table.less +12 -9
- package/lib/table/table.variable.css +9 -12
- package/lib/table/use-attributes.d.ts +5 -43
- package/lib/table/utils.d.ts +5 -4
- package/lib/table-column/index.d.ts +235 -119
- package/lib/table-column/index.js +221 -30
- package/lib/tag/tag.variable.css +3 -0
- package/lib/tag-input/index.d.ts +4 -4
- package/lib/tag-input/tag-input.d.ts +2 -2
- package/lib/tag-input/tag-input.variable.css +3 -0
- package/lib/tag-input/tag-props.d.ts +1 -1
- package/lib/tag-input/tag-render.d.ts +1 -1
- package/lib/time-picker/index.d.ts +38 -35
- package/lib/time-picker/time-picker.variable.css +3 -0
- package/lib/timeline/index.d.ts +73 -44
- package/lib/timeline/index.js +45 -63
- package/lib/timeline/timeline.d.ts +42 -29
- package/lib/timeline/timeline.variable.css +3 -0
- package/lib/transfer/transfer.variable.css +3 -0
- package/lib/tree/tree.variable.css +3 -0
- package/lib/upload/upload.variable.css +3 -0
- package/lib/virtual-render/index.d.ts +9 -9
- package/lib/virtual-render/virtual-render.d.ts +3 -3
- package/lib/virtual-render/virtual-render.variable.css +3 -0
- package/package.json +3 -2
@@ -12,6 +12,7 @@
|
|
12
12
|
--whitesmoke-color: #fafbfd;
|
13
13
|
--disable-color: #dcdee5;
|
14
14
|
--disable-bg-color: #f9fafd;
|
15
|
+
--border-color: #dcdee5;
|
15
16
|
--font-size-base: 12px;
|
16
17
|
--font-size-medium: 14px;
|
17
18
|
--font-size-large: 16px;
|
@@ -123,6 +124,8 @@
|
|
123
124
|
--search-select-placeholder-color: var(--light-gray);
|
124
125
|
--search-select-message-color: var(--danger-color);
|
125
126
|
--search-select-menu-border-color: var(--disable-color);
|
127
|
+
--select-active-color: #e1ecff;
|
128
|
+
--select-hover-color: #f5f7fa;
|
126
129
|
}
|
127
130
|
.bk-table-head-action {
|
128
131
|
display: flex;
|
@@ -8,6 +8,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
8
8
|
active: import("vue-types").VueTypeValidableDef<boolean> & {
|
9
9
|
default: boolean;
|
10
10
|
};
|
11
|
+
sortValFormat: import("vue-types").VueTypeDef<any[]> & {
|
12
|
+
default: () => any[];
|
13
|
+
};
|
11
14
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
12
15
|
column: import("vue-types").VueTypeDef<Column>;
|
13
16
|
defaultSort: import("vue-types").VueTypeDef<SORT_OPTION> & {
|
@@ -16,10 +19,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
16
19
|
active: import("vue-types").VueTypeValidableDef<boolean> & {
|
17
20
|
default: boolean;
|
18
21
|
};
|
22
|
+
sortValFormat: import("vue-types").VueTypeDef<any[]> & {
|
23
|
+
default: () => any[];
|
24
|
+
};
|
19
25
|
}>> & {
|
20
26
|
onChange?: (...args: any[]) => any;
|
21
27
|
}, {
|
22
28
|
active: boolean;
|
29
|
+
sortValFormat: any[];
|
23
30
|
defaultSort: SORT_OPTION;
|
24
31
|
}, {}>;
|
25
32
|
export default _default;
|
@@ -12,6 +12,7 @@
|
|
12
12
|
--whitesmoke-color: #fafbfd;
|
13
13
|
--disable-color: #dcdee5;
|
14
14
|
--disable-bg-color: #f9fafd;
|
15
|
+
--border-color: #dcdee5;
|
15
16
|
--font-size-base: 12px;
|
16
17
|
--font-size-medium: 14px;
|
17
18
|
--font-size-large: 16px;
|
@@ -123,6 +124,8 @@
|
|
123
124
|
--search-select-placeholder-color: var(--light-gray);
|
124
125
|
--search-select-message-color: var(--danger-color);
|
125
126
|
--search-select-menu-border-color: var(--disable-color);
|
127
|
+
--select-active-color: #e1ecff;
|
128
|
+
--select-hover-color: #f5f7fa;
|
126
129
|
}
|
127
130
|
.bk-head-cell-sort {
|
128
131
|
display: flex;
|
@@ -12,6 +12,7 @@
|
|
12
12
|
--whitesmoke-color: #fafbfd;
|
13
13
|
--disable-color: #dcdee5;
|
14
14
|
--disable-bg-color: #f9fafd;
|
15
|
+
--border-color: #dcdee5;
|
15
16
|
--font-size-base: 12px;
|
16
17
|
--font-size-medium: 14px;
|
17
18
|
--font-size-large: 16px;
|
@@ -123,6 +124,8 @@
|
|
123
124
|
--search-select-placeholder-color: var(--light-gray);
|
124
125
|
--search-select-message-color: var(--danger-color);
|
125
126
|
--search-select-menu-border-color: var(--disable-color);
|
127
|
+
--select-active-color: #e1ecff;
|
128
|
+
--select-hover-color: #f5f7fa;
|
126
129
|
}
|
127
130
|
.bk-table-settings[data-bk-table-settings-theme='true'] {
|
128
131
|
padding: 0;
|
@@ -6,12 +6,12 @@ declare const _default: (props: TablePropTypes, resp: ITableResponse, ctx: Setup
|
|
6
6
|
onDragleave?: undefined;
|
7
7
|
onDragstart?: undefined;
|
8
8
|
onDragover?: undefined;
|
9
|
-
|
9
|
+
onDragend?: undefined;
|
10
10
|
} | {
|
11
11
|
onDragenter: (event: DragEvent) => void;
|
12
12
|
onDragleave: (event: DragEvent) => void;
|
13
13
|
onDragstart: (event: DragEvent) => void;
|
14
14
|
onDragover: (event: DragEvent) => void;
|
15
|
-
|
15
|
+
onDragend: (event: DragEvent) => void;
|
16
16
|
};
|
17
17
|
export default _default;
|
package/lib/table/props.d.ts
CHANGED
@@ -17,7 +17,7 @@ export declare enum ColumnTypeEnum {
|
|
17
17
|
SELECTION = "selection",
|
18
18
|
INDEX = "index",
|
19
19
|
EXPAND = "expand",
|
20
|
-
NONE = "
|
20
|
+
NONE = "__COL_TYPE_NONE"
|
21
21
|
}
|
22
22
|
export declare enum TableAlignEnum {
|
23
23
|
LEFT = "left",
|
@@ -25,7 +25,7 @@ export declare enum TableAlignEnum {
|
|
25
25
|
CENTER = "center",
|
26
26
|
NONE = ""
|
27
27
|
}
|
28
|
-
export declare const columnType: import("vue-types").VueTypeDef<"
|
28
|
+
export declare const columnType: import("vue-types").VueTypeDef<"index" | "selection" | "expand" | "__COL_TYPE_NONE">;
|
29
29
|
export declare const TableAlign: import("vue-types").VueTypeDef<"" | "right" | "left" | "center">;
|
30
30
|
export declare enum FullEnum {
|
31
31
|
FULL = "full",
|
@@ -43,7 +43,7 @@ export declare enum FixedEnum {
|
|
43
43
|
RIGHT = "right"
|
44
44
|
}
|
45
45
|
export declare const fixedType: import("vue-types").VueTypeValidableDef<"right" | "left">;
|
46
|
-
export type
|
46
|
+
export type IOverflowTooltipOption = {
|
47
47
|
content: string | Function;
|
48
48
|
disabled?: (col: Column, row: any) => boolean | boolean;
|
49
49
|
watchCellResize?: boolean;
|
@@ -51,7 +51,8 @@ export type IOverflowTooltipProp = {
|
|
51
51
|
popoverOption?: any;
|
52
52
|
resizerWay?: ResizerWay;
|
53
53
|
showHead?: boolean;
|
54
|
-
}
|
54
|
+
};
|
55
|
+
export type IOverflowTooltipProp = IOverflowTooltipOption | boolean;
|
55
56
|
export type IOverflowTooltip = IOverflowTooltipProp;
|
56
57
|
export declare const IOverflowTooltipPropType: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
|
57
58
|
export type ISortOption = {
|
@@ -103,6 +104,7 @@ export type Settings = {
|
|
103
104
|
size?: string;
|
104
105
|
sizeList?: SizeItem[];
|
105
106
|
showLineHeight?: boolean;
|
107
|
+
extCls?: string;
|
106
108
|
trigger: 'manual';
|
107
109
|
};
|
108
110
|
export type ISettingPropType = Settings | boolean;
|
@@ -304,6 +306,15 @@ export declare const tableProps: {
|
|
304
306
|
} & {
|
305
307
|
default: boolean;
|
306
308
|
};
|
309
|
+
/**
|
310
|
+
* 排序时对需要排序的字符串数值进行格式化
|
311
|
+
* 这里需要配置为正则或者回调函数,(str) => string | number | boolean
|
312
|
+
* 如果配置为正则,程序会提取匹配到的第一个结果尝试转换为数值
|
313
|
+
* 如果为多个,程序会顺序执行所有正则表达式,直到转换成功
|
314
|
+
*/
|
315
|
+
sortValFormat: import("vue-types").VueTypeDef<any[]> & {
|
316
|
+
default: () => any[];
|
317
|
+
};
|
307
318
|
/**
|
308
319
|
* table header config
|
309
320
|
*/
|
package/lib/table/table.css
CHANGED
@@ -736,7 +736,6 @@
|
|
736
736
|
}
|
737
737
|
.bk-popover.bk-pop2-content {
|
738
738
|
position: absolute;
|
739
|
-
display: none;
|
740
739
|
padding: 12px;
|
741
740
|
font-size: 12px;
|
742
741
|
color: #fff;
|
@@ -744,6 +743,9 @@
|
|
744
743
|
border-radius: 4px;
|
745
744
|
box-sizing: border-box;
|
746
745
|
}
|
746
|
+
.bk-popover.bk-pop2-content.hidden {
|
747
|
+
display: none;
|
748
|
+
}
|
747
749
|
.bk-popover.bk-pop2-content .bk-pop2-arrow {
|
748
750
|
position: absolute;
|
749
751
|
z-index: -1;
|
@@ -1285,17 +1287,9 @@
|
|
1285
1287
|
.bk-table .bk-table-body table tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
1286
1288
|
background: #f5f7fa;
|
1287
1289
|
}
|
1288
|
-
.bk-table .bk-table-head table tbody tr.--drag-
|
1289
|
-
.bk-table .bk-table-body table tbody tr.--drag-
|
1290
|
-
|
1291
|
-
}
|
1292
|
-
.bk-table .bk-table-head table tbody tr.--drag-enter.--top,
|
1293
|
-
.bk-table .bk-table-body table tbody tr.--drag-enter.--top {
|
1294
|
-
border-top: solid 1px #3785ff;
|
1295
|
-
}
|
1296
|
-
.bk-table .bk-table-head table tbody tr.--drag-start,
|
1297
|
-
.bk-table .bk-table-body table tbody tr.--drag-start {
|
1298
|
-
background: #fff;
|
1290
|
+
.bk-table .bk-table-head table tbody tr.--drag-start td,
|
1291
|
+
.bk-table .bk-table-body table tbody tr.--drag-start td {
|
1292
|
+
background: #fff !important;
|
1299
1293
|
}
|
1300
1294
|
.bk-table .bk-table-head {
|
1301
1295
|
position: relative;
|
package/lib/table/table.d.ts
CHANGED
@@ -37,6 +37,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
37
37
|
} & {
|
38
38
|
default: boolean;
|
39
39
|
};
|
40
|
+
sortValFormat: import("vue-types").VueTypeDef<any[]> & {
|
41
|
+
default: () => any[];
|
42
|
+
};
|
40
43
|
thead: import("vue-types").VueTypeDef<import("./props").Thead> & {
|
41
44
|
default: () => import("./props").Thead;
|
42
45
|
};
|
@@ -275,6 +278,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
275
278
|
} & {
|
276
279
|
default: boolean;
|
277
280
|
};
|
281
|
+
sortValFormat: import("vue-types").VueTypeDef<any[]> & {
|
282
|
+
default: () => any[];
|
283
|
+
};
|
278
284
|
thead: import("vue-types").VueTypeDef<import("./props").Thead> & {
|
279
285
|
default: () => import("./props").Thead;
|
280
286
|
};
|
@@ -498,6 +504,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
498
504
|
stripe: boolean;
|
499
505
|
rowHeight: import("./props").RowHeightFunctionNumber;
|
500
506
|
showHead: boolean;
|
507
|
+
sortValFormat: any[];
|
501
508
|
virtualEnabled: boolean;
|
502
509
|
paginationHeight: number;
|
503
510
|
remotePagination: boolean;
|
package/lib/table/table.less
CHANGED
@@ -313,18 +313,21 @@
|
|
313
313
|
}
|
314
314
|
}
|
315
315
|
|
316
|
-
&.--drag-enter {
|
317
|
-
|
318
|
-
|
319
|
-
|
316
|
+
// &.--drag-enter {
|
317
|
+
// &.--bottom {
|
318
|
+
// border-bottom: solid 1px #3785ff;
|
319
|
+
// }
|
320
320
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
}
|
321
|
+
// &.--top {
|
322
|
+
// border-top: solid 1px #3785ff;
|
323
|
+
// }
|
324
|
+
// }
|
325
325
|
|
326
326
|
&.--drag-start {
|
327
|
-
|
327
|
+
|
328
|
+
td {
|
329
|
+
background: #fff!important;
|
330
|
+
}
|
328
331
|
}
|
329
332
|
}
|
330
333
|
}
|
@@ -12,6 +12,7 @@
|
|
12
12
|
--whitesmoke-color: #fafbfd;
|
13
13
|
--disable-color: #dcdee5;
|
14
14
|
--disable-bg-color: #f9fafd;
|
15
|
+
--border-color: #dcdee5;
|
15
16
|
--font-size-base: 12px;
|
16
17
|
--font-size-medium: 14px;
|
17
18
|
--font-size-large: 16px;
|
@@ -123,6 +124,8 @@
|
|
123
124
|
--search-select-placeholder-color: var(--light-gray);
|
124
125
|
--search-select-message-color: var(--danger-color);
|
125
126
|
--search-select-menu-border-color: var(--disable-color);
|
127
|
+
--select-active-color: #e1ecff;
|
128
|
+
--select-hover-color: #f5f7fa;
|
126
129
|
}
|
127
130
|
.bk-F-scroll-x {
|
128
131
|
overflow-x: auto;
|
@@ -862,7 +865,6 @@
|
|
862
865
|
}
|
863
866
|
.bk-popover.bk-pop2-content {
|
864
867
|
position: absolute;
|
865
|
-
display: none;
|
866
868
|
padding: 12px;
|
867
869
|
font-size: 12px;
|
868
870
|
color: #fff;
|
@@ -870,6 +872,9 @@
|
|
870
872
|
border-radius: 4px;
|
871
873
|
box-sizing: border-box;
|
872
874
|
}
|
875
|
+
.bk-popover.bk-pop2-content.hidden {
|
876
|
+
display: none;
|
877
|
+
}
|
873
878
|
.bk-popover.bk-pop2-content .bk-pop2-arrow {
|
874
879
|
position: absolute;
|
875
880
|
z-index: -1;
|
@@ -1411,17 +1416,9 @@
|
|
1411
1416
|
.bk-table .bk-table-body table tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
1412
1417
|
background: #f5f7fa;
|
1413
1418
|
}
|
1414
|
-
.bk-table .bk-table-head table tbody tr.--drag-
|
1415
|
-
.bk-table .bk-table-body table tbody tr.--drag-
|
1416
|
-
|
1417
|
-
}
|
1418
|
-
.bk-table .bk-table-head table tbody tr.--drag-enter.--top,
|
1419
|
-
.bk-table .bk-table-body table tbody tr.--drag-enter.--top {
|
1420
|
-
border-top: solid 1px #3785ff;
|
1421
|
-
}
|
1422
|
-
.bk-table .bk-table-head table tbody tr.--drag-start,
|
1423
|
-
.bk-table .bk-table-body table tbody tr.--drag-start {
|
1424
|
-
background: #fff;
|
1419
|
+
.bk-table .bk-table-head table tbody tr.--drag-start td,
|
1420
|
+
.bk-table .bk-table-body table tbody tr.--drag-start td {
|
1421
|
+
background: #fff !important;
|
1425
1422
|
}
|
1426
1423
|
.bk-table .bk-table-head {
|
1427
1424
|
position: relative;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IEmptyObject } from './const';
|
2
|
-
import { Column, Field, Settings,
|
2
|
+
import { Column, Field, Settings, TablePropTypes } from './props';
|
3
3
|
export type ITableFormatData = {
|
4
4
|
data: any[];
|
5
5
|
dataSchema: WeakMap<object, any>;
|
@@ -18,46 +18,7 @@ export type ITableFormatData = {
|
|
18
18
|
translateY: number;
|
19
19
|
};
|
20
20
|
};
|
21
|
-
|
22
|
-
setIndexData: () => Promise<void>;
|
23
|
-
formatColumns: (columns: Column[]) => void;
|
24
|
-
formatDataSchema: (data: any[]) => void;
|
25
|
-
setRowSelection: (row: any, isSelected: boolean) => void;
|
26
|
-
setRowExpand: (row: any, isExpand: boolean) => void;
|
27
|
-
setRowIndex: (row: any, index: number) => void;
|
28
|
-
setColumnAttribute: (col: Column, attrName: string, attrValue: ((...args: any[]) => boolean | number | void | string) | string | boolean | number) => void;
|
29
|
-
setColumnAttributeBySettings: (settings: Settings, checkedVal?: string[]) => void;
|
30
|
-
setAllColumnAttribute: (attrName: string, attrValue: ((...args: any[]) => boolean | number | void | string) | string | boolean | number) => void;
|
31
|
-
getColumnAttribute: (col: Column, attributeName: string) => string | boolean | Record<string, any>;
|
32
|
-
getColumnId: (col: Column) => string;
|
33
|
-
getColumnOrderWidth: (column: Column, orders?: string[]) => number;
|
34
|
-
isActiveColumn: (col: Column) => boolean;
|
35
|
-
isHiddenColumn: (col: Column) => boolean;
|
36
|
-
resolvePageData: (filterFn?: any, sortFn?: any, column?: Column, type?: string, sortScope?: SortScope) => void;
|
37
|
-
resolveByDefColumns: () => void;
|
38
|
-
resetStartEndIndex: () => void;
|
39
|
-
toggleRowSelection: (row: any) => void;
|
40
|
-
toggleAllSelection: (value?: boolean) => void;
|
41
|
-
setAllRowExpand: (value?: boolean) => void;
|
42
|
-
clearSelection: () => void;
|
43
|
-
clearColumnSort: (reset?: boolean) => void;
|
44
|
-
setColumnSortActive: (column: Column, active: boolean) => void;
|
45
|
-
getRowAttribute: (row: any | IEmptyObject, attrName: string) => any;
|
46
|
-
getRowSelection: () => any[];
|
47
|
-
resolveColumnWidth: (root: HTMLElement, autoWidth?: any, offsetWidth?: any) => void;
|
48
|
-
filter: () => void;
|
49
|
-
sortData: (column: Column) => void;
|
50
|
-
isCheckedAll: () => boolean;
|
51
|
-
hasCheckedRow: () => boolean;
|
52
|
-
setRowSelectionAll: (val: boolean) => void;
|
53
|
-
setRowIndeterminate: () => void;
|
54
|
-
updateSettings: (settings?: Settings, rowHeight?: number) => void;
|
55
|
-
changePageRowIndex: (sourceIndex: number, targetIndex: number) => void;
|
56
|
-
pageData: any[];
|
57
|
-
localPagination: any;
|
58
|
-
formatData: ITableFormatData;
|
59
|
-
};
|
60
|
-
declare const _default: (props: TablePropTypes) => {
|
21
|
+
declare const tableSchemaResponse: (props: TablePropTypes) => {
|
61
22
|
formatColumns: (columns: Column[]) => void;
|
62
23
|
formatDataSchema: (data: any[]) => void;
|
63
24
|
setRowSelection: (row: any, isSelected: boolean) => void;
|
@@ -84,7 +45,7 @@ declare const _default: (props: TablePropTypes) => {
|
|
84
45
|
clearSelection: () => void;
|
85
46
|
clearColumnSort: (reset?: boolean) => void;
|
86
47
|
toggleRowSelection: (row: any) => void;
|
87
|
-
getRowAttribute: (
|
48
|
+
getRowAttribute: (item: any | IEmptyObject, attrName: string) => any;
|
88
49
|
filter: () => void;
|
89
50
|
sortData: (column: Column) => void;
|
90
51
|
isCheckedAll: () => boolean;
|
@@ -96,4 +57,5 @@ declare const _default: (props: TablePropTypes) => {
|
|
96
57
|
formatData: ITableFormatData;
|
97
58
|
setIndexData: () => Promise<void>;
|
98
59
|
};
|
99
|
-
export
|
60
|
+
export type ITableResponse = ReturnType<typeof tableSchemaResponse>;
|
61
|
+
export default tableSchemaResponse;
|
package/lib/table/utils.d.ts
CHANGED
@@ -80,7 +80,7 @@ export declare const resolveHeadConfig: (props: TablePropTypes) => {
|
|
80
80
|
* @param index 当前行Index
|
81
81
|
* @returns
|
82
82
|
*/
|
83
|
-
export declare const getRowText: (row: any, key: string) => any;
|
83
|
+
export declare const getRowText: (row: any, key: string, format?: string[] | (() => string | number | boolean)[]) => any;
|
84
84
|
/**
|
85
85
|
* 获取当前行指定列的值
|
86
86
|
* @param row 当前行
|
@@ -111,10 +111,10 @@ export declare const resolveCellSpan: (column: Column, colIndex: number, row: an
|
|
111
111
|
colspan: any;
|
112
112
|
rowspan: any;
|
113
113
|
};
|
114
|
-
export declare const skipThisColumn: (columns: Column[], colIndex: number, row: any, rowIndex: number) =>
|
115
|
-
export declare const getSortFn: (column: any, sortType: any) => ((_a: any, _b: any) => boolean) | ((_a: any, _b: any) => number);
|
114
|
+
export declare const skipThisColumn: (columns: Column[], colIndex: number, row: any, rowIndex: number) => number | false;
|
115
|
+
export declare const getSortFn: (column: any, sortType: any, format?: any[]) => ((_a: any, _b: any) => boolean) | ((_a: any, _b: any) => number);
|
116
116
|
export declare const getNextSortType: (sortType: string) => string;
|
117
|
-
export declare const resolveSort: (sort: ISortPropShape, column: any) => ({
|
117
|
+
export declare const resolveSort: (sort: ISortPropShape, column: any, format?: any[]) => ({
|
118
118
|
sortFn: ((_a: any, _b: any) => boolean) | ((_a: any, _b: any) => number);
|
119
119
|
} & import("./props").ISortShape) | {
|
120
120
|
sortFn?: Function;
|
@@ -133,3 +133,4 @@ export declare const resolveColumnSortProp: (col: Column, props: TablePropTypes)
|
|
133
133
|
scope: import("./props").SortScope;
|
134
134
|
active: boolean;
|
135
135
|
};
|
136
|
+
export declare const getRawData: (data: any) => any;
|