1. 首页
  2. 数据库
  3. 其它
  4. vue 指令和过滤器的基本使用(品牌管理案例)

vue 指令和过滤器的基本使用(品牌管理案例)

上传者: 2021-02-01 14:50:28上传 PDF文件 70KB 热度 6次
过滤器的基本使用 定义一个过滤器 {{ msg | msgFormat('疯狂+1', '123') | test }} // 定义一个 Vue 全局的过滤器,名字叫做 msgFormat Vue.filter('msgFormat', function (msg, arg, arg2) { // 字符串的 replace 方法,第一个参数,除了可写一个 字符串之外,还可以定义一个正则 return msg.replace(/单纯/g, arg + arg2) }) Vue.filter('test',
下载地址
用户评论