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项目开发流程








相关推荐
AI_零食37 分钟前
鸿蒙PC Electron跨平台应用开发:24时区时间表应用详解
前端·华为·electron·开源·harmonyos·鸿蒙
Electrolux1 小时前
[onlyoffice-v9]纯前端怎么实现编辑预览office
前端·javascript·github
码云之上1 小时前
聊聊如何设计一个高效、稳定的 Node.js 接入层
前端·后端·node.js
kyriewen2 小时前
我读了一遍 Babel 编译后的 async/await,终于搞懂了它的原理(附 20 行手写实现)
前端·javascript·面试
IT_陈寒2 小时前
Vite项目build后路由404了?你可能漏了这个小配置
前端·人工智能·后端
lichenyang4533 小时前
AI 聊天从纯文本到结构化卡片:SSE done 帧携带 card + 历史记录卡片恢复实战
前端
梦曦i3 小时前
@meng-xi/vite-plugin v0.1.5:告别手动 import,精简工具层
前端
梦曦i3 小时前
Vite 0.1.6重磅更新:智能导入+路由安全
前端
gxf5203088069884 小时前
Flutter 裁剪图片
前端·app
ITMan彪叔4 小时前
赋能UE运行态编辑平台: 网络图片下载的插件改造与复盘
前端