4
JavaScript 实现的 Diolog 弹框的库,是基于什么原因考虑, 才会『基于内容的数据类型,...
source link: https://www.v2ex.com/t/797656
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
JavaScript 实现的 Diolog 弹框的库,是基于什么原因考虑, 才会『基于内容的数据类型,使用不同的默认的弹框关闭方式』?
9 条回复 • 2021-08-24 15:16:57 +08:00
eason1874 23 小时 41 分钟前 1
@manyfreebug #3 全部用 hide 那每一次弹窗提示就多一个弹窗 DOM,当控制台使用几个小时下来 DOM 数量得爆炸。如果要二取一,只能是 remove
我觉得设计逻辑是:需要用到 DOM 的是交互功能(可能复用),HTML 字符串通常是提示(看完就没用了)
这个组件库体验感不错,简约,大方,素雅
我觉得设计逻辑是:需要用到 DOM 的是交互功能(可能复用),HTML 字符串通常是提示(看完就没用了)
这个组件库体验感不错,简约,大方,素雅
aasdkl 23 小时 36 分钟前 1
应该就是组件库自己的约定吧
如果你的 content 是 string,我就认为你这个 dialog 是一次性的,就直接销毁
不然我就认为你这个 dialog 是需要反复使用的,就保留下来
如果你的 content 是 string,我就认为你这个 dialog 是一次性的,就直接销毁
不然我就认为你这个 dialog 是需要反复使用的,就保留下来
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK