cgdddd
V2EX  ›  问与答

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

  •  
  •   cgdddd · Apr 8, 2022 · 1532 views
    This topic created in 1522 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   ·   981 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:50 · PVG 03:50 · LAX 12:50 · JFK 15:50
    ♥ Do have faith in what you're doing.