bkui-vue 1.0.3-beta.2 → 1.0.3-beta.21
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 +72 -72
- package/dist/index.esm.js +15120 -13962
- package/dist/index.umd.js +71 -71
- 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/affix/index.js +1 -0
- package/lib/alert/alert.variable.css +3 -0
- package/lib/alert/index.js +1 -0
- package/lib/animate-number/index.js +1 -0
- package/lib/backtop/backtop.variable.css +3 -0
- package/lib/backtop/index.js +1 -0
- package/lib/badge/badge.variable.css +3 -0
- package/lib/badge/index.js +1 -0
- package/lib/breadcrumb/breadcrumb.variable.css +3 -0
- package/lib/breadcrumb/index.js +1 -0
- package/lib/button/button.variable.css +3 -0
- package/lib/button/index.js +1 -0
- package/lib/card/card.variable.css +3 -0
- package/lib/card/index.js +1 -0
- package/lib/cascader/cascader.variable.css +3 -0
- package/lib/cascader/index.js +1 -0
- package/lib/checkbox/checkbox.variable.css +3 -0
- package/lib/checkbox/index.js +1 -0
- package/lib/code-diff/code-diff.variable.css +3 -0
- package/lib/code-diff/index.js +1 -0
- package/lib/collapse/collapse.variable.css +3 -0
- package/lib/collapse/index.js +1 -0
- package/lib/collapse-transition/collapse-transition.variable.css +3 -0
- package/lib/collapse-transition/index.js +1 -0
- package/lib/color-picker/color-picker.variable.css +3 -0
- package/lib/color-picker/index.js +1 -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/index.js +1 -0
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.variable.css +3 -0
- package/lib/container/index.js +1 -0
- package/lib/date-picker/date-picker.variable.css +3 -0
- package/lib/date-picker/index.js +6 -2
- package/lib/dialog/dialog.variable.css +3 -0
- package/lib/dialog/index.js +1 -0
- package/lib/directives/index.js +1 -0
- package/lib/dist.index.js +0 -1
- package/lib/divider/divider.variable.css +3 -0
- package/lib/divider/index.js +1 -0
- package/lib/dropdown/dropdown.css +3 -1
- package/lib/dropdown/dropdown.variable.css +6 -1
- package/lib/dropdown/index.js +1 -0
- package/lib/exception/exception.variable.css +3 -0
- package/lib/exception/index.js +1 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +3 -0
- package/lib/fixed-navbar/index.js +1 -0
- package/lib/form/form.css +1 -0
- package/lib/form/form.less +2 -0
- package/lib/form/form.variable.css +4 -0
- package/lib/form/index.js +1 -0
- package/lib/hooks.js +1 -8
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +35 -1
- package/lib/icon/text-all.d.ts +4 -0
- package/lib/icon/text-all.js +276 -0
- package/lib/image/image-viewer.variable.css +3 -0
- package/lib/image/image.variable.css +3 -0
- package/lib/image/index.js +1 -0
- package/lib/index.js +0 -1
- package/lib/info-box/index.js +41 -455
- package/lib/info-box/info-box.variable.css +3 -0
- package/lib/input/index.js +6 -0
- package/lib/input/input.variable.css +3 -0
- package/lib/link/index.js +1 -0
- package/lib/link/link.variable.css +3 -0
- package/lib/loading/index.js +1 -0
- package/lib/loading/loading.variable.css +3 -0
- package/lib/locale/index.js +5 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.js +1 -0
- package/lib/menu/menu.variable.css +3 -0
- package/lib/menu/submenu.variable.css +3 -0
- package/lib/message/index.js +1 -0
- package/lib/message/message.variable.css +3 -0
- package/lib/modal/index.d.ts +6 -6
- package/lib/modal/index.js +6 -5
- package/lib/modal/modal.d.ts +2 -2
- package/lib/modal/modal.variable.css +3 -0
- package/lib/navigation/index.js +1 -0
- package/lib/navigation/navigation.variable.css +3 -0
- package/lib/notify/index.js +1 -0
- package/lib/notify/notify.variable.css +3 -0
- package/lib/overflow-title/index.js +1 -0
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.variable.css +3 -0
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +56 -31
- package/lib/plugins/index.js +1 -0
- package/lib/pop-confirm/index.js +1 -0
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.js +56 -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/popover2/index.js +1 -0
- package/lib/preset.d.ts +2 -0
- package/lib/preset.js +14 -20
- package/lib/process/index.js +1 -0
- package/lib/process/process.variable.css +3 -0
- package/lib/progress/index.js +1 -0
- package/lib/progress/progress.variable.css +3 -0
- package/lib/radio/index.js +1 -0
- package/lib/radio/radio.variable.css +3 -0
- package/lib/rate/index.js +1 -0
- package/lib/rate/rate.variable.css +3 -0
- package/lib/rate/star.variable.css +3 -0
- package/lib/resize-layout/index.js +1 -0
- package/lib/resize-layout/resize-layout.variable.css +3 -0
- package/lib/search-select/index.js +1 -0
- package/lib/search-select/search-select.variable.css +3 -0
- package/lib/select/index.d.ts +68 -6
- package/lib/select/index.js +1327 -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 +45 -3
- package/lib/shared/utils.d.ts +12 -0
- package/lib/sideslider/index.d.ts +6 -6
- package/lib/sideslider/index.js +1 -0
- package/lib/sideslider/sideslider.d.ts +2 -2
- package/lib/sideslider/sideslider.variable.css +3 -0
- package/lib/slider/index.js +1 -0
- package/lib/slider/slider.variable.css +3 -0
- package/lib/steps/index.js +1 -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 +3 -1
- package/lib/styles/reset.less +3 -1
- package/lib/styles/reset.variable.css +6 -1
- package/lib/styles/themes/themes.less +5 -0
- package/lib/swiper/index.js +1 -0
- package/lib/swiper/swiper.variable.css +3 -0
- package/lib/switcher/index.js +1 -0
- package/lib/switcher/switcher.variable.css +3 -0
- package/lib/tab/index.js +1 -0
- package/lib/tab/tab.variable.css +3 -0
- package/lib/table/components/table-column.d.ts +2 -0
- package/lib/table/index.d.ts +17 -0
- package/lib/table/index.js +1323 -1100
- 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 +13 -2
- package/lib/table/table.css +17 -17
- package/lib/table/table.d.ts +7 -0
- package/lib/table/table.less +26 -14
- package/lib/table/table.variable.css +20 -17
- package/lib/table/use-attributes.d.ts +5 -43
- package/lib/table/use-common.d.ts +1 -0
- package/lib/table/utils.d.ts +5 -4
- package/lib/table-column/index.d.ts +112 -106
- package/lib/table-column/index.js +44 -4
- package/lib/tag/index.js +1 -0
- package/lib/tag/tag.variable.css +3 -0
- package/lib/tag-input/index.d.ts +4 -4
- package/lib/tag-input/index.js +1 -0
- 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 +35 -35
- package/lib/time-picker/index.js +1 -0
- package/lib/time-picker/time-picker.variable.css +3 -0
- package/lib/timeline/index.js +1 -0
- package/lib/timeline/timeline.variable.css +3 -0
- package/lib/transfer/index.js +1 -0
- package/lib/transfer/transfer.variable.css +3 -0
- package/lib/tree/index.js +1 -0
- package/lib/tree/tree.variable.css +3 -0
- package/lib/upload/index.js +1 -0
- package/lib/upload/upload.variable.css +3 -0
- package/lib/virtual-render/index.d.ts +9 -9
- package/lib/virtual-render/index.js +1 -0
- 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
@@ -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;
|
@@ -1015,6 +1017,7 @@
|
|
1015
1017
|
position: relative;
|
1016
1018
|
overflow: auto;
|
1017
1019
|
scrollbar-gutter: stable;
|
1020
|
+
border-bottom: 1px solid #dcdee5;
|
1018
1021
|
}
|
1019
1022
|
.bk-table .bk-table-body::-webkit-scrollbar {
|
1020
1023
|
width: 5px;
|
@@ -1284,23 +1287,16 @@
|
|
1284
1287
|
.bk-table .bk-table-body table tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
1285
1288
|
background: #f5f7fa;
|
1286
1289
|
}
|
1287
|
-
.bk-table .bk-table-head table tbody tr.--drag-
|
1288
|
-
.bk-table .bk-table-body table tbody tr.--drag-
|
1289
|
-
|
1290
|
-
}
|
1291
|
-
.bk-table .bk-table-head table tbody tr.--drag-enter.--top,
|
1292
|
-
.bk-table .bk-table-body table tbody tr.--drag-enter.--top {
|
1293
|
-
border-top: solid 1px #3785ff;
|
1294
|
-
}
|
1295
|
-
.bk-table .bk-table-head table tbody tr.--drag-start,
|
1296
|
-
.bk-table .bk-table-body table tbody tr.--drag-start {
|
1297
|
-
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;
|
1298
1293
|
}
|
1299
1294
|
.bk-table .bk-table-head {
|
1300
1295
|
position: relative;
|
1301
1296
|
z-index: 2;
|
1302
1297
|
scrollbar-gutter: stable;
|
1303
1298
|
overflow: hidden;
|
1299
|
+
background-color: var(--background-color);
|
1304
1300
|
}
|
1305
1301
|
.bk-table .bk-table-head .col-resize-drag {
|
1306
1302
|
position: absolute;
|
@@ -1326,10 +1322,8 @@
|
|
1326
1322
|
font-size: 14px;
|
1327
1323
|
cursor: pointer;
|
1328
1324
|
background: #fafbfd;
|
1329
|
-
border-bottom: 1px solid #dcdee5;
|
1330
1325
|
border-left: 1px solid #dcdee5;
|
1331
1326
|
border-radius: 0 2px 0 0;
|
1332
|
-
transform: translateX(var(--scroll-left));
|
1333
1327
|
justify-content: center;
|
1334
1328
|
align-items: center;
|
1335
1329
|
}
|
@@ -1347,8 +1341,10 @@
|
|
1347
1341
|
.bk-table .bk-table-footer.is-hidden {
|
1348
1342
|
display: none;
|
1349
1343
|
}
|
1350
|
-
.bk-table.bordered-row
|
1351
|
-
|
1344
|
+
.bk-table.bordered-row .bk-table-head {
|
1345
|
+
border-bottom: 1px solid #dcdee5;
|
1346
|
+
}
|
1347
|
+
.bk-table.bordered-row td {
|
1352
1348
|
border-bottom: 1px solid #dcdee5;
|
1353
1349
|
}
|
1354
1350
|
.bk-table.bordered-row tr:last-child td {
|
@@ -1380,10 +1376,14 @@
|
|
1380
1376
|
.bk-table.bordered-col td:last-child {
|
1381
1377
|
border-right: none;
|
1382
1378
|
}
|
1379
|
+
.bk-table th,
|
1380
|
+
.bk-table td {
|
1381
|
+
border-right: 1px solid transparent;
|
1382
|
+
}
|
1383
1383
|
.bk-table.bordered-none th,
|
1384
1384
|
.bk-table.bordered-none td {
|
1385
1385
|
border-top: none;
|
1386
|
-
border-right:
|
1386
|
+
border-right: 1px solid transparent;
|
1387
1387
|
border-bottom: none;
|
1388
1388
|
border-left: none;
|
1389
1389
|
}
|
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
@@ -36,6 +36,7 @@
|
|
36
36
|
position: relative;
|
37
37
|
overflow: auto;
|
38
38
|
scrollbar-gutter: stable;
|
39
|
+
border-bottom: 1px solid @table-border-color;
|
39
40
|
|
40
41
|
&::-webkit-scrollbar {
|
41
42
|
width: 5px;
|
@@ -312,18 +313,21 @@
|
|
312
313
|
}
|
313
314
|
}
|
314
315
|
|
315
|
-
&.--drag-enter {
|
316
|
-
|
317
|
-
|
318
|
-
|
316
|
+
// &.--drag-enter {
|
317
|
+
// &.--bottom {
|
318
|
+
// border-bottom: solid 1px #3785ff;
|
319
|
+
// }
|
319
320
|
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
}
|
321
|
+
// &.--top {
|
322
|
+
// border-top: solid 1px #3785ff;
|
323
|
+
// }
|
324
|
+
// }
|
324
325
|
|
325
326
|
&.--drag-start {
|
326
|
-
|
327
|
+
|
328
|
+
td {
|
329
|
+
background: #fff!important;
|
330
|
+
}
|
327
331
|
}
|
328
332
|
}
|
329
333
|
}
|
@@ -335,6 +339,7 @@
|
|
335
339
|
z-index: 2;
|
336
340
|
scrollbar-gutter: stable;
|
337
341
|
overflow: hidden;
|
342
|
+
background-color: var(--background-color);
|
338
343
|
|
339
344
|
.col-resize-drag {
|
340
345
|
position: absolute;
|
@@ -364,10 +369,10 @@
|
|
364
369
|
|
365
370
|
background: @table-head-bg-color;
|
366
371
|
//border-right: 1px solid @table-border-color;
|
367
|
-
border-bottom: 1px solid @table-border-color;
|
372
|
+
// border-bottom: 1px solid @table-border-color;
|
368
373
|
border-left: 1px solid @table-border-color;
|
369
374
|
border-radius: 0 2px 0 0;
|
370
|
-
transform: translateX(var(--scroll-left));
|
375
|
+
// transform: translateX(var(--scroll-left));
|
371
376
|
justify-content: center;
|
372
377
|
align-items: center;
|
373
378
|
|
@@ -391,8 +396,11 @@
|
|
391
396
|
}
|
392
397
|
|
393
398
|
&.bordered-row {
|
394
|
-
|
395
|
-
|
399
|
+
.@{bk-prefix}-table-head {
|
400
|
+
border-bottom: 1px solid @table-border-color;
|
401
|
+
}
|
402
|
+
|
403
|
+
td {
|
396
404
|
border-bottom: 1px solid @table-border-color;
|
397
405
|
}
|
398
406
|
|
@@ -445,11 +453,15 @@
|
|
445
453
|
|
446
454
|
}
|
447
455
|
|
456
|
+
th, td {
|
457
|
+
border-right: 1px solid transparent;
|
458
|
+
}
|
459
|
+
|
448
460
|
&.bordered-none {
|
449
461
|
th,
|
450
462
|
td {
|
451
463
|
border-top: none;
|
452
|
-
border-right:
|
464
|
+
border-right: 1px solid transparent;
|
453
465
|
border-bottom: none;
|
454
466
|
border-left: none;
|
455
467
|
}
|
@@ -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;
|
@@ -1141,6 +1146,7 @@
|
|
1141
1146
|
position: relative;
|
1142
1147
|
overflow: auto;
|
1143
1148
|
scrollbar-gutter: stable;
|
1149
|
+
border-bottom: 1px solid #dcdee5;
|
1144
1150
|
}
|
1145
1151
|
.bk-table .bk-table-body::-webkit-scrollbar {
|
1146
1152
|
width: 5px;
|
@@ -1410,23 +1416,16 @@
|
|
1410
1416
|
.bk-table .bk-table-body table tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
1411
1417
|
background: #f5f7fa;
|
1412
1418
|
}
|
1413
|
-
.bk-table .bk-table-head table tbody tr.--drag-
|
1414
|
-
.bk-table .bk-table-body table tbody tr.--drag-
|
1415
|
-
|
1416
|
-
}
|
1417
|
-
.bk-table .bk-table-head table tbody tr.--drag-enter.--top,
|
1418
|
-
.bk-table .bk-table-body table tbody tr.--drag-enter.--top {
|
1419
|
-
border-top: solid 1px #3785ff;
|
1420
|
-
}
|
1421
|
-
.bk-table .bk-table-head table tbody tr.--drag-start,
|
1422
|
-
.bk-table .bk-table-body table tbody tr.--drag-start {
|
1423
|
-
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;
|
1424
1422
|
}
|
1425
1423
|
.bk-table .bk-table-head {
|
1426
1424
|
position: relative;
|
1427
1425
|
z-index: 2;
|
1428
1426
|
scrollbar-gutter: stable;
|
1429
1427
|
overflow: hidden;
|
1428
|
+
background-color: var(--background-color);
|
1430
1429
|
}
|
1431
1430
|
.bk-table .bk-table-head .col-resize-drag {
|
1432
1431
|
position: absolute;
|
@@ -1452,10 +1451,8 @@
|
|
1452
1451
|
font-size: 14px;
|
1453
1452
|
cursor: pointer;
|
1454
1453
|
background: #fafbfd;
|
1455
|
-
border-bottom: 1px solid #dcdee5;
|
1456
1454
|
border-left: 1px solid #dcdee5;
|
1457
1455
|
border-radius: 0 2px 0 0;
|
1458
|
-
transform: translateX(var(--scroll-left));
|
1459
1456
|
justify-content: center;
|
1460
1457
|
align-items: center;
|
1461
1458
|
}
|
@@ -1473,8 +1470,10 @@
|
|
1473
1470
|
.bk-table .bk-table-footer.is-hidden {
|
1474
1471
|
display: none;
|
1475
1472
|
}
|
1476
|
-
.bk-table.bordered-row
|
1477
|
-
|
1473
|
+
.bk-table.bordered-row .bk-table-head {
|
1474
|
+
border-bottom: 1px solid #dcdee5;
|
1475
|
+
}
|
1476
|
+
.bk-table.bordered-row td {
|
1478
1477
|
border-bottom: 1px solid #dcdee5;
|
1479
1478
|
}
|
1480
1479
|
.bk-table.bordered-row tr:last-child td {
|
@@ -1506,10 +1505,14 @@
|
|
1506
1505
|
.bk-table.bordered-col td:last-child {
|
1507
1506
|
border-right: none;
|
1508
1507
|
}
|
1508
|
+
.bk-table th,
|
1509
|
+
.bk-table td {
|
1510
|
+
border-right: 1px solid transparent;
|
1511
|
+
}
|
1509
1512
|
.bk-table.bordered-none th,
|
1510
1513
|
.bk-table.bordered-none td {
|
1511
1514
|
border-top: none;
|
1512
|
-
border-right:
|
1515
|
+
border-right: 1px solid transparent;
|
1513
1516
|
border-bottom: none;
|
1514
1517
|
border-left: none;
|
1515
1518
|
}
|
@@ -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;
|
@@ -32,6 +32,7 @@ export declare const useClass: (props: TablePropTypes, targetColumns: ITableColu
|
|
32
32
|
'--row-height': string;
|
33
33
|
'--scroll-head-left': string;
|
34
34
|
'--scroll-left': string;
|
35
|
+
'--background-color': any;
|
35
36
|
}>;
|
36
37
|
fixHeight: import("vue").Ref<number>;
|
37
38
|
maxFixHeight: import("vue").Ref<number>;
|
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;
|