自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 css美化滚动条

用 Mac 做前端,发现Windows上出现了十分丑陋的滚动条,为了保持一致:<style lang="scss">/* 美化滚动条,为了和苹果系统保持一致 */::-webkit-scrollbar { width: 6px; height: 6px;}::-webkit-scrollbar-track { width: 6px; background: rgba(#101F1C, 0.1); -webkit-border-radius: 2em; -moz-

2021-11-03 14:07:34 344

原创 Vue + html2canvas生成海报并下载

1、安装 npm install html2canvas --save 或者 yarn add html2canvas --save2、在组件中引入:import html2canvas from "html2canvas"3、把需要生成海报的元素放在一个元素容器里,设置一个ref<div ref="poster">  <!-- 这里放需要截图的元素,自定义组件元素也可以 --></div>4、js 代码块备注:名称默认值dpi

2021-07-22 18:21:52 1094 1

原创 nuxt的@nuxtjs/axios 使用

一、发送请求1、下载npm i @nuxtjs/axios 或者 yarn add @nuxtjs/axios 2、然后在nuxt.config.js配置文件中配置modules: [ '@nuxtjs/aixos']3、使用:不用导入 axios,因为在 配置文件中导入了,所以可以在 nuxt 上下文中得到,我们就可以解构出来在 nuxt 生命周期中使用 // pages > index.vue<script>export default {

2021-07-14 16:16:46 4765 1

原创 Nuxt.js封装@axios-nuxt

1. 注意安装插件 yarn add @nuxtjs/axios yarn add @nuxtjs/proxy2.在plugins文件夹新建axios.js 内容如下:import { Message ,Loading} from 'element-ui'export default function ({ store, redirect, app: { $axios } }) { let loadingInstance = null; // 后端接口地址 // $axios.defa

2021-07-13 16:53:31 808 1

原创 css3 PC/M公共样式

PC端公共样式:html{max-width: 640px;margin:0 auto;}article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, figure, section, legend, textarea, p, bloc

2021-07-05 10:12:21 161

原创 如果在加载图片时发生错误则执行 onerror =‘‘“ 回调函数

//1.第一种方式:<img src="image.gif" onerror="myFunction()"><script> function myFunction() { alert('无法加载图片。'); }</script>//2.第二种方式:<img title="{bookname}" onerror="this.src='http://img.wulicdn.com/images/defaultbookimage/covertimere

2021-07-03 17:26:50 576

原创 node 创建本地服务器 运行HTMl

1.全局安装express框架,cmd打开命令行,输入如下命令:npm install -g express然后创建server.js文件var express = require(“express”);var app = express();app.use(express.static("./")).listen(8899);之后在命令行进入server.js所在目录输入node server.js然后打开浏览器,在地址栏输入:http://localhost:8080/index.htm

2021-07-03 17:22:48 845

原创 通用贷款计算器js 计算方法

等额本息还款计算:/*** ---------------------------------等额本息还款计算----------------------------------------------------* @param float year_lilv 年利率* @param float money 贷款金额/万* @param float month 贷款期限/月* @returns array 计算结果 array(chbj=>277777777.7777778 ,chbx=

2021-07-03 17:21:24 1571 1

原创 jsonp跨域请求

<!DOCTYPE html><html><head><meta charset="UTF-8"><title></title></head><body><div id="tit"></div><ul id="item"></ul><script src="http://img.wulicdn.com/js/jquery-1.9.1.min

2021-07-03 17:19:13 114

原创 vConsole 插件

<script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script><script type="text/javascript"> var vConsole = new VConsole(); console.log("hello word!");</script>备注:vconsole.min.js源文件代码如下/*! * vConsole

2021-07-03 17:17:22 1066

原创 git使用方式

git clone https://gitee.com/kuaiyingyong/qu.git //开始下载服务器项目文件(后边是服务地项目的地址)git add .git status //检查项目修改状态git commit -m"注释(修改的内容)"git push //添加到gitgit pull //拉取git最新文件其它命令:更新远程分支列表git remote update origin --prune查看所有分支git branch -a删除远程分支Chapater

2021-07-03 17:14:22 131

转载 vue横向切换手风琴动画效果demo

demo效果图如下:html:<div class="or-container"> <div class="box" :class="eleindex ==i?'eleactive':''" v-for="(ele,i) in piclist" :key="i" @mouseenter="enter(i)" @mouseleave="out(i)"> <img :src="ele.img"> <span>{{i}}</sp

2021-07-03 17:11:15 984

原创 nuxt.config.js 文件配置

1. head 配置页面默认meta设置具体配置:https://zh.nuxtjs.org/api/configuration-head/2. loading个性化定制页面加载 (默认显示加载进度条)可以定制它的样式,禁用或者创建自己的加载组件。具体配置:https://zh.nuxtjs.org/api/configuration-loading/3. css定义应用的全局样式文件、模块或第三方库具体配置:https://zh.nuxtjs.org/api/configuration-

2021-07-03 16:46:11 930

原创 git 如何把master分支代码合并到自己的分支

1.首先切换到主分支git checkout master2.使用git pull 把领先的主分支代码pull下来git pull3.切换到自己的分支git checkout xxx(自己的分支)4.把主分支的代码merge到自己的分支git merge master5.git push推上去ok完成,现在 你自己分支的代码就和主分支的代码一样了git push注:有冲突先解决冲突再进行提交...

2021-07-03 16:41:25 841

转载 Vue项目打包部署到Tomcat

一、使用 npm run build打包完成之后会出现一个dist文件夹,里面有static文件夹和一个index.html文件,一般我们部署在tomcat上面会将文件放在webapps文件夹下如果不进行任何修改将dist文件夹放进去的话,会出现资源路径错误的问题,因为config文件夹下index文件build默认的 assetsPublicPath:"/",除非部署的时候将dist文件里的文件放在webapps下,这样就很不科学,那我们如何解决这个问题呢修改config文件夹下index文件中的b

2021-07-03 16:38:49 763

转载 解决 Vue 重复点击相同路由,出现 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation 问题

问题描述:重复点击导航时,控制台出现报错 ,虽然不影响功能使用,但也不能视而不见。废话不多说代码如下:方案一:只需在 router 文件夹下,添加如下代码:// src/router/index.jsVue.use(Router)const router = new Router({ routes})//找到上面位置,在下面增加这段代码即可。const VueRouterPush = Router.prototype.pushRouter.prototype.push = functi

2021-06-21 14:36:33 242

原创 前端页面PC-M 两端地址自动切换

PC-M 地址自动切换从M 跳转到PC<head> <script> function isPC() { for (var n = navigator.userAgent, i = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod", "windows mobile"], o = !0, e = 0; e < i.length; e++) if (n.indexOf(i[e

2021-06-19 17:29:27 589

原创 网站一键灰色代码

清明节,禁止一切娱乐活动。政府部门的网站都是灰色看代码~ 兄弟萌!!!var date = new Date();var seperator1 = "-";var year = date.getFullYear();var month = date.getMonth() + 1;var strDate = date.getDate();if (month >= 1 && month <= 9) { month = "0" + month;}if (st

2021-06-18 17:23:32 428

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除