bkui-vue 0.0.1-beta.147 → 0.0.1-beta.148
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 +25 -25
- package/dist/index.esm.js +58 -64
- package/dist/index.umd.js +26 -26
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/dropdown/const.d.ts +4 -0
- package/lib/dropdown/dropdown.css +8 -5
- package/lib/dropdown/dropdown.d.ts +31 -2
- package/lib/dropdown/dropdown.less +43 -34
- package/lib/dropdown/dropdown.variable.css +8 -5
- package/lib/dropdown/index.d.ts +60 -7
- package/lib/dropdown/index.js +1 -1
- package/lib/popover2/index.d.ts +5 -24
- package/lib/popover2/index.js +1 -1
- package/lib/popover2/popover2.d.ts +2 -11
- package/lib/popover2/props.d.ts +1 -5
- package/lib/select/index.d.ts +10 -10
- package/lib/select/select.d.ts +3 -3
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +12 -11
- package/lib/table/table.less +19 -18
- package/lib/table/table.variable.css +12 -11
- package/lib/virtual-render/index.js +1 -1
- package/package.json +1 -1
package/lib/table/table.less
CHANGED
@@ -15,17 +15,12 @@
|
|
15
15
|
height: auto;
|
16
16
|
overflow: hidden;
|
17
17
|
border-top: 1px solid @table-border-color;
|
18
|
+
// border-bottom: 1px solid @table-border-color;
|
18
19
|
|
19
20
|
&.has-scroll-y {
|
20
|
-
border-bottom: 1px solid @table-border-color;
|
21
|
-
|
22
21
|
.@{bk-prefix}-table-head {
|
23
22
|
padding-right: 4px;
|
24
23
|
}
|
25
|
-
|
26
|
-
&.is-scroll-bottom {
|
27
|
-
border-bottom: 1px solid transparent;
|
28
|
-
}
|
29
24
|
}
|
30
25
|
|
31
26
|
.@{bk-prefix}-table-body {
|
@@ -33,6 +28,19 @@
|
|
33
28
|
overflow: auto;
|
34
29
|
}
|
35
30
|
|
31
|
+
.@{bk-prefix}-fixed-bottom-border {
|
32
|
+
position: sticky;
|
33
|
+
bottom: 0;
|
34
|
+
left: 0;
|
35
|
+
width: 100%;
|
36
|
+
border-top: 1px solid @table-border-color;
|
37
|
+
transform: translateX(var(--scroll-head-left));
|
38
|
+
|
39
|
+
&._is-empty {
|
40
|
+
display: none;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
36
44
|
.@{bk-prefix}-table-head,
|
37
45
|
.@{bk-prefix}-table-body {
|
38
46
|
background: @table-bg-color;
|
@@ -66,7 +74,6 @@
|
|
66
74
|
padding: 0 15px;
|
67
75
|
overflow: hidden;
|
68
76
|
font-size: 12px;
|
69
|
-
// line-height: calc(var(--row-height) - 1px);
|
70
77
|
color: @table-body-font-color;
|
71
78
|
text-align: left;
|
72
79
|
text-overflow: ellipsis;
|
@@ -189,7 +196,7 @@
|
|
189
196
|
|
190
197
|
.@{bk-prefix}-table-footer {
|
191
198
|
line-height: 40px;
|
192
|
-
border-top: 1px solid @table-border-color;
|
199
|
+
// border-top: 1px solid @table-border-color;
|
193
200
|
border-bottom: 1px solid @table-border-color;
|
194
201
|
|
195
202
|
&.is-hidden {
|
@@ -203,16 +210,10 @@
|
|
203
210
|
border-bottom: 1px solid @table-border-color;
|
204
211
|
}
|
205
212
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
tr {
|
211
|
-
&:last-child {
|
212
|
-
td {
|
213
|
-
border-bottom: none;
|
214
|
-
}
|
215
|
-
}
|
213
|
+
tr {
|
214
|
+
&:last-child {
|
215
|
+
td {
|
216
|
+
border-bottom: none;
|
216
217
|
}
|
217
218
|
}
|
218
219
|
}
|
@@ -996,19 +996,24 @@
|
|
996
996
|
overflow: hidden;
|
997
997
|
border-top: 1px solid #dcdee5;
|
998
998
|
}
|
999
|
-
.bk-table.has-scroll-y {
|
1000
|
-
border-bottom: 1px solid #dcdee5;
|
1001
|
-
}
|
1002
999
|
.bk-table.has-scroll-y .bk-table-head {
|
1003
1000
|
padding-right: 4px;
|
1004
1001
|
}
|
1005
|
-
.bk-table.has-scroll-y.is-scroll-bottom {
|
1006
|
-
border-bottom: 1px solid transparent;
|
1007
|
-
}
|
1008
1002
|
.bk-table .bk-table-body {
|
1009
1003
|
position: relative;
|
1010
1004
|
overflow: auto;
|
1011
1005
|
}
|
1006
|
+
.bk-table .bk-fixed-bottom-border {
|
1007
|
+
position: sticky;
|
1008
|
+
bottom: 0;
|
1009
|
+
left: 0;
|
1010
|
+
width: 100%;
|
1011
|
+
border-top: 1px solid #dcdee5;
|
1012
|
+
transform: translateX(var(--scroll-head-left));
|
1013
|
+
}
|
1014
|
+
.bk-table .bk-fixed-bottom-border._is-empty {
|
1015
|
+
display: none;
|
1016
|
+
}
|
1012
1017
|
.bk-table .bk-table-head,
|
1013
1018
|
.bk-table .bk-table-body {
|
1014
1019
|
background: white;
|
@@ -1161,7 +1166,6 @@
|
|
1161
1166
|
}
|
1162
1167
|
.bk-table .bk-table-footer {
|
1163
1168
|
line-height: 40px;
|
1164
|
-
border-top: 1px solid #dcdee5;
|
1165
1169
|
border-bottom: 1px solid #dcdee5;
|
1166
1170
|
}
|
1167
1171
|
.bk-table .bk-table-footer.is-hidden {
|
@@ -1171,10 +1175,7 @@
|
|
1171
1175
|
.bk-table.bordered-row th {
|
1172
1176
|
border-bottom: 1px solid #dcdee5;
|
1173
1177
|
}
|
1174
|
-
.bk-table.bordered-row
|
1175
|
-
border-bottom: none;
|
1176
|
-
}
|
1177
|
-
.bk-table.bordered-row.has-footer.has-scroll-y tr:last-child td {
|
1178
|
+
.bk-table.bordered-row tr:last-child td {
|
1178
1179
|
border-bottom: none;
|
1179
1180
|
}
|
1180
1181
|
.bk-table.bordered-outer {
|
@@ -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 i={};return(()=>{l.r(i),l.d(i,{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),s={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)},s),u=l(467),c=void 0;function p(e,t,o,n){for(var r=0,l=0,i=0,s=0;r<e;r++){if(l+(s=n(r,[r*o,(r+1)*o,"virtual"]))>t){i=t-l;break}l+=s}return{startIndex:r,height:l,diffHeight:i}}function f(e,t,o,n,r){if(n){var l=n.scrollTop,i=n.scrollLeft,s=o.scrollTop,a=o.count,u=o.groupItemCount,c=o.startIndex,f=o.endIndex,d=n.offsetHeight,v=0,y=0,m=0;if("number"==typeof e&&(v=Math.floor(l/e),y=Math.ceil(d/e)+v,m=l%e),"function"==typeof e){var h=p(a,l,u,e);v=h.startIndex>0?h.startIndex:0,m=h.diffHeight,y=p(a,d,u,e).startIndex+v+1}if(l!==s||v!==c||y!==f){var g=n.scrollHeight-n.offsetHeight-n.scrollTop;"function"==typeof t&&t(r,v,y,l,m,i,{bottom:g>=0?g:0})}}}function d(e,t,o){var n=o.value,r=n.lineHeight,l=void 0===r?30:r,i=n.handleScrollCallback,s=n.pagination,a=void 0===s?{}:s;if(n.onlyScroll){var u=t.scrollTop,c=t.scrollLeft,p=t.scrollHeight-t.offsetHeight-t.scrollTop;i(e,null,null,u,u,c,{bottom:p>=0?p:0})}else{var d=a.startIndex,v=a.endIndex,y=a.groupItemCount,m=a.count;f(l,i,{scrollTop:a.scrollTop,startIndex:d,endIndex:v,groupItemCount:y,count:m},t,e)}}var v=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 y={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(v(n),c,[e,t,o])}(e,o,t,n)}))},unbind:function(e){if(e){var t=e.parentNode;if(!t)return;t.removeEventListener("scroll",v)}}},m=(0,r.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:y},props:a,emits:["content-scroll"],setup:function(t,l){var i=this,s=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"),i={lineHeight:e.lineHeight,handleScrollCallback:function(e,o,n,r,l,i,s){t.emit("content-scroll",[e,{translateY:l,translateX:i,pos:s}])},pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:function(){var s,a,u,c,p,f,d,v,y,m,h,g;return(0,r.h)(o,{class:e.className},[null!==(u=null===(a=(s=t.slots).beforeContent)||void 0===a?void 0:a.call(s))&&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,i]]),null!==(y=null===(v=(d=t.slots).afterContent)||void 0===v?void 0:v.call(d))&&void 0!==y?y:"",null!==(g=null===(h=(m=t.slots).afterSection)||void 0===h?void 0:h.call(m))&&void 0!==g?g:""])}}}(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}),v=function(e,t,o,n,r,i,s){d.startIndex=t,d.endIndex=o,d.scrollTop=n,d.translateY=r,d.translateX=i,d.pos=s,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(){y(),b()}),{deep:!0}),(0,r.watch)((function(){return t.lineHeight}),(function(){y(),b()}));var y=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(i,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,v,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"):""])})),S=(0,r.computed)((function(){return["content"===t.scrollPosition?(0,e.resolveClassName)("virtual-content"):""].concat(o(u(t.contentClassName)))})),O=(0,r.resolveDirective)("bkVirtualRender"),j={lineHeight:t.lineHeight,handleScrollCallback:v,pagination:d,throttleDelay:t.throttleDelay};return l.expose({reset:function(){y(),b()}}),function(){var o,n,i,u,c,f,d,v,y,m,h,g;return(0,r.h)(s||"div",{ref:p,class:H.value,style:I.value},[null!==(i=null===(n=(o=l.slots).beforeContent)||void 0===n?void 0:n.call(o))&&void 0!==i?i:"",(0,r.withDirectives)((0,r.h)(a||"div",{class:S.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:""]),[[O,j]]),null!==(y=null===(v=(d=l.slots).afterContent)||void 0===v?void 0:v.call(d))&&void 0!==y?y:"",(0,r.h)("div",{class:[(0,e.resolveClassName)("virtual-section")],style:C.value}),null!==(g=null===(h=(m=l.slots).afterSection)||void 0===h?void 0:h.call(m))&&void 0!==g?g:""])}}}),h=(0,e.withInstall)(m)})(),i})()));
|