V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
wktrf
V2EX  ›  Vue.js

Vue 中 TSX 没法和模板一样做到部分组件更新吗?

  •  
  •   wktrf · Oct 18, 2020 · 2524 views
    This topic created in 2016 days ago, the information mentioned may be changed or developed.
    Composition API 中 TSX 每次更新都是子组件全部更新了,五个 Input 就会更新五次 Input,而用模板写法就只会更新一次 Input
    用 Vue 3 测了下两种写法都是全部更新了,用 TSX 是为了 TypeScript,Vue 3 中模板还是缺乏良好的类型推导
    2 replies    2020-10-19 13:14:56 +08:00
    lee88688
        1
    lee88688  
       Oct 18, 2020 via Android
    发一下代码也,就这么描述很抽象
    cuzfinal
        2
    cuzfinal  
       Oct 19, 2020
    没办法
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4469 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 04:09 · PVG 12:09 · LAX 21:09 · JFK 00:09
    ♥ Do have faith in what you're doing.