bkui-vue 0.0.1-beta.45 → 0.0.1-beta.48
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 +27 -27
- package/dist/index.esm.js +698 -319
- package/dist/index.umd.js +28 -28
- package/dist/style.css +1 -1
- package/lib/button/index.js +1 -1
- package/lib/checkbox/checkbox.css +12 -0
- package/lib/checkbox/checkbox.d.ts +5 -11
- package/lib/checkbox/checkbox.less +17 -0
- package/lib/checkbox/checkbox.variable.css +12 -0
- package/lib/checkbox/common.d.ts +3 -3
- package/lib/checkbox/index.d.ts +10 -18
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +2 -6
- package/lib/dialog/dialog.d.ts +89 -17
- package/lib/dialog/index.d.ts +191 -36
- package/lib/dialog/index.js +1 -1
- package/lib/form/compose-form-item.d.ts +16 -0
- package/lib/form/form.css +73 -12
- package/lib/form/form.less +120 -46
- package/lib/form/form.variable.css +167 -12
- package/lib/form/index.d.ts +17 -1
- package/lib/form/index.js +1 -1
- package/lib/icon/funnel.d.ts +4 -0
- package/lib/icon/funnel.js +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/modal/index.d.ts +149 -1
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +20 -0
- package/lib/modal/modal.d.ts +58 -0
- package/lib/modal/modal.less +25 -0
- package/lib/modal/modal.variable.css +20 -0
- package/lib/modal/props.mixin.d.ts +26 -0
- package/lib/popover/index.d.ts +33 -2
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +16 -1
- package/lib/popover/props.d.ts +12 -0
- package/lib/radio/common.d.ts +5 -5
- package/lib/radio/index.d.ts +17 -16
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +5 -4
- package/lib/radio/radio.css +2 -2
- package/lib/radio/radio.d.ts +4 -4
- package/lib/radio/radio.less +2 -2
- package/lib/radio/radio.variable.css +2 -2
- package/lib/radio/type.d.ts +9 -4
- package/lib/rate/index.js +1 -1
- package/lib/sideslider/index.d.ts +123 -1
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +58 -0
- package/lib/slider/index.js +1 -1
- package/lib/switcher/switcher.less +2 -0
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +68 -0
- package/lib/table/plugins/head-filter.less +83 -0
- package/lib/table/plugins/head-filter.variable.css +162 -0
- package/lib/table/plugins/head-sort.css +22 -0
- package/lib/table/plugins/head-sort.less +28 -0
- package/lib/table/plugins/head-sort.variable.css +116 -0
- package/lib/table/props.d.ts +8 -1
- package/lib/table/render.d.ts +10 -15
- package/lib/table/table.css +94 -26
- package/lib/table/table.less +9 -28
- package/lib/table/table.variable.css +108 -40
- package/lib/table/utils.d.ts +10 -1
- package/package.json +30 -16
- package/lib/dialog/dialog.css +0 -68
- package/lib/dialog/dialog.less +0 -80
- package/lib/dialog/dialog.variable.css +0 -68
@@ -0,0 +1,116 @@
|
|
1
|
+
:root {
|
2
|
+
--bk-prefix: bk;
|
3
|
+
--popover-max-height: 216px;
|
4
|
+
--primary-color: #3a84ff;
|
5
|
+
--success-color: #2dcb56;
|
6
|
+
--warning-color: #ff9c01;
|
7
|
+
--danger-color: #ea3636;
|
8
|
+
--default-color: #63656e;
|
9
|
+
--gray-color: #979ba5;
|
10
|
+
--light-gray: #c4c6cc;
|
11
|
+
--white-color: white;
|
12
|
+
--disable-color: #dcdee5;
|
13
|
+
--font-size-base: 12px;
|
14
|
+
--font-size-medium: 14px;
|
15
|
+
--font-size-large: 16px;
|
16
|
+
--line-height-base: 16px;
|
17
|
+
--line-height-medium: 16px;
|
18
|
+
--line-height-large: 18px;
|
19
|
+
--component-size-small: 26px;
|
20
|
+
--component-size-base: 32px;
|
21
|
+
--component-size-large: 38px;
|
22
|
+
--border-width-base: 1px;
|
23
|
+
--border-style-base: solid;
|
24
|
+
--border-radius-base: 2px;
|
25
|
+
--input-disabled-bg: #fafbfd;
|
26
|
+
--input-disabled-border: var(--disable-color);
|
27
|
+
--input-height-base: var(--component-size-base);
|
28
|
+
--input-color: var(--default-color);
|
29
|
+
--input-bg: white;
|
30
|
+
--input-border-color: var(--light-gray);
|
31
|
+
--input-broder-radius: 3px;
|
32
|
+
--input-shadow-color: #a3c5fd;
|
33
|
+
--input-horizontal-padding: 10px;
|
34
|
+
--input-block-color: #f4f6fa;
|
35
|
+
--input-icon-size: var(--font-size-large);
|
36
|
+
--input-maxlength-color: #979ba5;
|
37
|
+
--button-primary-hover-color: #5594fa;
|
38
|
+
--button-danger-hover-color: #ff5656;
|
39
|
+
--button-success-hover-color: #45e35f;
|
40
|
+
--button-warning-hover-color: #ffb848;
|
41
|
+
--button-default-hover-border-color: #979ba5;
|
42
|
+
--button-primary-active-color: #2c77f4;
|
43
|
+
--button-danger-active-color: #db2626;
|
44
|
+
--button-success-active-color: #1ab943;
|
45
|
+
--button-warning-active-color: #eb9000;
|
46
|
+
--fixed-navbar-background: #fff;
|
47
|
+
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
48
|
+
--switch-default-color: #fff;
|
49
|
+
--switch-grey-color: #c4c6cc;
|
50
|
+
--breadcrumb-black-color: #979ba5;
|
51
|
+
--breadcrumb-primary-hover-color: #0082ff;
|
52
|
+
--breadcrumb-fn-main-color: #63656e;
|
53
|
+
--link-default-hover-color: #979ba5;
|
54
|
+
--link-primary-hover-color: #699df4;
|
55
|
+
--link-success-hover-color: #45e35f;
|
56
|
+
--link-warning-hover-color: #ffb848;
|
57
|
+
--link-danger-hover-color: #ff5656;
|
58
|
+
--link-default-disabled-color: #dcdee5;
|
59
|
+
--link-primary-disabled-color: #a3c5fd;
|
60
|
+
--link-success-disabled-color: #94f5a4;
|
61
|
+
--link-warning-disabled-color: #ffd695;
|
62
|
+
--link-danger-disabled-color: #fd9c9c;
|
63
|
+
--message-color: var(--default-color);
|
64
|
+
--message-primary-bg-color: #f0f8ff;
|
65
|
+
--message-primary-border-color: #e1ecff;
|
66
|
+
--message-warning-bg-color: #fff4e2;
|
67
|
+
--message-warning-border-color: #ffe8c3;
|
68
|
+
--message-success-bg-color: #f2fff4;
|
69
|
+
--message-success-border-color: #dcffe2;
|
70
|
+
--message-danger-bg-color: #ffeded;
|
71
|
+
--message-danger-border-color: #ffdddd;
|
72
|
+
--slider-default-bg: #dcdee5;
|
73
|
+
--slider-disable-bar-bg: #979ba5;
|
74
|
+
--menu-bg-color: #182132;
|
75
|
+
--submenu-bg-color: #151d2c;
|
76
|
+
--menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
|
77
|
+
--menu-color: #96a2b9;
|
78
|
+
--menu-group-color: var(--default-color);
|
79
|
+
--menu-width: 260px;
|
80
|
+
--menu-collapse-width: 60px;
|
81
|
+
--menu-active-color: white;
|
82
|
+
--nav-header-bg-color: #182132;
|
83
|
+
--nav-bg-color: #182132;
|
84
|
+
--date-picker-disabled-bg: #fafbfd;
|
85
|
+
--date-picker-dropdown-mb: 4px;
|
86
|
+
--date-picker-dropdown-bg: #fff;
|
87
|
+
--table-bg-color: var(--white-color);
|
88
|
+
--table-border-color: #dcdee5;
|
89
|
+
--table-head-bg-color: #fafbfd;
|
90
|
+
--table-head-font-color: #313238;
|
91
|
+
--table-body-font-color: #575961;
|
92
|
+
--table-row-hover-bg-color: #f5f7fa;
|
93
|
+
--table-row-active-bg-color: #f0f1f5;
|
94
|
+
}
|
95
|
+
.bk-head-cell-sort {
|
96
|
+
display: flex;
|
97
|
+
flex-direction: column;
|
98
|
+
margin-left: 4px;
|
99
|
+
font-size: 10px;
|
100
|
+
}
|
101
|
+
.bk-head-cell-sort .sort-action {
|
102
|
+
display: flex;
|
103
|
+
width: 18px;
|
104
|
+
height: calc(var(--row-height)/2);
|
105
|
+
color: #c0c4cc;
|
106
|
+
cursor: pointer;
|
107
|
+
}
|
108
|
+
.bk-head-cell-sort .sort-action.active {
|
109
|
+
color: #3a84ff;
|
110
|
+
}
|
111
|
+
.bk-head-cell-sort .sort-action.sort-asc {
|
112
|
+
align-items: flex-end;
|
113
|
+
}
|
114
|
+
.bk-head-cell-sort .sort-action.sort-desc {
|
115
|
+
align-items: flex-start;
|
116
|
+
}
|
package/lib/table/props.d.ts
CHANGED
@@ -3,6 +3,10 @@ export declare enum SortScope {
|
|
3
3
|
CURRENT = "current",
|
4
4
|
ALL = "all"
|
5
5
|
}
|
6
|
+
export declare type ColumnFilterListItem = {
|
7
|
+
text?: string;
|
8
|
+
value?: string;
|
9
|
+
};
|
6
10
|
export declare const tableProps: {
|
7
11
|
/**
|
8
12
|
* 渲染列表
|
@@ -112,10 +116,13 @@ export declare type Column = {
|
|
112
116
|
width?: number | string;
|
113
117
|
type?: string;
|
114
118
|
sort?: {
|
115
|
-
sortby?: string;
|
116
119
|
sortFn?: Function;
|
117
120
|
sortScope?: string;
|
118
121
|
} | boolean;
|
122
|
+
filter?: {
|
123
|
+
list?: any;
|
124
|
+
filterFn?: Function;
|
125
|
+
} | boolean;
|
119
126
|
};
|
120
127
|
export declare type Thead = {
|
121
128
|
height?: Number;
|
package/lib/table/render.d.ts
CHANGED
@@ -2,12 +2,8 @@ import { TablePlugins } from './plugins/index';
|
|
2
2
|
import { GroupColumn, IColumnActive, IReactiveProp, TablePropTypes } from './props';
|
3
3
|
export declare const enum EVENTS {
|
4
4
|
/** 点击排序事件 */
|
5
|
-
ON_SORT_BY_CLICK = "onSortByClick"
|
6
|
-
|
7
|
-
/** 排序方式 */
|
8
|
-
export declare const enum SortType {
|
9
|
-
ASC = "asc",
|
10
|
-
DESC = "desc"
|
5
|
+
ON_SORT_BY_CLICK = "onSortByClick",
|
6
|
+
ON_FILTER_CLICK = "onFilterClick"
|
11
7
|
}
|
12
8
|
export default class TableRender {
|
13
9
|
props: TablePropTypes;
|
@@ -58,6 +54,14 @@ export default class TableRender {
|
|
58
54
|
* @param index 当前选中列Index
|
59
55
|
*/
|
60
56
|
private handleColumnHeadClick;
|
57
|
+
/**
|
58
|
+
* 获取排序设置表头
|
59
|
+
* @param column 当前渲染排序列
|
60
|
+
* @param index 排序列所在index
|
61
|
+
* @returns
|
62
|
+
*/
|
63
|
+
private getSortCell;
|
64
|
+
private getFilterCell;
|
61
65
|
/**
|
62
66
|
* 渲染Table Header
|
63
67
|
* @returns
|
@@ -85,15 +89,6 @@ export default class TableRender {
|
|
85
89
|
* @param rows
|
86
90
|
*/
|
87
91
|
private handleRowDblClick;
|
88
|
-
/**
|
89
|
-
* 获取当前行指定列的内容
|
90
|
-
* @param row 当前行
|
91
|
-
* @param key 指定列名
|
92
|
-
* @param column 列配置
|
93
|
-
* @param index 当前行Index
|
94
|
-
* @returns
|
95
|
-
*/
|
96
|
-
private getRowText;
|
97
92
|
/**
|
98
93
|
* 渲染表格Cell内容
|
99
94
|
* @param row 当前行
|
package/lib/table/table.css
CHANGED
@@ -1,3 +1,93 @@
|
|
1
|
+
.bk-table-head-action {
|
2
|
+
display: flex;
|
3
|
+
width: 32px;
|
4
|
+
height: var(--row-height);
|
5
|
+
margin-left: 4px;
|
6
|
+
font-size: 12px;
|
7
|
+
color: #c4c6cc;
|
8
|
+
cursor: pointer;
|
9
|
+
align-items: center;
|
10
|
+
}
|
11
|
+
.bk-table-head-action.active {
|
12
|
+
color: #3a84ff;
|
13
|
+
}
|
14
|
+
.bk-table-head-action.opened {
|
15
|
+
color: inherit;
|
16
|
+
}
|
17
|
+
.bk-table-head-filter {
|
18
|
+
padding: 5px 0 0 0;
|
19
|
+
background-color: #fff;
|
20
|
+
border-radius: 2px;
|
21
|
+
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1);
|
22
|
+
}
|
23
|
+
.bk-table-head-filter .content-list {
|
24
|
+
max-width: 200px;
|
25
|
+
min-width: 140px;
|
26
|
+
overflow: auto;
|
27
|
+
}
|
28
|
+
.bk-table-head-filter .content-list .list-item {
|
29
|
+
width: 100%;
|
30
|
+
height: 32px;
|
31
|
+
padding: 0 10px;
|
32
|
+
font-size: 12px;
|
33
|
+
line-height: 32px;
|
34
|
+
color: #63656e;
|
35
|
+
text-align: left;
|
36
|
+
}
|
37
|
+
.bk-table-head-filter .content-list .list-item:hover {
|
38
|
+
background: #f0f1f5;
|
39
|
+
}
|
40
|
+
.bk-table-head-filter .content-footer {
|
41
|
+
display: flex;
|
42
|
+
height: 42px;
|
43
|
+
padding: 0 10px;
|
44
|
+
border-top: solid 1px #dcdee5;
|
45
|
+
justify-content: center;
|
46
|
+
align-items: center;
|
47
|
+
}
|
48
|
+
.bk-table-head-filter .content-footer span {
|
49
|
+
display: inline-flex;
|
50
|
+
height: 100%;
|
51
|
+
padding: 6px 12px;
|
52
|
+
font-size: 14px;
|
53
|
+
line-height: 22px;
|
54
|
+
color: #3a84ff;
|
55
|
+
cursor: pointer;
|
56
|
+
align-items: center;
|
57
|
+
}
|
58
|
+
.bk-table-head-filter .content-footer span.btn-filter-split {
|
59
|
+
width: 1px;
|
60
|
+
height: calc(100% - 12px);
|
61
|
+
padding: 6px 0;
|
62
|
+
cursor: default;
|
63
|
+
background: #f0f1f5;
|
64
|
+
}
|
65
|
+
.bk-table-head-filter .content-footer span.btn-filter-reset.disable {
|
66
|
+
color: #979ba5;
|
67
|
+
cursor: not-allowed;
|
68
|
+
}
|
69
|
+
.bk-head-cell-sort {
|
70
|
+
display: flex;
|
71
|
+
flex-direction: column;
|
72
|
+
margin-left: 4px;
|
73
|
+
font-size: 10px;
|
74
|
+
}
|
75
|
+
.bk-head-cell-sort .sort-action {
|
76
|
+
display: flex;
|
77
|
+
width: 18px;
|
78
|
+
height: calc(var(--row-height)/2);
|
79
|
+
color: #c0c4cc;
|
80
|
+
cursor: pointer;
|
81
|
+
}
|
82
|
+
.bk-head-cell-sort .sort-action.active {
|
83
|
+
color: #3a84ff;
|
84
|
+
}
|
85
|
+
.bk-head-cell-sort .sort-action.sort-asc {
|
86
|
+
align-items: flex-end;
|
87
|
+
}
|
88
|
+
.bk-head-cell-sort .sort-action.sort-desc {
|
89
|
+
align-items: flex-start;
|
90
|
+
}
|
1
91
|
.bk-table {
|
2
92
|
height: 100%;
|
3
93
|
overflow: hidden;
|
@@ -48,32 +138,10 @@
|
|
48
138
|
.bk-table .bk-table-body table thead th:hover {
|
49
139
|
background: #f0f1f5;
|
50
140
|
}
|
51
|
-
.bk-table .bk-table-head table
|
52
|
-
.bk-table .bk-table-body table
|
53
|
-
display:
|
54
|
-
|
55
|
-
margin-left: 4px;
|
56
|
-
font-size: 10px;
|
57
|
-
}
|
58
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action,
|
59
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action {
|
60
|
-
display: flex;
|
61
|
-
width: 18px;
|
62
|
-
height: calc(var(--row-height)/2);
|
63
|
-
color: #c0c4cc;
|
64
|
-
cursor: pointer;
|
65
|
-
}
|
66
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action.active,
|
67
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action.active {
|
68
|
-
color: #3a84ff;
|
69
|
-
}
|
70
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action.sort-asc,
|
71
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action.sort-asc {
|
72
|
-
align-items: flex-end;
|
73
|
-
}
|
74
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action.sort-desc,
|
75
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action.sort-desc {
|
76
|
-
align-items: flex-start;
|
141
|
+
.bk-table .bk-table-head table tbody tr td .cell,
|
142
|
+
.bk-table .bk-table-body table tbody tr td .cell {
|
143
|
+
display: inline-block;
|
144
|
+
width: 100%;
|
77
145
|
}
|
78
146
|
.bk-table .bk-table-head table tbody tr:hover td,
|
79
147
|
.bk-table .bk-table-body table tbody tr:hover td {
|
package/lib/table/table.less
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
@import '../styles/themes/themes.less';
|
2
|
-
|
2
|
+
@import './plugins/head-filter.less';
|
3
|
+
@import './plugins/head-sort.less';
|
3
4
|
.@{bk-prefix}-table {
|
4
5
|
height: 100%;
|
5
6
|
overflow: hidden;
|
@@ -44,38 +45,18 @@
|
|
44
45
|
&:hover {
|
45
46
|
background: @table-row-active-bg-color;
|
46
47
|
}
|
47
|
-
|
48
|
-
.head-cell-sort {
|
49
|
-
display: flex;
|
50
|
-
flex-direction: column;
|
51
|
-
margin-left: 4px;
|
52
|
-
font-size: 10px;
|
53
|
-
|
54
|
-
.sort-action {
|
55
|
-
display: flex;
|
56
|
-
width: 18px;
|
57
|
-
height: calc(var(--row-height)/2);
|
58
|
-
color: #c0c4cc;
|
59
|
-
cursor: pointer;
|
60
|
-
|
61
|
-
&.active {
|
62
|
-
color: #3a84ff;
|
63
|
-
}
|
64
|
-
|
65
|
-
&.sort-asc {
|
66
|
-
align-items: flex-end;
|
67
|
-
}
|
68
|
-
|
69
|
-
&.sort-desc {
|
70
|
-
align-items: flex-start;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
48
|
}
|
75
49
|
}
|
76
50
|
|
77
51
|
tbody {
|
78
52
|
tr {
|
53
|
+
td {
|
54
|
+
.cell {
|
55
|
+
display: inline-block;
|
56
|
+
width: 100%;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
79
60
|
&:hover {
|
80
61
|
td {
|
81
62
|
background: @table-row-hover-bg-color;
|
@@ -92,18 +92,108 @@
|
|
92
92
|
--table-row-hover-bg-color: #f5f7fa;
|
93
93
|
--table-row-active-bg-color: #f0f1f5;
|
94
94
|
}
|
95
|
+
.bk-table-head-action {
|
96
|
+
display: flex;
|
97
|
+
width: 32px;
|
98
|
+
height: var(--row-height);
|
99
|
+
margin-left: 4px;
|
100
|
+
font-size: 12px;
|
101
|
+
color: #c4c6cc;
|
102
|
+
cursor: pointer;
|
103
|
+
align-items: center;
|
104
|
+
}
|
105
|
+
.bk-table-head-action.active {
|
106
|
+
color: #3a84ff;
|
107
|
+
}
|
108
|
+
.bk-table-head-action.opened {
|
109
|
+
color: inherit;
|
110
|
+
}
|
111
|
+
.bk-table-head-filter {
|
112
|
+
padding: 5px 0 0 0;
|
113
|
+
background-color: #fff;
|
114
|
+
border-radius: 2px;
|
115
|
+
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1);
|
116
|
+
}
|
117
|
+
.bk-table-head-filter .content-list {
|
118
|
+
max-width: 200px;
|
119
|
+
min-width: 140px;
|
120
|
+
overflow: auto;
|
121
|
+
}
|
122
|
+
.bk-table-head-filter .content-list .list-item {
|
123
|
+
width: 100%;
|
124
|
+
height: 32px;
|
125
|
+
padding: 0 10px;
|
126
|
+
font-size: 12px;
|
127
|
+
line-height: 32px;
|
128
|
+
color: #63656e;
|
129
|
+
text-align: left;
|
130
|
+
}
|
131
|
+
.bk-table-head-filter .content-list .list-item:hover {
|
132
|
+
background: #f0f1f5;
|
133
|
+
}
|
134
|
+
.bk-table-head-filter .content-footer {
|
135
|
+
display: flex;
|
136
|
+
height: 42px;
|
137
|
+
padding: 0 10px;
|
138
|
+
border-top: solid 1px #dcdee5;
|
139
|
+
justify-content: center;
|
140
|
+
align-items: center;
|
141
|
+
}
|
142
|
+
.bk-table-head-filter .content-footer span {
|
143
|
+
display: inline-flex;
|
144
|
+
height: 100%;
|
145
|
+
padding: 6px 12px;
|
146
|
+
font-size: 14px;
|
147
|
+
line-height: 22px;
|
148
|
+
color: #3a84ff;
|
149
|
+
cursor: pointer;
|
150
|
+
align-items: center;
|
151
|
+
}
|
152
|
+
.bk-table-head-filter .content-footer span.btn-filter-split {
|
153
|
+
width: 1px;
|
154
|
+
height: calc(100% - 12px);
|
155
|
+
padding: 6px 0;
|
156
|
+
cursor: default;
|
157
|
+
background: #f0f1f5;
|
158
|
+
}
|
159
|
+
.bk-table-head-filter .content-footer span.btn-filter-reset.disable {
|
160
|
+
color: #979ba5;
|
161
|
+
cursor: not-allowed;
|
162
|
+
}
|
163
|
+
.bk-head-cell-sort {
|
164
|
+
display: flex;
|
165
|
+
flex-direction: column;
|
166
|
+
margin-left: 4px;
|
167
|
+
font-size: 10px;
|
168
|
+
}
|
169
|
+
.bk-head-cell-sort .sort-action {
|
170
|
+
display: flex;
|
171
|
+
width: 18px;
|
172
|
+
height: calc(var(--row-height)/2);
|
173
|
+
color: #c0c4cc;
|
174
|
+
cursor: pointer;
|
175
|
+
}
|
176
|
+
.bk-head-cell-sort .sort-action.active {
|
177
|
+
color: #3a84ff;
|
178
|
+
}
|
179
|
+
.bk-head-cell-sort .sort-action.sort-asc {
|
180
|
+
align-items: flex-end;
|
181
|
+
}
|
182
|
+
.bk-head-cell-sort .sort-action.sort-desc {
|
183
|
+
align-items: flex-start;
|
184
|
+
}
|
95
185
|
.bk-table {
|
96
186
|
height: 100%;
|
97
187
|
overflow: hidden;
|
98
|
-
border-top: 1px solid
|
99
|
-
border-bottom: 1px solid
|
188
|
+
border-top: 1px solid #dcdee5;
|
189
|
+
border-bottom: 1px solid #dcdee5;
|
100
190
|
}
|
101
191
|
.bk-table .bk-table-body {
|
102
192
|
overflow: auto;
|
103
193
|
}
|
104
194
|
.bk-table .bk-table-head,
|
105
195
|
.bk-table .bk-table-body {
|
106
|
-
background:
|
196
|
+
background: white;
|
107
197
|
}
|
108
198
|
.bk-table .bk-table-head table,
|
109
199
|
.bk-table .bk-table-body table {
|
@@ -126,67 +216,45 @@
|
|
126
216
|
padding: 0 15px;
|
127
217
|
overflow: hidden;
|
128
218
|
line-height: var(--row-height);
|
129
|
-
color:
|
219
|
+
color: #575961;
|
130
220
|
text-align: left;
|
131
221
|
text-overflow: ellipsis;
|
132
222
|
white-space: nowrap;
|
133
223
|
}
|
134
224
|
.bk-table .bk-table-head table thead th,
|
135
225
|
.bk-table .bk-table-body table thead th {
|
136
|
-
color:
|
137
|
-
background-color:
|
226
|
+
color: #313238;
|
227
|
+
background-color: #fafbfd;
|
138
228
|
}
|
139
229
|
.bk-table .bk-table-head table thead th.active,
|
140
230
|
.bk-table .bk-table-body table thead th.active,
|
141
231
|
.bk-table .bk-table-head table thead th:hover,
|
142
232
|
.bk-table .bk-table-body table thead th:hover {
|
143
|
-
background:
|
233
|
+
background: #f0f1f5;
|
144
234
|
}
|
145
|
-
.bk-table .bk-table-head table
|
146
|
-
.bk-table .bk-table-body table
|
147
|
-
display:
|
148
|
-
|
149
|
-
margin-left: 4px;
|
150
|
-
font-size: 10px;
|
151
|
-
}
|
152
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action,
|
153
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action {
|
154
|
-
display: flex;
|
155
|
-
width: 18px;
|
156
|
-
height: calc(var(--row-height)/2);
|
157
|
-
color: #c0c4cc;
|
158
|
-
cursor: pointer;
|
159
|
-
}
|
160
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action.active,
|
161
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action.active {
|
162
|
-
color: #3a84ff;
|
163
|
-
}
|
164
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action.sort-asc,
|
165
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action.sort-asc {
|
166
|
-
align-items: flex-end;
|
167
|
-
}
|
168
|
-
.bk-table .bk-table-head table thead th .head-cell-sort .sort-action.sort-desc,
|
169
|
-
.bk-table .bk-table-body table thead th .head-cell-sort .sort-action.sort-desc {
|
170
|
-
align-items: flex-start;
|
235
|
+
.bk-table .bk-table-head table tbody tr td .cell,
|
236
|
+
.bk-table .bk-table-body table tbody tr td .cell {
|
237
|
+
display: inline-block;
|
238
|
+
width: 100%;
|
171
239
|
}
|
172
240
|
.bk-table .bk-table-head table tbody tr:hover td,
|
173
241
|
.bk-table .bk-table-body table tbody tr:hover td {
|
174
|
-
background:
|
242
|
+
background: #f5f7fa;
|
175
243
|
}
|
176
244
|
.bk-table .bk-table-footer {
|
177
245
|
line-height: 40px;
|
178
246
|
}
|
179
247
|
.bk-table.bordered-row td,
|
180
248
|
.bk-table.bordered-row th {
|
181
|
-
border-bottom: 1px solid
|
249
|
+
border-bottom: 1px solid #dcdee5;
|
182
250
|
}
|
183
251
|
.bk-table.bordered-outer {
|
184
|
-
border-right: 1px solid
|
185
|
-
border-left: 1px solid
|
252
|
+
border-right: 1px solid #dcdee5;
|
253
|
+
border-left: 1px solid #dcdee5;
|
186
254
|
}
|
187
255
|
.bk-table.bordered-col th,
|
188
256
|
.bk-table.bordered-col td {
|
189
|
-
border-right: 1px solid
|
257
|
+
border-right: 1px solid #dcdee5;
|
190
258
|
}
|
191
259
|
.bk-table.bordered-col th:last-child,
|
192
260
|
.bk-table.bordered-col td:last-child {
|
@@ -203,9 +271,9 @@
|
|
203
271
|
width: 100%;
|
204
272
|
}
|
205
273
|
.bk-table colgroup col {
|
206
|
-
background:
|
274
|
+
background: white;
|
207
275
|
}
|
208
276
|
.bk-table colgroup col.active {
|
209
277
|
position: relative;
|
210
|
-
background:
|
278
|
+
background: #f0f1f5;
|
211
279
|
}
|
package/lib/table/utils.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { GroupColumn, TablePropTypes } from './props';
|
1
|
+
import { Column, GroupColumn, TablePropTypes } from './props';
|
2
2
|
/**
|
3
3
|
* 解析Prop值 | 可能为多种类型 & 函数返回的场景
|
4
4
|
* @param prop 当前Prop
|
@@ -80,3 +80,12 @@ export declare const resolveHeadConfig: (props: TablePropTypes) => {
|
|
80
80
|
isShow?: boolean;
|
81
81
|
cellFn?: Function;
|
82
82
|
};
|
83
|
+
/**
|
84
|
+
* 获取当前行指定列的内容
|
85
|
+
* @param row 当前行
|
86
|
+
* @param key 指定列名
|
87
|
+
* @param column 列配置
|
88
|
+
* @param index 当前行Index
|
89
|
+
* @returns
|
90
|
+
*/
|
91
|
+
export declare const getRowText: (row: any, key: string, column: Column) => any;
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "bkui-vue",
|
3
|
-
"version": "0.0.1-beta.
|
3
|
+
"version": "0.0.1-beta.48",
|
4
4
|
"workspaces": {
|
5
5
|
"packages": [
|
6
6
|
"packages/!(**.bak)*",
|
7
|
-
"scripts
|
7
|
+
"scripts/*"
|
8
8
|
]
|
9
9
|
},
|
10
10
|
"files": [
|
@@ -14,19 +14,27 @@
|
|
14
14
|
"scripts": {
|
15
15
|
"prepare": "husky install",
|
16
16
|
"dev": "vite serve site",
|
17
|
-
"build": "
|
17
|
+
"build": "run-p build:dist build:lib",
|
18
18
|
"build:site": "vite build site --mode development",
|
19
19
|
"build:dist": "rimraf dist && lerna run --stream --scope cli dist",
|
20
20
|
"build:lib": "rimraf lib && lerna run --stream --scope cli lib",
|
21
|
+
"lib:dev": "rimraf lib && node --inspect-brk ./node_modules/.bin/ts-node --project=./scripts/cli/tsconfig.json ./scripts/cli/index.ts lib",
|
21
22
|
"help:release": "lerna run --stream --scope cli release",
|
22
|
-
"release": "
|
23
|
+
"release": "run-s build help:release",
|
23
24
|
"analyze:lib": "rimraf lib && lerna run --stream --scope cli lib -- -a",
|
24
25
|
"generate:icon": "lerna run --scope @bkui-vue/icon build",
|
25
26
|
"changelog": "conventional-changelog -c .changelog.config.js -p angular -i CHANGELOG.md -s -l",
|
26
|
-
"lint": "eslint --ext .js,.ts,.tsx
|
27
|
-
"lint:
|
28
|
-
"lint:
|
29
|
-
"
|
27
|
+
"lint:packages": "eslint ./packages --ext .js,.ts,.tsx --cache",
|
28
|
+
"lint:site": "eslint ./site --ext .js,.ts,.tsx,.vue --cache",
|
29
|
+
"lint:scripts": "eslint ./scripts --ext .js,.ts,.tsx --cache",
|
30
|
+
"lint": "run-p lint:site lint:packages lint:scripts",
|
31
|
+
"fix:packages": "eslint ./packages --ext .js,.ts,.tsx --fix --cache",
|
32
|
+
"fix:site": "eslint ./site --ext .js,.ts,.tsx,.vue --fix --cache",
|
33
|
+
"fix:scripts": "eslint ./scripts --ext .js,.ts,.tsx --fix --cache",
|
34
|
+
"lint:fix": "run-p lint:site lint:packages lint:scripts",
|
35
|
+
"stylelint": "eslint --ext .js,.ts,.tsx,.vue ./packages ./site --cache",
|
36
|
+
"stylelint:fix": "yarn stylelint -- --fix",
|
37
|
+
"test:unit": "jest --passWithNoTests --config=./jest.config.js",
|
30
38
|
"cz": "git-cz"
|
31
39
|
},
|
32
40
|
"devDependencies": {
|
@@ -34,14 +42,12 @@
|
|
34
42
|
"@commitlint/config-conventional": "~16.2.1",
|
35
43
|
"@types/jest": "~27.4.1",
|
36
44
|
"@types/node": "~17.0.23",
|
45
|
+
"@types/postcss-less": "~4.0.2",
|
37
46
|
"@typescript-eslint/eslint-plugin": "~5.19.0",
|
38
47
|
"@typescript-eslint/parser": "~5.19.0",
|
39
48
|
"@vitejs/plugin-vue": "~2.3.1",
|
40
49
|
"@vitejs/plugin-vue-jsx": "~1.3.9",
|
41
50
|
"@vue/babel-plugin-jsx": "~1.1.1",
|
42
|
-
"@vue/babel-preset-jsx": "~1.2.4",
|
43
|
-
"@vue/compiler-sfc": "~3.2.31",
|
44
|
-
"@vue/component-compiler-utils": "~3.3.0",
|
45
51
|
"@vue/eslint-config-standard": "~6.1.0",
|
46
52
|
"@vue/eslint-config-typescript": "~10.0.0",
|
47
53
|
"@vue/test-utils": "~2.0.0-rc.12",
|
@@ -69,11 +75,16 @@
|
|
69
75
|
"lint-staged": "~12.3.7",
|
70
76
|
"markdown-it-container": "~3.0.0",
|
71
77
|
"normalize-wheel": "~1.0.1",
|
78
|
+
"npm-run-all": "~4.1.5",
|
72
79
|
"plop": "~3.0.5",
|
80
|
+
"postcss": "~8.4.12",
|
81
|
+
"postcss-html": "~1.4.1",
|
82
|
+
"postcss-less": "~6.0.0",
|
73
83
|
"prettier": "~2.6.2",
|
74
84
|
"prismjs": "~1.27.0",
|
75
85
|
"rimraf": "~3.0.2",
|
76
86
|
"stylelint": "~14.6.1",
|
87
|
+
"stylelint-config-recommended-vue": "~1.4.0",
|
77
88
|
"stylelint-order": "~5.0.0",
|
78
89
|
"stylelint-scss": "~4.2.0",
|
79
90
|
"ts-jest": "~27.1.4",
|
@@ -82,6 +93,7 @@
|
|
82
93
|
"vite": "~2.9.1",
|
83
94
|
"vite-plugin-md": "~0.12.4",
|
84
95
|
"vue": "^3.2.0",
|
96
|
+
"vue-eslint-parser": "~8.3.0",
|
85
97
|
"vue-router": "~4.0.14",
|
86
98
|
"vue-types": "~4.1.1"
|
87
99
|
},
|
@@ -93,11 +105,13 @@
|
|
93
105
|
"module": "dist/bkui-vue.esm.js",
|
94
106
|
"typings": "./lib/index.d.ts",
|
95
107
|
"lint-staged": {
|
96
|
-
"*.
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
108
|
+
"*.(vue|ts|tsx|js)": [
|
109
|
+
"eslint --ext .js,.tsx,.ts,.vue --cache --fix",
|
110
|
+
"git add"
|
111
|
+
],
|
112
|
+
"*.(vue|scss|css|sass)": [
|
113
|
+
"stylelint --cache --fix",
|
114
|
+
"git add"
|
101
115
|
]
|
102
116
|
},
|
103
117
|
"config": {
|