会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我们相恋了
5年32天1时35分59秒啦
玖捌
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2022年7月
react 使用 useState useRef 添加TS使用方式
摘要: useState type RecordItem = { title: string; total: number; id: number; color: string; } const [list, setList] = React.useState<RecordItem[]>(recordLis
阅读全文
posted @ 2022-07-18 17:14 玖捌
阅读(874)
评论(0)
推荐(0)
2022年6月
uniapp
摘要: slider 滑动选择器 slider 属性说明 min: 最小值 max: 最大值 step: 步长, 取值必须大于0, 并且可被(max - min)整除 disabled: 是否禁用 value: 当前取值 activeColor: 滑块左侧已选择部分的线条颜色 backgroundColor
阅读全文
posted @ 2022-06-14 18:14 玖捌
阅读(172)
评论(0)
推荐(0)
iframe 的使用 和跨域通信方法 历尽千辛万苦
摘要: iframe 标签的使用 <iframe src={url} // 需要嵌入页面的地址 frameBorder='0' // 清除自带边框 name='选材算量' // 当前iframe的名字 title='选材算量' id='xuancaisuanliang' // iframe的id width
阅读全文
posted @ 2022-06-02 15:47 玖捌
阅读(566)
评论(0)
推荐(0)
2022年4月
a 标签下载图片 先把图片个变成blob格式URL.createObjectURL(blob)
摘要: const downloadFile = (herf, downloadName = '') => { const link = document.createElement('a'); const arr = href.split('?')[0].split('/'); fetch(href) .
阅读全文
posted @ 2022-04-22 11:41 玖捌
阅读(444)
评论(0)
推荐(0)
webpack 处理图片img 信息名字
摘要: 其中 [img/]代表图片当前的文件夹,[name]表示图片原有的名字[hash:8]哈希算法生成8位的文件名,防止文件名重复[ext]代表着文件名的后缀文件夹后面要加个/,不然会当成字符串处理,作为图片的固定文件名,name,hash,ext要加个[],才能当作变量处理 module: { rul
阅读全文
posted @ 2022-04-13 11:16 玖捌
阅读(115)
评论(0)
推荐(0)
history 使用方法 push
摘要: history 路径传参携带state/query页面不刷新 history.push({ pathname: `/assort/orders/${r.goodsOrderNo}`, search: '?code=l', state: { ...Object(getValues()), }, });
阅读全文
posted @ 2022-04-13 10:23 玖捌
阅读(1852)
评论(0)
推荐(0)
手动点击 打印
摘要: // 最初调用函数function submit() { const style = getStyle(); // 需要打印的数据获取innerHTML const container = getContainer(document.querySelector('.next-drawer-body'
阅读全文
posted @ 2022-04-08 19:52 玖捌
阅读(49)
评论(0)
推荐(0)
2021年12月
大屏幕可视化
摘要: import React, { Component } from 'react'; import debounce from 'lodash.debounce' import s from './index.less' class Comp extends Component{ constructo
阅读全文
posted @ 2021-12-29 15:47 玖捌
阅读(37)
评论(0)
推荐(0)
2021年10月
uniapp 小程序上传图片
摘要: data(){ return{ imgList:[], imgArr:"", pingjiaSrc:this.adminIp + "content/image/pingjia.png", } }, methods:{ ChooseImage() { var _this = this; uni.cho
阅读全文
posted @ 2021-10-28 09:40 玖捌
阅读(704)
评论(2)
推荐(0)
2021年8月
正则
摘要: 正则 1.不允许输入特殊字符 /[`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im 2.限制只允许输入字母和英文 value.replace(/[^\w.//]/gi, ''); 3.其他 1.文
阅读全文
posted @ 2021-08-09 18:16 玖捌
阅读(28)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告