maxTagCount设置最大显示个数报错

2019-11-12  本文已影响0人  鲜蛋卷小狐狸

maxTagCount设置最大显示个数报错

<a-select mode="tags" style="width: 200px" @change="handleChange" :defaultValue="brandId" maxTagCount="1">

      <a-select-option v-for="item in selectSource" :key="item.id">{{item.value}}</a-select-option>

    </a-select>

报错:

Invalid prop: type check failed for prop "maxTagCount". Expected Number with value 2, got String wit

改成

<a-select mode="tags" style="width: 200px" @change="handleChange" :defaultValue="brandId" :maxTagCount="1">

      <a-select-option v-for="item in selectSource" :key="item.id">{{item.value}}</a-select-option>

    </a-select>

另外

:maxTagCount=1 也是不对的,虽然maxTagCount接收number类型,但规定不是这样写

如果是接收字符串类型,则写成:xxx=" '0' "

上一篇 下一篇

猜你喜欢

热点阅读