摘要: axios功能强大的网络请求库。 <script src="https://unpkg.com/axios/dist/axios.min.js"></script> 基础使用: axios.get(地址?key=value&key2=values).then(function(response){} 阅读全文
posted @ 2023-04-06 16:29 super_ip 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 功能需求: 新增 生成列表结构 获取用户输入 回车,新增数据 删除 点击删除指定内容(v-on splice) splice(index,1) 删除1个对应的索引 统计 v-text,length 清空 数组清空 隐藏 没有数据时,隐藏元素(v-if,v-show 数组非空) <div id='ap 阅读全文
posted @ 2023-04-06 14:21 super_ip 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1,v-for指令 根据数据生成列表结构 <div id='app'> <input type="button" value="添加数据" @click="add"> <input type="button" value="删除数据" @click="remove"> <ul> <li v-for= 阅读全文
posted @ 2023-04-06 12:43 super_ip 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 知识点: 1,定义图片数组 2,添加图片索引 3,绑定src属性 4,图片切换逻辑 需求: 第一张图片不显示上一页(隐藏) 最后一张图片不显示下一页(隐藏) <div id='app'> <img :src="imgarr[index]"> <a href="#" v-show="index!=0" 阅读全文
posted @ 2023-04-06 11:50 super_ip 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 1,v-show指令 根据表达式的真假,切换元素的显示和隐藏如:广告,遮罩层等 <div id='app'> <input type="button" value="切换显示状态" @click="changeIsshow"> <input type="button" value="增加年龄" @c 阅读全文
posted @ 2023-04-06 11:26 super_ip 阅读(23) 评论(0) 推荐(0) 编辑