using computed
property would be better option
computed: {
FilterCategories() {
return this.inputValue ? this.categories.filter(category => {
return category.category_name.toLowerCase().includes(this.inputValue.toLowerCase())
}) : this.categories;
}
}
**No changes are required in template
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…