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

用 JSX 写 Vue 的时候, JSX 是写 setup() 里面好呢,还是写 render() 里面好呢?

  •  
  •   cbdyzj · Jan 12, 2024 · 2404 views
    This topic created in 848 days ago, the information mentioned may be changed or developed.
    3 replies    2024-01-13 13:55:53 +08:00
    CHTuring
        1
    CHTuring  
       Jan 12, 2024 via iPhone
    setup
    Peng0620
        2
    Peng0620  
       Jan 13, 2024
    setup
    lisongeee
        3
    lisongeee  
       Jan 13, 2024
    没有 setup 属性也没有 render 属性直接传 setup 函数引用

    defineComponent((props, ctx)=>{
    return ()=>{return <div>demo</div>}
    })
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2763 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 15:34 · PVG 23:34 · LAX 08:34 · JFK 11:34
    ♥ Do have faith in what you're doing.