会员
周边
众包
新闻
博问
闪存
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
HLLZ
博客园
首页
新随笔
联系
订阅
管理
2023年12月6日
vant组件一个文本框添加多项校验
摘要: 下图为用户密码校验表单,需要对密码是否为空,密码长度,以及密码强度进行校验。 但是 “密码格式不正确!”这个校验信息并不是我想要的,我想在isPassWordStrength方法中区分开密码长度提示和密码强度提示,方便用户知道具体是什么问题导致校验不通过。 <van-field required v
阅读全文
posted @ 2023-12-06 17:46 HLLZ
阅读(503)
评论(0)
推荐(0)
2021年2月18日
前端页面的防抖与节流
摘要: 一.防抖 事件触发后固定时间内不会再次调用方法 <div> <button onclick="count()">点击</button> </div> <div id='num'></div> <script type="text/javascript"> let num = 1; let dom =
阅读全文
posted @ 2021-02-18 14:51 HLLZ
阅读(430)
评论(0)
推荐(0)
2020年10月23日
oss获取视频文件第一帧做封面
摘要: oss获取视频文件第一帧做封面 视频地址+?x-oss-process=video/snapshot,t_1000,m_fast 例:https://video.aliyunoss.com/1.mp4?x-oss-process=video/snapshot,t_1000,m_fast 文章转载于:
阅读全文
posted @ 2020-10-23 15:46 HLLZ
阅读(2867)
评论(0)
推荐(0)
2020年9月18日
uniapp 上传图片,视频,文件 到阿里云oss (egg.js后端)
摘要: 直接上代码:(博客中红色标注请注意) 1.前端(分为两个部分,选择图片和上传图片) 前端代码,用到了uni-app中的drawer(抽屉)组件,大家自定义一个点击事件即可。 效果图 <uni-drawer class="drawer" ref="drawer" mode="right"> <view
阅读全文
posted @ 2020-09-18 15:36 HLLZ
阅读(3136)
评论(0)
推荐(3)
2020年6月11日
React-Router入门
摘要: 1.新建react项目 安装react-router-dom插件 create-react-app 项目名 npm install react-router-dom 2.基础代码 import React from 'react'; import {BrowserRouter as Router,
阅读全文
posted @ 2020-06-11 09:48 HLLZ
阅读(247)
评论(0)
推荐(0)
2020年6月10日
React-Hooks 使用useContext进行父子组件传值
摘要: 1.父组件代码 import React, { useState } from 'react'; import Child from './child.js' import CountContext from './createContext' function Example(){ const [
阅读全文
posted @ 2020-06-10 15:14 HLLZ
阅读(691)
评论(0)
推荐(0)
2020年6月9日
webpack.config.js详细配置
摘要: const { resolve } = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') /** * entry:入口起点 * 1.string --> './src/index.js' * 打包形成一个
阅读全文
posted @ 2020-06-09 15:53 HLLZ
阅读(809)
评论(0)
推荐(0)
2020年6月8日
webpack 之 oneOf babel缓存 tree shaking
摘要: oneOf: 提高loader匹配效率,使用方法如下,匹配到一个loader后,后面的就不会再继续匹配了。 注意:不能有两个配置处理同一种类型文件 module:{ rules:[ { test:/\.js$/, exclude:/node_modules/, // //优先执行 enforce:'
阅读全文
posted @ 2020-06-08 13:16 HLLZ
阅读(476)
评论(0)
推荐(0)
webpack 之 HMR热更新 source-map配置
摘要: HMR热更新 1.配置热更新,在devServer中配置hot,开启HMR功能 devServer:{ contentBase: resolve(__dirname,'build'),//自动构建目录,打包后的文件夹 compress:true, port:3000, open:true, hot:
阅读全文
posted @ 2020-06-08 09:41 HLLZ
阅读(571)
评论(0)
推荐(0)
2020年6月6日
webpack 生产环境配置(无注释)
摘要: const { resolve } = require('path') const MiniCssExtractPlugin =require('mini-css-extract-plugin') const HtmlWebpackPlugin = require('html-webpack-plu
阅读全文
posted @ 2020-06-06 10:27 HLLZ
阅读(252)
评论(0)
推荐(0)
下一页
公告