自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Electron项目更新(增量与全量)

electron软件更新

2023-11-30 14:19:08 796 2

原创 微信小程序使用scss

微信小程序中使用scss

2022-10-13 10:50:38 423 1

原创 dialog函数式调用方法

dialog函数式调用

2022-08-11 15:17:29 1270 1

原创 vant自定义主题

vant自定义主题

2022-06-07 15:32:03 417 1

原创 在nuxt中配置vant按需加载并自定义主题

需要注意的是less-loader的版本,我使用的是npm install --save-dev [email protected]: { transpile: [/vant.*?less/], babel: { plugins: [ [ 'import', { libraryName: 'vant', style: (name) =

2021-09-30 15:21:34 377

原创 xlsx删除行和列

function encodeCell(r, c) { return XLSX.utils.encode_cell({ r, c });} function deleteRow(ws, index) { const range = XLSX.utils.decode_range(ws['!ref']); for (let row = index; row < range.e.r; row++) { for (let col = range.s.c; c

2021-02-02 10:03:05 818

原创 移动端1px

.retina-border { position: relative;}.retina-border::before { content: ''; position: absolute; width: 100%; height: 100%; transform-origin: left top; box-sizing: border-box; pointer-events: none; border-width: 1px; border-style: solid

2020-09-27 14:35:35 38

原创 vue高阶组件

vue一种高阶组件的写法,实际上就是父子两个组件,父组件负责数据模型,子组件负责视图渲染<div id="app"> <comp /></div>function http() { return new Promise((resolve, reject) => { setTimeout(() => { fetch('http://192.168.10.13:8765/name', { method: 'GET

2020-09-11 13:58:14 256

原创 nuxt.config.js配置postcss-pxtorem插件以及静态站点打包配置

const buildDir = "dist"export default { /* ** Build configuration ** See https://nuxtjs.org/api/configuration-build/ */ build: { // postcss配置插件postcss-pxtorem,npm i -D postcss-pxtorem postcss: { plugins: { "postcss-pxto

2020-07-27 09:44:10 1008

原创 ckeditor5图像上传,自定义上传适配器

因为本项目是基于vue.js开发的一个SPA,所以使用了ckeditor5官方提供的vue component,图片上传需要添加Simple upload adapter插件才能工作,但是在vue component中配置的编辑器类型是build过后的,和Simple upload adapter插件两者都引入了相同的模块,导致报重复引入模块的错误,于是参照官网的自定义适配器教程,实现了一个upload adapter。1.安装vue组件和编辑器npm install --save @ckeditor/

2020-07-08 11:39:23 1304

原创 JavaScript数组的扁平化

flat方法var arr1 = [1, 2, [3, 4]];arr1.flat(); // [1, 2, 3, 4]var arr2 = [1, 2, [3, 4, [5, 6]]];arr2.flat();// [1, 2, 3, 4, [5, 6]]var arr3 = [1, 2, [3, 4, [5, 6]]];arr3.flat(2);// [1, 2, 3, 4, 5, 6]//使用 Infinity,可展开任意深度的嵌套数组var arr4 = [1, 2, [

2020-07-01 11:46:13 121

原创 node.js搭建图片上传服务器

const express = require("express");const fs = require("fs");const formidable = require("formidable");const bodyParser = require("body-parser");const path = require("path");const rootPath = require("app-root-path");const { v4: uuidv4 } = require("uuid

2020-06-29 15:12:20 771

原创 node.js搭建文件服务器

const http = require("http");const url = require("url");const fs = require("fs");const path = require("path");const mime = { css: "text/css", gif: "image/gif", html: "text/html", ico: "image/x-icon", jpeg: "image/jpeg", jpg: "image/jpeg",

2020-06-29 15:07:58 497

原创 滚动穿透解决方法

滚动穿透解决方法(在nutui组件库上get到的)let scrollTop = 0;let maskVisible = true;if (maskVisible) { // 遮罩层显示时 scrollTop = document.scrollingElement.scrollTop || document.body.scrollTop; Object.assign(document.body.style, { position: "fexed", top: -scroll

2020-06-28 18:10:21 311

原创 vue父子组件的创建及挂载顺序

Vue的created和mounted执行顺序,created自上而下,mounted自下而上

2020-06-28 17:59:26 1012

原创 对象作为属性——JavaScript中toString的隐式调用

将对象作为属性时,会默认调用对象的toString方法,如果覆写了toString方法并返回了值,那么就使用返回值作为属性名;如果没有覆写toString方法,将返回[object Object]作为属性名,所以使用对象p作为属性名时,使用对象b一样可以拿到存储在属性p上的属性值const o = { toString: function () { console.log("toString called"); return "toString"; },};const p =

2020-06-28 17:56:23 642

原创 JavaScript图片压缩并下载

<input type="file" onChange="onChange(event)" />function onChange(e) { const input = e.target; const files = input.files; const file = files[0]; if (!file) return; const name = file.name; // 必须是图片类型 const type = file.type; console

2020-05-30 23:27:24 365

空空如也

空空如也

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

TA关注的人

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