会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shine_lovely
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2021年2月22日
vscode-setting备份
摘要: 1 { 2 "javascript.preferences.quoteStyle": "single", 3 "workbench.colorTheme": "Solarized Light (no bold)", 4 "files.autoSave": "onFocusChange", 5 "es
阅读全文
posted @ 2021-02-22 16:49 shine_lovely
阅读(135)
评论(0)
推荐(0)
2021年1月19日
Mac电脑在finder中添加- 右键打开vscode
摘要: https://blog.csdn.net/mzlogin/article/details/109368041 或者 https://blog.csdn.net/qq_44733925/article/details/107372887
阅读全文
posted @ 2021-01-19 14:57 shine_lovely
阅读(272)
评论(0)
推荐(0)
2021年1月15日
vscode 快捷键 (mac版)
摘要: 光标移动 移动到单词的最前面:option + ← 移动到单词最末尾:option + → 将当前行代码移动到上一行:option + ↑ 将当前行代码移动到下一行:option + ↓ 移动到当前行最前面:cmd + ← 移动到当前行最末尾:cmd + → 花括号之间跳转:cmd + shift
阅读全文
posted @ 2021-01-15 14:03 shine_lovely
阅读(383)
评论(0)
推荐(0)
2021年1月14日
vscode符合eslint的代码格式化设置
摘要: 1、安装插件 1)ESlint:javascript代码检测工具,可以配置每次保存时格式化js,但每次保存只格式化一点点,你得连续按住Ctrl+S好几次,才格式化好,自行体会~~2)vetur:可以格式化html、标准css(有分号 、大括号的那种)、标准js(有分号 、双引号的那种)、vue文件,
阅读全文
posted @ 2021-01-14 10:13 shine_lovely
阅读(898)
评论(0)
推荐(0)
2021年1月4日
前端实现文件流下载
摘要: 1. 与后端约定,接口是get还是post,参数是json格式,还是query string格式,请求头是否要添加什么数据,等等。 /** * @description 下载模板 * @param {Object} params */ export const export = params =>
阅读全文
posted @ 2021-01-04 15:01 shine_lovely
阅读(468)
评论(0)
推荐(0)
2020年12月24日
vue自定义指令
摘要: vue自定义指令的作用 定义任何的DOM操作,并且是可复用的。 集成第三方插件。 vue自定义指令的实现 注册自定义指令: 全局自定义指令 // 自定义权限指令 Vue.directive('permission', { inserted (el, binding) { // el: 代表使用了此指
阅读全文
posted @ 2020-12-24 14:06 shine_lovely
阅读(288)
评论(0)
推荐(0)
2020年12月22日
vue 过滤器
摘要: <template> <div> {{ time | formatTime }} {{ status | getDicVal(statusDic) }} </div> </template> statusDic: [ { key: '1', value: '启用' }, { key: '2', va
阅读全文
posted @ 2020-12-22 10:52 shine_lovely
阅读(71)
评论(0)
推荐(0)
2020年12月21日
Typesrcript学习笔记 - 报错:Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
摘要: node中express的,res.send() 或res.json()这类客户端返回的方法仅返回一次,如果多次返回就会出现这个错误! 一般是因为 if…else 判断时出错
阅读全文
posted @ 2020-12-21 09:29 shine_lovely
阅读(738)
评论(0)
推荐(0)
2020年12月18日
typescript 学习笔记 - error TS2531: Object is possibly 'null'.
摘要: 在ts爬虫代码练习时,用cheerio来获取网页中数据时 const viewCountTemp = $(e).find('.postDesc').eq(idx).find('.post-view-count').text() // "阅读(5)" infoItem.viewCount = pars
阅读全文
posted @ 2020-12-18 14:32 shine_lovely
阅读(1781)
评论(0)
推荐(0)
2020年12月11日
typescript 学习笔记 - 简单网页爬虫1:爬取整个网页的内容
摘要: 1. 新建文件夹。 crowller 2. 在文件夹下,进行 npm init -y ,进行初始化,出现package.json文件。 3. 在文件夹下,进行 tsc --init , 新增typescript的配置文件 tsconfig.json 4. 安装typescript文件,ts-node
阅读全文
posted @ 2020-12-11 16:48 shine_lovely
阅读(752)
评论(0)
推荐(0)
typescript 学习笔记 - class 类
摘要: 1. 简单创建一个class 类 1 class Person { 2 // name:string; 3 // constructor(name:string){ 4 // this.name = name 5 // } 6 // 简化写法 在构造器的参数前面加上 访问属性,就是默认添加一个参数名
阅读全文
posted @ 2020-12-11 16:36 shine_lovely
阅读(232)
评论(0)
推荐(0)
2020年12月3日
css实现radio/checkbox自定义样式
摘要: 实现思路 1.设置input 属性hidden对该input进行隐藏,或者通过display:none也可以 <input type="radio" name="type" id="adviceRadio1" value="1" checked hidden/> 2.借助label for标签通过i
阅读全文
posted @ 2020-12-03 10:41 shine_lovely
阅读(230)
评论(0)
推荐(0)
2020年11月26日
vue项目中使用 iconfont
摘要: 1. iconfont网站,将图标添加到项目,并下载到本地 2. 在src/assets/文件下,新建iconfont文件夹,将字体文件放入其中 3. 在iconfont.scss中 将下载下来的文件 iconfont.css中的内容,复制到 iconfont.scss中,注意修改 路径 1 @fo
阅读全文
posted @ 2020-11-26 17:56 shine_lovely
阅读(356)
评论(0)
推荐(0)
vue项目中使用 SVG 组件
摘要: 使用 SVG 组件 1. 安装 svg-sprite-loader npm i -D svg-sprite-loader 2. 新增 SvgIcon 组件 1 <template> 2 <svg class="svg-icon" 3 aria-hidden="true"> 4 <use :xlink
阅读全文
posted @ 2020-11-26 16:43 shine_lovely
阅读(1609)
评论(0)
推荐(0)
2020年11月25日
nodejs获取 本地ip地址
摘要: vue本地项目,想要在手机端访问的时候,需要在vue.config.js的devServe中修改 host的值 host: "localhost" ==> host: "**.**.**.**" 但每次启动前都要手动查询ipconfig/ifconfig,比较麻烦。 所以,用nodejs的‘os’来
阅读全文
posted @ 2020-11-25 16:21 shine_lovely
阅读(1812)
评论(0)
推荐(0)
2020年11月20日
vue滑块校验
摘要: 1. npm install vue-monoplasty-slide-verify --save 1 import Vue from 'vue'; 2 import SlideVerify from 'vue-monoplasty-slide-verify'; 3 4 Vue.use(SlideV
阅读全文
posted @ 2020-11-20 16:06 shine_lovely
阅读(646)
评论(0)
推荐(0)
2020年11月18日
在vue中使用elementUi的回到顶部backToTop组件
摘要: 1 <template> 2 <el-tooltip placement="top" content="回到顶部"> 3 <back-to-top :custom-style="myBackToTopStyle" 4 :visibility-height="300" :back-position="
阅读全文
posted @ 2020-11-18 17:17 shine_lovely
阅读(1134)
评论(0)
推荐(1)
vue的路由懒加载、组件懒加载
摘要: 为给客户更好的客户体验,首屏组件加载速度更快一些,解决白屏问题。常用的懒加载方式有两种:即 ES中的import 和 使用vue异步组件一、 路由懒加载 1、未用懒加载,vue中路由代码如下 1 import Vue from 'vue' 2 import Router from 'vue-rout
阅读全文
posted @ 2020-11-18 17:16 shine_lovely
阅读(464)
评论(0)
推荐(0)
vue组件复用时,页面不刷新
摘要: 一、 keep-alive包裹的组件,在actived的钩子函数总进行调用。 二、在使用Vue-router做项目时,会遇到如/serviceId/:id这样只改变id号的场景。由于router-view是复用的,单纯的改变id号并不会刷新router-view。 当然,我们可以在点击事件上加上ro
阅读全文
posted @ 2020-11-18 17:15 shine_lovely
阅读(1734)
评论(0)
推荐(0)
2020年11月14日
vue中使用高德地图
摘要: 1. npm install amap --save 2. 在index.html中写入 <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.4&key=**********4b9e&plugin=AMap.G
阅读全文
posted @ 2020-11-14 15:57 shine_lovely
阅读(5362)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告