bkui-vue 1.0.3-beta.24 → 1.0.3-beta.25
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 +46 -46
- package/dist/index.esm.js +6162 -6148
- package/dist/index.umd.js +46 -46
- package/lib/date-picker/date-picker.d.ts +1 -0
- package/lib/date-picker/index.d.ts +3 -0
- package/lib/date-picker/index.js +8 -8
- package/lib/date-picker/time-picker.d.ts +1 -0
- package/lib/shared/index.js +4 -6
- package/lib/table/components/table-column.d.ts +1 -0
- package/lib/table/index.d.ts +1 -0
- package/lib/table/index.js +20 -0
- package/lib/table-column/index.d.ts +3 -0
- package/lib/table-column/index.js +15 -0
- package/lib/time-picker/index.d.ts +3 -0
- package/package.json +1 -1
@@ -133,6 +133,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
133
133
|
localReadonly: import("vue").ComputedRef<boolean>;
|
134
134
|
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
135
135
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
136
|
+
teleportTo: import("vue").Ref<any>;
|
136
137
|
pickerDropdownRef: import("vue").Ref<any>;
|
137
138
|
inputRef: import("vue").Ref<any>;
|
138
139
|
triggerRef: import("vue").Ref<HTMLElement>;
|
@@ -142,6 +142,7 @@ declare const BkDatePicker: {
|
|
142
142
|
localReadonly: import("vue").ComputedRef<boolean>;
|
143
143
|
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
144
144
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
145
|
+
teleportTo: import("vue").Ref<any>;
|
145
146
|
pickerDropdownRef: import("vue").Ref<any>;
|
146
147
|
inputRef: import("vue").Ref<any>;
|
147
148
|
triggerRef: import("vue").Ref<HTMLElement>;
|
@@ -491,6 +492,7 @@ declare const BkDatePicker: {
|
|
491
492
|
localReadonly: import("vue").ComputedRef<boolean>;
|
492
493
|
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
493
494
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
495
|
+
teleportTo: import("vue").Ref<any>;
|
494
496
|
pickerDropdownRef: import("vue").Ref<any>;
|
495
497
|
inputRef: import("vue").Ref<any>;
|
496
498
|
triggerRef: import("vue").Ref<HTMLElement>;
|
@@ -703,6 +705,7 @@ declare const BkDatePicker: {
|
|
703
705
|
localReadonly: import("vue").ComputedRef<boolean>;
|
704
706
|
allowCrossDayProp: import("vue").ComputedRef<boolean>;
|
705
707
|
ownPickerProps: import("vue").ComputedRef<Record<string, any>>;
|
708
|
+
teleportTo: import("vue").Ref<any>;
|
706
709
|
pickerDropdownRef: import("vue").Ref<any>;
|
707
710
|
inputRef: import("vue").Ref<any>;
|
708
711
|
triggerRef: import("vue").Ref<HTMLElement>;
|
package/lib/date-picker/index.js
CHANGED
@@ -4260,6 +4260,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4260
4260
|
emit = _ref.emit;
|
4261
4261
|
var formItem = (0,shared_namespaceObject.useFormItem)();
|
4262
4262
|
var isRange = props.type.includes('range');
|
4263
|
+
var teleportTo = (0,external_vue_namespaceObject.ref)((0,shared_namespaceObject.getFullscreenRoot)());
|
4263
4264
|
var emptyArray = isRange ? [null, null] : [null];
|
4264
4265
|
var initialArr = isRange ? props.value || props.modelValue : [props.value || props.modelValue];
|
4265
4266
|
var initialValue = isAllEmptyArr(initialArr) ? emptyArray : parseDate(props.value || props.modelValue, props.type, props.multiple, props.format);
|
@@ -4575,6 +4576,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4575
4576
|
if (props.readonly) {
|
4576
4577
|
return;
|
4577
4578
|
}
|
4579
|
+
teleportTo.value = (0,shared_namespaceObject.getFullscreenRoot)();
|
4578
4580
|
state.isFocused = true;
|
4579
4581
|
if (e && e.type === 'focus') {
|
4580
4582
|
return;
|
@@ -4760,6 +4762,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4760
4762
|
localReadonly: localReadonly,
|
4761
4763
|
allowCrossDayProp: allowCrossDayProp,
|
4762
4764
|
ownPickerProps: ownPickerProps,
|
4765
|
+
teleportTo: teleportTo,
|
4763
4766
|
pickerDropdownRef: pickerDropdownRef,
|
4764
4767
|
inputRef: inputRef,
|
4765
4768
|
triggerRef: triggerRef,
|
@@ -4827,9 +4830,6 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4827
4830
|
confirm: this.$slots.confirm
|
4828
4831
|
} : {};
|
4829
4832
|
var slots = date_picker_objectSpread(date_picker_objectSpread({}, shortcutsSlot), confirmSlot);
|
4830
|
-
var teleportTo = (0,external_vue_namespaceObject.computed)(function () {
|
4831
|
-
return (0,shared_namespaceObject.getFullscreenRoot)();
|
4832
|
-
});
|
4833
4833
|
return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
4834
4834
|
"class": [this.resolveClassName('date-picker'), this.type === 'datetimerange' ? 'long' : '', this.longWidthCls]
|
4835
4835
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -4838,7 +4838,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4838
4838
|
"onMouseenter": this.handleInputMouseenter,
|
4839
4839
|
"onMouseleave": this.handleInputMouseleave
|
4840
4840
|
}, [(_this$$slots$trigger = (_this$$slots$trigger2 = (_this$$slots2 = this.$slots).trigger) === null || _this$$slots$trigger2 === void 0 ? void 0 : _this$$slots$trigger2.call(_this$$slots2, this.displayValue)) !== null && _this$$slots$trigger !== void 0 ? _this$$slots$trigger : defaultTrigger]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
|
4841
|
-
"to": teleportTo
|
4841
|
+
"to": this.teleportTo,
|
4842
4842
|
"disabled": !this.appendToBody
|
4843
4843
|
}, {
|
4844
4844
|
"default": function _default() {
|
@@ -4963,6 +4963,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4963
4963
|
emit = _ref.emit;
|
4964
4964
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
4965
4965
|
resolveClassName = _usePrefix.resolveClassName;
|
4966
|
+
var teleportTo = (0,external_vue_namespaceObject.ref)((0,shared_namespaceObject.getFullscreenRoot)());
|
4966
4967
|
var formItem = (0,shared_namespaceObject.useFormItem)();
|
4967
4968
|
var isRange = props.type.includes('range');
|
4968
4969
|
var emptyArray = isRange ? [null, null] : [null];
|
@@ -5275,6 +5276,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5275
5276
|
if (props.readonly) {
|
5276
5277
|
return;
|
5277
5278
|
}
|
5279
|
+
teleportTo.value = (0,shared_namespaceObject.getFullscreenRoot)();
|
5278
5280
|
state.isFocused = true;
|
5279
5281
|
if (e && e.type === 'focus') {
|
5280
5282
|
return;
|
@@ -5462,6 +5464,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5462
5464
|
inputRef: inputRef,
|
5463
5465
|
triggerRef: triggerRef,
|
5464
5466
|
pickerPanelRef: pickerPanelRef,
|
5467
|
+
teleportTo: teleportTo,
|
5465
5468
|
handleClose: handleClose,
|
5466
5469
|
handleIconClick: handleIconClick,
|
5467
5470
|
handleInputMouseenter: handleInputMouseenter,
|
@@ -5517,9 +5520,6 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5517
5520
|
return ((_this$$slots$shortcut = (_this$$slots = _this.$slots).shortcuts) === null || _this$$slots$shortcut === void 0 ? void 0 : _this$$slots$shortcut.call(_this$$slots)) || null;
|
5518
5521
|
}
|
5519
5522
|
} : {};
|
5520
|
-
var teleportTo = (0,external_vue_namespaceObject.computed)(function () {
|
5521
|
-
return (0,shared_namespaceObject.getFullscreenRoot)();
|
5522
|
-
});
|
5523
5523
|
return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
5524
5524
|
"class": [this.resolveClassName('date-picker'), this.type === 'datetimerange' ? 'long' : '', this.longWidthCls]
|
5525
5525
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -5528,7 +5528,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5528
5528
|
"onMouseenter": this.handleInputMouseenter,
|
5529
5529
|
"onMouseleave": this.handleInputMouseleave
|
5530
5530
|
}, [(_this$$slots$trigger = (_this$$slots$trigger2 = (_this$$slots2 = this.$slots).trigger) === null || _this$$slots$trigger2 === void 0 ? void 0 : _this$$slots$trigger2.call(_this$$slots2, this.displayValue)) !== null && _this$$slots$trigger !== void 0 ? _this$$slots$trigger : defaultTrigger]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
|
5531
|
-
"to": teleportTo
|
5531
|
+
"to": this.teleportTo,
|
5532
5532
|
"disabled": !this.appendToBody
|
5533
5533
|
}, {
|
5534
5534
|
"default": function _default() {
|
@@ -165,6 +165,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
165
165
|
inputRef: import("vue").Ref<any>;
|
166
166
|
triggerRef: import("vue").Ref<HTMLElement>;
|
167
167
|
pickerPanelRef: import("vue").Ref<any>;
|
168
|
+
teleportTo: import("vue").Ref<any>;
|
168
169
|
handleClose: (e?: Event) => boolean;
|
169
170
|
handleIconClick: () => void;
|
170
171
|
handleInputMouseenter: () => void;
|
package/lib/shared/index.js
CHANGED
@@ -1336,8 +1336,6 @@ var isFullScreenContainsElement = function isFullScreenContainsElement(target) {
|
|
1336
1336
|
* @returns
|
1337
1337
|
*/
|
1338
1338
|
var getFullscreenRoot = function getFullscreenRoot(selector) {
|
1339
|
-
var _document$fullscreenE3;
|
1340
|
-
console.log('getFullscreenRoot', (_document$fullscreenE3 = document.fullscreenElement) !== null && _document$fullscreenE3 !== void 0 ? _document$fullscreenE3 : document.body);
|
1341
1339
|
if (helper_isElement(selector)) {
|
1342
1340
|
if (isFullScreenContainsElement(selector)) {
|
1343
1341
|
return selector;
|
@@ -1348,10 +1346,10 @@ var getFullscreenRoot = function getFullscreenRoot(selector) {
|
|
1348
1346
|
return getFullscreenRoot(target);
|
1349
1347
|
}
|
1350
1348
|
if (document.fullscreenElement) {
|
1351
|
-
var _document$
|
1352
|
-
if ((_document$
|
1353
|
-
var _document$
|
1354
|
-
return (_document$
|
1349
|
+
var _document$fullscreenE3;
|
1350
|
+
if ((_document$fullscreenE3 = document.fullscreenElement) !== null && _document$fullscreenE3 !== void 0 && _document$fullscreenE3.shadowRoot) {
|
1351
|
+
var _document$fullscreenE4;
|
1352
|
+
return (_document$fullscreenE4 = document.fullscreenElement) === null || _document$fullscreenE4 === void 0 ? void 0 : _document$fullscreenE4.shadowRoot;
|
1355
1353
|
}
|
1356
1354
|
return document.fullscreenElement;
|
1357
1355
|
}
|
@@ -182,6 +182,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
182
182
|
}, unknown, {}, {
|
183
183
|
updateColumnDefine(unmounted?: boolean): void;
|
184
184
|
copyProps(props: ITableColumn): {};
|
185
|
+
rsolveIndexedColumn(): boolean;
|
185
186
|
updateColumnDefineByParent(): void;
|
186
187
|
unmountColumn(): void;
|
187
188
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
package/lib/table/index.d.ts
CHANGED
@@ -1455,6 +1455,7 @@ declare const BkTable: {
|
|
1455
1455
|
default: number;
|
1456
1456
|
};
|
1457
1457
|
}>>): {};
|
1458
|
+
rsolveIndexedColumn(): boolean;
|
1458
1459
|
updateColumnDefineByParent(): void;
|
1459
1460
|
unmountColumn(): void;
|
1460
1461
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
package/lib/table/index.js
CHANGED
@@ -753,8 +753,23 @@ var TableColumnProp = {
|
|
753
753
|
return Object.assign(result, defineProperty_defineProperty({}, target, props[key]));
|
754
754
|
}, {});
|
755
755
|
},
|
756
|
+
rsolveIndexedColumn: function rsolveIndexedColumn() {
|
757
|
+
// 如果是设置了Index,则先添加Index列,不做自动递归读取Column
|
758
|
+
if (/\d+\.?\d*/.test("".concat(this.$props.index))) {
|
759
|
+
var resolveProp = Object.assign({}, this.copyProps(this.$props), {
|
760
|
+
field: this.$props.prop || this.$props.field,
|
761
|
+
render: this.$slots["default"]
|
762
|
+
});
|
763
|
+
this.initColumns(resolveProp);
|
764
|
+
return false;
|
765
|
+
}
|
766
|
+
return true;
|
767
|
+
},
|
756
768
|
updateColumnDefineByParent: function updateColumnDefineByParent() {
|
757
769
|
var _this = this;
|
770
|
+
if (!this.rsolveIndexedColumn()) {
|
771
|
+
return;
|
772
|
+
}
|
758
773
|
var fn = function fn() {
|
759
774
|
// @ts-ignore
|
760
775
|
var selfVnode = _this._;
|
@@ -4070,6 +4085,11 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
4070
4085
|
/* harmony default export */ const use_column = (function (props, targetColumns) {
|
4071
4086
|
var _props$columns;
|
4072
4087
|
var resolvedColumns = (0,external_vue_namespaceObject.reactive)((_props$columns = props.columns) !== null && _props$columns !== void 0 ? _props$columns : []);
|
4088
|
+
/**
|
4089
|
+
* 初始化Column配置
|
4090
|
+
* @param column 传入
|
4091
|
+
* @param remove 是否移除当前列
|
4092
|
+
*/
|
4073
4093
|
var initColumns = function initColumns(column) {
|
4074
4094
|
var remove = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
4075
4095
|
var resolveColumns = [];
|
@@ -179,6 +179,7 @@ declare const BkTableColumn: {
|
|
179
179
|
default: number;
|
180
180
|
};
|
181
181
|
}>>): {};
|
182
|
+
rsolveIndexedColumn(): boolean;
|
182
183
|
updateColumnDefineByParent(): void;
|
183
184
|
unmountColumn(): void;
|
184
185
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
@@ -425,6 +426,7 @@ declare const BkTableColumn: {
|
|
425
426
|
default: number;
|
426
427
|
};
|
427
428
|
}>>): {};
|
429
|
+
rsolveIndexedColumn(): boolean;
|
428
430
|
updateColumnDefineByParent(): void;
|
429
431
|
unmountColumn(): void;
|
430
432
|
}, {
|
@@ -619,6 +621,7 @@ declare const BkTableColumn: {
|
|
619
621
|
default: number;
|
620
622
|
};
|
621
623
|
}>>): {};
|
624
|
+
rsolveIndexedColumn(): boolean;
|
622
625
|
updateColumnDefineByParent(): void;
|
623
626
|
unmountColumn(): void;
|
624
627
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
@@ -714,8 +714,23 @@ var TableColumnProp = {
|
|
714
714
|
return Object.assign(result, _defineProperty({}, target, props[key]));
|
715
715
|
}, {});
|
716
716
|
},
|
717
|
+
rsolveIndexedColumn: function rsolveIndexedColumn() {
|
718
|
+
// 如果是设置了Index,则先添加Index列,不做自动递归读取Column
|
719
|
+
if (/\d+\.?\d*/.test("".concat(this.$props.index))) {
|
720
|
+
var resolveProp = Object.assign({}, this.copyProps(this.$props), {
|
721
|
+
field: this.$props.prop || this.$props.field,
|
722
|
+
render: this.$slots["default"]
|
723
|
+
});
|
724
|
+
this.initColumns(resolveProp);
|
725
|
+
return false;
|
726
|
+
}
|
727
|
+
return true;
|
728
|
+
},
|
717
729
|
updateColumnDefineByParent: function updateColumnDefineByParent() {
|
718
730
|
var _this = this;
|
731
|
+
if (!this.rsolveIndexedColumn()) {
|
732
|
+
return;
|
733
|
+
}
|
719
734
|
var fn = function fn() {
|
720
735
|
// @ts-ignore
|
721
736
|
var selfVnode = _this._;
|
@@ -172,6 +172,7 @@ declare const BkTimePicker: {
|
|
172
172
|
inputRef: import("vue").Ref<any>;
|
173
173
|
triggerRef: import("vue").Ref<HTMLElement>;
|
174
174
|
pickerPanelRef: import("vue").Ref<any>;
|
175
|
+
teleportTo: import("vue").Ref<any>;
|
175
176
|
handleClose: (e?: Event) => boolean;
|
176
177
|
handleIconClick: () => void;
|
177
178
|
handleInputMouseenter: () => void;
|
@@ -576,6 +577,7 @@ declare const BkTimePicker: {
|
|
576
577
|
inputRef: import("vue").Ref<any>;
|
577
578
|
triggerRef: import("vue").Ref<HTMLElement>;
|
578
579
|
pickerPanelRef: import("vue").Ref<any>;
|
580
|
+
teleportTo: import("vue").Ref<any>;
|
579
581
|
handleClose: (e?: Event) => boolean;
|
580
582
|
handleIconClick: () => void;
|
581
583
|
handleInputMouseenter: () => void;
|
@@ -820,6 +822,7 @@ declare const BkTimePicker: {
|
|
820
822
|
inputRef: import("vue").Ref<any>;
|
821
823
|
triggerRef: import("vue").Ref<HTMLElement>;
|
822
824
|
pickerPanelRef: import("vue").Ref<any>;
|
825
|
+
teleportTo: import("vue").Ref<any>;
|
823
826
|
handleClose: (e?: Event) => boolean;
|
824
827
|
handleIconClick: () => void;
|
825
828
|
handleInputMouseenter: () => void;
|