摘要: v8--sort方法源码中对于长度较短的数组使用的是插入排序法。 部分源码: function InsertionSort(a, from, to) { for (var i = from + 1; i < to; i++) { var element = a[i]; // Pre-convert 阅读全文
posted @ 2019-11-14 23:55 chulai9527 阅读(192) 评论(0) 推荐(0) 编辑
摘要: \num 匹配 num,其中 num 是一个正整数。对所获取的匹配的引用。例如,'(.)\1' 匹配两个连续的相同字符。 例子: 正则:/(a)(b)\1/。此表达式的意思大概是对第一个()匹配结果的引用 类似于匹配 aba 然后获取a,b 检验: 例子: 正则:/(a)(b)\2/。此表达式的意思 阅读全文
posted @ 2019-11-14 21:56 chulai9527 阅读(1406) 评论(0) 推荐(0) 编辑
摘要: store的结构: city模块: 在各模块使用了命名空间的情况下,即 namespaced: true 时: 组件中访问模块里的state 传统方法: this.$store.state['模块名']['属性名'] 例如:this.$store.state.city.list。 控制台输出 thi 阅读全文
posted @ 2019-11-14 00:01 chulai9527 阅读(7013) 评论(0) 推荐(1) 编辑