bkui-vue 0.0.1-beta.122 → 0.0.1-beta.125
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 +145 -31
- package/dist/index.esm.js +3494 -467
- package/dist/index.umd.js +145 -31
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -0
- package/lib/affix/affix.variable.css +2 -2
- package/lib/alert/alert.variable.css +2 -2
- package/lib/backtop/backtop.variable.css +2 -2
- package/lib/badge/badge.variable.css +2 -2
- package/lib/breadcrumb/breadcrumb.variable.css +2 -2
- package/lib/button/button.css +4 -0
- package/lib/button/button.less +13 -7
- package/lib/button/button.variable.css +6 -2
- package/lib/card/card.variable.css +2 -2
- package/lib/cascader/cascader.variable.css +2 -2
- package/lib/checkbox/checkbox.css +16 -4
- package/lib/checkbox/checkbox.d.ts +11 -3
- package/lib/checkbox/checkbox.less +22 -4
- package/lib/checkbox/checkbox.variable.css +18 -6
- package/lib/checkbox/index.d.ts +19 -5
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/code-diff.variable.css +2 -2
- package/lib/collapse/collapse.variable.css +2 -2
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -1
- package/lib/container/container.variable.css +2 -2
- package/lib/date-picker/date-picker.variable.css +2 -2
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +0 -1
- package/lib/divider/divider.variable.css +2 -2
- package/lib/dropdown/dropdown.variable.css +2 -2
- package/lib/exception/exception.variable.css +2 -2
- package/lib/fixed-navbar/fixed-navbar.variable.css +2 -2
- package/lib/form/form.variable.css +2 -2
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +13 -5
- package/lib/input/input.less +12 -2
- package/lib/input/input.variable.css +12 -4
- package/lib/link/link.variable.css +2 -2
- package/lib/loading/loading.css +0 -2
- package/lib/loading/loading.less +2 -2
- package/lib/loading/loading.variable.css +2 -4
- package/lib/menu/menu.variable.css +2 -2
- package/lib/menu/submenu.variable.css +2 -2
- package/lib/message/message.variable.css +2 -2
- package/lib/navigation/navigation.variable.css +2 -2
- package/lib/notify/notify.variable.css +2 -2
- package/lib/pagination/pagination.variable.css +2 -2
- package/lib/popover/popover.variable.css +2 -2
- package/lib/popover2/popover2.variable.css +2 -2
- package/lib/process/process.variable.css +2 -2
- package/lib/progress/progress.variable.css +2 -2
- package/lib/radio/radio.variable.css +2 -2
- package/lib/resize-layout/resize-layout.variable.css +2 -2
- package/lib/select/select.variable.css +2 -2
- package/lib/sideslider/sideslider.variable.css +2 -2
- package/lib/slider/slider.variable.css +2 -2
- package/lib/steps/steps.variable.css +2 -2
- package/lib/styles/mixins/scroll.css +17 -0
- package/lib/styles/mixins/scroll.less +22 -0
- package/lib/styles/mixins/scroll.variable.css +119 -0
- package/lib/styles/themes/themes.less +2 -2
- package/lib/switcher/switcher.variable.css +2 -2
- package/lib/tab/tab.variable.css +2 -2
- package/lib/table/const.d.ts +4 -0
- package/lib/table/index.d.ts +5 -16
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.less +1 -1
- package/lib/table/plugins/head-filter.variable.css +2 -2
- package/lib/table/plugins/head-sort.less +1 -1
- package/lib/table/plugins/head-sort.variable.css +2 -2
- package/lib/table/plugins/settings.css +22 -4
- package/lib/table/plugins/settings.less +25 -5
- package/lib/table/plugins/settings.variable.css +24 -6
- package/lib/table/props.d.ts +7 -3
- package/lib/table/table.css +683 -7
- package/lib/table/table.d.ts +2 -7
- package/lib/table/table.less +9 -4
- package/lib/table/table.variable.css +685 -9
- package/lib/table/use-common.d.ts +4 -2
- package/lib/tag/tag.variable.css +2 -2
- package/lib/tag-input/tag-input.variable.css +2 -2
- package/lib/timeline/timeline.variable.css +2 -2
- package/lib/transfer/transfer.variable.css +2 -2
- package/lib/tree/constant.d.ts +3 -1
- package/lib/tree/index.d.ts +54 -2
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +16 -0
- package/lib/tree/tree.css +141 -0
- package/lib/tree/tree.d.ts +24 -0
- package/lib/tree/tree.less +26 -0
- package/lib/tree/tree.variable.css +143 -2
- package/lib/tree/use-node-action.d.ts +2 -1
- package/lib/tree/use-node-attribute.d.ts +2 -0
- package/lib/upload/upload.variable.css +2 -2
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/virtual-render.css +17 -17
- package/lib/virtual-render/virtual-render.less +2 -23
- package/lib/virtual-render/virtual-render.variable.css +119 -17
- package/package.json +2 -2
package/lib/tree/tree.less
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
@import '../styles/themes/themes.less';
|
2
|
+
@import '../styles/mixins/scroll.less';
|
3
|
+
@import '../virtual-render/virtual-render.less';
|
4
|
+
@import '../checkbox/checkbox.less';
|
5
|
+
|
2
6
|
.@{bk-prefix}-tree {
|
7
|
+
font-size: 14px;
|
8
|
+
|
3
9
|
.@{bk-prefix}-node-row {
|
4
10
|
padding-left: calc(var(--offset-left));
|
5
11
|
|
@@ -45,6 +51,18 @@
|
|
45
51
|
border-left: var(--level-line);
|
46
52
|
}
|
47
53
|
|
54
|
+
.@{bk-prefix}-node-prefix {
|
55
|
+
display: flex;
|
56
|
+
width: 14px;
|
57
|
+
height: 14px;
|
58
|
+
align-items: center;
|
59
|
+
justify-content: center;
|
60
|
+
}
|
61
|
+
|
62
|
+
.@{bk-prefix}-node-action {
|
63
|
+
margin-right: 2px;
|
64
|
+
}
|
65
|
+
|
48
66
|
.@{bk-prefix}-tree-icon {
|
49
67
|
margin: 0 6px 0 4px;
|
50
68
|
}
|
@@ -55,6 +73,14 @@
|
|
55
73
|
align-items: center;
|
56
74
|
min-width: 0;
|
57
75
|
|
76
|
+
.@{bk-prefix}-checkbox {
|
77
|
+
margin: 0;
|
78
|
+
|
79
|
+
.@{bk-prefix}-checkbox-input {
|
80
|
+
margin: 0;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
58
84
|
.@{bk-prefix}-node-text {
|
59
85
|
flex: 1;
|
60
86
|
overflow: hidden;
|
@@ -19,7 +19,7 @@
|
|
19
19
|
--line-height-large: 18px;
|
20
20
|
--component-size-small: 26px;
|
21
21
|
--component-size-base: 32px;
|
22
|
-
--component-size-large:
|
22
|
+
--component-size-large: 40px;
|
23
23
|
--border-width-base: 1px;
|
24
24
|
--border-style-base: solid;
|
25
25
|
--border-radius-base: 2px;
|
@@ -34,7 +34,7 @@
|
|
34
34
|
--input-horizontal-padding: 10px;
|
35
35
|
--input-block-color: #f5f7fa;
|
36
36
|
--input-block-hover-color: #eaebf0;
|
37
|
-
--input-icon-size: var(--font-size-
|
37
|
+
--input-icon-size: var(--font-size-medium);
|
38
38
|
--input-maxlength-color: #979ba5;
|
39
39
|
--button-primary-hover-color: #5594fa;
|
40
40
|
--button-danger-hover-color: #ff5656;
|
@@ -100,6 +100,131 @@
|
|
100
100
|
--cascader-panel-active: #f4f6fa;
|
101
101
|
--cascader-panel-disabled-bg: #fff;
|
102
102
|
}
|
103
|
+
.bk-F-scroll-x {
|
104
|
+
overflow-x: auto;
|
105
|
+
scrollbar-color: #a0a0a0 transparent;
|
106
|
+
scrollbar-width: thin;
|
107
|
+
}
|
108
|
+
.bk-F-scroll-x::-webkit-scrollbar {
|
109
|
+
height: 6px;
|
110
|
+
}
|
111
|
+
.bk-F-scroll-y {
|
112
|
+
overflow-y: auto;
|
113
|
+
}
|
114
|
+
.bk-F-scroll-y::-webkit-scrollbar {
|
115
|
+
width: 4px;
|
116
|
+
}
|
117
|
+
.bk-F-scroll-y::-webkit-scrollbar-thumb {
|
118
|
+
border-radius: 4px;
|
119
|
+
}
|
120
|
+
.bk-virtual-render {
|
121
|
+
position: relative;
|
122
|
+
}
|
123
|
+
.bk-virtual-render .bk-virtual-content,
|
124
|
+
.bk-virtual-render.bk-virtual-content {
|
125
|
+
position: absolute;
|
126
|
+
top: 0;
|
127
|
+
bottom: 0;
|
128
|
+
left: 0;
|
129
|
+
width: 100%;
|
130
|
+
height: 100%;
|
131
|
+
}
|
132
|
+
.bk-virtual-render .bk-virtual-section {
|
133
|
+
width: 1px;
|
134
|
+
background: transparent;
|
135
|
+
}
|
136
|
+
.bk-checkbox {
|
137
|
+
display: inline-flex;
|
138
|
+
justify-self: center;
|
139
|
+
margin-right: 30px;
|
140
|
+
font-size: 14px;
|
141
|
+
line-height: 18px;
|
142
|
+
letter-spacing: normal;
|
143
|
+
color: #63656e;
|
144
|
+
cursor: pointer;
|
145
|
+
user-select: none;
|
146
|
+
}
|
147
|
+
.bk-checkbox.is-checked .bk-checkbox-input {
|
148
|
+
background: #3a84ff;
|
149
|
+
border-color: #3a84ff;
|
150
|
+
transition: all 0.1s;
|
151
|
+
}
|
152
|
+
.bk-checkbox.is-checked .bk-checkbox-input.small::after {
|
153
|
+
width: 3px;
|
154
|
+
height: 6px;
|
155
|
+
}
|
156
|
+
.bk-checkbox.is-checked .bk-checkbox-input::after {
|
157
|
+
position: absolute;
|
158
|
+
top: 50%;
|
159
|
+
left: 50%;
|
160
|
+
width: 4px;
|
161
|
+
height: 8px;
|
162
|
+
border: 2px solid #fff;
|
163
|
+
border-top: 0;
|
164
|
+
border-left: 0;
|
165
|
+
content: '';
|
166
|
+
transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
|
167
|
+
transform-origin: center;
|
168
|
+
}
|
169
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input.small::after {
|
170
|
+
width: 6px;
|
171
|
+
height: 2px;
|
172
|
+
}
|
173
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input::after {
|
174
|
+
position: absolute;
|
175
|
+
top: 50%;
|
176
|
+
left: 50%;
|
177
|
+
width: 8px;
|
178
|
+
height: 2px;
|
179
|
+
background: #fff;
|
180
|
+
border: none;
|
181
|
+
border-radius: 2px;
|
182
|
+
content: '';
|
183
|
+
transform: translate(-50%, -50%);
|
184
|
+
}
|
185
|
+
.bk-checkbox.is-disabled {
|
186
|
+
color: #c4c6cc;
|
187
|
+
cursor: not-allowed;
|
188
|
+
}
|
189
|
+
.bk-checkbox.is-disabled .bk-checkbox-input {
|
190
|
+
background: #fafbfd;
|
191
|
+
border-color: #dcdee5;
|
192
|
+
}
|
193
|
+
.bk-checkbox.is-disabled .bk-checkbox-input::after {
|
194
|
+
background: #dcdee5;
|
195
|
+
}
|
196
|
+
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
|
197
|
+
background: #dcdee5;
|
198
|
+
}
|
199
|
+
.bk-checkbox .bk-checkbox-input {
|
200
|
+
position: relative;
|
201
|
+
display: inline-block;
|
202
|
+
width: 16px;
|
203
|
+
height: 16px;
|
204
|
+
margin-right: 5px;
|
205
|
+
vertical-align: middle;
|
206
|
+
border: 1px solid #979ba5;
|
207
|
+
border-radius: 2px;
|
208
|
+
}
|
209
|
+
.bk-checkbox .bk-checkbox-input.small {
|
210
|
+
width: 14px;
|
211
|
+
height: 14px;
|
212
|
+
}
|
213
|
+
.bk-checkbox .bk-checkbox-original {
|
214
|
+
position: absolute;
|
215
|
+
top: 0;
|
216
|
+
left: 0;
|
217
|
+
z-index: -1;
|
218
|
+
width: 0;
|
219
|
+
height: 0;
|
220
|
+
}
|
221
|
+
.bk-checkbox .bk-checkbox-label {
|
222
|
+
display: inline-block;
|
223
|
+
vertical-align: middle;
|
224
|
+
}
|
225
|
+
.bk-tree {
|
226
|
+
font-size: 14px;
|
227
|
+
}
|
103
228
|
.bk-tree .bk-node-row {
|
104
229
|
padding-left: calc(var(--offset-left));
|
105
230
|
}
|
@@ -138,6 +263,16 @@
|
|
138
263
|
width: 0;
|
139
264
|
border-left: var(--level-line);
|
140
265
|
}
|
266
|
+
.bk-tree .bk-tree-node .bk-node-prefix {
|
267
|
+
display: flex;
|
268
|
+
width: 14px;
|
269
|
+
height: 14px;
|
270
|
+
align-items: center;
|
271
|
+
justify-content: center;
|
272
|
+
}
|
273
|
+
.bk-tree .bk-tree-node .bk-node-action {
|
274
|
+
margin-right: 2px;
|
275
|
+
}
|
141
276
|
.bk-tree .bk-tree-node .bk-tree-icon {
|
142
277
|
margin: 0 6px 0 4px;
|
143
278
|
}
|
@@ -147,6 +282,12 @@
|
|
147
282
|
align-items: center;
|
148
283
|
min-width: 0;
|
149
284
|
}
|
285
|
+
.bk-tree .bk-tree-node .bk-node-content .bk-checkbox {
|
286
|
+
margin: 0;
|
287
|
+
}
|
288
|
+
.bk-tree .bk-tree-node .bk-node-content .bk-checkbox .bk-checkbox-input {
|
289
|
+
margin: 0;
|
290
|
+
}
|
150
291
|
.bk-tree .bk-tree-node .bk-node-content .bk-node-text {
|
151
292
|
flex: 1;
|
152
293
|
overflow: hidden;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
import { TreePropTypes } from './props';
|
2
|
+
declare const _default: (props: TreePropTypes, ctx: any, flatData: any, _renderData: any, schemaValues: any, initOption: any) => {
|
2
3
|
renderTreeNode: (item: any) => JSX.Element;
|
3
4
|
hanldeTreeNodeClick: (item: any, e: MouseEvent) => void;
|
4
5
|
deepAutoOpen: () => void;
|
@@ -6,6 +6,7 @@ declare const _default: (flatData: any, props?: TreePropTypes) => {
|
|
6
6
|
getNodeParentId: (node: any) => any;
|
7
7
|
getNodeParentIdById: (id: string) => any;
|
8
8
|
getParentNodeData: (uid: string) => any;
|
9
|
+
getParentNode: (node: any) => any;
|
9
10
|
setNodeAttr: (node: any, attr: string, val: any) => void;
|
10
11
|
getNodePath: (node: any) => any;
|
11
12
|
isRootNode: (node: any) => any;
|
@@ -27,5 +28,6 @@ declare const _default: (flatData: any, props?: TreePropTypes) => {
|
|
27
28
|
};
|
28
29
|
setTreeNodeLoading: (node: any, value: boolean) => void;
|
29
30
|
extendNodeAttr: (item: any) => any;
|
31
|
+
getChildNodes: (node: any) => any[];
|
30
32
|
};
|
31
33
|
export default _default;
|
@@ -19,7 +19,7 @@
|
|
19
19
|
--line-height-large: 18px;
|
20
20
|
--component-size-small: 26px;
|
21
21
|
--component-size-base: 32px;
|
22
|
-
--component-size-large:
|
22
|
+
--component-size-large: 40px;
|
23
23
|
--border-width-base: 1px;
|
24
24
|
--border-style-base: solid;
|
25
25
|
--border-radius-base: 2px;
|
@@ -34,7 +34,7 @@
|
|
34
34
|
--input-horizontal-padding: 10px;
|
35
35
|
--input-block-color: #f5f7fa;
|
36
36
|
--input-block-hover-color: #eaebf0;
|
37
|
-
--input-icon-size: var(--font-size-
|
37
|
+
--input-icon-size: var(--font-size-medium);
|
38
38
|
--input-maxlength-color: #979ba5;
|
39
39
|
--button-primary-hover-color: #5594fa;
|
40
40
|
--button-danger-hover-color: #ff5656;
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","lodash"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("lodash")):t(e["../shared"],e.vue,e.lodash);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,((e,t,o)=>(()=>{"use strict";var n={4212:t=>{t.exports=e},467:e=>{e.exports=o},748:e=>{e.exports=t}},r={};function l(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,l),o.exports}l.d=(e,t)=>{for(var o in t)l.o(t,o)&&!l.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","lodash"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("lodash")):t(e["../shared"],e.vue,e.lodash);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,((e,t,o)=>(()=>{"use strict";var n={4212:t=>{t.exports=e},467:e=>{e.exports=o},748:e=>{e.exports=t}},r={};function l(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,l),o.exports}l.d=(e,t)=>{for(var o in t)l.o(t,o)&&!l.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{l.r(s),l.d(s,{default:()=>h});var e=l(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}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 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)?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 n(e){return n="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},n(e)}var r=l(748),i={onContentScroll:Function},a=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)},i),u=l(467),c=void 0;function p(e,t,o,n){for(var r=0,l=0,s=0,i=0;r<e;r++){if(l+(i=n(r,[r*o,(r+1)*o,"virtual"]))>t){s=t-l;break}l+=i}return{startIndex:r,height:l,diffHeight:s}}function f(e,t,o,n,r){if(n){var l=n.scrollTop,s=n.scrollLeft,i=o.scrollTop,a=o.count,u=o.groupItemCount,c=o.startIndex,f=o.endIndex,d=n.offsetHeight,y=0,v=0,m=0;if("number"==typeof e&&(y=Math.floor(l/e),v=Math.ceil(d/e)+y,m=l%e),"function"==typeof e){var h=p(a,l,u,e);y=h.startIndex>0?h.startIndex:0,m=h.diffHeight,v=p(a,d,u,e).startIndex+y+1}if(l!==i||y!==c||v!==f){var g=n.scrollHeight-n.offsetHeight-n.scrollTop;"function"==typeof t&&t(r,y,v,l,m,s,{bottom:g>=0?g:0})}}}function d(e,t,o){var n=o.value,r=n.lineHeight,l=void 0===r?30:r,s=n.handleScrollCallback,i=n.pagination,a=void 0===i?{}:i;if(n.onlyScroll){var u=t.scrollTop,c=t.scrollLeft,p=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,u,u,c,{bottom:p>=0?p:0})}else{var d=a.startIndex,y=a.endIndex,v=a.groupItemCount,m=a.count;f(l,s,{scrollTop:a.scrollTop,startIndex:d,endIndex:y,groupItemCount:v,count:m},t,e)}}var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;return(0,u.throttle)((function(e,t,o){return d(e,t,o)}),e)};const v={mounted:function(e,t){var o=e.parentNode,n=t.value.throttleDelay;o.addEventListener("scroll",(function(e){!function(e,t,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60;Reflect.apply(y(n),c,[e,t,o])}(e,o,t,n)}))},unbind:function(e){if(e){var t=e.parentNode;if(!t)return;t.removeEventListener("scroll",y)}}},m=(0,r.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:v},props:a,emits:["content-scroll"],setup:function(t,l){var s=this,i=t.renderAs,a=t.contentAs,u=function(e){return"string"==typeof e?[e]:"object"!==n(e)||Array.isArray(e)?e:[e]};if(!t.enabled){var c=function(e,t){var o=e.renderAs,n=e.contentAs,l=(0,r.resolveDirective)("bkVirtualRender"),s={lineHeight:e.lineHeight,handleScrollCallback:function(e,o,n,r,l,s,i){t.emit("content-scroll",[e,{translateY:l,translateX:s,pos:i}])},pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:function(){var i,a,u,c,p,f,d,y,v;return(0,r.h)(o,{class:e.className},[null!==(u=null===(a=(i=t.slots).beforeContent)||void 0===a?void 0:a.call(i))&&void 0!==u?u:"",(0,r.withDirectives)((0,r.h)(n,{class:e.contentClassName,style:e.contentStyle},[null!==(f=null===(p=(c=t.slots).default)||void 0===p?void 0:p.call(c,{data:e.list}))&&void 0!==f?f:""]),[[l,s]]),null!==(v=null===(y=(d=t.slots).afterContent)||void 0===y?void 0:y.call(d))&&void 0!==v?v:""])}}}(t,l);return c.rendAsTag}var p=(0,r.ref)(null),d=(0,r.reactive)({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:t.groupItemCount}),y=function(e,t,o,n,r,s,i){d.startIndex=t,d.endIndex=o,d.scrollTop=n,d.translateY=r,d.translateX=s,d.pos=i,l.emit("content-scroll",[e,d])};(0,r.onMounted)((function(){(0,r.nextTick)((function(){g(t.list),b()}))})),(0,r.watch)((function(){return t.list}),(function(){v(),b()}),{deep:!0}),(0,r.watch)((function(){return t.lineHeight}),(function(){v(),b()}));var v=function(){g(t.list)},m=(0,r.ref)(0),h=(0,r.ref)(0),g=function(e){if(m.value=Math.ceil((e||[]).length/t.groupItemCount),d.count=m.value,d.startIndex=0,d.endIndex=0,d.translateY=0,d.scrollTop=0,"string"==typeof t.abosuteHeight&&"auto"===t.abosuteHeight)if("function"==typeof t.lineHeight){h.value=0;for(var o=0,n=0;n<m.value;n++){var r=t.lineHeight.call(s,n,e.slice(n*t.groupItemCount,t.groupItemCount));o+="number"==typeof r?r:0}h.value=o}else h.value=t.lineHeight*m.value;else h.value=t.abosuteHeight},b=function(){var e,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=null===(e=p.value)||void 0===e?void 0:e.parentNode;f(t.lineHeight,y,d,n,null),o&&p.value&&p.value.scrollTo(0,0)},T=(0,r.computed)((function(){return(t.list||[]).map((function(e,t){return Object.assign(Object.assign({},e),{$index:t})}))})),P=(0,r.computed)((function(){return T.value.slice(d.startIndex*t.groupItemCount,(d.endIndex+t.preloadItemCount)*t.groupItemCount)})),x=(0,r.computed)((function(){return"content"===t.scrollPosition?{top:"".concat(d.scrollTop+t.scrollOffsetTop,"px"),transform:"translateY(-".concat(d.translateY,"px)")}:{}})),I=(0,r.computed)((function(){return Object.assign({height:"number"==typeof t.height?"".concat(t.height,"px"):t.height,width:"number"==typeof t.width?"".concat(t.width,"px"):t.width,display:"inline-block"},"container"===t.scrollPosition?x.value:{})})),C=(0,r.computed)((function(){var e="number"==typeof t.abosuteHeight&&0===t.abosuteHeight;return{height:"".concat(h.value<t.minHeight?t.minHeight:h.value,"px"),display:e?"none":"block"}})),H=(0,r.computed)((function(){return[(0,e.resolveClassName)("virtual-render"),t.scrollXName,t.scrollYName].concat(o(u(t.className)),["container"===t.scrollPosition?(0,e.resolveClassName)("virtual-content"):""])})),O=(0,r.computed)((function(){return["content"===t.scrollPosition?(0,e.resolveClassName)("virtual-content"):""].concat(o(u(t.contentClassName)))})),S=(0,r.resolveDirective)("bkVirtualRender"),j={lineHeight:t.lineHeight,handleScrollCallback:y,pagination:d,throttleDelay:t.throttleDelay};return l.expose({reset:function(){v(),b()}}),function(){var o,n,s,u,c,f,d,y,v;return(0,r.h)(i||"div",{ref:p,class:H.value,style:I.value},[null!==(s=null===(n=(o=l.slots).beforeContent)||void 0===n?void 0:n.call(o))&&void 0!==s?s:"",(0,r.withDirectives)((0,r.h)(a||"div",{class:O.value,style:Object.assign(Object.assign({},x.value),t.contentStyle)},[null!==(f=null===(c=(u=l.slots).default)||void 0===c?void 0:c.call(u,{data:P.value}))&&void 0!==f?f:""]),[[S,j]]),null!==(v=null===(y=(d=l.slots).afterContent)||void 0===y?void 0:y.call(d))&&void 0!==v?v:"",(0,r.h)("div",{class:[(0,e.resolveClassName)("virtual-section")],style:C.value})])}}}),h=(0,e.withInstall)(m)})(),s})()));
|
@@ -1,3 +1,20 @@
|
|
1
|
+
.bk-F-scroll-x {
|
2
|
+
overflow-x: auto;
|
3
|
+
scrollbar-color: #a0a0a0 transparent;
|
4
|
+
scrollbar-width: thin;
|
5
|
+
}
|
6
|
+
.bk-F-scroll-x::-webkit-scrollbar {
|
7
|
+
height: 6px;
|
8
|
+
}
|
9
|
+
.bk-F-scroll-y {
|
10
|
+
overflow-y: auto;
|
11
|
+
}
|
12
|
+
.bk-F-scroll-y::-webkit-scrollbar {
|
13
|
+
width: 4px;
|
14
|
+
}
|
15
|
+
.bk-F-scroll-y::-webkit-scrollbar-thumb {
|
16
|
+
border-radius: 4px;
|
17
|
+
}
|
1
18
|
.bk-virtual-render {
|
2
19
|
position: relative;
|
3
20
|
}
|
@@ -14,20 +31,3 @@
|
|
14
31
|
width: 1px;
|
15
32
|
background: transparent;
|
16
33
|
}
|
17
|
-
.bk-virtual-render.bk-scroll-x {
|
18
|
-
overflow-x: auto;
|
19
|
-
scrollbar-color: #a0a0a0 transparent;
|
20
|
-
scrollbar-width: thin;
|
21
|
-
}
|
22
|
-
.bk-virtual-render.bk-scroll-x::-webkit-scrollbar {
|
23
|
-
height: 6px;
|
24
|
-
}
|
25
|
-
.bk-virtual-render.bk-scroll-y {
|
26
|
-
overflow-y: auto;
|
27
|
-
}
|
28
|
-
.bk-virtual-render.bk-scroll-y::-webkit-scrollbar {
|
29
|
-
width: 4px;
|
30
|
-
}
|
31
|
-
.bk-virtual-render.bk-scroll-y::-webkit-scrollbar-thumb {
|
32
|
-
border-radius: 4px;
|
33
|
-
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
@import '../styles/themes/themes.less';
|
2
|
+
@import '../styles/mixins/scroll.less';
|
1
3
|
|
2
4
|
.bk-virtual-render {
|
3
5
|
position: relative;
|
@@ -16,28 +18,5 @@
|
|
16
18
|
width: 1px;
|
17
19
|
background: transparent;
|
18
20
|
}
|
19
|
-
|
20
|
-
|
21
|
-
&.bk-scroll-x {
|
22
|
-
overflow-x: auto;
|
23
|
-
scrollbar-color: #a0a0a0 transparent;
|
24
|
-
scrollbar-width: thin;
|
25
|
-
|
26
|
-
&::-webkit-scrollbar {
|
27
|
-
height: 6px;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
&.bk-scroll-y {
|
32
|
-
overflow-y: auto;
|
33
|
-
|
34
|
-
&::-webkit-scrollbar {
|
35
|
-
width: 4px;
|
36
|
-
}
|
37
|
-
|
38
|
-
&::-webkit-scrollbar-thumb {
|
39
|
-
border-radius: 4px;
|
40
|
-
}
|
41
|
-
}
|
42
21
|
}
|
43
22
|
|
@@ -1,3 +1,122 @@
|
|
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
|
+
--whitesmoke-color: #fafbfd;
|
13
|
+
--disable-color: #dcdee5;
|
14
|
+
--font-size-base: 12px;
|
15
|
+
--font-size-medium: 14px;
|
16
|
+
--font-size-large: 16px;
|
17
|
+
--line-height-base: 16px;
|
18
|
+
--line-height-medium: 16px;
|
19
|
+
--line-height-large: 18px;
|
20
|
+
--component-size-small: 26px;
|
21
|
+
--component-size-base: 32px;
|
22
|
+
--component-size-large: 40px;
|
23
|
+
--border-width-base: 1px;
|
24
|
+
--border-style-base: solid;
|
25
|
+
--border-radius-base: 2px;
|
26
|
+
--input-disabled-bg: #fafbfd;
|
27
|
+
--input-disabled-border: var(--disable-color);
|
28
|
+
--input-height-base: var(--component-size-base);
|
29
|
+
--input-color: var(--default-color);
|
30
|
+
--input-bg: white;
|
31
|
+
--input-border-color: var(--light-gray);
|
32
|
+
--input-broder-radius: 3px;
|
33
|
+
--input-shadow-color: #a3c5fd;
|
34
|
+
--input-horizontal-padding: 10px;
|
35
|
+
--input-block-color: #f5f7fa;
|
36
|
+
--input-block-hover-color: #eaebf0;
|
37
|
+
--input-icon-size: var(--font-size-medium);
|
38
|
+
--input-maxlength-color: #979ba5;
|
39
|
+
--button-primary-hover-color: #5594fa;
|
40
|
+
--button-danger-hover-color: #ff5656;
|
41
|
+
--button-success-hover-color: #45e35f;
|
42
|
+
--button-warning-hover-color: #ffb848;
|
43
|
+
--button-default-hover-border-color: #979ba5;
|
44
|
+
--button-primary-active-color: #2c77f4;
|
45
|
+
--button-danger-active-color: #db2626;
|
46
|
+
--button-success-active-color: #1ab943;
|
47
|
+
--button-warning-active-color: #eb9000;
|
48
|
+
--button-selected-bg-color: #e1ecff;
|
49
|
+
--button-disabled-selected-bg-color: #f0f1f5;
|
50
|
+
--fixed-navbar-background: #fff;
|
51
|
+
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
52
|
+
--switch-default-color: #fff;
|
53
|
+
--switch-grey-color: #c4c6cc;
|
54
|
+
--breadcrumb-black-color: #979ba5;
|
55
|
+
--breadcrumb-primary-hover-color: #0082ff;
|
56
|
+
--breadcrumb-fn-main-color: #63656e;
|
57
|
+
--link-default-hover-color: #979ba5;
|
58
|
+
--link-primary-hover-color: #699df4;
|
59
|
+
--link-success-hover-color: #45e35f;
|
60
|
+
--link-warning-hover-color: #ffb848;
|
61
|
+
--link-danger-hover-color: #ff5656;
|
62
|
+
--link-default-disabled-color: #dcdee5;
|
63
|
+
--link-primary-disabled-color: #a3c5fd;
|
64
|
+
--link-success-disabled-color: #94f5a4;
|
65
|
+
--link-warning-disabled-color: #ffd695;
|
66
|
+
--link-danger-disabled-color: #fd9c9c;
|
67
|
+
--message-color: var(--default-color);
|
68
|
+
--message-primary-bg-color: #f0f8ff;
|
69
|
+
--message-primary-border-color: #e1ecff;
|
70
|
+
--message-warning-bg-color: #fff4e2;
|
71
|
+
--message-warning-border-color: #ffe8c3;
|
72
|
+
--message-success-bg-color: #f2fff4;
|
73
|
+
--message-success-border-color: #dcffe2;
|
74
|
+
--message-danger-bg-color: #ffeded;
|
75
|
+
--message-danger-border-color: #ffdddd;
|
76
|
+
--slider-default-bg: #dcdee5;
|
77
|
+
--slider-disable-bar-bg: #979ba5;
|
78
|
+
--menu-bg-color: #182132;
|
79
|
+
--submenu-bg-color: #151d2c;
|
80
|
+
--menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
|
81
|
+
--menu-color: #96a2b9;
|
82
|
+
--menu-group-color: var(--default-color);
|
83
|
+
--menu-width: 260px;
|
84
|
+
--menu-collapse-width: 60px;
|
85
|
+
--menu-active-color: white;
|
86
|
+
--nav-header-bg-color: #182132;
|
87
|
+
--nav-bg-color: #182132;
|
88
|
+
--date-picker-disabled-bg: #fafbfd;
|
89
|
+
--date-picker-dropdown-mb: 4px;
|
90
|
+
--date-picker-dropdown-bg: #fff;
|
91
|
+
--table-bg-color: var(--white-color);
|
92
|
+
--table-border-color: #dcdee5;
|
93
|
+
--table-head-bg-color: #fafbfd;
|
94
|
+
--table-head-font-color: #313238;
|
95
|
+
--table-body-font-color: #575961;
|
96
|
+
--table-row-hover-bg-color: #f5f7fa;
|
97
|
+
--table-row-active-bg-color: #f0f1f5;
|
98
|
+
--cascader-panel-border-color: #dcdee5;
|
99
|
+
--cascader-panel-hover: #eaf3ff;
|
100
|
+
--cascader-panel-active: #f4f6fa;
|
101
|
+
--cascader-panel-disabled-bg: #fff;
|
102
|
+
}
|
103
|
+
.bk-F-scroll-x {
|
104
|
+
overflow-x: auto;
|
105
|
+
scrollbar-color: #a0a0a0 transparent;
|
106
|
+
scrollbar-width: thin;
|
107
|
+
}
|
108
|
+
.bk-F-scroll-x::-webkit-scrollbar {
|
109
|
+
height: 6px;
|
110
|
+
}
|
111
|
+
.bk-F-scroll-y {
|
112
|
+
overflow-y: auto;
|
113
|
+
}
|
114
|
+
.bk-F-scroll-y::-webkit-scrollbar {
|
115
|
+
width: 4px;
|
116
|
+
}
|
117
|
+
.bk-F-scroll-y::-webkit-scrollbar-thumb {
|
118
|
+
border-radius: 4px;
|
119
|
+
}
|
1
120
|
.bk-virtual-render {
|
2
121
|
position: relative;
|
3
122
|
}
|
@@ -14,20 +133,3 @@
|
|
14
133
|
width: 1px;
|
15
134
|
background: transparent;
|
16
135
|
}
|
17
|
-
.bk-virtual-render.bk-scroll-x {
|
18
|
-
overflow-x: auto;
|
19
|
-
scrollbar-color: #a0a0a0 transparent;
|
20
|
-
scrollbar-width: thin;
|
21
|
-
}
|
22
|
-
.bk-virtual-render.bk-scroll-x::-webkit-scrollbar {
|
23
|
-
height: 6px;
|
24
|
-
}
|
25
|
-
.bk-virtual-render.bk-scroll-y {
|
26
|
-
overflow-y: auto;
|
27
|
-
}
|
28
|
-
.bk-virtual-render.bk-scroll-y::-webkit-scrollbar {
|
29
|
-
width: 4px;
|
30
|
-
}
|
31
|
-
.bk-virtual-render.bk-scroll-y::-webkit-scrollbar-thumb {
|
32
|
-
border-radius: 4px;
|
33
|
-
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "bkui-vue",
|
3
|
-
"version": "0.0.1-beta.
|
3
|
+
"version": "0.0.1-beta.125",
|
4
4
|
"workspaces": {
|
5
5
|
"packages": [
|
6
6
|
"packages/!(**.bak)*",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
"scripts": {
|
15
15
|
"prepare": "husky install",
|
16
16
|
"dev": "vite serve site",
|
17
|
-
"build": "run-
|
17
|
+
"build": "run-s build:dist build:lib",
|
18
18
|
"build:site": "vite build site --mode production && cp -r ./site/views/ ./site/dist/views",
|
19
19
|
"build:dist": "rimraf dist && lerna run --stream --scope cli dist",
|
20
20
|
"build:lib": "rimraf lib && lerna run --stream --scope cli lib",
|