切换布局
显示结果
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Vue 测试实例 - 迹忆客(jiyik.com)</title> <script src="https://unpkg.com/vue@next"></script> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> </head> <body> <div id="app"> {{ info }} </div> <script> const app = { data() { return { info: null } }, mounted () { axios .post('https://tools.jiyik.com/demo_source/demo_axios_post.php') .then(response => (this.info = response)) .catch(function (error) { // 请求失败处理 console.log(error); }); } } Vue.createApp(app).mount('#app') </script> </body> </html>