zwmmm

Results 28 comments of zwmmm

![image](https://user-images.githubusercontent.com/30194521/42610723-6c7f6be6-85c5-11e8-8afc-cbf2227c9cd2.png) 这么配置 还是无法使用 ?.

一直比较喜欢简洁的代码 ```js const obj = { 1: 222, 2: 123, 5: 888 }; const result = Array.from({ ...obj, length: 13 }, item => item || null).slice(1); console.log(result); ```

大佬们 我这样对不对 ```js function fn(a, b) { const result = []; const map = a.reduce((obj, item) => { obj[item] ? obj[item]++ : obj[item] = 1; return obj; }, {}); b.forEach(item...

> ``` > > + > - > ``` > > ```js > const data = { count: 0 }; > const proxy = new Proxy(data, { > get(target, property)...

> ```js > LazyMan('Tony'); > // Hi I am Tony > > LazyMan('Tony').sleep(10).eat('lunch'); > // Hi I am Tony > // 等待了10秒... > // I am eating lunch > >...

测试通过 ```js function transformStr(str) { let arr = str.split(',') let i = 0 let ret = [] for (let j = 1; j

最终返回的值是 ```js { data: { a: { numa: 1, numb: 2 }, b: { numc: 3, numd: 4 } }, getA() { console.log('a'); }, getB() { console.log('b'); } } ```

> update的时候key应该怎么样呢 > ![image](https://user-images.githubusercontent.com/45563478/62444937-8a4db480-b791-11e9-99ca-4d5cfb375bbc.png) > 请问如何更新到roomStore里面的数据呢. > ![image](https://user-images.githubusercontent.com/45563478/62444977-a4879280-b791-11e9-8bcc-5898a43f72fd.png) > 然后wxml里面该如何绑定数据。我试了roomStore.xxx不行.直接xxx也不行呢. > ![image](https://user-images.githubusercontent.com/45563478/62445026-db5da880-b791-11e9-8617-8975a0787084.png) 仔细看下readme 第一个问题 数据更新 使用 ```js this.store.data.a = 'a' this.update() ``` 在wxml中使用的数据需要现在page的data中声明(但是默认值要在store中设置) ```js { data: { a: null },...