摘要: arr.filter(function(n) { return n > 100; }).map(function(n) { return n * 2; }).reduce(function(prevValue, n) { return prevValue + n; }, 0) 阅读全文
posted @ 2022-11-23 22:06 n9c9 阅读(30) 评论(0) 推荐(0)
摘要: push('a', 'b') pop() unshift('a', 'b', 'c') shift() splice(2, 0, 'a') sort() reverse() arr[0]='aaa'; 这个不是响应式的 Vue.set(this.letters, 0, 'bbbbb'); 阅读全文
posted @ 2022-11-23 13:48 n9c9 阅读(16) 评论(0) 推荐(0)
摘要: ...items 阅读全文
posted @ 2022-11-23 13:38 n9c9 阅读(13) 评论(0) 推荐(0)
摘要: arr.splice(2, 0, 'F', 'E'); 阅读全文
posted @ 2022-11-22 18:01 n9c9 阅读(16) 评论(0) 推荐(0)
摘要: @click.stop @click.prevent @keyup.enter @click.native (组件) @click.once 阅读全文
posted @ 2022-11-22 15:41 n9c9 阅读(17) 评论(0) 推荐(0)
摘要: const names = 'Kobe Bryant'.split(' '); console.log(names[0]); console.log(names[1]); 阅读全文
posted @ 2022-11-22 11:16 n9c9 阅读(19) 评论(0) 推荐(0)
摘要: for(let i= 0; i < this.books.length; ++i) { } for(let i in this.books) { } for(let books of this.books) { } 阅读全文
posted @ 2022-11-22 10:28 n9c9 阅读(10) 评论(0) 推荐(0)
摘要: el: String | HTMLElement data: Object | function (组件只能使用function) methods: {} 还可以有一些生命周期中的钩子函数 beforeCreate: function() {} created: function() {} moun 阅读全文
posted @ 2022-11-21 14:33 n9c9 阅读(20) 评论(0) 推荐(0)
摘要: https://www.runoob.com/cssref/func-linear-gradient.html 阅读全文
posted @ 2022-11-07 17:04 n9c9 阅读(18) 评论(0) 推荐(0)
摘要: <!-- 通过accept可以指定允许用户选择什么类型的文件 --> <input type="file" id="file" accept="image/png,image/jpeg" /> 阅读全文
posted @ 2022-11-03 14:25 n9c9 阅读(26) 评论(0) 推荐(0)