cgdddd
V2EX  ›  问与答

vue3 中$attrs 怎么用 ts 定义类型?

  •  
  •   cgdddd · Apr 8, 2022 · 1462 views
    This topic created in 1494 days ago, the information mentioned may be changed or developed.
    <ElSelect>
        <template v-if="$attrs.optionList && $attrs.optionList.length > 0">
          <DbOption
            v-for="item in $attrs.optionList"
            :key="item.value"
            v-bind="item"
          />
        </template>
    </ElSelect>
    

    image-20220408164718077

    各位大佬帮忙看看这个类型报错应该如何解决?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5630 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 03:45 · PVG 11:45 · LAX 20:45 · JFK 23:45
    ♥ Do have faith in what you're doing.