Day03-Ajax,前后端分离开发,前端工程化,Vue组件库Element,Vue路由,打包部署



1. AXios



html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
    <input type="button" value="get" onclick="get()"><br>
    <input type="button" value="post" onclick="post()"><br>
</body>
<script>
    function get(){
        axios({
            methods: 
            "get",
            url:"https://unpkg.com/axios/dist/axios.min.js"
        }).then(result=>{
            console.log(result.data)
        })
    }    
    function post(){
        axios({
            methods: 
            "post",
            url:"https://unpkg.com/axios/dist/axios.min.js",
            data:"id=1"
        }).then(result=>{
            console.log(result.data)
        })
    }
</script>
</html>



3. 前端工程化

环境准备

nodejs安装过程的

vue项目简介

vue项目开发流程








相关推荐
Java陈序员5 小时前
太香了!一款轻量级的 Elasticsearch 可视化管理工具!
vue.js·elasticsearch·vite
万物得其道者成7 小时前
前端大整数精度丢失:一次踩坑后的实战解决方案(`json-bigint`)
前端·json
鹏北海8 小时前
移动端 H5 响应式字体适配方案完全指南
前端
柳杉9 小时前
使用AI从零打造炫酷医疗数据可视化大屏,源码免费拿!
前端·javascript·数据可视化
凌云拓界9 小时前
前端开发的“平衡木”:在取舍之间找到最优解
前端·性能优化·架构·前端框架·代码规范·设计规范
zhengfei61110 小时前
【XSS payload 】一个经典的XSS payload
前端·xss
简单Janeee10 小时前
[Vue 3 从零到上线]-第四篇:组件化思维——把网页像积木一样拆解
javascript·vue.js·ecmascript
全栈老石11 小时前
手写一个无限画布 #1:坐标系的谎言
前端·canvas
XW010599911 小时前
4-11判断素数
前端·python·算法·素数
J2虾虾11 小时前
Spring Boot中使用@Scheduled做定时任务
java·前端·spring boot