vue 处理表达式

const template = `<div>{{ a + b | c }}</div>`
//vue 源码处理的为 _f("${filter}")(${exp})
const staticRenderCode = 'with(this){ return _f(c)(a+b)}'
//将code生成handler
const staticRenderHandler = new Function(staticRenderCode);

  

原文地址:https://www.cnblogs.com/me-data/p/13926688.html