tanxin-ui 0.5.0 → 0.5.1

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.
@@ -7871,7 +7871,7 @@ const menuItemProps$1 = {
7871
7871
  function getType(type4) {
7872
7872
  if (["horizontal", "x"].includes(type4))
7873
7873
  return "x";
7874
- else if (["vertical", "xy"].includes(type4))
7874
+ else if (["vertical", "y"].includes(type4))
7875
7875
  return "y";
7876
7876
  else if (type4 == "seperate")
7877
7877
  return type4;
@@ -21908,7 +21908,7 @@ function useVetical(props, openPath, selectedPath, prefixCls, byOptions, menuLis
21908
21908
  const style = {};
21909
21909
  if (props.collapsed)
21910
21910
  style[`width`] = getLength(props.collapsedWidth);
21911
- else if (props.width)
21911
+ else if (props.mainWidth)
21912
21912
  style[`width`] = getLength(props.mainWidth);
21913
21913
  return style;
21914
21914
  });
@@ -22406,6 +22406,7 @@ var Menu = defineComponent({
22406
22406
  watch(() => props.selectedPath, () => {
22407
22407
  selectedPath.value = props.selectedPath;
22408
22408
  openPath.value = props.selectedPath;
22409
+ updateRightMenu();
22409
22410
  }, {
22410
22411
  deep: true
22411
22412
  });
@@ -22457,9 +22458,7 @@ var Menu = defineComponent({
22457
22458
  calculateParentNoIcon(menuList.value);
22458
22459
  }
22459
22460
  };
22460
- onMounted(() => {
22461
- initData();
22462
- setSelectedPath(props.selectedPath);
22461
+ const updateRightMenu = () => {
22463
22462
  if (props.type == "seperate") {
22464
22463
  let firstSelectedItem = null;
22465
22464
  if (selectedPath.value.length > 0) {
@@ -22469,6 +22468,10 @@ var Menu = defineComponent({
22469
22468
  if (firstSelectedItem)
22470
22469
  rightMenuList.value = firstSelectedItem.children;
22471
22470
  }
22471
+ };
22472
+ onMounted(() => {
22473
+ initData();
22474
+ setSelectedPath(props.selectedPath);
22472
22475
  });
22473
22476
  const menuType = getType(props.type);
22474
22477
  const render = () => {