摘要: 运动 初识运动 1.停不下来 给定时器添加timer 来判断是否需要停止 2.到目的地,还能点击移动,把移动的代码放入else中 3.重复点击按钮会加速运动 是因为点一次就会启动一次定时器,多次就会启动多次 保证只有一个定时器在启动,启动一次就关闭上一次启动定时器 运动框架: ​ 1 启动就关闭定时 阅读全文
posted @ 2020-12-12 18:09 Ssinoo団子 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Actions 根据流程图得知,actions是接受后端api的,进行异步请求,获取到的数据 要通过commit提交给mutation,mutation才能修改state中的数据, 案例: 请求卖座的api 通过action 1,首先先判断页面是否拥有数据,没有的话,使用action进行异步请求 i 阅读全文
posted @ 2020-12-05 15:27 Ssinoo団子 阅读(1129) 评论(0) 推荐(0) 编辑
摘要: 一般后端请求来的数据,需要转换为自己需要的格式 城市列表案例 目的:为了搭建城市列表查询 原因:因为后端传来的数据,不能直接拿来使用,需要自己用js改造数据格式 下图是请求到数据 目标转为: 1.先创建26个字母,通过ASCII值 const letterArr = []; for (let cod 阅读全文
posted @ 2020-11-30 16:32 Ssinoo団子 阅读(209) 评论(0) 推荐(0) 编辑
摘要: const letterArr = []; for (let code = 65; code < 91; code++) { // fromCharCode方法 可以将对应的ASCII转换 letterArr.push(String.fromCharCode(code)); } console.lo 阅读全文
posted @ 2020-11-30 16:08 Ssinoo団子 阅读(189) 评论(0) 推荐(0) 编辑
摘要: vant 中的轻提示 用axios拦截器封装 全局使用 axios拦截器的两种方法 Interceptors You can intercept requests or responses before they are handled by then or catch. // Add a requ 阅读全文
posted @ 2020-11-29 14:33 Ssinoo団子 阅读(1097) 评论(0) 推荐(0) 编辑
摘要: Vant的初次使用 应用vant中list实现懒加载 vant-list 首先npm 下载 ,使用的是需要什么导入什么 // 对于使用 babel7 的用户,可以在 babel.config.js 中配置 module.exports = { plugins: [ ['import', { libr 阅读全文
posted @ 2020-11-28 17:55 Ssinoo団子 阅读(3469) 评论(0) 推荐(1) 编辑
摘要: p { // 设定宽度 width: 270px; overflow: hidden; text-overflow: ellipsis; /* 弹性伸缩盒子模型显示 */ display: -webkit-box; /* 限制在一个块元素显示的文本的行数 */ -webkit-line-clamp: 阅读全文
posted @ 2020-11-25 23:35 Ssinoo団子 阅读(120) 评论(0) 推荐(0) 编辑
摘要: title: JavaScript笔记 tags: JavaScript categories: WEB DOM <body> <img src="20190325.jpg" id = "sakura"> <script> var sakura = document.getElementById(" 阅读全文
posted @ 2020-11-21 18:21 Ssinoo団子 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 Lambda表达式的标准格式: 3 由三部分组成 4 a:一些参数 5 b:一个箭头 6 c:一段代码 7 格式: 8 (参数列表)->(一些重写方法的代码); 9 解释说明格式: 10 ():接口中抽象方法的参数列表,没有参数,就空着 11 ->:传递的意思,把参数传递给方法体{} 阅读全文
posted @ 2019-07-16 15:14 Ssinoo団子 阅读(1184) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<malloc.h>#include<stdlib.h>#include<string.h>#include<conio.h>#include<ctype.h>#define Esc 27#define NULL 0#define LEN sizeo 阅读全文
posted @ 2019-06-20 19:58 Ssinoo団子 阅读(594) 评论(0) 推荐(0) 编辑