muunala10221
V2EX  ›  Vue.js

请问一个 slot 相关的问题

  •  
  •   muunala10221 · Jul 22, 2021 · 1465 views
    This topic created in 1785 days ago, the information mentioned may be changed or developed.
    就是我有 N 个 这样的插槽,slot 后面的名字不同,{{ xx }}的内容基本都相同,其中会有一些选择框 /文本输入框,这些绑定的值是 aa,有什么比较好的写法吗请问
    <template v-slot:aa="{scope}"> {{ xx }}</template>
    1 replies    2021-08-16 12:11:57 +08:00
    lin07hui
        1
    lin07hui  
       Aug 16, 2021
    <template v-for="(item, key) in obj" v-slot:[key]="{ scope}">...</template>

    <template v-for="(item, index) in arr" v-slot:[item]="{ scope}">...</template>
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5561 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 03:21 · PVG 11:21 · LAX 20:21 · JFK 23:21
    ♥ Do have faith in what you're doing.