Comments (3)
曾经是分开的,现在合并了,Dom的base就相当于jquery的功能,分开的麻烦点:
内部各个模块有很多互相依赖的地方,分开后会增加很多代码量
from tealui.
但是便于维护扩展啊。
我觉得拆开好。当然现在 已经在这基础上 开发很多组件了。。。
所以现在拆代价很大啊
from tealui.
Dom的Base内部其实是有分开的层次的:
// Core - 核心部分
// Parse - 节点解析部分
// Traversing - 节点转移部分
// Manipulation - 节点处理部分
// Style - CSS部分
// Attribute - 属性部分
// Event - 事件部分
// DomReady - 加载部分
// Dimension - 尺寸部分
// Offset - 定位部分
但是一般使用的时候是肯定会全部引用的,就像jquery源码也是分开的,但是往往都是直接引一个jquery.js。
所以还不如不分开,这样可以节约大概 2k的代码量,也增加执行效率
from tealui.
Related Issues (20)
- 3个bug HOT 1
- Scalable的问题 HOT 1
- ie6-8下 事件参数 e 的bug HOT 4
- Dom.has 需要判断是否参数 是否为 null HOT 1
- 不知道是什么赶脚,觉得框架不能离原生dom的设计太远。 HOT 12
- 组件的基础代码变动会影响所有组件? HOT 2
- Dom.parse('<li></li><li></li>') 时的返回节点问题。 HOT 1
- Dom#setStyle('left', 4) 无法自动添加 px
- impress代码风格
- Dialog IE6 无显示 HOT 1
- Validator.Form 组件 如何设置自定义错误提示 HOT 1
- 跑单元测试 抛了很多TypeError、ReferenceError HOT 1
- dialog width值没有统一, IE浏览器width 是400px,chrome浏览器 min-width 是200px HOT 1
- //#include browser/base.js 不存在 HOT 2
- 运用YUIDoc生成JS文档方法 HOT 1
- 有压缩的js版本? HOT 2
- addClass()提示错误
- 是否可以支持换肤功能 HOT 1
- ajax.post 不支持 dataType: 'json'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tealui.