<template>
<div>
<div v-for="(item,index) in userInputTips" :key="index" >
{{ item}}
</div>
</div>
</template>
<script>
export default {
name:'A',
data () {
return {
tipsContent: []
};
},
computed: {//通过计算属性过滤掉列表中不需要显示的项目
userInputTips() {
return this.tipsContent.filter(item => {
return item.indexOf(this.textMsg) != -1
})
}
}
};
</script>