摘要: 捕获同步异常: created() { this.test1() }, methods: { test1() { try { this.test2() } catch (err) { console.warn('捕获到test2的错误', err) } }, test2() { throw new 阅读全文
posted @ 2021-10-09 16:59 吴小明- 阅读(275) 评论(0) 推荐(0) 编辑
摘要: async created() { // Promise.all([this.getTodos(), this.getComments(), this.getAlbums()]).then( // (res) => { // console.log(res) // } // ) const data 阅读全文
posted @ 2021-10-09 16:08 吴小明- 阅读(442) 评论(0) 推荐(0) 编辑
摘要: import axios from 'axios' export default { mounted() { // this.getTodos().then((res) => { // console.log('todos', res.data) // this.getComments().then 阅读全文
posted @ 2021-10-09 15:54 吴小明- 阅读(277) 评论(0) 推荐(0) 编辑
摘要: <template> <div id="app"> <button class="btn btn-primary">按钮1 <span class="mask mask-1"></span></button> <button class="btn btn-secondary">按钮2 <span c 阅读全文
posted @ 2021-10-09 15:15 吴小明- 阅读(173) 评论(0) 推荐(0) 编辑