You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Activity
hax commentedon Jul 8, 2015
is$Element的使用场景是?
hax commentedon Jul 8, 2015
可以加上$root和$head。
但是有个问题这些东西为什么不是直接变成$.body,$ .head,$.win 上,这样似乎更好用点。
cssmagic commentedon Jul 8, 2015
内部会用到。但业务场景一时想不起来了。
cssmagic commentedon Jul 8, 2015
$root貌似就是$doc?$head在业务中不常用,所以没有加。只是想统一挂载到
_这个命名空间上,然后所有接口的形式保持一致(_.{module}.{api})。hax commentedon Jul 9, 2015
$head偶尔会用,插个样式表、脚本什么的
我想既然是$xxx,前提是有zepto/jquery,那么放在$的命名空间上更合理些吧。这样也不需要
_的存在。但也许不好属于这个repo了。cssmagic commentedon Jul 10, 2015
那跟现在的
_.dom.$doc是一样的。如果做业务开发的同学有这方面需求,会考虑提供一个高层次的接口来做这个,尽量不让业务层自己做这些事。(BTW,插脚本可以用 Zepto/jQuery 的
$.getScript()。)目前这样的命名(
_.dom.$xxx)单纯是为了接口的一致性考虑。hax commentedon Jul 10, 2015
我以为
$doc是$(document)...cssmagic commentedon Jul 11, 2015
我错了……
我会改成这样: