bkui-vue 0.0.2-beta.85 → 0.0.2-beta.87
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 +356 -365
- 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 +2 -1
- package/lib/table/components/table-column.d.ts +1 -1
- package/lib/table/index.d.ts +1 -1
- package/lib/table/index.js +40 -42
- package/lib/table/table.css +1 -1
- package/lib/table/table.less +1 -1
- package/lib/table/table.variable.css +1 -1
- package/lib/table-column/index.d.ts +3 -3
- package/lib/table-column/index.js +9 -6
- package/lib/upload/index.js +2 -2
- package/lib/upload/upload.type.d.ts +1 -1
- package/lib/upload/use-file-handler.d.ts +2 -2
- package/package.json +1 -1
package/lib/directives/index.js
CHANGED
@@ -1291,9 +1291,10 @@ var createInstance = function createInstance(el, binding) {
|
|
1291
1291
|
handleContentLeave();
|
1292
1292
|
createTimer && clearTimeout(createTimer);
|
1293
1293
|
createTimer = setTimeout(function () {
|
1294
|
+
var _targetOptions$conten;
|
1294
1295
|
var targetOptions = resolveOptions(el, binding);
|
1295
1296
|
targetOptions.isShow = true;
|
1296
|
-
targetOptions.content = targetOptions.content
|
1297
|
+
targetOptions.content = typeof targetOptions.content === 'function' ? targetOptions.content() : (_targetOptions$conten = targetOptions.content) !== null && _targetOptions$conten !== void 0 ? _targetOptions$conten : el;
|
1297
1298
|
targetOptions.allowHtml = true;
|
1298
1299
|
Object.assign(targetOptions, {
|
1299
1300
|
onContentMouseenter: handleContentEnter,
|
@@ -179,7 +179,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
179
179
|
}, unknown, {}, {
|
180
180
|
updateColumnDefine(unmounted?: boolean): void;
|
181
181
|
updateColumnDefineByParent(): void;
|
182
|
-
|
182
|
+
unmountColumn(): void;
|
183
183
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
184
184
|
label: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
185
185
|
field: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
package/lib/table/index.d.ts
CHANGED
@@ -1337,7 +1337,7 @@ declare const BkTable: {
|
|
1337
1337
|
}, unknown, {}, {
|
1338
1338
|
updateColumnDefine(unmounted?: boolean): void;
|
1339
1339
|
updateColumnDefineByParent(): void;
|
1340
|
-
|
1340
|
+
unmountColumn(): void;
|
1341
1341
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
1342
1342
|
label: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
|
1343
1343
|
field: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
|
package/lib/table/index.js
CHANGED
@@ -965,8 +965,8 @@ var TableColumnProp = {
|
|
965
965
|
methods: {
|
966
966
|
updateColumnDefine: function updateColumnDefine() {
|
967
967
|
var unmounted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
968
|
-
if (
|
969
|
-
this.
|
968
|
+
if (unmounted) {
|
969
|
+
this.unmountColumn();
|
970
970
|
return;
|
971
971
|
}
|
972
972
|
this.updateColumnDefineByParent();
|
@@ -978,6 +978,7 @@ var TableColumnProp = {
|
|
978
978
|
var selfVnode = _this._;
|
979
979
|
var colList = selfVnode.parent.vnode.children["default"]() || [];
|
980
980
|
var sortColumns = [];
|
981
|
+
var index = 0;
|
981
982
|
var reduceColumns = function reduceColumns(nodes) {
|
982
983
|
if (!Array.isArray(nodes)) {
|
983
984
|
return;
|
@@ -992,11 +993,14 @@ var TableColumnProp = {
|
|
992
993
|
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
993
994
|
var _node$children;
|
994
995
|
skipValidateKey0 = Object.hasOwnProperty.call(node.props || {}, 'key');
|
995
|
-
var resolveProp = Object.assign({
|
996
|
+
var resolveProp = Object.assign({
|
997
|
+
index: index
|
998
|
+
}, node.props, {
|
996
999
|
field: node.props.prop || node.props.field,
|
997
1000
|
render: (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"]
|
998
1001
|
});
|
999
1002
|
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
1003
|
+
index = index + 1;
|
1000
1004
|
}
|
1001
1005
|
if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0) {
|
1002
1006
|
reduceColumns(node.children);
|
@@ -1010,13 +1014,12 @@ var TableColumnProp = {
|
|
1010
1014
|
this.bkTableCache.queueStack(BK_COLUMN_UPDATE_DEFINE, fn);
|
1011
1015
|
}
|
1012
1016
|
},
|
1013
|
-
|
1014
|
-
var unmounted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
1017
|
+
unmountColumn: function unmountColumn() {
|
1015
1018
|
var resolveProp = Object.assign({}, this.$props, {
|
1016
1019
|
field: this.$props.prop || this.$props.field,
|
1017
1020
|
render: this.$slots["default"]
|
1018
1021
|
});
|
1019
|
-
this.initColumns(
|
1022
|
+
this.initColumns(resolveProp, true);
|
1020
1023
|
}
|
1021
1024
|
},
|
1022
1025
|
render: function render() {
|
@@ -3936,48 +3939,31 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3936
3939
|
resolveColumns = column;
|
3937
3940
|
}
|
3938
3941
|
if (!remove) {
|
3939
|
-
var needToSort = false;
|
3940
3942
|
resolveColumns.forEach(function (col) {
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
|
3945
|
-
|
3946
|
-
if (oldIndex >= 0) {
|
3947
|
-
targetColumns.splice(oldIndex, 1);
|
3948
|
-
}
|
3949
|
-
targetColumns.push(col);
|
3943
|
+
var index = targetColumns.findIndex(function (tc) {
|
3944
|
+
return tc.label === col.label && tc.field === col.field;
|
3945
|
+
});
|
3946
|
+
if (index >= 0) {
|
3947
|
+
Object.assign(targetColumns[index], col);
|
3950
3948
|
} else {
|
3951
|
-
|
3952
|
-
return tc.label === col.label && tc.field === col.field;
|
3953
|
-
});
|
3954
|
-
if (index >= 0) {
|
3955
|
-
targetColumns.splice(index, 1, col);
|
3956
|
-
} else {
|
3957
|
-
targetColumns.push(col);
|
3958
|
-
}
|
3949
|
+
targetColumns.push(col);
|
3959
3950
|
}
|
3960
3951
|
});
|
3961
|
-
|
3962
|
-
|
3963
|
-
|
3964
|
-
});
|
3965
|
-
}
|
3952
|
+
targetColumns.sort(function (col1, col2) {
|
3953
|
+
return col1.index - col2.index;
|
3954
|
+
});
|
3966
3955
|
} else {
|
3967
3956
|
resolveColumns.forEach(function (col) {
|
3968
3957
|
var matchColIndex = targetColumns.findIndex(function (c) {
|
3969
3958
|
return c.label === col.label && c.field === col.field;
|
3970
3959
|
});
|
3971
|
-
if (
|
3972
|
-
|
3973
|
-
targetColumns.splice(matchColIndex, 1);
|
3974
|
-
}
|
3975
|
-
return;
|
3960
|
+
if (matchColIndex >= 0) {
|
3961
|
+
targetColumns.splice(matchColIndex, 1);
|
3976
3962
|
}
|
3977
3963
|
});
|
3978
3964
|
}
|
3979
3965
|
resolvedColumns.length = 0;
|
3980
|
-
resolvedColumns.push.apply(resolvedColumns, _toConsumableArray(
|
3966
|
+
resolvedColumns.push.apply(resolvedColumns, _toConsumableArray(targetColumns));
|
3981
3967
|
};
|
3982
3968
|
(0,external_vue_namespaceObject.watch)(function () {
|
3983
3969
|
return [props.columns];
|
@@ -4415,7 +4401,9 @@ const external_directives_namespaceObject = external_directives_x({ ["bkEllipsis
|
|
4415
4401
|
var resolveTooltipOption = function resolveTooltipOption() {
|
4416
4402
|
var disabled = true;
|
4417
4403
|
var resizerWay = props.resizerWay;
|
4418
|
-
var content =
|
4404
|
+
var content = function content() {
|
4405
|
+
return refRoot.value.innerText;
|
4406
|
+
};
|
4419
4407
|
var popoverOption = {};
|
4420
4408
|
var mode = 'auto';
|
4421
4409
|
var watchCellResize = true;
|
@@ -4426,9 +4414,13 @@ const external_directives_namespaceObject = external_directives_x({ ["bkEllipsis
|
|
4426
4414
|
disabled = showOverflowTooltip.disabled;
|
4427
4415
|
popoverOption = showOverflowTooltip.popoverOption;
|
4428
4416
|
resizerWay = showOverflowTooltip.resizerWay || 'debounce';
|
4429
|
-
content =
|
4417
|
+
content = function content() {
|
4418
|
+
return showOverflowTooltip.content || refRoot.value.innerText;
|
4419
|
+
};
|
4430
4420
|
if (typeof showOverflowTooltip.content === 'function') {
|
4431
|
-
content =
|
4421
|
+
content = function content() {
|
4422
|
+
return showOverflowTooltip.content(props.column, props.row);
|
4423
|
+
};
|
4432
4424
|
}
|
4433
4425
|
watchCellResize = showOverflowTooltip.watchCellResize;
|
4434
4426
|
mode = showOverflowTooltip.mode || 'auto';
|
@@ -4437,13 +4429,17 @@ const external_directives_namespaceObject = external_directives_x({ ["bkEllipsis
|
|
4437
4429
|
disabled = Reflect.apply(disabled, _this, [props.column, props.row]);
|
4438
4430
|
}
|
4439
4431
|
if (props.isHead) {
|
4440
|
-
var _getEllipsisTarget;
|
4441
4432
|
disabled = false;
|
4442
4433
|
mode = 'auto';
|
4443
|
-
content =
|
4434
|
+
content = function content() {
|
4435
|
+
var _getEllipsisTarget;
|
4436
|
+
return (_getEllipsisTarget = getEllipsisTarget()) === null || _getEllipsisTarget === void 0 ? void 0 : _getEllipsisTarget.innerHTML;
|
4437
|
+
};
|
4444
4438
|
if (props.headExplain) {
|
4445
4439
|
mode = 'static';
|
4446
|
-
content =
|
4440
|
+
content = function content() {
|
4441
|
+
return props.headExplain;
|
4442
|
+
};
|
4447
4443
|
}
|
4448
4444
|
}
|
4449
4445
|
/**
|
@@ -4453,7 +4449,9 @@ const external_directives_namespaceObject = external_directives_x({ ["bkEllipsis
|
|
4453
4449
|
disabled = false;
|
4454
4450
|
mode = 'static';
|
4455
4451
|
if (typeof_typeof(props.column.explain) === 'object') {
|
4456
|
-
content =
|
4452
|
+
content = function content() {
|
4453
|
+
return resolvePropVal(props.column.explain, 'content', [props.column, props.row]);
|
4454
|
+
};
|
4457
4455
|
}
|
4458
4456
|
}
|
4459
4457
|
return {
|
package/lib/table/table.css
CHANGED
package/lib/table/table.less
CHANGED
@@ -207,7 +207,7 @@ declare const BkTableColumn: {
|
|
207
207
|
}, unknown, {}, {
|
208
208
|
updateColumnDefine(unmounted?: boolean): void;
|
209
209
|
updateColumnDefineByParent(): void;
|
210
|
-
|
210
|
+
unmountColumn(): void;
|
211
211
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
212
212
|
fixed: boolean | "right" | "left";
|
213
213
|
minWidth: string | number;
|
@@ -364,7 +364,7 @@ declare const BkTableColumn: {
|
|
364
364
|
}> & {} & {
|
365
365
|
updateColumnDefine(unmounted?: boolean): void;
|
366
366
|
updateColumnDefineByParent(): void;
|
367
|
-
|
367
|
+
unmountColumn(): void;
|
368
368
|
} & import("vue").ComponentCustomProperties & {};
|
369
369
|
__isFragment?: never;
|
370
370
|
__isTeleport?: never;
|
@@ -497,7 +497,7 @@ declare const BkTableColumn: {
|
|
497
497
|
}, unknown, {}, {
|
498
498
|
updateColumnDefine(unmounted?: boolean): void;
|
499
499
|
updateColumnDefineByParent(): void;
|
500
|
-
|
500
|
+
unmountColumn(): void;
|
501
501
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
502
502
|
fixed: boolean | "right" | "left";
|
503
503
|
minWidth: string | number;
|
@@ -668,8 +668,8 @@ var TableColumnProp = {
|
|
668
668
|
methods: {
|
669
669
|
updateColumnDefine: function updateColumnDefine() {
|
670
670
|
var unmounted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
671
|
-
if (
|
672
|
-
this.
|
671
|
+
if (unmounted) {
|
672
|
+
this.unmountColumn();
|
673
673
|
return;
|
674
674
|
}
|
675
675
|
this.updateColumnDefineByParent();
|
@@ -681,6 +681,7 @@ var TableColumnProp = {
|
|
681
681
|
var selfVnode = _this._;
|
682
682
|
var colList = selfVnode.parent.vnode.children["default"]() || [];
|
683
683
|
var sortColumns = [];
|
684
|
+
var index = 0;
|
684
685
|
var reduceColumns = function reduceColumns(nodes) {
|
685
686
|
if (!Array.isArray(nodes)) {
|
686
687
|
return;
|
@@ -695,11 +696,14 @@ var TableColumnProp = {
|
|
695
696
|
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
696
697
|
var _node$children;
|
697
698
|
skipValidateKey0 = Object.hasOwnProperty.call(node.props || {}, 'key');
|
698
|
-
var resolveProp = Object.assign({
|
699
|
+
var resolveProp = Object.assign({
|
700
|
+
index: index
|
701
|
+
}, node.props, {
|
699
702
|
field: node.props.prop || node.props.field,
|
700
703
|
render: (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"]
|
701
704
|
});
|
702
705
|
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
706
|
+
index = index + 1;
|
703
707
|
}
|
704
708
|
if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0) {
|
705
709
|
reduceColumns(node.children);
|
@@ -713,13 +717,12 @@ var TableColumnProp = {
|
|
713
717
|
this.bkTableCache.queueStack(BK_COLUMN_UPDATE_DEFINE, fn);
|
714
718
|
}
|
715
719
|
},
|
716
|
-
|
717
|
-
var unmounted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
720
|
+
unmountColumn: function unmountColumn() {
|
718
721
|
var resolveProp = Object.assign({}, this.$props, {
|
719
722
|
field: this.$props.prop || this.$props.field,
|
720
723
|
render: this.$slots["default"]
|
721
724
|
});
|
722
|
-
this.initColumns(
|
725
|
+
this.initColumns(resolveProp, true);
|
723
726
|
}
|
724
727
|
},
|
725
728
|
render: function render() {
|
package/lib/upload/index.js
CHANGED
@@ -1945,11 +1945,11 @@ const external_button_namespaceObject = external_button_x({ ["default"]: () => _
|
|
1945
1945
|
"disabled": disabled.value
|
1946
1946
|
}, {
|
1947
1947
|
"default": function _default() {
|
1948
|
-
return [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Upload, {
|
1948
|
+
return [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [slots["default"] ? slots["default"]() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Upload, {
|
1949
1949
|
"class": "".concat(classBlock, "__button-icon")
|
1950
1950
|
}, null), (0,external_vue_namespaceObject.createVNode)("span", {
|
1951
1951
|
"class": "".concat(classBlock, "__button-text")
|
1952
|
-
}, [t.value.uploadLabel])];
|
1952
|
+
}, [t.value.uploadLabel])])])];
|
1953
1953
|
}
|
1954
1954
|
});
|
1955
1955
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { UploadFile, UploadHanderHooks, UploadProgressEvent, UploadProps, UploadRawFile } from './upload.type';
|
1
|
+
import { SuccessResponse, UploadFile, UploadHanderHooks, UploadProgressEvent, UploadProps, UploadRawFile } from './upload.type';
|
2
2
|
declare const _default: (props: UploadProps, hooks: UploadHanderHooks) => {
|
3
3
|
fileList: import("vue").Ref<{
|
4
4
|
name: string;
|
@@ -15,7 +15,7 @@ declare const _default: (props: UploadProps, hooks: UploadHanderHooks) => {
|
|
15
15
|
handlePreprocess: (file: UploadRawFile) => any;
|
16
16
|
handleRemove: (file: UploadFile | UploadRawFile) => Promise<void>;
|
17
17
|
handleError: (err: Error, rawFile: UploadRawFile, res?: unknown) => Promise<void>;
|
18
|
-
handleSuccess: (res:
|
18
|
+
handleSuccess: (res: SuccessResponse, rawFile: UploadRawFile) => Promise<void>;
|
19
19
|
handleProgress: (event: UploadProgressEvent, rawFile: UploadRawFile) => Promise<void>;
|
20
20
|
};
|
21
21
|
export default _default;
|