bkui-vue 2.0.2-beta.99 → 2.1.0-dev-beta.2

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.
@@ -485,12 +485,10 @@ function renderContent(opts) {
485
485
  theme = opts.theme,
486
486
  extCls = opts.extCls;
487
487
  var isLight = theme === 'light';
488
- var zIndex = shared_.bkZIndexManager.getPopperIndex();
489
488
  var content = document.createElement('div');
490
489
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
491
490
  content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
492
491
  content.innerText = value;
493
- content.style.zIndex = String(zIndex);
494
492
  renderContext(value, content);
495
493
  if (hasArrow) {
496
494
  var arrow = renderArrow();
@@ -569,6 +567,7 @@ function show(el) {
569
567
  _opts$modifiers = opts.modifiers,
570
568
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
571
569
  if (disabled) return;
570
+ popper.style.zIndex = String(shared_.bkZIndexManager.getPopperIndex());
572
571
  renderContext(content, popper);
573
572
  if (hasArrow) {
574
573
  var arrow = renderArrow();
@@ -476,12 +476,10 @@ function renderContent(opts) {
476
476
  theme = opts.theme,
477
477
  extCls = opts.extCls;
478
478
  var isLight = theme === 'light';
479
- var zIndex = shared_.bkZIndexManager.getPopperIndex();
480
479
  var content = document.createElement('div');
481
480
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
482
481
  content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
483
482
  content.innerText = value;
484
- content.style.zIndex = String(zIndex);
485
483
  renderContext(value, content);
486
484
  if (hasArrow) {
487
485
  var arrow = renderArrow();
@@ -560,6 +558,7 @@ function show(el) {
560
558
  _opts$modifiers = opts.modifiers,
561
559
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
562
560
  if (disabled) return;
561
+ popper.style.zIndex = String(shared_.bkZIndexManager.getPopperIndex());
563
562
  renderContext(content, popper);
564
563
  if (hasArrow) {
565
564
  var arrow = renderArrow();
@@ -480,12 +480,10 @@ function renderContent(opts) {
480
480
  theme = opts.theme,
481
481
  extCls = opts.extCls;
482
482
  var isLight = theme === 'light';
483
- var zIndex = shared_.bkZIndexManager.getPopperIndex();
484
483
  var content = document.createElement('div');
485
484
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
486
485
  content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
487
486
  content.innerText = value;
488
- content.style.zIndex = String(zIndex);
489
487
  renderContext(value, content);
490
488
  if (hasArrow) {
491
489
  var arrow = renderArrow();
@@ -564,6 +562,7 @@ function show(el) {
564
562
  _opts$modifiers = opts.modifiers,
565
563
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
566
564
  if (disabled) return;
565
+ popper.style.zIndex = String(shared_.bkZIndexManager.getPopperIndex());
567
566
  renderContext(content, popper);
568
567
  if (hasArrow) {
569
568
  var arrow = renderArrow();
@@ -44,6 +44,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
44
44
  } & {
45
45
  default: boolean;
46
46
  };
47
+ showContentClass: import("vue-types").VueTypeValidableDef<boolean> & {
48
+ default: boolean;
49
+ } & {
50
+ default: boolean;
51
+ };
47
52
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
48
53
  default: string | boolean | (() => HTMLElement);
49
54
  };
@@ -158,6 +163,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
158
163
  } & {
159
164
  default: boolean;
160
165
  };
166
+ showContentClass: import("vue-types").VueTypeValidableDef<boolean> & {
167
+ default: boolean;
168
+ } & {
169
+ default: boolean;
170
+ };
161
171
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
162
172
  default: string | boolean | (() => HTMLElement);
163
173
  };
@@ -253,5 +263,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
253
263
  footerAlign: "right" | "left" | "center";
254
264
  confirmButtonTheme: "danger" | "primary" | "success" | "warning";
255
265
  isLoading: boolean;
266
+ showContentClass: boolean;
256
267
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
257
268
  export default _default;
@@ -45,6 +45,11 @@ declare const BkDialog: {
45
45
  } & {
46
46
  default: boolean;
47
47
  };
48
+ showContentClass: import("vue-types").VueTypeValidableDef<boolean> & {
49
+ default: boolean;
50
+ } & {
51
+ default: boolean;
52
+ };
48
53
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
49
54
  default: string | boolean | (() => HTMLElement);
50
55
  };
@@ -148,6 +153,7 @@ declare const BkDialog: {
148
153
  footerAlign: "right" | "left" | "center";
149
154
  confirmButtonTheme: "danger" | "primary" | "success" | "warning";
150
155
  isLoading: boolean;
156
+ showContentClass: boolean;
151
157
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
152
158
  P: {};
153
159
  B: {};
@@ -201,6 +207,11 @@ declare const BkDialog: {
201
207
  } & {
202
208
  default: boolean;
203
209
  };
210
+ showContentClass: import("vue-types").VueTypeValidableDef<boolean> & {
211
+ default: boolean;
212
+ } & {
213
+ default: boolean;
214
+ };
204
215
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
205
216
  default: string | boolean | (() => HTMLElement);
206
217
  };
@@ -296,6 +307,7 @@ declare const BkDialog: {
296
307
  footerAlign: "right" | "left" | "center";
297
308
  confirmButtonTheme: "danger" | "primary" | "success" | "warning";
298
309
  isLoading: boolean;
310
+ showContentClass: boolean;
299
311
  }>;
300
312
  __isFragment?: never;
301
313
  __isTeleport?: never;
@@ -346,6 +358,11 @@ declare const BkDialog: {
346
358
  } & {
347
359
  default: boolean;
348
360
  };
361
+ showContentClass: import("vue-types").VueTypeValidableDef<boolean> & {
362
+ default: boolean;
363
+ } & {
364
+ default: boolean;
365
+ };
349
366
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
350
367
  default: string | boolean | (() => HTMLElement);
351
368
  };
@@ -449,5 +466,6 @@ declare const BkDialog: {
449
466
  footerAlign: "right" | "left" | "center";
450
467
  confirmButtonTheme: "danger" | "primary" | "success" | "warning";
451
468
  isLoading: boolean;
469
+ showContentClass: boolean;
452
470
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[], any[]>;
453
471
  export default BkDialog;
@@ -45,7 +45,7 @@ const shared_namespaceObject = x({ ["AlignEnum"]: () => __WEBPACK_EXTERNAL_MODUL
45
45
  ;// CONCATENATED MODULE: external "vue"
46
46
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
47
47
  var external_vue_y = x => () => x
48
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["useAttrs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs, ["useSlots"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.useSlots });
48
+ const external_vue_namespaceObject = external_vue_x({ ["Comment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Comment, ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["useAttrs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs, ["useSlots"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.useSlots });
49
49
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
50
50
  function _typeof(o) {
51
51
  "@babel/helpers - typeof";
@@ -208,6 +208,8 @@ var props = _objectSpread(_objectSpread({}, dialogProps), {}, {
208
208
  dialogType: (0,shared_namespaceObject.dialogTypeUnion)(),
209
209
  // 按钮loading
210
210
  isLoading: shared_namespaceObject.PropTypes.bool.def(false),
211
+ // 是否为默认内容区包裹 dialog-content 样式类
212
+ showContentClass: shared_namespaceObject.PropTypes.bool.def(true),
211
213
  // 是否显示在body内即与#app同级
212
214
  transfer: shared_namespaceObject.PropTypes.oneOfType([Boolean, String, HTMLElement]).def(true)
213
215
  });
@@ -397,10 +399,25 @@ function _isSlot(s) {
397
399
  isMoveing.value = false;
398
400
  };
399
401
  };
402
+ var _isSlotContentEmpty = function isSlotContentEmpty(content) {
403
+ if (!content) return true;
404
+ if (Array.isArray(content)) return content.every(_isSlotContentEmpty);
405
+ if (!(0,external_vue_namespaceObject.isVNode)(content)) return false;
406
+ if (content.type === external_vue_namespaceObject.Comment) return true;
407
+ if (content.type === external_vue_namespaceObject.Fragment) return _isSlotContentEmpty(content.children);
408
+ return false;
409
+ };
400
410
  return function () {
411
+ var _slots$header;
412
+ var headerSlotContent = (_slots$header = slots.header) === null || _slots$header === void 0 ? void 0 : _slots$header.call(slots);
413
+ var hasHeaderSlot = !!slots.header;
414
+ var shouldRenderHeader = hasHeaderSlot ? !_isSlotContentEmpty(headerSlotContent) : Boolean(props.title);
401
415
  var dialogSlot = {
402
416
  header: function header() {
403
- var _slots$tools, _slots$header, _slots$header2;
417
+ var _slots$tools;
418
+ if (!shouldRenderHeader) {
419
+ return null;
420
+ }
404
421
  return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!props.fullscreen && props.draggable && (0,external_vue_namespaceObject.createVNode)("div", {
405
422
  "class": resolveClassName('dialog-tool'),
406
423
  "onMousedown": handleMousedown
@@ -409,12 +426,19 @@ function _isSlot(s) {
409
426
  }, [(0,external_vue_namespaceObject.createVNode)("span", {
410
427
  "style": "text-align: ".concat(props.headerAlign),
411
428
  "class": resolveClassName('dialog-title')
412
- }, [(_slots$header = (_slots$header2 = slots.header) === null || _slots$header2 === void 0 ? void 0 : _slots$header2.call(slots)) !== null && _slots$header !== void 0 ? _slots$header : props.title])])]);
429
+ }, [hasHeaderSlot ? headerSlotContent : props.title])])]);
413
430
  },
414
431
  "default": function _default() {
432
+ if (!slots["default"]) {
433
+ return null;
434
+ }
435
+ var defaultSlotContent = slots["default"]();
436
+ if (!props.showContentClass) {
437
+ return defaultSlotContent;
438
+ }
415
439
  return (0,external_vue_namespaceObject.createVNode)("div", {
416
440
  "class": resolveClassName('dialog-content')
417
- }, [slots["default"]()]);
441
+ }, [defaultSlotContent]);
418
442
  },
419
443
  footer: function footer() {
420
444
  if (slots.footer) {
@@ -44,6 +44,11 @@ declare const props: {
44
44
  } & {
45
45
  default: boolean;
46
46
  };
47
+ showContentClass: import("vue-types").VueTypeValidableDef<boolean> & {
48
+ default: boolean;
49
+ } & {
50
+ default: boolean;
51
+ };
47
52
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
48
53
  default: string | boolean | (() => HTMLElement);
49
54
  };
@@ -1339,12 +1339,10 @@ function renderContent(opts) {
1339
1339
  theme = opts.theme,
1340
1340
  extCls = opts.extCls;
1341
1341
  var isLight = theme === 'light';
1342
- var zIndex = shared_.bkZIndexManager.getPopperIndex();
1343
1342
  var content = document.createElement('div');
1344
1343
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1345
1344
  content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
1346
1345
  content.innerText = value;
1347
- content.style.zIndex = String(zIndex);
1348
1346
  renderContext(value, content);
1349
1347
  if (hasArrow) {
1350
1348
  var arrow = renderArrow();
@@ -1423,6 +1421,7 @@ function show(el) {
1423
1421
  _opts$modifiers = opts.modifiers,
1424
1422
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
1425
1423
  if (disabled) return;
1424
+ popper.style.zIndex = String(shared_.bkZIndexManager.getPopperIndex());
1426
1425
  renderContext(content, popper);
1427
1426
  if (hasArrow) {
1428
1427
  var arrow = renderArrow();
package/lib/form/index.js CHANGED
@@ -480,12 +480,10 @@ function renderContent(opts) {
480
480
  theme = opts.theme,
481
481
  extCls = opts.extCls;
482
482
  var isLight = theme === 'light';
483
- var zIndex = shared_.bkZIndexManager.getPopperIndex();
484
483
  var content = document.createElement('div');
485
484
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
486
485
  content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
487
486
  content.innerText = value;
488
- content.style.zIndex = String(zIndex);
489
487
  renderContext(value, content);
490
488
  if (hasArrow) {
491
489
  var arrow = renderArrow();
@@ -564,6 +562,7 @@ function show(el) {
564
562
  _opts$modifiers = opts.modifiers,
565
563
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
566
564
  if (disabled) return;
565
+ popper.style.zIndex = String(shared_.bkZIndexManager.getPopperIndex());
567
566
  renderContext(content, popper);
568
567
  if (hasArrow) {
569
568
  var arrow = renderArrow();
@@ -1230,12 +1230,10 @@ function renderContent(opts) {
1230
1230
  theme = opts.theme,
1231
1231
  extCls = opts.extCls;
1232
1232
  var isLight = theme === 'light';
1233
- var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
1234
1233
  var content = document.createElement('div');
1235
1234
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1236
1235
  content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
1237
1236
  content.innerText = value;
1238
- content.style.zIndex = String(zIndex);
1239
1237
  renderContext(value, content);
1240
1238
  if (hasArrow) {
1241
1239
  var arrow = renderArrow();
@@ -1314,6 +1312,7 @@ function show(el) {
1314
1312
  _opts$modifiers = opts.modifiers,
1315
1313
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
1316
1314
  if (disabled) return;
1315
+ popper.style.zIndex = String(shared_namespaceObject.bkZIndexManager.getPopperIndex());
1317
1316
  renderContext(content, popper);
1318
1317
  if (hasArrow) {
1319
1318
  var arrow = renderArrow();
package/lib/index.js CHANGED
@@ -3,5 +3,5 @@ export * from './hooks';
3
3
  export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
- export const version = "2.0.2-beta.99";
6
+ export const version = "2.1.0-dev-beta.2";
7
7
  window.__bkui_vue_version__ = version;
@@ -125,8 +125,8 @@ declare const BkInput: {
125
125
  onKeypress?: (_value: any, _evt: KeyboardEvent) => any;
126
126
  onKeyup?: (_value: any, _evt: KeyboardEvent) => any;
127
127
  onPaste?: (_value: any, _e: ClipboardEvent) => any;
128
- "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
129
128
  onSearch?: (evt: Event) => any;
129
+ "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
130
130
  }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
131
131
  "update:modelValue": (_value: any, _evt: KeyboardEvent) => any;
132
132
  focus: (evt: FocusEvent) => FocusEvent;
@@ -307,8 +307,8 @@ declare const BkInput: {
307
307
  onKeypress?: (_value: any, _evt: KeyboardEvent) => any;
308
308
  onKeyup?: (_value: any, _evt: KeyboardEvent) => any;
309
309
  onPaste?: (_value: any, _e: ClipboardEvent) => any;
310
- "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
311
310
  onSearch?: (evt: Event) => any;
311
+ "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
312
312
  }>, () => JSX.Element, {}, {}, {}, {
313
313
  type: string;
314
314
  prefix: string;
@@ -468,8 +468,8 @@ declare const BkInput: {
468
468
  onKeypress?: (_value: any, _evt: KeyboardEvent) => any;
469
469
  onKeyup?: (_value: any, _evt: KeyboardEvent) => any;
470
470
  onPaste?: (_value: any, _e: ClipboardEvent) => any;
471
- "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
472
471
  onSearch?: (evt: Event) => any;
472
+ "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
473
473
  }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
474
474
  "update:modelValue": (_value: any, _evt: KeyboardEvent) => any;
475
475
  focus: (evt: FocusEvent) => FocusEvent;
@@ -1296,12 +1296,10 @@ function renderContent(opts) {
1296
1296
  theme = opts.theme,
1297
1297
  extCls = opts.extCls;
1298
1298
  var isLight = theme === 'light';
1299
- var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
1300
1299
  var content = document.createElement('div');
1301
1300
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1302
1301
  content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
1303
1302
  content.innerText = value;
1304
- content.style.zIndex = String(zIndex);
1305
1303
  renderContext(value, content);
1306
1304
  if (hasArrow) {
1307
1305
  var arrow = renderArrow();
@@ -1380,6 +1378,7 @@ function show(el) {
1380
1378
  _opts$modifiers = opts.modifiers,
1381
1379
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
1382
1380
  if (disabled) return;
1381
+ popper.style.zIndex = String(shared_namespaceObject.bkZIndexManager.getPopperIndex());
1383
1382
  renderContext(content, popper);
1384
1383
  if (hasArrow) {
1385
1384
  var arrow = renderArrow();
@@ -1660,8 +1659,8 @@ var EVENTS;
1660
1659
  EVENTS["KEYPRESS"] = "keypress";
1661
1660
  EVENTS["KEYUP"] = "keyup";
1662
1661
  EVENTS["PASTE"] = "paste";
1663
- EVENTS["UPDATE"] = "update:modelValue";
1664
1662
  EVENTS["SEARCH"] = "search";
1663
+ EVENTS["UPDATE"] = "update:modelValue";
1665
1664
  })(EVENTS || (EVENTS = {}));
1666
1665
  /* eslint-disable-next-line */
1667
1666
  function EventFunction(_value, _evt) {
@@ -1937,7 +1936,16 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
1937
1936
  if (val === '' || val === null || val === undefined) {
1938
1937
  return '';
1939
1938
  }
1940
- return (+val).toFixed(precision);
1939
+ // 输入过程中只截断超出 precision 的多余小数位,不用 toFixed 补零
1940
+ // 完整的精度格式化在 CHANGE(失焦)时由 handleNumber 处理
1941
+ var dotIndex = val.indexOf('.');
1942
+ if (precision === 0) {
1943
+ return dotIndex > -1 ? val.slice(0, dotIndex) : val;
1944
+ }
1945
+ if (dotIndex > -1 && val.length - dotIndex - 1 > precision) {
1946
+ return val.slice(0, dotIndex + precision + 1);
1947
+ }
1948
+ return val;
1941
1949
  }() : e.target.value, e);
1942
1950
  } else if (eventName === EVENTS.CHANGE && isNumberInput.value) {
1943
1951
  var _val = handleNumber(e.target.value, 0);
@@ -131,8 +131,8 @@ export declare const enum EVENTS {
131
131
  KEYPRESS = "keypress",
132
132
  KEYUP = "keyup",
133
133
  PASTE = "paste",
134
- UPDATE = "update:modelValue",
135
- SEARCH = "search"
134
+ SEARCH = "search",
135
+ UPDATE = "update:modelValue"
136
136
  }
137
137
  declare function EventFunction(_value: any, _evt: KeyboardEvent): any;
138
138
  declare function PastEventFunction(_value: any, _e: ClipboardEvent): boolean;
@@ -409,8 +409,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
409
409
  onKeypress?: (_value: any, _evt: KeyboardEvent) => any;
410
410
  onKeyup?: (_value: any, _evt: KeyboardEvent) => any;
411
411
  onPaste?: (_value: any, _e: ClipboardEvent) => any;
412
- "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
413
412
  onSearch?: (evt: Event) => any;
413
+ "onUpdate:modelValue"?: (_value: any, _evt: KeyboardEvent) => any;
414
414
  }>, {
415
415
  type: string;
416
416
  prefix: string;
@@ -142,7 +142,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
142
142
  styles: import("vue").ComputedRef<{
143
143
  top: string;
144
144
  zIndex: number;
145
- position: "fixed" | "absolute";
145
+ position: "absolute" | "fixed";
146
146
  } & ({
147
147
  maxWidth: any;
148
148
  minWidth: any;
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties, type Ref, type ComputedRef } from 'vue';
2
- import { type Placement, type MiddlewareData } from '@floating-ui/vue';
2
+ import { type Placement, type Strategy, type MiddlewareData } from '@floating-ui/vue';
3
3
  import type { IAxesOffsets, PopoverPlacement, VirtualElement } from '../types';
4
4
  export interface UseFloatingProps {
5
5
  /** 弹出位置 */
@@ -16,6 +16,8 @@ export interface UseFloatingProps {
16
16
  autoVisibility: boolean;
17
17
  /** 是否禁用 transform 定位 */
18
18
  disableTransform: boolean;
19
+ /** 定位策略:'fixed' 不会导致容器产生滚动溢出 */
20
+ strategy: Strategy;
19
21
  /** 当前是否显示 */
20
22
  isOpen: boolean;
21
23
  }
@@ -2853,6 +2853,9 @@ function usePopoverFloating(props, referenceRef, floatingRef, arrowRef) {
2853
2853
  placement: (0,external_vue_namespaceObject.computed)(function () {
2854
2854
  return props.value.placement;
2855
2855
  }),
2856
+ strategy: (0,external_vue_namespaceObject.computed)(function () {
2857
+ return props.value.strategy;
2858
+ }),
2856
2859
  middleware: middleware,
2857
2860
  whileElementsMounted: autoUpdate,
2858
2861
  transform: (0,external_vue_namespaceObject.computed)(function () {
@@ -3476,6 +3479,15 @@ var EMIT_EVENTS = {
3476
3479
  toggle = _useDelay.toggle,
3477
3480
  stopHide = _useDelay.stopHide,
3478
3481
  clearTimers = _useDelay.clearTimers;
3482
+ var floatingStrategy = (0,external_vue_namespaceObject.computed)(function () {
3483
+ if (disableTeleport.value) return 'absolute';
3484
+ var b = boundary.value;
3485
+ if (typeof b === 'string') {
3486
+ return b === 'body' || b === 'parent' ? 'fixed' : 'absolute';
3487
+ }
3488
+ if (b === document.body) return 'fixed';
3489
+ return 'absolute';
3490
+ });
3479
3491
  // 浮动定位
3480
3492
  var floatingProps = (0,external_vue_namespaceObject.computed)(function () {
3481
3493
  return {
@@ -3486,6 +3498,7 @@ var EMIT_EVENTS = {
3486
3498
  autoPlacement: autoPlacement.value,
3487
3499
  autoVisibility: autoVisibility.value,
3488
3500
  disableTransform: disableTransform.value,
3501
+ strategy: floatingStrategy.value,
3489
3502
  isOpen: isOpen.value
3490
3503
  };
3491
3504
  });
@@ -3675,32 +3688,9 @@ var EMIT_EVENTS = {
3675
3688
  }
3676
3689
  return classes.filter(Boolean);
3677
3690
  });
3678
- // 计算 data-theme 属性(只取基础主题部分)
3691
+ // 计算 data-theme 属性(与旧版保持一致,完整 theme 字符串写入 data-theme)
3679
3692
  var dataTheme = (0,external_vue_namespaceObject.computed)(function () {
3680
- var _parseTheme2 = parseTheme(theme.value),
3681
- baseTheme = _parseTheme2.baseTheme;
3682
- return baseTheme;
3683
- });
3684
- /**
3685
- * 兼容旧样式约定:
3686
- * 一些组件(如 table settings)会在主题 class 上再依赖一个 data-xxx-theme 标记来开启样式。
3687
- * 例如:`.bk-table-settings[data-bk-table-settings-theme='true']`
3688
- *
3689
- * 这里根据 theme 里解析出的额外 class 自动补齐对应的 data 属性,确保旧用法不需要改调用方。
3690
- */
3691
- var extraThemeDataAttrs = (0,external_vue_namespaceObject.computed)(function () {
3692
- var _parseTheme3 = parseTheme(theme.value),
3693
- extraClasses = _parseTheme3.extraClasses;
3694
- var attrs = {};
3695
- extraClasses.forEach(function (cls) {
3696
- var normalized = String(cls || '').trim().toLowerCase();
3697
- // data-* 属性名只允许字母/数字/连字符/下划线
3698
- if (!normalized || !/^[a-z0-9_-]+$/.test(normalized)) {
3699
- return;
3700
- }
3701
- attrs["data-".concat(normalized, "-theme")] = 'true';
3702
- });
3703
- return attrs;
3693
+ return theme.value;
3704
3694
  });
3705
3695
  // 处理 clickoutside
3706
3696
  var handleClickOutside = function handleClickOutside(event) {
@@ -3917,8 +3907,7 @@ var EMIT_EVENTS = {
3917
3907
  }),
3918
3908
  "class": contentClass.value,
3919
3909
  "data-bk-popover-id": popoverId,
3920
- "data-theme": dataTheme.value
3921
- }, extraThemeDataAttrs.value, {
3910
+ "data-theme": dataTheme.value,
3922
3911
  "data-arrow": arrowSide.value,
3923
3912
  "onClick": handleClickContent
3924
3913
  }, guardedFloatingListeners.value), [arrow.value && (0,external_vue_namespaceObject.createVNode)("div", {
@@ -74,8 +74,8 @@ declare const BkProgress: {
74
74
  }>[] | JSX.Element;
75
75
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
76
76
  type: "circle" | "line" | "dashboard";
77
- width: number;
78
77
  fixed: number;
78
+ width: number;
79
79
  color: string;
80
80
  theme: "danger" | "primary" | "success" | "warning";
81
81
  extCls: string;
@@ -171,8 +171,8 @@ declare const BkProgress: {
171
171
  }>[] | JSX.Element;
172
172
  }, {
173
173
  type: "circle" | "line" | "dashboard";
174
- width: number;
175
174
  fixed: number;
175
+ width: number;
176
176
  color: string;
177
177
  theme: "danger" | "primary" | "success" | "warning";
178
178
  extCls: string;
@@ -265,8 +265,8 @@ declare const BkProgress: {
265
265
  }>[] | JSX.Element;
266
266
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
267
267
  type: "circle" | "line" | "dashboard";
268
- width: number;
269
268
  fixed: number;
269
+ width: number;
270
270
  color: string;
271
271
  theme: "danger" | "primary" | "success" | "warning";
272
272
  extCls: string;
@@ -210,8 +210,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
210
210
  };
211
211
  }>> & Readonly<{}>, {
212
212
  type: "circle" | "line" | "dashboard";
213
- width: number;
214
213
  fixed: number;
214
+ width: number;
215
215
  color: string;
216
216
  theme: "danger" | "primary" | "success" | "warning";
217
217
  extCls: string;
@@ -1229,12 +1229,10 @@ function renderContent(opts) {
1229
1229
  theme = opts.theme,
1230
1230
  extCls = opts.extCls;
1231
1231
  var isLight = theme === 'light';
1232
- var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
1233
1232
  var content = document.createElement('div');
1234
1233
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1235
1234
  content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
1236
1235
  content.innerText = value;
1237
- content.style.zIndex = String(zIndex);
1238
1236
  renderContext(value, content);
1239
1237
  if (hasArrow) {
1240
1238
  var arrow = renderArrow();
@@ -1313,6 +1311,7 @@ function show(el) {
1313
1311
  _opts$modifiers = opts.modifiers,
1314
1312
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
1315
1313
  if (disabled) return;
1314
+ popper.style.zIndex = String(shared_namespaceObject.bkZIndexManager.getPopperIndex());
1316
1315
  renderContext(content, popper);
1317
1316
  if (hasArrow) {
1318
1317
  var arrow = renderArrow();
@@ -1436,12 +1436,10 @@ function renderContent(opts) {
1436
1436
  theme = opts.theme,
1437
1437
  extCls = opts.extCls;
1438
1438
  var isLight = theme === 'light';
1439
- var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
1440
1439
  var content = document.createElement('div');
1441
1440
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1442
1441
  content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
1443
1442
  content.innerText = value;
1444
- content.style.zIndex = String(zIndex);
1445
1443
  renderContext(value, content);
1446
1444
  if (hasArrow) {
1447
1445
  var arrow = renderArrow();
@@ -1520,6 +1518,7 @@ function show(el) {
1520
1518
  _opts$modifiers = opts.modifiers,
1521
1519
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
1522
1520
  if (disabled) return;
1521
+ popper.style.zIndex = String(shared_namespaceObject.bkZIndexManager.getPopperIndex());
1523
1522
  renderContext(content, popper);
1524
1523
  if (hasArrow) {
1525
1524
  var arrow = renderArrow();
package/lib/tab/index.js CHANGED
@@ -1375,12 +1375,10 @@ function renderContent(opts) {
1375
1375
  theme = opts.theme,
1376
1376
  extCls = opts.extCls;
1377
1377
  var isLight = theme === 'light';
1378
- var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
1379
1378
  var content = document.createElement('div');
1380
1379
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1381
1380
  content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
1382
1381
  content.innerText = value;
1383
- content.style.zIndex = String(zIndex);
1384
1382
  renderContext(value, content);
1385
1383
  if (hasArrow) {
1386
1384
  var arrow = renderArrow();
@@ -1459,6 +1457,7 @@ function show(el) {
1459
1457
  _opts$modifiers = opts.modifiers,
1460
1458
  modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
1461
1459
  if (disabled) return;
1460
+ popper.style.zIndex = String(shared_namespaceObject.bkZIndexManager.getPopperIndex());
1462
1461
  renderContext(content, popper);
1463
1462
  if (hasArrow) {
1464
1463
  var arrow = renderArrow();
@@ -18,6 +18,7 @@ declare const _default: (props: TablePropTypes, ctx: any) => {
18
18
  setHeaderRowCount: (val: number) => void;
19
19
  initRootStyleVars: () => void;
20
20
  translateX: Ref<number, number>;
21
+ headHeight: import("vue").ComputedRef<number>;
21
22
  refRoot: Ref<HTMLElement, HTMLElement>;
22
23
  refHead: Ref<HTMLElement, HTMLElement>;
23
24
  refBody: Ref<any, any>;