js比较或者筛选时不区分大小写

str.toUpperCase() str转化成大写
str.toLowerCase() str转成小写
例如:

product.name.toUpperCase().indexOf(this.props.filterText.toUpperCase())=== -1

都转化成统一格式就可以进行比较了

猜你喜欢

转载自blog.csdn.net/etemal_bright/article/details/80940472