文章分类 - 前端
摘要:function getLastMonth(date) { const now = new Date(date) const year = now.getFullYear(); const month = now.getMonth() + 1; const day = now.getDate();
阅读全文
摘要:效果: 1. option = { color: ['#3398DB'], tooltip: { trigger: 'axis', formatter: function (params) { // console.log(JSON.stringify(params)); return ( para
阅读全文
摘要:vue的 mounted钩子函数中,监听 mounted() { //监听键盘Esc按键事件 let self = this; this.$nextTick(function() { document.addEventListener('keydown', function(e) { //此处填写你
阅读全文
摘要:module.exports = { env: { test: { presets: [ [ '@babel/preset-env', { targets: {node: 'current'}, } ] ] } }, presets: ['@vue/cli-plugin-babel/preset',
阅读全文
摘要:本来这很简单,不需要写的,但是以后如果忘了,直接copy也是比较好的 前提:正常安装git,正常安装vscode 1. 插件方式: 1.1 打开VS Code ,安装GitLens — Git supercharged,版本:v11.1.3,安装后重启VS Code 外网:使用VS Code 左侧菜
阅读全文
摘要:node_modules\vue-loader\lib\template-compiler\index.js { parser: "babylon" } 换成 { parser: "babel" }
阅读全文
摘要:updated() { window.scroll(0, 0); } 有时显示,顶部的菜单默认会被滚动上去,vue中添加如上方法,跟mounted同级即可
阅读全文
摘要:推荐一个非常nice的css 动画,效果多样,好看 https://www.webhek.com/post/css3-animation-sniplet-collection.html#/ <!DOCTYPE html> <html lang="en"> <head> <meta charset="
阅读全文
摘要:this.$refs[pri][0].setAttribute("class", "xxxx xxxxx");
阅读全文
摘要:<!DOCTYPE html> <html> <head> <style> body { margin: 0; padding: 0; width: 100%; height: 100%; background-color: #282828; } </style> </head> <body> <s
阅读全文
摘要:<!DOCTYPE html> <html> <body> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" > <path d="M 100,100 L 200,100 L 200,200 " fill-opacity="0.0" stro
阅读全文
摘要:1. 原生 <input type="file" onchange="handleFiles(this.files)" /> handleFiles(files) { var base64 = "" if (files.length) { let file = files[0]; let reade
阅读全文
摘要:安装包地址 链接:https://pan.baidu.com/s/1j2cgdCNuCIBaNzTSWUw_TQ?pwd=4l6z 提取码:4l6z exe 直接next安装,自定义安装路径 后执行命令如下 nvm node_mirror https://npm.taobao.org/mirrors
阅读全文
摘要:1.IE浏览器提示"Internet Explorer 已经限制此网页运行脚本或Activex控件"在html标签下面,head上面添加<!-- saved from url=(0014)about:intenert -->即可 2.纯js在前端使用接口获取byte[],并显示为图片先把byte[]
阅读全文