tnblog
首页
视频
资源
登录
愿你出走半生,归来仍是少年
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
欢迎加群交流技术

vue.js过滤器,过滤器传递多个参数,传递三个参数

3051人阅读 2022/1/29 11:00 总访问:1627744 评论:0 收藏:0 手机
分类: 前端

多个参数往后面写即可

全局写一个过滤器:

Vue.filter("filter_link_front_behind",function(front,start,url,behind){
	// console.log("---------------");
	// console.log(front);
	// console.log(start);
	// console.log(url);
	// console.log(behind);
	return start+front+url+behind;
})

使用:

:href="item.userName|filter_link_front_behind('http://m.xx.net/','/article/UserCategory/',item.aClassId)"


欢迎加群讨论技术,群:677373950(满了,可以加,但通过不了),2群:656732739

评价