opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.66k stars 264 forks source link

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

Closed Aostas closed 3 months ago

Aostas commented 1 year ago

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的

Huangyilin19 commented 11 months ago

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

Issues-translate-bot commented 11 months ago

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.

James-9696 commented 10 months ago

修复中

Issues-translate-bot commented 10 months ago

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


Under repair

James-9696 commented 10 months ago

已修复,待发布。

Issues-translate-bot commented 10 months ago

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


Fixed and pending release.