摘要: 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)
摘要: slider 滑动选择器 slider 属性说明 min: 最小值 max: 最大值 step: 步长, 取值必须大于0, 并且可被(max - min)整除 disabled: 是否禁用 value: 当前取值 activeColor: 滑块左侧已选择部分的线条颜色 backgroundColor 阅读全文
posted @ 2022-06-14 18:14 玖捌 阅读(172) 评论(0) 推荐(0)
摘要: iframe 标签的使用 <iframe src={url} // 需要嵌入页面的地址 frameBorder='0' // 清除自带边框 name='选材算量' // 当前iframe的名字 title='选材算量' id='xuancaisuanliang' // iframe的id width 阅读全文
posted @ 2022-06-02 15:47 玖捌 阅读(566) 评论(0) 推荐(0)
摘要: 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)
摘要: 其中 [img/]代表图片当前的文件夹,[name]表示图片原有的名字[hash:8]哈希算法生成8位的文件名,防止文件名重复[ext]代表着文件名的后缀文件夹后面要加个/,不然会当成字符串处理,作为图片的固定文件名,name,hash,ext要加个[],才能当作变量处理 module: { rul 阅读全文
posted @ 2022-04-13 11:16 玖捌 阅读(115) 评论(0) 推荐(0)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 正则 1.不允许输入特殊字符 /[`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im 2.限制只允许输入字母和英文 value.replace(/[^\w.//]/gi, ''); 3.其他 1.文 阅读全文
posted @ 2021-08-09 18:16 玖捌 阅读(28) 评论(0) 推荐(0)