Giter Club home page Giter Club logo

Comments (4)

github-actions avatar github-actions commented on June 2, 2024

👋 @LoopZhou,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

from tdesign-mobile-vue.

XBIsland avatar XBIsland commented on June 2, 2024

tag 也有这个问题,看源码大概有 12 个组件有这个问题,全局搜下关键字 props.onClick 可以找到,将源码改为 context.emit 的方式也许可以修复。

临时解决可以通过将 key 绑定在 t-<name> 上解决。

<div v-for="(item, index) in list">
  <t-cell
    :key="item.name"
    :title="item.name"
    @click="testLog(index)"
  ></t-cell>
</div>

from tdesign-mobile-vue.

catiwang avatar catiwang commented on June 2, 2024
 <div v-for="(item, index) in dataArr" :key="item.name">
    <t-cell note="辅助信息" @click="testLog(index)">
      <template #title>
        {{ item.name }}
      </template>
    </t-cell>
  </div>

自测过这样写就可以更新了,tag如果像之前cell这样的写法,用:content="item.name",也会更新不了,个人认为可以换成这种写法
@LoopZhou

from tdesign-mobile-vue.

XBIsland avatar XBIsland commented on June 2, 2024

我尝试排查原因,最终发现跟 emits 声明和 props 定义有关。
应该跟组件本身无关,更多可能是 Vue 的写法有关,个人觉得是个值得讨论的问题。

emits👉: https://cn.vuejs.org/api/options-state.html#emits
demo👉: https://stackblitz.com/edit/vitejs-vite-z7hfy7?file=src%2FApp.vue

我会尝试提交 PR 修复这个问题。

from tdesign-mobile-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.