bkui-vue 2.0.2-beta.89 → 2.0.2-beta.90

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/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.89";
6
+ export const version = "2.0.2-beta.90";
7
7
  window.__bkui_vue_version__ = version;
@@ -607,7 +607,7 @@ sliderProps.width["default"] = '400';
607
607
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
608
608
  resolveClassName = _usePrefix.resolveClassName;
609
609
  // 拖拽相关状态
610
- var currentWidth = (0,external_vue_namespaceObject.ref)(typeof props.width === 'number' ? props.width : parseInt(props.width) || 400);
610
+ var currentWidth = (0,external_vue_namespaceObject.ref)(props.width);
611
611
  // 代理线
612
612
  var resizeProxyRef = (0,external_vue_namespaceObject.ref)(null);
613
613
  // 遮罩
@@ -706,10 +706,8 @@ sliderProps.width["default"] = '400';
706
706
  emit('before-resize', mouseEvent);
707
707
  var rect = (_modalWrapperRef$valu = modalWrapperRef.value) === null || _modalWrapperRef$valu === void 0 ? void 0 : _modalWrapperRef$valu.getBoundingClientRect();
708
708
  if (!rect) return;
709
- // immediate 模式下,先同步 currentWidth 为实际宽度,避免闪动
710
- if (props.immediate) {
711
- currentWidth.value = rect.width;
712
- }
709
+ // 拖拽开始时,将 currentWidth 设置为实际像素宽度作为基准
710
+ currentWidth.value = rect.width;
713
711
  state.value = Object.freeze({
714
712
  mouse: {
715
713
  clientX: mouseEvent.clientX
@@ -758,12 +756,11 @@ sliderProps.width["default"] = '400';
758
756
  document.addEventListener('mousemove', handleMouseMove);
759
757
  document.addEventListener('mouseup', handleMouseUp);
760
758
  };
761
- // 监听 width prop 变化
759
+ // 监听 width prop 变化,保持用户设置的原值
762
760
  (0,external_vue_namespaceObject.watch)(function () {
763
761
  return props.width;
764
762
  }, function (newWidth) {
765
- var width = typeof newWidth === 'number' ? newWidth : parseInt(newWidth) || 400;
766
- currentWidth.value = width;
763
+ currentWidth.value = newWidth;
767
764
  });
768
765
  return function () {
769
766
  var modelSlot = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.2-beta.89",
3
+ "version": "2.0.2-beta.90",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",