vue 筛选器能用在方法传参中吗

<img v-if="currentItem.picArr[0] != ''" :src="item | transferPic" class="showImg" @click="showLargeImg(item | transferPic)"/>

如上,我要把item 筛选后的值作为参数传入click方法,要怎么写方便

阅读 1.5k
2 个回答

应该没法这样操作

不能这么写,只能用在{{}}和v-bind中
可以把filter改成一个method

推荐问题