03 2020 档案

摘要:; (function () { // 调用私有方法,获取transform var transform = getTransform(); function Drag(selector) { this.elem = typeof selector 'object' ? selector : doc 阅读全文
posted @ 2020-03-24 10:49 面包_girl 阅读(421) 评论(0) 推荐(0)
摘要:Ie浏览器下,有时候获取到的window.location.origin为undefined,需要兼容 let origin: any; if (!window.location.origin) { origin = window.location.protocol + '//' + window. 阅读全文
posted @ 2020-03-20 10:49 面包_girl 阅读(1213) 评论(0) 推荐(0)
摘要:<div></div> //css div{ width:50px; height:50px; outline:20px solid; outline-offset:-42px } 效果 阅读全文
posted @ 2020-03-13 16:52 面包_girl 阅读(284) 评论(0) 推荐(0)
摘要:// 复制链接 copyLinkHandler() { const input = document.querySelector('#private-link-code'); input.value = this.copyLinkTxt; // 选中赋值过的input input.select(); 阅读全文
posted @ 2020-03-09 15:08 面包_girl 阅读(563) 评论(0) 推荐(0)
摘要:1.安装命令 npm install ngx-clipboard 2.在当前所需组件的module中引入ClipboardModule; 3.在组件中使用 阅读全文
posted @ 2020-03-09 10:30 面包_girl 阅读(1252) 评论(0) 推荐(0)
摘要:1.新建filesize管道 import {Pipe, PipeTransform} from '@angular/core'; @Pipe({ name: 'fileSizeFormat' }) export class FileSizeFormatPipe implements PipeTra 阅读全文
posted @ 2020-03-03 10:51 面包_girl 阅读(354) 评论(0) 推荐(0)
摘要:1.新建pipe 文件 import {Pipe, PipeTransform} from '@angular/core'; import {DomSanitizer} from '@angular/platform-browser'; @Pipe({ name: 'htmlReset' }) ex 阅读全文
posted @ 2020-03-03 10:48 面包_girl 阅读(743) 评论(0) 推荐(0)

/* 鼠标点击文字特效 */