摘要: 所有执行完成后,回调 Promise.all([ new Promise(resolve => { setTimeout(() => { console.log('furong'); resolve({ name: 'furong', age: 12 }); }, 2000) }), new Pro 阅读全文
posted @ 2021-07-13 14:08 thomas_blog 阅读(74) 评论(0) 推荐(0) 编辑
摘要: new Promise((resolve) => { var a = 1; resolve(a); }).then((data) => { console.log(data); return data + 1; }).then((data) => { console.log(data); }) 阅读全文
posted @ 2021-07-13 13:44 thomas_blog 阅读(211) 评论(0) 推荐(0) 编辑
摘要: resolve new Promise((resolve, reject) => { setTimeout(() => { console.log('one'); }, 2000) resolve("resolve"); }).then((data) => { console.log(data); 阅读全文
posted @ 2021-07-13 12:24 thomas_blog 阅读(155) 评论(0) 推荐(0) 编辑
摘要: resolve: { extensions: ['.js', '.vue', '.json'], alias: { 'vue$': 'vue/dist/vue.esm.js', '@': resolve('src'), } }, 使用 import HelloWorld from '@/compon 阅读全文
posted @ 2021-07-13 11:14 thomas_blog 阅读(120) 评论(0) 推荐(0) 编辑