let str = decodeURI(location.href).slice(index + 7).split('&')[0]
this.searchValProps = str
str = location.href.slice(index + 7).split('&')[0]
this.searchValProps = decodeURIComponent(str).trim()
对比以上两个this.searchValProps的区别:
decodeURIComponent得到的可能含特殊符号,不是理想的值,在做搜索功能时可能会搜索不出来。decodeURI则不会。