摘要:
1 去重 var a = [1,2,3,4,5,3,2,3,4,5]; // 去掉重复的项 1 Array.form // Array.from() 方法从一个类似数组或可迭代对象创建一个新的,浅拷贝的数组实例 Array.from(new Set(a)) 注意:并不适合所有的去重情况 var a 阅读全文
摘要:
this.$options.data() // 初始data的值 this.$data // 当前data的值 阅读全文
摘要:
<template> <div> <Child1 /> <Child2 /> </div> </template> <template> <div @click="child1Click"> child1 </div> </template> // child1 { data() { return 阅读全文