Skip to content

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

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

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

Activity

YuYanDev

YuYanDev commented on Jul 5, 2019

@YuYanDev

在method中定义方法

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

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

Wu-wb

Wu-wb commented on Jul 12, 2019

@Wu-wb

1:全局方法

2:computed

3:$options.filters

Yanhua67

Yanhua67 commented on Aug 1, 2019

@Yanhua67

使用过滤器 Vue.filter

Miboweixin

Miboweixin commented on Aug 6, 2019

@Miboweixin

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

wenjiechen0913

wenjiechen0913 commented on May 6, 2023

@wenjiechen0913

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@YuYanDev@Yanhua67@Miboweixin@Wu-wb

        Issue actions

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