bkui-vue 0.0.2-beta.111 → 0.0.2-beta.112
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 +3840 -3837
- package/dist/index.umd.js +26 -26
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/input/input.css +16 -0
- package/lib/input/input.less +19 -0
- package/lib/input/input.variable.css +16 -0
- package/lib/plugin-popover/index.js +17 -101
- package/lib/popover/index.js +17 -101
- package/lib/table/components/table-column.d.ts +4 -4
- package/lib/table/index.d.ts +4 -4
- package/lib/table/props.d.ts +1 -1
- package/lib/table-column/index.d.ts +10 -10
- package/lib/tree/index.js +47 -1
- package/lib/tree/tree.d.ts +4 -0
- package/lib/virtual-render/index.js +71 -30
- package/lib/virtual-render/use-fix-top.d.ts +18 -0
- package/lib/virtual-render/v-virtual-render.d.ts +5 -0
- package/package.json +1 -1
package/lib/input/input.css
CHANGED
@@ -502,3 +502,19 @@
|
|
502
502
|
.bk-input--number-control span:not(.is-disabled):hover {
|
503
503
|
background-color: var(--input-block-hover-color);
|
504
504
|
}
|
505
|
+
/* 针对 Chrome、Safari 和新版 Edge 的样式 */
|
506
|
+
input:-webkit-autofill,
|
507
|
+
input:-webkit-autofill:hover,
|
508
|
+
input:-webkit-autofill:focus,
|
509
|
+
input:-webkit-autofill:active {
|
510
|
+
-webkit-box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
511
|
+
box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
512
|
+
}
|
513
|
+
/* 针对 Firefox 的样式 */
|
514
|
+
input:-moz-autofill,
|
515
|
+
input:-moz-autofill:hover,
|
516
|
+
input:-moz-autofill:focus,
|
517
|
+
input:-moz-autofill:active {
|
518
|
+
-moz-box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
519
|
+
box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
520
|
+
}
|
package/lib/input/input.less
CHANGED
@@ -344,4 +344,23 @@
|
|
344
344
|
background-color: @input-block-hover-color;
|
345
345
|
}
|
346
346
|
}
|
347
|
+
}
|
348
|
+
|
349
|
+
// 去掉自动填充时的背景颜色
|
350
|
+
/* 针对 Chrome、Safari 和新版 Edge 的样式 */
|
351
|
+
input:-webkit-autofill,
|
352
|
+
input:-webkit-autofill:hover,
|
353
|
+
input:-webkit-autofill:focus,
|
354
|
+
input:-webkit-autofill:active {
|
355
|
+
-webkit-box-shadow: 0 0 0 100px @input-bg inset !important;
|
356
|
+
box-shadow: 0 0 0 100px @input-bg inset !important;
|
357
|
+
}
|
358
|
+
|
359
|
+
/* 针对 Firefox 的样式 */
|
360
|
+
input:-moz-autofill,
|
361
|
+
input:-moz-autofill:hover,
|
362
|
+
input:-moz-autofill:focus,
|
363
|
+
input:-moz-autofill:active {
|
364
|
+
-moz-box-shadow: 0 0 0 100px @input-bg inset !important;
|
365
|
+
box-shadow: 0 0 0 100px @input-bg inset !important;
|
347
366
|
}
|
@@ -868,3 +868,19 @@
|
|
868
868
|
.bk-input--number-control span:not(.is-disabled):hover {
|
869
869
|
background-color: var(--input-block-hover-color);
|
870
870
|
}
|
871
|
+
/* 针对 Chrome、Safari 和新版 Edge 的样式 */
|
872
|
+
input:-webkit-autofill,
|
873
|
+
input:-webkit-autofill:hover,
|
874
|
+
input:-webkit-autofill:focus,
|
875
|
+
input:-webkit-autofill:active {
|
876
|
+
-webkit-box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
877
|
+
box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
878
|
+
}
|
879
|
+
/* 针对 Firefox 的样式 */
|
880
|
+
input:-moz-autofill,
|
881
|
+
input:-moz-autofill:hover,
|
882
|
+
input:-moz-autofill:focus,
|
883
|
+
input:-moz-autofill:active {
|
884
|
+
-moz-box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
885
|
+
box-shadow: 0 0 0 100px var(--input-bg) inset !important;
|
886
|
+
}
|
@@ -2507,88 +2507,6 @@ const floating_ui_dom_computePosition = (reference, floating, options) => {
|
|
2507
2507
|
|
2508
2508
|
|
2509
2509
|
|
2510
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
|
2511
|
-
function _objectDestructuringEmpty(obj) {
|
2512
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
2513
|
-
}
|
2514
|
-
;// CONCATENATED MODULE: ../../packages/popover/src/use-platform.tsx
|
2515
|
-
|
2516
|
-
/*
|
2517
|
-
* Tencent is pleased to support the open source community by making
|
2518
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
2519
|
-
*
|
2520
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
2521
|
-
*
|
2522
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
2523
|
-
*
|
2524
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
2525
|
-
*
|
2526
|
-
* ---------------------------------------------------
|
2527
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
2528
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
2529
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
2530
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2531
|
-
*
|
2532
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
2533
|
-
* the Software.
|
2534
|
-
*
|
2535
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
2536
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2537
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
2538
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2539
|
-
* IN THE SOFTWARE.
|
2540
|
-
*/
|
2541
|
-
/* harmony default export */ const use_platform = (function (fullscreenTarget) {
|
2542
|
-
var getElementRects = function getElementRects(_ref) {
|
2543
|
-
var reference = _ref.reference,
|
2544
|
-
floating = _ref.floating;
|
2545
|
-
var refRect = reference.getBoundingClientRect();
|
2546
|
-
var floatRect = floating.getBoundingClientRect();
|
2547
|
-
return {
|
2548
|
-
reference: {
|
2549
|
-
width: refRect.width,
|
2550
|
-
height: refRect.height,
|
2551
|
-
x: refRect.x,
|
2552
|
-
y: refRect.y
|
2553
|
-
},
|
2554
|
-
floating: {
|
2555
|
-
width: floatRect.width,
|
2556
|
-
height: floatRect.height,
|
2557
|
-
x: floatRect.x,
|
2558
|
-
y: floatRect.y
|
2559
|
-
}
|
2560
|
-
};
|
2561
|
-
};
|
2562
|
-
var getDimensions = function getDimensions(element) {
|
2563
|
-
var _element$getBoundingC = element.getBoundingClientRect(),
|
2564
|
-
width = _element$getBoundingC.width,
|
2565
|
-
height = _element$getBoundingC.height;
|
2566
|
-
return {
|
2567
|
-
width: width,
|
2568
|
-
height: height
|
2569
|
-
};
|
2570
|
-
};
|
2571
|
-
var getClippingRect = function getClippingRect(_ref2) {
|
2572
|
-
var _fullscreenTarget$get;
|
2573
|
-
_objectDestructuringEmpty(_ref2);
|
2574
|
-
var _ref3 = (_fullscreenTarget$get = fullscreenTarget === null || fullscreenTarget === void 0 ? void 0 : fullscreenTarget.getBoundingClientRect()) !== null && _fullscreenTarget$get !== void 0 ? _fullscreenTarget$get : {},
|
2575
|
-
_ref3$width = _ref3.width,
|
2576
|
-
width = _ref3$width === void 0 ? 0 : _ref3$width,
|
2577
|
-
_ref3$height = _ref3.height,
|
2578
|
-
height = _ref3$height === void 0 ? 0 : _ref3$height;
|
2579
|
-
return {
|
2580
|
-
width: width,
|
2581
|
-
height: height,
|
2582
|
-
x: 0,
|
2583
|
-
y: 0
|
2584
|
-
};
|
2585
|
-
};
|
2586
|
-
return {
|
2587
|
-
getElementRects: getElementRects,
|
2588
|
-
getDimensions: getDimensions,
|
2589
|
-
getClippingRect: getClippingRect
|
2590
|
-
};
|
2591
|
-
});
|
2592
2510
|
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
|
2593
2511
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
2594
2512
|
/* harmony default export */ const esm_browser_native = ({
|
@@ -2776,7 +2694,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
2776
2694
|
|
2777
2695
|
|
2778
2696
|
|
2779
|
-
|
2697
|
+
// import usePlatform from './use-platform';
|
2780
2698
|
|
2781
2699
|
/**
|
2782
2700
|
* 解析popover相关配置
|
@@ -2912,10 +2830,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
2912
2830
|
}
|
2913
2831
|
if (isAutoPlacementAvailable()) {
|
2914
2832
|
middleware.push(autoPlacement());
|
2915
|
-
} else {
|
2916
|
-
middleware.unshift(inline());
|
2917
|
-
middleware.push(flip());
|
2918
2833
|
}
|
2834
|
+
middleware.unshift(inline());
|
2835
|
+
middleware.push(flip());
|
2919
2836
|
if (isHideMiddlewareAvailable()) {
|
2920
2837
|
options.middleware.push(hide());
|
2921
2838
|
}
|
@@ -2925,20 +2842,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
2925
2842
|
* 在弹出的全屏元素中,元素相对位置有别于document下面元素
|
2926
2843
|
* 全屏模式下面,需要自定义当前元素的一个platform
|
2927
2844
|
*/
|
2928
|
-
if (isElementFullScreen() || props.isVirtualEl) {
|
2929
|
-
|
2930
|
-
|
2931
|
-
|
2932
|
-
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
})
|
2940
|
-
});
|
2941
|
-
}
|
2845
|
+
// if (isElementFullScreen() || props.isVirtualEl) {
|
2846
|
+
// const { getElementRects, getDimensions, getClippingRect } = usePlatform(fullScreenTarget.value);
|
2847
|
+
// Object.assign(options, {
|
2848
|
+
// platform: {
|
2849
|
+
// ...(props?.platform ?? {}),
|
2850
|
+
// getElementRects,
|
2851
|
+
// getDimensions,
|
2852
|
+
// getClippingRect,
|
2853
|
+
// },
|
2854
|
+
// });
|
2855
|
+
// }
|
2942
2856
|
return options;
|
2943
2857
|
};
|
2944
2858
|
var resolveTargetElement = function resolveTargetElement(target) {
|
@@ -3420,7 +3334,9 @@ var parentNodeReferId = null;
|
|
3420
3334
|
elReference = _resolvePopElements3.elReference,
|
3421
3335
|
root = _resolvePopElements3.root;
|
3422
3336
|
if (isFullscreen.value) {
|
3423
|
-
|
3337
|
+
var _ref6 = elReference || root || {},
|
3338
|
+
parentNode = _ref6.parentNode;
|
3339
|
+
boundary.value = (fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) || parentNode;
|
3424
3340
|
return;
|
3425
3341
|
}
|
3426
3342
|
boundary.value = getPrefixId(root || elReference);
|
package/lib/popover/index.js
CHANGED
@@ -2509,88 +2509,6 @@ const floating_ui_dom_computePosition = (reference, floating, options) => {
|
|
2509
2509
|
|
2510
2510
|
|
2511
2511
|
|
2512
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
|
2513
|
-
function _objectDestructuringEmpty(obj) {
|
2514
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
2515
|
-
}
|
2516
|
-
;// CONCATENATED MODULE: ../../packages/popover/src/use-platform.tsx
|
2517
|
-
|
2518
|
-
/*
|
2519
|
-
* Tencent is pleased to support the open source community by making
|
2520
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
2521
|
-
*
|
2522
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
2523
|
-
*
|
2524
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
2525
|
-
*
|
2526
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
2527
|
-
*
|
2528
|
-
* ---------------------------------------------------
|
2529
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
2530
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
2531
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
2532
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2533
|
-
*
|
2534
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
2535
|
-
* the Software.
|
2536
|
-
*
|
2537
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
2538
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2539
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
2540
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2541
|
-
* IN THE SOFTWARE.
|
2542
|
-
*/
|
2543
|
-
/* harmony default export */ const use_platform = (function (fullscreenTarget) {
|
2544
|
-
var getElementRects = function getElementRects(_ref) {
|
2545
|
-
var reference = _ref.reference,
|
2546
|
-
floating = _ref.floating;
|
2547
|
-
var refRect = reference.getBoundingClientRect();
|
2548
|
-
var floatRect = floating.getBoundingClientRect();
|
2549
|
-
return {
|
2550
|
-
reference: {
|
2551
|
-
width: refRect.width,
|
2552
|
-
height: refRect.height,
|
2553
|
-
x: refRect.x,
|
2554
|
-
y: refRect.y
|
2555
|
-
},
|
2556
|
-
floating: {
|
2557
|
-
width: floatRect.width,
|
2558
|
-
height: floatRect.height,
|
2559
|
-
x: floatRect.x,
|
2560
|
-
y: floatRect.y
|
2561
|
-
}
|
2562
|
-
};
|
2563
|
-
};
|
2564
|
-
var getDimensions = function getDimensions(element) {
|
2565
|
-
var _element$getBoundingC = element.getBoundingClientRect(),
|
2566
|
-
width = _element$getBoundingC.width,
|
2567
|
-
height = _element$getBoundingC.height;
|
2568
|
-
return {
|
2569
|
-
width: width,
|
2570
|
-
height: height
|
2571
|
-
};
|
2572
|
-
};
|
2573
|
-
var getClippingRect = function getClippingRect(_ref2) {
|
2574
|
-
var _fullscreenTarget$get;
|
2575
|
-
_objectDestructuringEmpty(_ref2);
|
2576
|
-
var _ref3 = (_fullscreenTarget$get = fullscreenTarget === null || fullscreenTarget === void 0 ? void 0 : fullscreenTarget.getBoundingClientRect()) !== null && _fullscreenTarget$get !== void 0 ? _fullscreenTarget$get : {},
|
2577
|
-
_ref3$width = _ref3.width,
|
2578
|
-
width = _ref3$width === void 0 ? 0 : _ref3$width,
|
2579
|
-
_ref3$height = _ref3.height,
|
2580
|
-
height = _ref3$height === void 0 ? 0 : _ref3$height;
|
2581
|
-
return {
|
2582
|
-
width: width,
|
2583
|
-
height: height,
|
2584
|
-
x: 0,
|
2585
|
-
y: 0
|
2586
|
-
};
|
2587
|
-
};
|
2588
|
-
return {
|
2589
|
-
getElementRects: getElementRects,
|
2590
|
-
getDimensions: getDimensions,
|
2591
|
-
getClippingRect: getClippingRect
|
2592
|
-
};
|
2593
|
-
});
|
2594
2512
|
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
|
2595
2513
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
2596
2514
|
/* harmony default export */ const esm_browser_native = ({
|
@@ -2778,7 +2696,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
2778
2696
|
|
2779
2697
|
|
2780
2698
|
|
2781
|
-
|
2699
|
+
// import usePlatform from './use-platform';
|
2782
2700
|
|
2783
2701
|
/**
|
2784
2702
|
* 解析popover相关配置
|
@@ -2914,10 +2832,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
2914
2832
|
}
|
2915
2833
|
if (isAutoPlacementAvailable()) {
|
2916
2834
|
middleware.push(autoPlacement());
|
2917
|
-
} else {
|
2918
|
-
middleware.unshift(inline());
|
2919
|
-
middleware.push(flip());
|
2920
2835
|
}
|
2836
|
+
middleware.unshift(inline());
|
2837
|
+
middleware.push(flip());
|
2921
2838
|
if (isHideMiddlewareAvailable()) {
|
2922
2839
|
options.middleware.push(hide());
|
2923
2840
|
}
|
@@ -2927,20 +2844,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
2927
2844
|
* 在弹出的全屏元素中,元素相对位置有别于document下面元素
|
2928
2845
|
* 全屏模式下面,需要自定义当前元素的一个platform
|
2929
2846
|
*/
|
2930
|
-
if (isElementFullScreen() || props.isVirtualEl) {
|
2931
|
-
|
2932
|
-
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
|
2941
|
-
})
|
2942
|
-
});
|
2943
|
-
}
|
2847
|
+
// if (isElementFullScreen() || props.isVirtualEl) {
|
2848
|
+
// const { getElementRects, getDimensions, getClippingRect } = usePlatform(fullScreenTarget.value);
|
2849
|
+
// Object.assign(options, {
|
2850
|
+
// platform: {
|
2851
|
+
// ...(props?.platform ?? {}),
|
2852
|
+
// getElementRects,
|
2853
|
+
// getDimensions,
|
2854
|
+
// getClippingRect,
|
2855
|
+
// },
|
2856
|
+
// });
|
2857
|
+
// }
|
2944
2858
|
return options;
|
2945
2859
|
};
|
2946
2860
|
var resolveTargetElement = function resolveTargetElement(target) {
|
@@ -3422,7 +3336,9 @@ var parentNodeReferId = null;
|
|
3422
3336
|
elReference = _resolvePopElements3.elReference,
|
3423
3337
|
root = _resolvePopElements3.root;
|
3424
3338
|
if (isFullscreen.value) {
|
3425
|
-
|
3339
|
+
var _ref6 = elReference || root || {},
|
3340
|
+
parentNode = _ref6.parentNode;
|
3341
|
+
boundary.value = (fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) || parentNode;
|
3426
3342
|
return;
|
3427
3343
|
}
|
3428
3344
|
boundary.value = getPrefixId(root || elReference);
|
@@ -14,7 +14,7 @@ declare const TableColumnProp: {
|
|
14
14
|
default: string;
|
15
15
|
};
|
16
16
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../props").IOverflowTooltipProp>;
|
17
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
17
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
18
18
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
19
19
|
default: boolean;
|
20
20
|
} & {
|
@@ -65,7 +65,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
65
65
|
default: string;
|
66
66
|
};
|
67
67
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../props").IOverflowTooltipProp>;
|
68
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
68
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
69
69
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
70
70
|
default: boolean;
|
71
71
|
} & {
|
@@ -160,7 +160,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
160
160
|
height?: number;
|
161
161
|
maxHeight?: number;
|
162
162
|
};
|
163
|
-
type?: "none" | "
|
163
|
+
type?: "none" | "index" | "selection" | "expand";
|
164
164
|
label?: import("../props").LabelFunctionString;
|
165
165
|
width?: string | number;
|
166
166
|
className?: import("../props").RowClassFunctionString;
|
@@ -195,7 +195,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
195
195
|
default: string;
|
196
196
|
};
|
197
197
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../props").IOverflowTooltipProp>;
|
198
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
198
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
199
199
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
200
200
|
default: boolean;
|
201
201
|
} & {
|
package/lib/table/index.d.ts
CHANGED
@@ -1223,7 +1223,7 @@ declare const BkTable: {
|
|
1223
1223
|
default: string;
|
1224
1224
|
};
|
1225
1225
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("./props").IOverflowTooltipProp>;
|
1226
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
1226
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
1227
1227
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
1228
1228
|
default: boolean;
|
1229
1229
|
} & {
|
@@ -1318,7 +1318,7 @@ declare const BkTable: {
|
|
1318
1318
|
height?: number;
|
1319
1319
|
maxHeight?: number;
|
1320
1320
|
};
|
1321
|
-
type?: "none" | "
|
1321
|
+
type?: "none" | "index" | "selection" | "expand";
|
1322
1322
|
label?: import("./props").LabelFunctionString;
|
1323
1323
|
width?: string | number;
|
1324
1324
|
className?: import("./props").RowClassFunctionString;
|
@@ -1350,7 +1350,7 @@ declare const BkTable: {
|
|
1350
1350
|
default: string;
|
1351
1351
|
};
|
1352
1352
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("./props").IOverflowTooltipProp>;
|
1353
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
1353
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
1354
1354
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
1355
1355
|
default: boolean;
|
1356
1356
|
} & {
|
@@ -1402,7 +1402,7 @@ declare const BkTable: {
|
|
1402
1402
|
default: string;
|
1403
1403
|
};
|
1404
1404
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("./props").IOverflowTooltipProp>;
|
1405
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
1405
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
1406
1406
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
1407
1407
|
default: boolean;
|
1408
1408
|
} & {
|
package/lib/table/props.d.ts
CHANGED
@@ -25,7 +25,7 @@ export declare enum TableAlignEnum {
|
|
25
25
|
CENTER = "center",
|
26
26
|
NONE = ""
|
27
27
|
}
|
28
|
-
export declare const columnType: import("vue-types").VueTypeDef<"none" | "
|
28
|
+
export declare const columnType: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
29
29
|
export declare const TableAlign: import("vue-types").VueTypeDef<"" | "right" | "left" | "center">;
|
30
30
|
export declare enum FullEnum {
|
31
31
|
FULL = "full",
|
@@ -13,7 +13,7 @@ declare const BkTableColumn: {
|
|
13
13
|
readonly render?: import("../../table/src/props").RenderFunctionString;
|
14
14
|
readonly sort?: import("../../table/src/props").ISortPropShape;
|
15
15
|
readonly filter?: import("../../table/src/props").IFilterPropShape;
|
16
|
-
readonly type?: "none" | "
|
16
|
+
readonly type?: "none" | "index" | "selection" | "expand";
|
17
17
|
class?: unknown;
|
18
18
|
readonly label?: import("../../table/src/props").LabelFunctionString;
|
19
19
|
style?: unknown;
|
@@ -93,7 +93,7 @@ declare const BkTableColumn: {
|
|
93
93
|
default: string;
|
94
94
|
};
|
95
95
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../../table/src/props").IOverflowTooltipProp>;
|
96
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
96
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
97
97
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
98
98
|
default: boolean;
|
99
99
|
} & {
|
@@ -188,7 +188,7 @@ declare const BkTableColumn: {
|
|
188
188
|
height?: number;
|
189
189
|
maxHeight?: number;
|
190
190
|
};
|
191
|
-
type?: "none" | "
|
191
|
+
type?: "none" | "index" | "selection" | "expand";
|
192
192
|
label?: import("../../table/src/props").LabelFunctionString;
|
193
193
|
width?: string | number;
|
194
194
|
className?: import("../../table/src/props").RowClassFunctionString;
|
@@ -220,7 +220,7 @@ declare const BkTableColumn: {
|
|
220
220
|
default: string;
|
221
221
|
};
|
222
222
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../../table/src/props").IOverflowTooltipProp>;
|
223
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
223
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
224
224
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
225
225
|
default: boolean;
|
226
226
|
} & {
|
@@ -300,7 +300,7 @@ declare const BkTableColumn: {
|
|
300
300
|
default: string;
|
301
301
|
};
|
302
302
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../../table/src/props").IOverflowTooltipProp>;
|
303
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
303
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
304
304
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
305
305
|
default: boolean;
|
306
306
|
} & {
|
@@ -395,7 +395,7 @@ declare const BkTableColumn: {
|
|
395
395
|
height?: number;
|
396
396
|
maxHeight?: number;
|
397
397
|
};
|
398
|
-
type?: "none" | "
|
398
|
+
type?: "none" | "index" | "selection" | "expand";
|
399
399
|
label?: import("../../table/src/props").LabelFunctionString;
|
400
400
|
width?: string | number;
|
401
401
|
className?: import("../../table/src/props").RowClassFunctionString;
|
@@ -427,7 +427,7 @@ declare const BkTableColumn: {
|
|
427
427
|
default: string;
|
428
428
|
};
|
429
429
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../../table/src/props").IOverflowTooltipProp>;
|
430
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
430
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
431
431
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
432
432
|
default: boolean;
|
433
433
|
} & {
|
@@ -483,7 +483,7 @@ declare const BkTableColumn: {
|
|
483
483
|
default: string;
|
484
484
|
};
|
485
485
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../../table/src/props").IOverflowTooltipProp>;
|
486
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
486
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
487
487
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
488
488
|
default: boolean;
|
489
489
|
} & {
|
@@ -578,7 +578,7 @@ declare const BkTableColumn: {
|
|
578
578
|
height?: number;
|
579
579
|
maxHeight?: number;
|
580
580
|
};
|
581
|
-
type?: "none" | "
|
581
|
+
type?: "none" | "index" | "selection" | "expand";
|
582
582
|
label?: import("../../table/src/props").LabelFunctionString;
|
583
583
|
width?: string | number;
|
584
584
|
className?: import("../../table/src/props").RowClassFunctionString;
|
@@ -610,7 +610,7 @@ declare const BkTableColumn: {
|
|
610
610
|
default: string;
|
611
611
|
};
|
612
612
|
showOverflowTooltip: import("vue-types").VueTypeDef<import("../../table/src/props").IOverflowTooltipProp>;
|
613
|
-
type: import("vue-types").VueTypeDef<"none" | "
|
613
|
+
type: import("vue-types").VueTypeDef<"none" | "index" | "selection" | "expand">;
|
614
614
|
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
615
615
|
default: boolean;
|
616
616
|
} & {
|
package/lib/tree/index.js
CHANGED
@@ -802,6 +802,7 @@ var getTreeStyle = function getTreeStyle(item, props) {
|
|
802
802
|
'--offset-left': "".concat(props.offsetLeft, "px")
|
803
803
|
};
|
804
804
|
};
|
805
|
+
console.log(11);
|
805
806
|
/**
|
806
807
|
* 获取节点样式配置
|
807
808
|
* @param item
|
@@ -2372,7 +2373,8 @@ var use_tree_init_this = undefined;
|
|
2372
2373
|
isNodeChecked = _useNodeAttribute.isNodeChecked,
|
2373
2374
|
isNodeMatched = _useNodeAttribute.isNodeMatched,
|
2374
2375
|
hasChildNode = _useNodeAttribute.hasChildNode,
|
2375
|
-
getNodePath = _useNodeAttribute.getNodePath
|
2376
|
+
getNodePath = _useNodeAttribute.getNodePath,
|
2377
|
+
getNodeId = _useNodeAttribute.getNodeId;
|
2376
2378
|
var _useSearch = use_search(props),
|
2377
2379
|
searchFn = _useSearch.searchFn,
|
2378
2380
|
isSearchActive = _useSearch.isSearchActive,
|
@@ -2453,6 +2455,49 @@ var use_tree_init_this = undefined;
|
|
2453
2455
|
var _root$value;
|
2454
2456
|
(_root$value = root.value) === null || _root$value === void 0 ? void 0 : _root$value.reset();
|
2455
2457
|
};
|
2458
|
+
/**
|
2459
|
+
* 将制定元素滚动到顶部
|
2460
|
+
* @param option
|
2461
|
+
*/
|
2462
|
+
var scrollToTop = function scrollToTop(option) {
|
2463
|
+
if (option === undefined || option === null) {
|
2464
|
+
root.value.fixToTop({
|
2465
|
+
index: 1
|
2466
|
+
});
|
2467
|
+
return;
|
2468
|
+
}
|
2469
|
+
if (props.nodeKey && Object.prototype.hasOwnProperty.call(option, props.nodeKey)) {
|
2470
|
+
root.value.fixToTop({
|
2471
|
+
index: renderData.value.findIndex(function (node) {
|
2472
|
+
return node[props.nodeKey] === option[props.nodeKey];
|
2473
|
+
}) + 1
|
2474
|
+
});
|
2475
|
+
return;
|
2476
|
+
}
|
2477
|
+
if (option.id !== undefined && option.id !== null) {
|
2478
|
+
root.value.fixToTop({
|
2479
|
+
index: renderData.value.findIndex(function (node) {
|
2480
|
+
return node[props.nodeKey] === option.id;
|
2481
|
+
}) + 1
|
2482
|
+
});
|
2483
|
+
return;
|
2484
|
+
}
|
2485
|
+
if (option.index >= 0) {
|
2486
|
+
root.value.fixToTop({
|
2487
|
+
index: option.index
|
2488
|
+
});
|
2489
|
+
return;
|
2490
|
+
}
|
2491
|
+
var id = getNodeId(option);
|
2492
|
+
if (id) {
|
2493
|
+
root.value.fixToTop({
|
2494
|
+
index: renderData.value.findIndex(function (node) {
|
2495
|
+
return getNodeId(node) === id;
|
2496
|
+
}) + 1
|
2497
|
+
});
|
2498
|
+
return;
|
2499
|
+
}
|
2500
|
+
};
|
2456
2501
|
ctx.expose({
|
2457
2502
|
handleTreeNodeClick: handleTreeNodeClick,
|
2458
2503
|
isNodeChecked: isNodeChecked,
|
@@ -2465,6 +2510,7 @@ var use_tree_init_this = undefined;
|
|
2465
2510
|
setNodeAction: setNodeAction,
|
2466
2511
|
setNodeOpened: setNodeOpened,
|
2467
2512
|
setSelect: setSelect,
|
2513
|
+
scrollToTop: scrollToTop,
|
2468
2514
|
asyncNodeClick: asyncNodeClick,
|
2469
2515
|
getData: getData,
|
2470
2516
|
reset: reset
|
package/lib/tree/tree.d.ts
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
import { TreePropTypes as defineTypes } from './props';
|
2
2
|
export type TreePropTypes = defineTypes;
|
3
|
+
export type ITreeScrollTopOption = {
|
4
|
+
id?: string;
|
5
|
+
index?: number;
|
6
|
+
};
|
3
7
|
declare const _default: import("vue").DefineComponent<{
|
4
8
|
data: import("vue-types").VueTypeDef<any[]> & {
|
5
9
|
default: () => any[];
|