MVVM M(data)–>Model V(dom)–>View VM–>ViewModel VUE中VM就是Vue,从M取出数据通过Vue内部把数据渲染到View(每一个dom) Vue的生命周期 Vue的基本语法 插值操作 mustache语法:双大括号语法,用于把data渲染到demo。v-once:原本不加v-once时,数据是响应式的。加了v-once数据渲染过
预备知识: reduce: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce concat: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/concat includes: https://developer.mozilla.org/zh-CN
1 function foo (...args) { return args.reduce(function (previousValue, currentValue) { // console.log(previousValue, currentValue) return previousValue += currentValue; }) } console