自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 el-table合并单元格

【代码】el-table合并单元格。

2023-09-19 14:11:15 385

原创 微信小程序Watch监听

【代码】微信小程序Watch监听。

2022-11-21 14:16:41 245 1

原创 Hybird和Android iOS通信

【代码】Hybird和Android iOS通信。

2022-09-19 13:39:11 206

原创 金额正则匹配

【代码】金额正则匹配。

2022-09-08 17:01:20 192

原创 Vue 导出二进制流文件

代码】Vue导出二进制流文件。

2022-07-22 16:24:24 376

原创 leaflet 地图

leaflet地图

2022-06-09 11:58:10 855

原创 类式axios封装

封装axios

2022-06-02 10:31:28 144

原创 ali-oss 上传图片

/* * @Author: zhanggenyuan [email protected] * @Date: 2022-05-17 13:48:59 * @LastEditors: zhanggenyuan [email protected] * @LastEditTime: 2022-05-17 13:50:51 * @FilePath: \admin-web\src\api\ali-oss.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileH

2022-05-17 18:20:33 542 1

原创 Vue 钉钉扫码登录

2.X<template> <div id="app"> <div id="login_container"></div> </div></template><script>export default { components: {}, data() { return { redirect: undefined, appid: 'ding8lrom1le5z

2022-05-08 21:07:24 1083

原创 正则表达式

const MOBILE_REG = /^1\d{10}$/; // 验证手机号const EMAIL_REG = /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/; // 验证邮箱const MONEY_REG = /^([1-9][\d]{0,7}|0)(\.[\d]{1,2})?$/; // 验证RMBconst NAME_REG = /^([\u4e00-\u9fa5]+|[a-zA-Z0-9]+)$/; // 名字(包括中文、英文、数字)const C.

2022-05-02 17:22:20 176

原创 Mac升级node版本

sudo npm cache clean -f //清除nodejs的cachesudo npm install -g n //使用npm安装n模块npm view node versions // node所有版本sudo n 15.0.0 // 指定版本sudo n latest // 升级到最新版本sudo n stable // 升级到稳定版本sudo n xx.xx // 升级到具体版本号...

2022-04-23 22:29:16 1328

原创 Vue React 等 一键复制

npmjs文档下载npm i use-light-copy --save使用支持Promise.then 返回Boolean true为复制成功/** @name: toCopy* @test: test font* @msg:* @param text:String options:Object =>{debug:Boolean}* @return Promise=>then(res:Boolean)*/const { toCopy } = require('u

2022-04-11 15:38:04 949

原创 node Vite 读取文件夹中所有文件

const path = require(‘path’)const files = require.context(’@/components/home’, false, /.vue$/)const modules = {}files.keys().forEach(key => {undefinedconst name = path.basename(key, ‘.vue’) //返回文件名 不含后缀名content= files(key).default || files(key)})

2022-04-10 17:54:10 6908

原创 Tinymce 设置CV图片

initTinymce() { const _this = this window.tinymce.init({ selector: `#${this.tinymceId}`, language: this.languageTypeList['en'], height: this.height, body_class: 'panel-body ', object_resizing: false,

2022-04-08 14:40:46 205

原创 前端导出文件

npm链接npm install js-file-download --savefunction download(id) { return new Promise((resolve, reject) => { axios.get(`${url}id`, { responseType: 'blob', headers: { 'Content-Type': 'application/octet-stream' }

2022-03-30 13:32:37 1088

原创 nodejs multer封装 上传文件

<template> <el-upload class="upload-demo" drag action="http://127.0.0.1:3000/upload/upload" multiple > <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em>&

2022-02-28 16:03:12 298

原创 Mac 配置 mongoDB

点击跳转

2022-02-26 13:14:01 381

原创 sass切换主题

@mixin theme { color: #fff; background-color: #000; [data-theme="theme1"] & { color: #f00; background-color: antiquewhite; } [data-theme="theme2"] & { color: green; background-color: aqua; } [data-theme="theme3"] &

2022-02-11 22:09:27 627

原创 接入摄像头源码

地址

2021-12-31 17:44:30 260

原创 Vue切片上传

<template> <div> <input type="file" @change="handleFileChange" /> <el-button @click="handleUpload">上传</el-button> </div></template><script>const SIZE = 10 * 1024; // 切片大小expo

2021-12-30 13:40:19 940

原创 Vue 配置cdn 优化

vue.config.js chainWebpack(config) { config.plugin("preload").tap(() => [ { rel: "preload", fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], include: "initial" } ]); config.set("external

2021-12-27 09:21:20 446

原创 dllPlugin

[大佬的文档](https://www.jb51.net/article/160137.htm)

2021-12-22 15:18:27 101

原创 正则匹配图片 ,视频

export function fixImg(htmlstr:string):string{ //正则匹配所有img标签 //var regex0 = new RegExp("(i?)(\<img)([^\>]+\>)","gmi"); //正则匹配不含style="" 或 style='' 的img标签 var regex1 = new RegExp("(i?)(\<img)(?!(.*?style=['\"](.*)['\"])[^\>]+\>)","

2021-11-23 15:35:54 1832

原创 Vue 接入 科大讯飞

audio.js/* * @Autor: zhanggenyuan * @Date: 2021-11-09 17:40:51 * @Description: *//* * @Autor: lycheng * @Date: 2020-01-13 16:12:22 *//** * Created by iflytek on 2019/11/19. * * 在线语音合成调用demo * 此demo只是一个简单的调用示例,不适合用到实际生产环境中 * * 在线语音合成 WebAPI

2021-11-09 17:53:31 886

原创 Vue 语音播报

<template> <div> <h1>111111111</h1> <i @click="reader" class="el-icon-microphone"></i> <div id="group">{{ words }}</div> </div></template><script>export default { data

2021-11-09 16:21:37 2135

原创 axios 缓存 Token无痛刷新

/* * @Author: zhang gen yuan * @Date: 2021-10-09 17:51:00 * @Descripttion: */import axios from 'axios' // 数据存储export const cache = { data: {}, set (key, data, bol = false) { if (bol) { localStorage.setItem(key, JSON.stringify(data))

2021-10-09 17:55:59 354

原创 轮播一页显示多少条数据

// array 展示swiper的数组 // size 每页展示数据的个数 swiper(arr, size) { // 定义好全局this指向 let that = this; // 获取数组长度 var length = arr.length; // 一共可以分为几页,ceil:取整,有小数点加一 例如:1.2 取 2 var page = Math.ceil(length / size);.

2021-10-08 09:24:27 229

原创 Vue新手指引

driver.jsnpm install driver.js --saveutils / driver.jsexport default [ { element: '#some-element1', popover: { title: '第一项', description: '第一项的描述', position: 'bottom', } }, { ele

2021-09-24 11:03:34 1358

原创 Elementui树状结构表格 树局部刷新

2021-09-22 16:21:46 476

转载 performance 优化

https://www.cnblogs.com/tugenhua0707/p/10982332.html 本文转载 Performance --- 前端性能监控 2019-06-05 22:23 龙恩0707 阅读(4429) 评论(1) 编辑 收藏 举报 Performanc

2021-09-18 15:52:13 1301

原创 electron

// 如果安装失败npm install --save-dev electron-chromedrivervue add electron-builder

2021-09-16 22:16:20 89

转载 css 动画 打字效果

本文借鉴 https://blog.csdn.net/weixin_39843414/article/details/119792197使用 CSS 实现打字效果 <h1>Pure CSS Typing animation.</h1><style lang="scss">h1 { font-family: monospace; width: 26ch; white-space: nowrap; overflow: hidden; animat

2021-09-16 10:28:38 108

原创 NProgress

npm install --save nprogressrouter.jsimport NProgress from 'nprogress'import 'nprogress/nprogress.css'router.beforeEach((to, from, next) => { NProgress.start() next()})router.afterEach(() => { NProgress.done()})App.vue 改变自定义颜色#n

2021-09-15 17:07:15 95

原创 flyio 无感刷新token

npm install flyiovar Fly=require('flyio/dist/npm/wx');var fly=new Fly();<!DOCTYPE html><html><head lang="zh-cmn-Hans"> <meta charset="UTF-8"> <title>Fly.js Demo</title> <meta name="renderer" content

2021-09-14 22:21:22 351

原创 refreshToken

import store from '@/store'import config from './config.js'import Base64 from './base64.js'// H5版本// #ifdef H5import Fly from "flyio/dist/npm/fly"// #endif//微信小程序和APP版本// #ifndef H5import Fly from "flyio/dist/npm/wx"// #endifconst request = new

2021-09-13 16:22:58 144

原创 simplest-i18n

main.jsimport t from './t';Vue.prototype.$t = t;getLang.jsimport store from './store/index'const langs = ['zh-CN', 'en']const getLang = { lang:store.state.lang, langs}export default getLang;t.jsimport i18n from 'simplest-i18n';import

2021-09-13 13:40:11 147

原创 uni拦截器

// common/request.js// 目前没有针对uni的Fly版本,使用wx版本没有问题import store from '@/store'import config from './config.js'import Base64 from './base64.js'// H5版本// #ifdef H5import Fly from "flyio/dist/npm/fly"// #endif//微信小程序和APP版本// #ifndef H5import Fly fr

2021-09-09 16:07:42 283

原创 前端技术总结

添加链接描述

2021-08-23 17:18:51 50

原创 uni-app接入友盟统计

2021-08-22 00:29:48 301

原创 Permission

index.js/* * @Author: zhang gen yuan * @Date: 2021-08-09 14:34:28 * @Descripttion: */import Vue from 'vue'import permissionFunc from './permission'Vue.directive('permission', { inserted(el, binding) { let p = binding.value; if

2021-08-09 17:53:38 95

空空如也

空空如也

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

TA关注的人

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