摘要:
捕获同步异常: created() { this.test1() }, methods: { test1() { try { this.test2() } catch (err) { console.warn('捕获到test2的错误', err) } }, test2() { throw new 阅读全文
摘要:
async created() { // Promise.all([this.getTodos(), this.getComments(), this.getAlbums()]).then( // (res) => { // console.log(res) // } // ) const data 阅读全文
摘要:
import axios from 'axios' export default { mounted() { // this.getTodos().then((res) => { // console.log('todos', res.data) // this.getComments().then 阅读全文
摘要:
<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 阅读全文