05 2024 档案
摘要:前言 Angular 从 v14 开始大改特改,改最多的就是编码风格。 以前是 class first,Decorator first,mutable first。 现在变成了 function first,immutable first。 本篇主要是探讨 v14 后,尤其是 Signal-base
阅读全文
摘要:前言 CDK Table 是 Angular Material 对 <table> 的抽象 (无 styles) 封装。 无 styles 的 table 有什么好封装的呢? CDK Table 最重要的 3 个功能: 以 column 概念来做管理 动态选择性输出 column sticky co
阅读全文
摘要:前言 一个常见的 Tooltip 使用场景是 当有 ellipsis 时,hover 显示全文。 Tooltip 算是一种 Popover,我们之前有讲过,要搞 Popover 可以使用底层的 CDK Overlay 来实现。 而 Angular Material Tooltip 便是基于 CDK
阅读全文
摘要:前言 Observers 是 Angular Material 对游览器原生 MutationObserver 的上层封装。主要用于监听 add/remove Node。 不熟悉的朋友可以先看这篇 DOM – MutationObserver。 ContentObserver ContentObse
阅读全文
摘要:需求 这个是 Google Ads 里的 table。 那个 horizontal scrollbar 可以 sticky bottom。 我们知道 scrollbar 是游览器原生的,我们能做的 styling 少之又少,挺多只能调 size, color 而已。要让它 sticky bottom
阅读全文
摘要:前言 Scrollbar 能 styling 的东西不多 (尤其是 IOS 基本上只能 display:none 而已),但有时候我们不得不 styling。 这里记入我自己在项目中修改过的 scrollbar 经历。 参考 can i use webkit-scrollbar MDN – ::-w
阅读全文
摘要:前言 在 用 JavaScript 实现 position sticky 文章中,我提到了用 wheel 来模拟 scroll 效果。 这篇来说说具体怎么实现,挺简单的哦。 Preparation table.html <div class="container"> <table> <thead>
阅读全文