VUE源码:模板引擎mustache
文章目录模板引擎的定义mustache的基本使用
模板引擎的定义
模板引擎就是将数据变为视图最优雅的解决方案
例如:VUE的v-for、mustache
历史上数据变为视图方法:
纯DOM方法
数组join
ES6的反引号法:``${a} `
模板引擎
mustache的基本使用
官方git:https://github.com/janl/mustache.js
例子:
let arr = [
{ name: "小红", sex: "女", age: 18 },
{ name: "小黑", s
原创
2022-04-07 21:57:12 ·
1542 阅读 ·
0 评论