|
@@ -144,7 +144,7 @@ var articleList = new Vue({
|
|
|
|
|
|
// 高亮关键词
|
|
// 高亮关键词
|
|
highlightKeyword: function(str){
|
|
highlightKeyword: function(str){
|
|
- return str.replaceAll(this.keyword, '<span style="color: #E15616">'+ this.keyword +'</span>')
|
|
|
|
|
|
+ return str.replace(new RegExp(this.keyword, 'g'), '<span style="color: #E15616">'+ this.keyword +'</span>')
|
|
},
|
|
},
|
|
|
|
|
|
// 获取文章列表
|
|
// 获取文章列表
|