cgdddd
V2EX  ›  问与答

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

  •  
  •   cgdddd · Apr 8, 2022 · 1480 views
    This topic created in 1501 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   ·   1037 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 22:39 · PVG 06:39 · LAX 15:39 · JFK 18:39
    ♥ Do have faith in what you're doing.