Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vue] vue2.0不再支持v-html中使用过滤器了怎么办? #555

Open
haizhilin2013 opened this issue Jul 2, 2019 · 5 comments
Open
Labels
vue vue

Comments

@haizhilin2013
Copy link
Collaborator

[vue] vue2.0不再支持v-html中使用过滤器了怎么办?

@haizhilin2013 haizhilin2013 added the vue vue label Jul 2, 2019
@YuYanDev
Copy link

YuYanDev commented Jul 5, 2019

在method中定义方法

htmlFilter(htmlString){
return htmlString.replace(/+s/g,'')
}

在vue中 v-html="htmlFilter(htmlString)"即可

@Wu-wb
Copy link

Wu-wb commented Jul 12, 2019

1:全局方法

2:computed

3:$options.filters

@Yanhua67
Copy link

Yanhua67 commented Aug 1, 2019

使用过滤器 Vue.filter

@Miboweixin
Copy link

其实这些问题是工作的时候也会遇到的很重要的问题,熟练掌握记住api这真的是件好事

@wenjiechen0913
Copy link

没看懂这个问题,好像回答的也不是很仔细啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vue vue
Projects
None yet
Development

No branches or pull requests

6 participants