摸着石头过河

Results 11 comments of 摸着石头过河

博主 有个问题请教下 一个函数中有个参数是异步的,用这个参数的时候怎么等待它加载完成啊? 我知道用promise 但是具体怎么写?怎么实现 伪代码怎么写?有写的文章推荐看看吗

@jawil 博主看到一个列子 var m = 12; var a = { m : 123, f1: { m : 23, test: function(){ var t = function(){ console.log(this.m) } t(); } } }...

有一个疑问?vuex的state可以用 store.state 可以直接修改,为啥还要commit到mutations ? 你怎么看,大神,我感觉好像就是为了多个组件达到复用

看你api/index.js 里面有很多请求 ,比如 fetchGet('/musiclist') /musiclist 这是哪来的呢 没找到,项目跑起来报错,貌似缺少app.js 这个文件

clone 下来报错 不好截图 只能复制了 ET http://localhost:3000/music/url?id=471385043 net::ERR_CONNECTION_REFUSED dispatchXhrRequest @ xhr.js?7ad9:177 xhrAdapter @ xhr.js?7ad9:12 dispatchRequest @ dispatchRequest.js?54ce:52 xhr.js?7ad9:177 GET http://localhost:3000/playlist/detail?id=3778678 net::ERR_CONNECTION_REFUSED dispatchXhrRequest @ xhr.js?7ad9:177 xhrAdapter @ xhr.js?7ad9:12 dispatchRequest @ dispatchRequest.js?54ce:52 xhr.js?7ad9:177...

关键是你项目app.js 没有? 是不是忘记上传了?

@Huitimkit 确实有这问题,我也遇到,你是如何解决的呢

@jawil var F=function(){}; F.prototype= Constructor.prototype; obj=new F();//指向正确的原型 这写法是什么意思 没太看明白

```js var fn = null; function foo() { var a = 2; function innnerFoo() { console.log(c); console.log(a); } fn = innnerFoo; } function bar() { var c = 100; fn();...

@tangshuimei 你说 innerFoo函数的时候他的作用域scope里面分别是[AO,fooContext.AO,globalContext.AO], 那这个时候AO 具体表示什么呢???有点费解