Vue js with语句原理及用法解析
vue源码中编译部分有下面一段代码,里面用到了with: export function generate ( ast: ASTElement | void, options: CompilerOptions ): CodegenResult { const state = new CodegenState(options) const code = ast ? genElement(ast, state) : '_c("div")' return { render: `with(this){return $[code]}`, staticRenderFns: state.
下载地址
用户评论