bkui-vue 0.0.1-beta.465 → 0.0.1-beta.466
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 +3 -3
- package/dist/index.esm.js +22 -22
- package/dist/index.umd.js +3 -3
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/plugin-popover/index.js +1 -1
- package/lib/popover/index.d.ts +12 -12
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +6 -6
- package/lib/popover/props.d.ts +2 -2
- package/lib/popover/root.d.ts +11 -0
- package/lib/select/index.d.ts +12 -12
- package/lib/select/select.d.ts +6 -6
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.js +1 -1
- package/lib/slider/slider.d.ts +2 -2
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +3 -0
- package/lib/table/table.less +4 -0
- package/lib/table/table.variable.css +3 -0
- package/lib/table-column/index.js +1 -1
- package/lib/tag-input/index.d.ts +6 -6
- package/lib/tag-input/tag-input.d.ts +4 -4
- package/lib/tag-input/tag-input.less +11 -11
- package/lib/tag-input/tag-props.d.ts +2 -2
- package/lib/virtual-render/index.js +1 -1
- package/package.json +1 -1
@@ -7,7 +7,7 @@
|
|
7
7
|
position: relative;
|
8
8
|
min-height: @min-height;
|
9
9
|
|
10
|
-
|
10
|
+
.@{bk-prefix}-tag-input-trigger {
|
11
11
|
position: relative;
|
12
12
|
display: flex;
|
13
13
|
min-height: @min-height;
|
@@ -116,12 +116,12 @@
|
|
116
116
|
}
|
117
117
|
}
|
118
118
|
|
119
|
-
|
120
|
-
|
119
|
+
.@{bk-prefix}-tag-input-popover-content {
|
120
|
+
&.@{bk-prefix}-popover {
|
121
121
|
padding: 0;
|
122
122
|
}
|
123
123
|
|
124
|
-
|
124
|
+
.@{bk-prefix}-selector-list {
|
125
125
|
min-width: 150px;
|
126
126
|
|
127
127
|
.outside-ul {
|
@@ -147,7 +147,7 @@
|
|
147
147
|
}
|
148
148
|
}
|
149
149
|
|
150
|
-
|
150
|
+
.@{bk-prefix}-selector-group-item {
|
151
151
|
list-style: none;
|
152
152
|
|
153
153
|
.group-name {
|
@@ -158,13 +158,13 @@
|
|
158
158
|
}
|
159
159
|
}
|
160
160
|
|
161
|
-
|
161
|
+
.@{bk-prefix}-selector-group-list-item {
|
162
162
|
padding: 0;
|
163
163
|
margin: 0;
|
164
164
|
list-style: none;
|
165
165
|
}
|
166
166
|
|
167
|
-
|
167
|
+
.@{bk-prefix}-selector-list-item {
|
168
168
|
position: relative;
|
169
169
|
width: 100%;
|
170
170
|
cursor: pointer;
|
@@ -180,7 +180,7 @@
|
|
180
180
|
border-bottom: @light-gray;
|
181
181
|
}
|
182
182
|
|
183
|
-
|
183
|
+
&.@{bk-prefix}-selector-selected {
|
184
184
|
background-color: #f4f6fa;
|
185
185
|
|
186
186
|
.selected-icon {
|
@@ -188,7 +188,7 @@
|
|
188
188
|
}
|
189
189
|
}
|
190
190
|
|
191
|
-
|
191
|
+
&.@{bk-prefix}-selector-actived {
|
192
192
|
background-color: #f4f6fa;
|
193
193
|
}
|
194
194
|
|
@@ -228,14 +228,14 @@
|
|
228
228
|
white-space: nowrap;
|
229
229
|
}
|
230
230
|
|
231
|
-
|
231
|
+
.@{bk-prefix}-selector-tools {
|
232
232
|
position: absolute;
|
233
233
|
top: 10px;
|
234
234
|
right: 0;
|
235
235
|
display: none;
|
236
236
|
font-size: 12px;
|
237
237
|
|
238
|
-
|
238
|
+
.@{bk-prefix}-selector-list-icon {
|
239
239
|
margin-right: 14px;
|
240
240
|
}
|
241
241
|
}
|
@@ -159,8 +159,8 @@ declare const tagProps: () => {
|
|
159
159
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
160
160
|
default: string | number;
|
161
161
|
};
|
162
|
-
content: import("vue-types").VueTypeDef<
|
163
|
-
default:
|
162
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
163
|
+
default: string | number;
|
164
164
|
};
|
165
165
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
166
166
|
default: boolean;
|
@@ -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 r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o)=>(()=>{"use strict";var r={4212:t=>{t.exports=e},467:e=>{e.exports=o},748:e=>{e.exports=t}},n={};function l(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[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:()=>y});var e=l(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r(e){return r="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},r(e)}var n=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),rowKey:e.PropTypes.string.def(void 0),keepAlive:e.PropTypes.bool.def(!1)},i),u=l(467);function c(e,t,o,r){for(var n=0,l=0,s=0,i=0;n<e;n++){if(l+(i=r(n,[n*o,(n+1)*o,"virtual"]))>t){s=t-l;break}l+=i}return{startIndex:n,height:l,diffHeight:s}}function p(e,t,o,r,n){if(r){var l=r.scrollTop,s=r.scrollLeft,i=o.scrollTop,a=o.count,u=o.groupItemCount,p=o.startIndex,f=o.endIndex,d=o.scrollLeft,v=r.offsetHeight,y=0,h=0,m=0;if("number"==typeof e&&(y=Math.floor(l/e),h=Math.ceil(v/e)+y,m=l%e),"function"==typeof e){var g=c(a,l,u,e);y=g.startIndex>0?g.startIndex:0,m=g.diffHeight,h=c(a,v,u,e).startIndex+y+1}if(l!==i||y!==p||h!==f||d!==s){var b=r.scrollHeight-r.offsetHeight-r.scrollTop;"function"==typeof t&&t(n,y,h,l,m,s,{bottom:b>=0?b:0})}}}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;return(0,u.throttle)((function(e,t,o){return function(e,t,o){var r=o.value,n=r.lineHeight,l=void 0===n?30:n,s=r.handleScrollCallback,i=r.pagination,a=void 0===i?{}:i;if(r.onlyScroll){var u=t.scrollTop,c=t.scrollLeft,f=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,u,u,c,{bottom:f>=0?f:0})}else{var d=a.startIndex,v=a.endIndex,y=a.groupItemCount,h=a.count;p(l,s,{scrollTop:a.scrollTop,startIndex:d,endIndex:v,groupItemCount:y,count:h,scrollLeft:a.scrollLeft},t,e)}}(e,t,o)}),e)};const d={mounted:function(e,t){var o=e.parentNode,r=t.value.throttleDelay;o.addEventListener("scroll",(function(e){!function(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60;Reflect.apply(f(r),void 0,[e,t,o])}(e,o,t,r)}))},unbind:function(e){if(e){var t=e.parentNode;if(!t)return;t.removeEventListener("scroll",f)}}},v=(0,n.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:d},props:a,emits:["content-scroll"],slots:Object,setup:function(t,l){var s=this,i=t.renderAs,a=t.contentAs,u=function(e){return"string"==typeof e?[e]:"object"!==r(e)||Array.isArray(e)?e:[e]};if(!t.enabled){var c=function(e,t){var o=e.renderAs,r=e.contentAs,l=(0,n.resolveDirective)("bkVirtualRender"),s={lineHeight:e.lineHeight,handleScrollCallback:function(e,o,r,n,l,s,i){t.emit("content-scroll",[e,{translateY:l,translateX:s,pos:i}])},pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent},i=(0,n.ref)(null);return t.expose({scrollTo:function(e){var t=e.left,o=void 0===t?0:t,r=e.top,n=void 0===r?0:r;i.value.scrollTo(o,n)}}),{rendAsTag:function(){var a,u,c,p,f,d,v,y,h,m,g,b;return(0,n.h)(o,{class:e.className,ref:i},[null!==(c=null===(u=(a=t.slots).beforeContent)||void 0===u?void 0:u.call(a))&&void 0!==c?c:"",(0,n.withDirectives)((0,n.h)(r,{class:e.contentClassName,style:e.contentStyle},[null!==(d=null===(f=(p=t.slots).default)||void 0===f?void 0:f.call(p,{data:e.list}))&&void 0!==d?d:""]),[[l,s]]),null!==(h=null===(y=(v=t.slots).afterContent)||void 0===y?void 0:y.call(v))&&void 0!==h?h:"",null!==(b=null===(g=(m=t.slots).afterSection)||void 0===g?void 0:g.call(m))&&void 0!==b?b:""])}}}(t,l);return c.rendAsTag}var f=(0,n.ref)(null),d=(0,n.reactive)({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:t.groupItemCount}),v=function(e,t,o,r,n,s,i){d.startIndex=t,d.endIndex=o,d.scrollTop=r,d.translateY=n,d.translateX=s,d.scrollLeft=s,d.pos=i,l.emit("content-scroll",[e,d])};(0,n.onMounted)((function(){(0,n.nextTick)((function(){g(t.list),b()}))})),(0,n.watch)((function(){return t.list}),(function(){var e;e={left:d.scrollLeft,top:d.scrollTop},y(),b(),t.keepAlive&&A(e)}),{deep:!0}),(0,n.watch)((function(){return t.lineHeight}),(function(){y(),b()}));var y=function(){g(t.list)},h=(0,n.ref)(0),m=(0,n.ref)(0),g=function(e){if(h.value=Math.ceil((e||[]).length/t.groupItemCount),d.count=h.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){m.value=0;for(var o=0,r=0;r<h.value;r++){var n=t.lineHeight.call(s,r,e.slice(r*t.groupItemCount,t.groupItemCount));o+="number"==typeof n?n:0}m.value=o}else m.value=t.lineHeight*h.value;else m.value=t.abosuteHeight},b=function(){var e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},r=null===(e=f.value)||void 0===e?void 0:e.parentNode;
|
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 r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o)=>(()=>{"use strict";var r={4212:t=>{t.exports=e},467:e=>{e.exports=o},748:e=>{e.exports=t}},n={};function l(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[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:()=>y});var e=l(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r(e){return r="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},r(e)}var n=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),rowKey:e.PropTypes.string.def(void 0),keepAlive:e.PropTypes.bool.def(!1)},i),u=l(467);function c(e,t,o,r){for(var n=0,l=0,s=0,i=0;n<e;n++){if(l+(i=r(n,[n*o,(n+1)*o,"virtual"]))>t){s=t-l;break}l+=i}return{startIndex:n,height:l,diffHeight:s}}function p(e,t,o,r,n){if(r){var l=r.scrollTop,s=r.scrollLeft,i=o.scrollTop,a=o.count,u=o.groupItemCount,p=o.startIndex,f=o.endIndex,d=o.scrollLeft,v=r.offsetHeight,y=0,h=0,m=0;if("number"==typeof e&&(y=Math.floor(l/e),h=Math.ceil(v/e)+y,m=l%e),"function"==typeof e){var g=c(a,l,u,e);y=g.startIndex>0?g.startIndex:0,m=g.diffHeight,h=c(a,v,u,e).startIndex+y+1}if(l!==i||y!==p||h!==f||d!==s){var b=r.scrollHeight-r.offsetHeight-r.scrollTop;"function"==typeof t&&t(n,y,h,l,m,s,{bottom:b>=0?b:0})}}}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;return(0,u.throttle)((function(e,t,o){return function(e,t,o){var r=o.value,n=r.lineHeight,l=void 0===n?30:n,s=r.handleScrollCallback,i=r.pagination,a=void 0===i?{}:i;if(r.onlyScroll){var u=t.scrollTop,c=t.scrollLeft,f=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,u,u,c,{bottom:f>=0?f:0})}else{var d=a.startIndex,v=a.endIndex,y=a.groupItemCount,h=a.count;p(l,s,{scrollTop:a.scrollTop,startIndex:d,endIndex:v,groupItemCount:y,count:h,scrollLeft:a.scrollLeft},t,e)}}(e,t,o)}),e)};const d={mounted:function(e,t){var o=e.parentNode,r=t.value.throttleDelay;o.addEventListener("scroll",(function(e){!function(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60;Reflect.apply(f(r),void 0,[e,t,o])}(e,o,t,r)}))},unbind:function(e){if(e){var t=e.parentNode;if(!t)return;t.removeEventListener("scroll",f)}}},v=(0,n.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:d},props:a,emits:["content-scroll"],slots:Object,setup:function(t,l){var s=this,i=t.renderAs,a=t.contentAs,u=function(e){return"string"==typeof e?[e]:"object"!==r(e)||Array.isArray(e)?e:[e]};if(!t.enabled){var c=function(e,t){var o=e.renderAs,r=e.contentAs,l=(0,n.resolveDirective)("bkVirtualRender"),s={lineHeight:e.lineHeight,handleScrollCallback:function(e,o,r,n,l,s,i){t.emit("content-scroll",[e,{translateY:l,translateX:s,pos:i}])},pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent},i=(0,n.ref)(null);return t.expose({scrollTo:function(e){var t=e.left,o=void 0===t?0:t,r=e.top,n=void 0===r?0:r;i.value.scrollTo(o,n)}}),{rendAsTag:function(){var a,u,c,p,f,d,v,y,h,m,g,b;return(0,n.h)(o,{class:e.className,ref:i},[null!==(c=null===(u=(a=t.slots).beforeContent)||void 0===u?void 0:u.call(a))&&void 0!==c?c:"",(0,n.withDirectives)((0,n.h)(r,{class:e.contentClassName,style:e.contentStyle},[null!==(d=null===(f=(p=t.slots).default)||void 0===f?void 0:f.call(p,{data:e.list}))&&void 0!==d?d:""]),[[l,s]]),null!==(h=null===(y=(v=t.slots).afterContent)||void 0===y?void 0:y.call(v))&&void 0!==h?h:"",null!==(b=null===(g=(m=t.slots).afterSection)||void 0===g?void 0:g.call(m))&&void 0!==b?b:""])}}}(t,l);return c.rendAsTag}var f=(0,n.ref)(null),d=(0,n.reactive)({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:t.groupItemCount}),v=function(e,t,o,r,n,s,i){d.startIndex=t,d.endIndex=o,d.scrollTop=r,d.translateY=n,d.translateX=s,d.scrollLeft=s,d.pos=i,l.emit("content-scroll",[e,d])};(0,n.onMounted)((function(){(0,n.nextTick)((function(){g(t.list),b()}))})),(0,n.watch)((function(){return t.list}),(function(){var e;e={left:d.scrollLeft,top:d.scrollTop},y(),b(),t.keepAlive&&A(e)}),{deep:!0}),(0,n.watch)((function(){return t.lineHeight}),(function(){y(),b()}));var y=function(){g(t.list)},h=(0,n.ref)(0),m=(0,n.ref)(0),g=function(e){if(h.value=Math.ceil((e||[]).length/t.groupItemCount),d.count=h.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){m.value=0;for(var o=0,r=0;r<h.value;r++){var n=t.lineHeight.call(s,r,e.slice(r*t.groupItemCount,t.groupItemCount));o+="number"==typeof n?n:0}m.value=o}else m.value=t.lineHeight*h.value;else m.value=t.abosuteHeight},b=function(){var e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},r=null===(e=f.value)||void 0===e?void 0:e.parentNode;p(t.lineHeight,v,d,r,null),o&&f.value&&A(o)},T=(0,n.computed)((function(){return void 0!==t.rowKey?t.list:(t.list||[]).map((function(e,t){return Object.assign(Object.assign({},e),{$index:t})}))})),P=(0,n.computed)((function(){return T.value.slice(d.startIndex*t.groupItemCount,(d.endIndex+t.preloadItemCount)*t.groupItemCount)})),x=(0,n.computed)((function(){return"content"===t.scrollPosition?{top:"".concat(d.scrollTop+t.scrollOffsetTop,"px"),transform:"translateY(-".concat(d.translateY,"px)")}:{}})),I=(0,n.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,n.computed)((function(){var e="number"==typeof t.abosuteHeight&&0===t.abosuteHeight;return{height:"".concat(m.value<t.minHeight?t.minHeight:m.value,"px"),display:e?"none":"block"}})),H=(0,n.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,n.computed)((function(){return["content"===t.scrollPosition?(0,e.resolveClassName)("virtual-content"):""].concat(o(u(t.contentClassName)))})),S=(0,n.resolveDirective)("bkVirtualRender"),j={lineHeight:t.lineHeight,handleScrollCallback:v,pagination:d,throttleDelay:t.throttleDelay},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},t=e.left,o=e.top;f.value.scrollTo(t,o)};return l.expose({reset:function(){y(),b()},scrollTo:A}),function(){var o,r,s,u,c,p,d,v,y,h,m,g;return(0,n.h)(i||"div",{ref:f,class:H.value,style:I.value},[null!==(s=null===(r=(o=l.slots).beforeContent)||void 0===r?void 0:r.call(o))&&void 0!==s?s:"",(0,n.withDirectives)((0,n.h)(a||"div",{class:O.value,style:Object.assign(Object.assign({},x.value),t.contentStyle)},[null!==(p=null===(c=(u=l.slots).default)||void 0===c?void 0:c.call(u,{data:P.value}))&&void 0!==p?p:""]),[[S,j]]),null!==(y=null===(v=(d=l.slots).afterContent)||void 0===v?void 0:v.call(d))&&void 0!==y?y:"",(0,n.h)("div",{class:[(0,e.resolveClassName)("virtual-section")],style:C.value}),null!==(g=null===(m=(h=l.slots).afterSection)||void 0===m?void 0:m.call(h))&&void 0!==g?g:""])}}}),y=(0,e.withInstall)(v)})(),s})()));
|