上一页 1 2 3 4 5 6 ··· 9 下一页
  2021年9月26日
摘要: 什么是协变和逆变 原来,在泛型参数上添加了in关键字作为泛型修饰符的话,那么那个泛型参数就只能用作方法的输入参数,或者只写属性的参数,不能作为方法返回值等,总之就是只能是“入”,不能出。out关键字反之。 上面标红的文字中,in表示逆变,out表示协变。用例子看下什么是协变和逆变。 逆变(contr 阅读全文
posted @ 2021-09-26 17:11 chen8840 阅读(502) 评论(0) 推荐(0) 编辑
  2021年4月25日
摘要: 1.若height是确定的(比如height:100px),则height直接可确定(还受min-height,max-height影响,见height,min-height,max-heigth的作用机制问答)。 2.若width是不确定的(比如width: min-content 或 width 阅读全文
posted @ 2021-04-25 11:15 chen8840 阅读(874) 评论(0) 推荐(0) 编辑
摘要: fill-available:宽度由外部元素决定(div)min-content:宽度由内部元素宽度缩小到最小的最大内部元素宽度决定max-content:宽度由内部元素宽度扩大到最大后的最大内部元素宽度决定fit-content:(inline-block) 先取max-content和min-c 阅读全文
posted @ 2021-04-25 09:22 chen8840 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 1.min-height和height同时存在,子元素高度100%,以哪个高度为准? 答:min-height 2.height存在,子元素高度100%,子元素内容高度大于100%,子元素高度为多少? 答:高度为父元素高度100% 3.min-height 和 height 同时存在且相等,子元素高 阅读全文
posted @ 2021-04-25 09:15 chen8840 阅读(260) 评论(0) 推荐(0) 编辑
  2021年4月23日
摘要: 父元素设置了min-width:fit-content后,其宽度由子元素的宽度来决定 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content=" 阅读全文
posted @ 2021-04-23 10:14 chen8840 阅读(530) 评论(0) 推荐(0) 编辑
  2021年4月21日
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-04-21 09:34 chen8840 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 方式1,使用flex <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" 阅读全文
posted @ 2021-04-21 09:26 chen8840 阅读(220) 评论(0) 推荐(1) 编辑
  2021年3月11日
摘要: OnPush组件内部触发的事件(包括viewChild)会引起组件的一次markForCheck Detached组件内部触发的事件不会引起组件的变化检测 OnPush组件的contentChild依然会在变化检测周期时进行自身的变化检测 OnPush进行markForCheck时,会以此对父组件进 阅读全文
posted @ 2021-03-11 22:20 chen8840 阅读(178) 评论(0) 推荐(0) 编辑
  2021年3月3日
摘要: 你需要了解的关于Angular 变更检测的一切 If you think `ngDoCheck` means your component is being checked — read this article (如果你认为 `ngDoCheck`意味着组件正被检测, 那么阅读这篇文章) He w 阅读全文
posted @ 2021-03-03 14:15 chen8840 阅读(32) 评论(0) 推荐(0) 编辑
  2021年1月28日
摘要: 1.新建angular 2.添加@angular/localize ng add @angular/localize 3.设置默认locale_id,在app.module.ts中(忽略此步) import { NgModule } from '@angular/core'; import { Br 阅读全文
posted @ 2021-01-28 12:40 chen8840 阅读(687) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页