tiny-vue icon indicating copy to clipboard operation
tiny-vue copied to clipboard

🐛 [Bug]: ToggleMenu's get-menu-data-async doesn't work at all.

Open Aostas opened this issue 1 year ago • 6 comments

Version

3

Vue Version

3.2.45

Link to minimal reproduction

https://opentiny.design/tiny-vue/zh-CN/os-theme/components/toggle-menu#get-menu-data-async

Step to reproduce

修改实例代码中的数据,甚至把数据以及:get-menu-data-async="getMenuDataAsync"全删掉,显示数据无变化,猜测是get-menu-data-async未执行,使用了默认数据。

<script setup lang="ts">
function getMenuDataAsync() {
  console.log("getMenuDataAsync")
}
</script>

<template>
  <div class="root-container">
    <tiny-container pattern="simple">
      <template #aside>
        <tiny-layout>
          <tiny-tree-menu style="width: auto;" :get-menu-data-async="getMenuDataAsync"></tiny-tree-menu>
        </tiny-layout>
      </template>
      <tiny-layout style="height: 100vh;">
      </tiny-layout>
    </tiny-container>
  </div>
</template>

<style scoped>
</style>

console.log("getMenuDataAsync")未打印,打断点也不会触发

What is expected

执行getMenuDataAsync后获得目录数据

What is actually happening

未执行getMenuDataAsync

Any additional comments (optional)

TreeMenu的异步会有吗,本来想用TreeView的

Aostas avatar Jul 18 '23 01:07 Aostas

这确实是个问题,我们内部先评审下解决方案。

Huangyilin19 avatar Nov 23 '23 03:11 Huangyilin19

Bot detected the issue body's language is not English, translate it automatically.


This is indeed a problem, and we will review the solution internally first.

Issues-translate-bot avatar Nov 23 '23 03:11 Issues-translate-bot

修复中

James-9696 avatar Dec 28 '23 09:12 James-9696

Bot detected the issue body's language is not English, translate it automatically.


Under repair

Issues-translate-bot avatar Dec 28 '23 09:12 Issues-translate-bot

已修复,待发布。

James-9696 avatar Dec 29 '23 08:12 James-9696

Bot detected the issue body's language is not English, translate it automatically.


Fixed and pending release.

Issues-translate-bot avatar Dec 29 '23 08:12 Issues-translate-bot