bkui-vue 1.0.3-beta.12 → 1.0.3-beta.13
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 +2963 -2951
- package/dist/index.umd.js +25 -25
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/table/index.js +35 -14
- package/lib/table/props.d.ts +3 -2
- package/lib/table-column/index.d.ts +106 -106
- package/lib/table-column/index.js +15 -3
- package/lib/tag-input/index.d.ts +4 -4
- package/lib/tag-input/tag-input.d.ts +2 -2
- package/lib/tag-input/tag-props.d.ts +1 -1
- package/lib/tag-input/tag-render.d.ts +1 -1
- package/lib/time-picker/index.d.ts +35 -35
- package/package.json +1 -1
@@ -23,5 +23,5 @@
|
|
23
23
|
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
24
24
|
* IN THE SOFTWARE.
|
25
25
|
*/
|
26
|
-
import $bkPopover from '
|
26
|
+
import $bkPopover from '../popover/plugin-popover';
|
27
27
|
export default $bkPopover;
|
package/lib/table/index.js
CHANGED
@@ -741,7 +741,19 @@ var TableColumnProp = {
|
|
741
741
|
var fn = function fn() {
|
742
742
|
// @ts-ignore
|
743
743
|
var selfVnode = _this._;
|
744
|
-
var
|
744
|
+
var getTableNode = function getTableNode() {
|
745
|
+
var _parentVnode$type;
|
746
|
+
var parentVnode = selfVnode.parent;
|
747
|
+
if (((_parentVnode$type = parentVnode.type) === null || _parentVnode$type === void 0 ? void 0 : _parentVnode$type.name) === 'Table') {
|
748
|
+
return parentVnode.vnode;
|
749
|
+
}
|
750
|
+
return getTableNode();
|
751
|
+
};
|
752
|
+
var tableNode = getTableNode();
|
753
|
+
if (!tableNode) {
|
754
|
+
return;
|
755
|
+
}
|
756
|
+
var colList = tableNode.children["default"]() || [];
|
745
757
|
var sortColumns = [];
|
746
758
|
var index = 0;
|
747
759
|
var reduceColumns = function reduceColumns(nodes) {
|
@@ -749,7 +761,7 @@ var TableColumnProp = {
|
|
749
761
|
return;
|
750
762
|
}
|
751
763
|
nodes.forEach(function (node) {
|
752
|
-
var _node$type, _node$children2;
|
764
|
+
var _node$type, _node$children2, _node$type2;
|
753
765
|
if (Array.isArray(node)) {
|
754
766
|
reduceColumns(node);
|
755
767
|
return;
|
@@ -767,7 +779,7 @@ var TableColumnProp = {
|
|
767
779
|
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
768
780
|
index = index + 1;
|
769
781
|
}
|
770
|
-
if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0) {
|
782
|
+
if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0 && ((_node$type2 = node.type) === null || _node$type2 === void 0 ? void 0 : _node$type2.name) !== 'Table') {
|
771
783
|
reduceColumns(node.children);
|
772
784
|
}
|
773
785
|
});
|
@@ -4423,14 +4435,21 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
|
|
4423
4435
|
});
|
4424
4436
|
var resolveSetting = function resolveSetting() {
|
4425
4437
|
if (/boolean|object/.test(typeof_typeof(props.column.showOverflowTooltip)) && props.column.showOverflowTooltip !== null) {
|
4438
|
+
var _props$column$showOve = props.column.showOverflowTooltip,
|
4439
|
+
_props$column$showOve2 = _props$column$showOve.content,
|
4440
|
+
content = _props$column$showOve2 === void 0 ? '' : _props$column$showOve2,
|
4441
|
+
_props$column$showOve3 = _props$column$showOve.mode,
|
4442
|
+
mode = _props$column$showOve3 === void 0 ? undefined : _props$column$showOve3,
|
4443
|
+
_props$column$showOve4 = _props$column$showOve.popoverOption,
|
4444
|
+
popoverOption = _props$column$showOve4 === void 0 ? {} : _props$column$showOve4;
|
4426
4445
|
var result = {
|
4427
4446
|
showOverflowTooltip: {
|
4428
|
-
content:
|
4447
|
+
content: content,
|
4429
4448
|
disabled: !props.column.showOverflowTooltip,
|
4430
|
-
mode:
|
4449
|
+
mode: mode,
|
4431
4450
|
resizerWay: undefined,
|
4432
4451
|
watchCellResize: undefined,
|
4433
|
-
popoverOption:
|
4452
|
+
popoverOption: popoverOption
|
4434
4453
|
}
|
4435
4454
|
};
|
4436
4455
|
if (props.parentSetting !== null && typeof_typeof(props.parentSetting) === 'object') {
|
@@ -4448,11 +4467,11 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
|
|
4448
4467
|
showOverflowTooltip: props.parentSetting
|
4449
4468
|
};
|
4450
4469
|
};
|
4451
|
-
var _resolveSetting = resolveSetting(),
|
4452
|
-
_resolveSetting$showO = _resolveSetting.showOverflowTooltip,
|
4453
|
-
showOverflowTooltip = _resolveSetting$showO === void 0 ? false : _resolveSetting$showO;
|
4454
4470
|
var bkEllipsisIns = null;
|
4455
4471
|
var resolveTooltipOption = function resolveTooltipOption() {
|
4472
|
+
var _resolveSetting = resolveSetting(),
|
4473
|
+
_resolveSetting$showO = _resolveSetting.showOverflowTooltip,
|
4474
|
+
showOverflowTooltip = _resolveSetting$showO === void 0 ? false : _resolveSetting$showO;
|
4456
4475
|
var disabled = true;
|
4457
4476
|
var resizerWay = props.resizerWay;
|
4458
4477
|
var content = function content() {
|
@@ -4495,8 +4514,8 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
|
|
4495
4514
|
}
|
4496
4515
|
}
|
4497
4516
|
if (props.isHead) {
|
4498
|
-
var _props$column$
|
4499
|
-
disabled = !((_props$column$
|
4517
|
+
var _props$column$showOve5, _props$column;
|
4518
|
+
disabled = !((_props$column$showOve5 = (_props$column = props.column) === null || _props$column === void 0 || (_props$column = _props$column.showOverflowTooltip) === null || _props$column === void 0 ? void 0 : _props$column.showHead) !== null && _props$column$showOve5 !== void 0 ? _props$column$showOve5 : true);
|
4500
4519
|
mode = 'auto';
|
4501
4520
|
content = function content() {
|
4502
4521
|
var _getEllipsisTarget;
|
@@ -5065,13 +5084,14 @@ function _isSlot(s) {
|
|
5065
5084
|
});
|
5066
5085
|
});
|
5067
5086
|
var lastDragRow = null;
|
5087
|
+
var lastDragRowClass = '';
|
5068
5088
|
var insertPlaceDiv = function insertPlaceDiv(target, placement) {
|
5069
5089
|
if (placement === '--top') {
|
5070
5090
|
target.parentNode.insertBefore(placeDiv, target);
|
5071
5091
|
return;
|
5072
5092
|
}
|
5073
5093
|
if (target.nextElementSibling === null) {
|
5074
|
-
target.parentNode.
|
5094
|
+
target.parentNode.append(placeDiv);
|
5075
5095
|
return;
|
5076
5096
|
}
|
5077
5097
|
target.parentNode.insertBefore(placeDiv, target.nextElementSibling);
|
@@ -5127,6 +5147,7 @@ function _isSlot(s) {
|
|
5127
5147
|
var onDragleave = function onDragleave(event) {
|
5128
5148
|
beforeEventFire(function () {
|
5129
5149
|
var target = getTargetRow(event);
|
5150
|
+
lastDragRowClass = target.classList.contains('--bottom') ? '--bottom' : '--top';
|
5130
5151
|
removeDragClass(target, ['--drag-enter', '--bottom', '--top']);
|
5131
5152
|
});
|
5132
5153
|
};
|
@@ -5149,12 +5170,12 @@ function _isSlot(s) {
|
|
5149
5170
|
var rowIndex = target.dataset.rowIndex;
|
5150
5171
|
var targetIndex = Number(rowIndex);
|
5151
5172
|
var sourceIndex = (_event$target$dataset = event.target.dataset) === null || _event$target$dataset === void 0 ? void 0 : _event$target$dataset.rowIndex;
|
5152
|
-
if (
|
5173
|
+
if (lastDragRowClass === '--bottom') {
|
5153
5174
|
targetIndex = targetIndex + 1;
|
5154
5175
|
}
|
5155
5176
|
resp.changePageRowIndex(Number(sourceIndex), targetIndex);
|
5156
|
-
removeDragClass(target, ['--drag-enter', '--bottom', '--top']);
|
5157
5177
|
lastDragRow = null;
|
5178
|
+
lastDragRowClass = '';
|
5158
5179
|
ctx.emit(EMIT_EVENTS.DRAG_END, {
|
5159
5180
|
sourceEvent: event,
|
5160
5181
|
data: resp.pageData
|
package/lib/table/props.d.ts
CHANGED
@@ -43,7 +43,7 @@ export declare enum FixedEnum {
|
|
43
43
|
RIGHT = "right"
|
44
44
|
}
|
45
45
|
export declare const fixedType: import("vue-types").VueTypeValidableDef<"right" | "left">;
|
46
|
-
export type
|
46
|
+
export type IOverflowTooltipOption = {
|
47
47
|
content: string | Function;
|
48
48
|
disabled?: (col: Column, row: any) => boolean | boolean;
|
49
49
|
watchCellResize?: boolean;
|
@@ -51,7 +51,8 @@ export type IOverflowTooltipProp = {
|
|
51
51
|
popoverOption?: any;
|
52
52
|
resizerWay?: ResizerWay;
|
53
53
|
showHead?: boolean;
|
54
|
-
}
|
54
|
+
};
|
55
|
+
export type IOverflowTooltipProp = IOverflowTooltipOption | boolean;
|
55
56
|
export type IOverflowTooltip = IOverflowTooltipProp;
|
56
57
|
export declare const IOverflowTooltipPropType: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
|
57
58
|
export type ISortOption = {
|