摘要: 1、如果obj里面存在时间对象,JSON.parse(JSON.stringify(obj))之后,时间对象变成了字符串。 2、如果obj里面有RegExp/Error对象,则序列化的结果降得到空对象。 3、如果obj里有函数,undedined,则序列化的结果会把函数,undefined丢失。 4 阅读全文
posted @ 2022-06-24 14:59 努力的样子 阅读(28) 评论(0) 推荐(0) 编辑
摘要: // 兼容iphonex @media only screen and (device-width:375px) and (device-height:812px) and (-webkit-device-pixel-ratio:3) { .iphonex{padding-top:88px;padd 阅读全文
posted @ 2019-05-14 15:28 努力的样子 阅读(243) 评论(0) 推荐(0) 编辑
摘要: input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #b8c4ce!important; } input:-moz-placeholder, textarea:-moz-placeholder 阅读全文
posted @ 2019-05-14 15:07 努力的样子 阅读(760) 评论(0) 推荐(0) 编辑
摘要: let myEvent = new CustomEvent("newMessage", { detail: { message: "davidwalsh" }, bubbles: true, cancelable: false })自定义userLogin事件,这个浏览器自带的click事件是一样的 阅读全文
posted @ 2019-05-14 14:41 努力的样子 阅读(1962) 评论(0) 推荐(1) 编辑
摘要: 转:https://blog.csdn.net/silence_pinot/article/details/81018452 知识点引用来自于: http://danml.com/download.html 可以直接传下载地址 使用 download(this.logUrl) 在前端想要生成txt或 阅读全文
posted @ 2019-01-16 15:24 努力的样子 阅读(5174) 评论(0) 推荐(0) 编辑
摘要: function isJson(str) { if (typeof str == 'string') { try { var obj=JSON.parse(str); if(typeof obj == 'object' && obj ){ return true; }else{ return fal 阅读全文
posted @ 2019-01-16 15:08 努力的样子 阅读(805) 评论(0) 推荐(0) 编辑
摘要: <ul nz-menu [nzMode]="'inline'" nzTheme='dark' [nzInlineCollapsed]="isCollapsed"> <li nz-submenu *ngFor="let parent of menus" [nzOpen]="rla2.isActive" 阅读全文
posted @ 2018-11-08 13:21 努力的样子 阅读(2552) 评论(0) 推荐(0) 编辑
摘要: 在父组件中注入子组件 @ViewChild(BaUploadComponent) private baUpload: BaUploadComponent; 在子组件中注入父组件 @Inject(forwardRef(() => DetailsComponent)) private _parent: 阅读全文
posted @ 2018-10-26 19:17 努力的样子 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 直接献上代码 父组件 import { Component, OnInit } from '@angular/core'; @Component({ selector: 'ngx-input', templateUrl: ` <p>双向绑定</p> {{pvalue}} <input type="r 阅读全文
posted @ 2018-09-27 20:02 努力的样子 阅读(805) 评论(0) 推荐(0) 编辑
摘要: 1,只支持整数或小数 /^-?[1-9]+\d*([.]{1}[0-9]+){0,1}$/.test(string)&&/^-?0(\.\d*)?$/.test(string) 2,输入正确的ip地址 /^(\d|[1-9]\d|1\d{2}|2[0-5][0-5])\.(\d|[1-9]\d|1\ 阅读全文
posted @ 2018-07-25 16:31 努力的样子 阅读(179) 评论(0) 推荐(0) 编辑