自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Windows-docker集成SRS服务器的部署和使用

Windows-docker集成SRS 安装和使用

2023-08-28 15:31:03 1515

原创 a-range-picker设置中文

a-range-picker设置为中文

2022-11-18 17:49:32 677 3

原创 a-range-picker样式修改

a-range-picker

2022-11-18 17:43:10 1613

原创 vue组合快捷键

vue组合快捷键

2022-08-04 17:30:41 899

原创 模拟ajax提交生成文件流进行下载(未知文件类型,支持所有类型文件直接下载)

/** * 文件下载方法(支持任何格式文件) * fileUrl 文件路径,fileName 下载后的文件新名 */function fileDownloadFun(fileUrl,fileName) { if("undefined" == typeof fileUrl || !fileUrl){ alert('文件路径不能为空');return false; } let fileUrlArr = fileUrl.split('.'); let fileFix = "unde

2022-04-25 09:48:58 313

原创 vue-cli3打包至非根目录及element.ui字体图标丢失

vue-cli3脚手架打包至线上非根目录需要的两步操作: 在项目目录下的config/index.js中设置assetsPublicPath为’./‘,代码如下: build: { // Template for index.html index: path.resolve(__dirname, '../dist/index.html'), // Paths assetsRoot: path.resolve(__dirname, '../dist'), asset

2022-04-20 14:14:51 987

原创 js循环splice删除可能会遇到的坑

## splice删除一级const list = [ {"className": "花花5555", "gradeName": "毕业班"}, {"className": "中ei班", "gradeName": "毕业班"}, {"className": "花花班5", "gradeName": "小班"}, {"className": "花花", "gradeName": "大班"}, {"className": "花花班", "grade

2022-03-22 09:39:38 356

原创 web模拟textarea内容高亮显示

1.div模拟textarea<style> .box{ width: 400px; height: 100px; outline: none; border: 1px solid #a0b3d6; } .box:focus{ outline: none; }</style><div contenteditable="true" class="box" v-html="realText(keywords)">

2022-03-08 16:00:59 807

原创 字符编码asc与utf-8与GB2312相互转换

asc与utf-8转换<!DOCTYPE html><html lang="zh-CN"> <head> <title>在线编码转换</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="zh-CN" /> <

2022-03-07 16:53:05 880

原创 vue activated、deactivated发生的生命周期

vue activated、deactivated发生的生命周期1.使用keep-alive 缓存的组件后,created和mounted第一次成功,再次进入页面不进行触发ctivated进入路由前进行触发使用keep-alive 缓存的组件后,destory和beforedestory不进行触发,失效deactivated路由离开前进行触发...

2022-03-02 11:07:08 592 2

转载 html繁体简体切换

繁体简体切换<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>繁简转换测试</title> <script type="text/javascript" src="zh.js"></script></head><body><p>繁简测试</p>

2022-02-18 14:31:46 707

原创 CSS里的pointer-events属性(去掉hover)

pointer-events:none;现代浏览器里CSS的职责范围和JavaScript的越来越模糊分不清。比如CSS里-webkit-touch-callout属性在iOS里能禁止当用户点击时弹出气泡框。而本文要说的pointer-events的风格更像JavaScript,它能够:阻止用户的点击动作产生任何效果阻止缺省鼠标指针的显示阻止CSS里的hover和active状态的变化触发事件阻止JavaScript点击动作触发的事件...

2022-02-18 13:45:33 3297

原创 li标签超出自动换行

white-space:normal;word-break : break-all;word-wrap: break-word;

2022-02-17 17:03:28 3051

原创 el-upload上传

el-upload上传<template> <div> <el-upload class="upload-demo" action="#" multiple :http-request='fileValueChange' :limit="1" :on-error="uploaderror" :file-list="fileList" accept=".zip" :before-upload="beforeUpload" :on-exceed="handleE

2022-01-26 16:41:00 968

原创 js监听localStorage

监听设置//添加setItemEvent监听事件window.addEventListener("setItemEvent", function (e) { //监听key为author的localstorage变化 if(e.key === 'author'){ }}); 移除监听window.addEventListener("removeItemEvent", function (e) { //监听key为author的localstorag

2022-01-20 10:01:03 4777

原创 js监听键盘事件

document.addEventListener('keydown', function(e){ if (e.keyCode == 86 && e.ctrlKey) { alert("你按下了ctrl+V"); } if (e.keyCode == 86 && e.altKey) { alert("你按下了alt+V"); } if (e.keyCode =..

2022-01-18 16:32:50 6969 1

原创 vue node_modules复制到内网环境

1.首先检测node版本,尽可能和公司内网环境一致window7环境注意点有的nodejs版本不支持win7,在win7系统中执行npm -v时会有以下提示This application is only supported on Windows 8.1, Windows Server 2012 R2, or higher.下载v12.16.2及之前的版本即可2.node-sass和sass-loader配合版本"node-sass": "^4.14.1", "sass-loader":

2022-01-06 15:12:34 2312

原创 vue 视频播放插件VideoPlayer

vue 视频播放插件VideoPlayer1.npm install vue-video-player --save2.main.js引入import VideoPlayer from 'vue-video-player'import 'vue-video-player/src/custom-theme.css'import 'video.js/dist/video-js.css' Vue.use(VideoPlayer) ...

2021-12-27 17:05:07 1735

原创 vue音频wavesurfer波形图

1.效果图2.npm install wavesurfer.js3.main.js或者使用组件内引入 import WaveSurfer from 'wavesurfer.js' import CursorPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.cursor.js' import Timeline from 'wavesurfer.js/dist/plugin/wavesurfer.timeline.js'<template&

2021-12-27 17:01:36 2105 1

原创 elementui时间季度选择器2

<template> <div> 日期按季度选择 <mark style="position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,0);z-index:999;" v-show="showSeason" @click.stop="showSeason=false"></mark> <el-input placeholder="请选择季度" v-model=

2021-11-24 17:32:48 277

原创 elementui时间季度选择器

<template> <div> 日期选择日期单个 <mark style="position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,0);z-index:999;" v-show="showSeason" @click.stop="showSeason=false"></mark> <el-input placeholder="请选择季度" v-model

2021-11-24 17:31:51 2241 3

原创 echarts--x轴y轴拖拽

echarts–x轴y轴拖拽//dataZoom和series同级dataZoom: [ //x轴拖拽 { show: true, start: 94, end: 100 }, //y轴拖拽 { type: 'inside', start: 94, end: 100 }, {

2021-11-08 16:12:17 1842

原创 Vue CLI3 bable兼容ie11ie10

Vue CLI3 bable兼容ie11ie10Vue CLI3不兼容IE11打开空白报错SCRIPT1003: 缺少 ‘:‘1、安装依赖cnpm i @babel/polyfill -S2、入口文件 main.js 引入依赖import '@babel/polyfill';3.修改 babel.config.jsmodule.exports = { presets: [ [ '@vue/app', { useBuiltIns: 'ent

2021-05-26 11:18:45 575

原创 bable打包的use strict取消(vue-cli3)

bable打包的use strict取消vue-cli31.插件transform-remove-strict-modenpm i babel-plugin-transform-remove-strict-mode -S或者yarn add babel-plugin-transform-remove-strict-mode -S2.根目录新建loader文件夹loader下新建remove-strict.jsfunction removeStrict(code) { return cod

2021-05-26 11:11:54 1581

原创 移除bable打包的use strict模式(vue2)

移除bable打包的use strict模式(vue-cli2)打包之后dist文件夹全局查看use strict个数babel-loader有一个插件transform-remove-strict-mode,webpack.config.js的配置如下(记得要安装npm i babel-plugin-transform-remove-strict-mode -S或者yarn add babel-plugin-transform-remove-strict-mode -S)1.一个loader(文件

2021-05-26 11:00:01 793

转载 Vue 兼容ie 使用transpileDependencies

Vue 兼容ie 使用transpileDependenciesnode_modules里的依赖默认是不会编译的,会导致es6语法在ie中的语法报错,所以需要在vue.config.js中使用transpileDependencies属性配置node_modules中指定哪些文件夹或文件需要编译. transpileDependencies: [ /[/\\]node_modules[/\\](.+?)?element-ui(.*)[/\\]src/, /[/\\]nod

2021-05-19 16:10:48 30569 5

原创 vue父传子监听

父组件<template> <div class="home"> <img alt="Vue logo" src="../assets/logo.png"> <!--<HelloWorld msg="Welcome to Your Vue.js App"/>--> 父组件的值<input type="text" v-model="parentVal"> <d

2021-05-14 09:11:52 560

原创 vuenbsp;不起作用

vuenbsp;不起作用<span v-html="'\u00a0\u00a0'"/></span>

2021-05-12 09:41:26 1413 2

原创 npm安装windows-build-tools等packages时卡在Successfully installed Python 2.7处挂起的解决方法

npm安装windows-build-tools等packages时卡在Successfully installed Python 2.7处挂起的解决方法?卡在了Successfully installed Python 2.7处,只好Ctrl+C终止了批处理操作。经过一番查找,参考https://github.com/felixrieseberg/windows-build-tools/issues/123和https://github.com/felixrieseberg/windows-build-

2021-04-12 18:06:08 2102 1

原创 ant-design-vue锚点

ant-design-vue锚点1.npm install ant-design-vue2.main.js引入import Antd from 'ant-design-vue';import 'ant-design-vue/dist/antd.css';Vue.config.productionTip = false;Vue.use(Antd);3.使用·<template> <div class="home"> <a-button type="prim

2021-03-17 08:15:54 2784

原创 vue省市区三级联动(行政区划代码)

vue省市区三级联动(地区编码)vue.js不放入了<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> .container { width: 100%; height: 100px; overflow: hidden; backgr

2021-03-10 08:52:49 665 1

原创 js阻止事件冒泡

js阻止事件冒泡<div id="div1"> <div id="div2"></div> </div> var div2 = document.getElementById("div2");var div1 = document.getElementById("div1");div2.onclick = function(ev){ // 红色面板加事件 div1.style.display = "block"; st

2021-03-10 08:50:02 100

原创 echarts-横向柱状图的左侧文字左对齐设置

在需要左对齐的Y轴中这样设置,设置完后会发现,文字跟圆柱重合覆盖(跟你需要的位置有区别)yAxis:[ { axisLabel:{ margin: 150, textStyle: { align: 'left' } } }]这时候需要设置grid中的leftgrid: { top: "0%", left: "-10%", right

2021-02-18 13:41:13 6087

原创 echart 柱状图如何让y轴文字靠左显示,series上文字右对齐显示

echart 柱状图如何让y轴文字靠左显示,series上文字右对齐显示yAxis: [{ type: 'category', inverse: true, splitLine: { show: false }, axisTick: { show: false }, axisLine: { show: false

2021-02-01 16:38:06 6060 2

原创 vue绑定多个class名称

vue绑定多个class名称:class="[a==2?'class':'',b==3?'class':'class1']"

2021-02-01 16:35:59 275

转载 bcryptjs加密

bcryptjs加密1.bcryptjs是nodejs中比较好的一款加盐(salt)加密的包.所谓加盐.就是系统生成一串随机值,然后混入原始密码中,然后按照加密方式生成一串字符串保存在服务器。2.安装$ npm install bcryptjs3.使用/** * bcryptjs 加密 */const bcryptjs = require('bcryptjs');const password = '123456';/** * 加密处理 - 同步方法 * bcryptjs.h

2021-01-28 09:20:15 863

原创 如何在vue项目中使用md5加密

如何在vue项目中使用md5加密1.npm下载npm install --save js-md52.main.js引入import md5 from 'js-md5';Vue.prototype.$md5 = md5;3.使用页面引入import md5 from 'js-md5';4.使用this.$md5('holle') // bcecb35d0a12baad472fbe0392bcc043...

2021-01-27 09:47:45 200

转载 Vue项目中是用jsencrypt.js进行RSA加密解密

Vue项目中是用jsencrypt.js进行RSA加密解密1、安装jsencryptnpm install jsencrypt2、vue中引用jsencrypt第一种:import { JSEncrypt } from 'jsencrypt'第二种:import JSEncrypt from 'jsencrypt'3.代码示例<script>import { JSEncrypt } from 'jsencrypt'export default { name: 'Hell

2021-01-27 09:44:49 688

原创 高德地图+echarts禁止缩放

高德地图+echarts禁止缩放map.setStatus({ dragEnable: false, // 地图是否可通过鼠标拖拽平移,默认为true zoomEnable: true, //地图是否可缩放,默认值为true})

2021-01-12 08:52:26 2578

原创 js监听网络状态

检测断网断网window.addEventListener("offline", () => { console.log("已断网");});网络已连接window.addEventListener("online", () => { console.log("网络已连接");});

2020-12-23 10:02:25 379

空空如也

空空如也

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

TA关注的人

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