01 2021 档案

摘要:/** * 移出黑名单 * @param id 主键 */@Confirm({ title: '移出黑名单', content: '是否移出黑名单?' })public handleOut(id: string) { this.vdRequest(API_USER_BLACK, { id: id, 阅读全文
posted @ 2021-01-29 17:22 _ryze 阅读(280) 评论(0) 推荐(0)
摘要:oninput 尝试了2种方法都有缺陷,那我们可不可以通过监听oninput事件,如果输入的值不在0-9,就替换为空字符串呢? <input type="text" oninput="this.value = this.value.replace(/[^0-9]/g, '');"> 1 oninpu 阅读全文
posted @ 2021-01-19 10:43 _ryze 阅读(200) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-01-18 12:25 _ryze 阅读(37) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-01-18 12:21 _ryze 阅读(48) 评论(0) 推荐(0)
摘要:document.selection.createRange() 根据当前文字选择返回 TextRange 对象,或根据控件选择返回 ControlRange 对象。 配合 execCommand,在 HTML 编辑器中很有用,比如:文字加粗、斜体、复制、粘贴、创建超链接等。 实例一: <texta 阅读全文
posted @ 2021-01-15 15:33 _ryze 阅读(412) 评论(0) 推荐(0)
摘要:方法一:# function copyHandle(content){ let copy = (e)=>{ e.preventDefault() e.clipboardData.setData('text/plain',content) alert('复制成功') document.removeEv 阅读全文
posted @ 2021-01-15 15:27 _ryze 阅读(435) 评论(0) 推荐(0)
摘要:/** * 下载图片类 */export class DownloadImg { /** * 下载图片 * @param url */ public static downloadImg(url: string) { this.convertUrlToBase64(url).then(res => 阅读全文
posted @ 2021-01-15 15:14 _ryze 阅读(172) 评论(0) 推荐(0)