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);

  

posted on 2020-11-04 16:42  偏灬爱  阅读(184)  评论(0)    收藏  举报

导航