Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新版本的特性积累 #790

Closed
RubyLouvre opened this issue Apr 7, 2015 · 12 comments
Closed

新版本的特性积累 #790

RubyLouvre opened this issue Apr 7, 2015 · 12 comments

Comments

@RubyLouvre
Copy link
Owner

1.4.2
修正parseHTML 对非标签类型的字符串解析失败的BUG
修正监控数组push方法没有同步$last属性的BUG
更改safari5.x下contains方法的存在性检测
更改对avalon.*.shim文件的构建
修正IE6-11下的ms-duplex-checked BUG
优化提示信息
添加data-include-cache辅助指令

@RubyLouvre RubyLouvre changed the title 1.4.2 新版本的特性积累 Apr 17, 2015
@RubyLouvre
Copy link
Owner Author

1.4.3
修复【ms-attr绑定对布尔属性的值为false】的BUG,必须先设置为false,再用removeAttribute移除
修复【avalon.modern下data()方法】 BUG
修复【postion()对父元素出现滚动条取值不正确】的BUG
修复【ms-include-src在循环绑定中发出N多相同请求】的BUG
修复avalon移动端无法触发select下拉选框bug
修复【为监控数组删除或添加项时会让触发其它项更新】的BUG, 修复方法为$index, $first, $last, el不再共享订阅数组,el进行依赖收集时是通过$index实现的,在收集前,将$index的订阅数组改为el的 #817
修复【vml元素变成不可以访问元素】的BUG——scanAttr不能对VML元素访问nodeType属性;IE6-8下如果访问VML元素的type属性,就让会它的所有属性值都变成,这时我们再访问它的这些属性时,就会抛错
重构ms-duplex在SELECT元素上的实现,原来是通过不稳定的checkScan判定其子孙节点被扫描完毕才设置selected属性,现在是通过更可靠的duplexCallback回调实现
强制触发 widget 的$init方法
fix require方法在IE6-8下的BUG
toggleClass 第一个参数必须为字符串

修复ms-repeat在添加或删除项时会导致其他项重新渲染的BUG
重构html绑定

bindingExecutors.html = function(val, elem, data) {
    val = val == null ? "" : val
    var isHtmlFilter = "group" in data
    var parent = isHtmlFilter ? elem.parentNode : elem
    if (!parent)
        return
    if (val.nodeType === 11) { //将val转换为文档碎片
        var fragment = val
    } else if (val.nodeType === 1 || val.item) {
        var nodes = val.nodeType === 1 ? val.childNodes : val.item ? val : []
        fragment = hyperspace.cloneNode(true)
        while (nodes[0]) {
            fragment.appendChild(nodes[0])
        }
    } else {
        fragment = avalon.parseHTML(val)
    }
    //插入占位符, 如果是过滤器,需要有节制地移除指定的数量,如果是html指令,直接清空
    var comment = DOC.createComment("ms-html")
    if (isHtmlFilter) {
        parent.insertBefore(comment, elem)
        var n = data.group, i = 1
        while (i < n) {
            var node = elem.nextSibling
            if (node) {
                parent.removeChild(node)
                i++
            }
        }
        parent.removeChild(elem)
        data.element = comment //防止被CG
    } else {
        avalon.clearHTML(parent).appendChild(comment)
    }
    if (isHtmlFilter) {
        data.group = fragment.childNodes.length || 1
    }
    nodes = avalon.slice(fragment.childNodes)
    if (nodes[0]) {
        if (comment.parentNode)
            comment.parentNode.replaceChild(fragment, comment)
        if (isHtmlFilter) {
            data.element = nodes[0]
        }
    }
    scanNodeArray(nodes, data.vmodels)
}

---->

bindingExecutors.html = function (val, elem, data) {
    val = val == null ? "" : val
    var isHtmlFilter = "group" in data
    var parent = isHtmlFilter ? elem.parentNode : elem
    if (!parent)
        return
    if (typeof val === "string") {
        var fragment = avalon.parseHTML(val)
    } else if (val.nodeType === 11) { //将val转换为文档碎片
        fragment = val
    } else if (val.nodeType === 1 || val.item) {
        var nodes = val.nodeType === 1 ? val.childNodes : val.item
        fragment = hyperspace.cloneNode(true)
        while (nodes[0]) {
            fragment.appendChild(nodes[0])
        }
    }
    if (!fragment.firstChild) {
        fragment.appendChild(DOC.createComment("ms-html"))
    }
    nodes = avalon.slice(fragment.childNodes)
    //插入占位符, 如果是过滤器,需要有节制地移除指定的数量,如果是html指令,直接清空
    if (isHtmlFilter) {
        var n = data.group, i = 1

        data.group = nodes.length
        data.element = nodes[0]

        while (i < n) {
            var node = elem.nextSibling
            if (node) {
                parent.removeChild(node)
                i++
            }
        }
        parent.replaceChild(fragment, elem)
    } else {
        avalon.clearHTML(parent).appendChild(fragment)
    }
    scanNodeArray(nodes, data.vmodels)
}

@RubyLouvre
Copy link
Owner Author

1.4.4

  • 更新随机数的生成策略
  • 内部方法registerSubscriber更名为avalon.injectBinding并暴露出来
  • 重构ms-repeat,ms-with,ms-each,监控数组都共享一个代理VM, data.element在初始化变成一个注释节点,方便以后rollback不再进行收集回调这些重复操作
  • 重构scanAttr,减少不必要的操作
  • 重构modelFactory
  • 重构modelFactory.shim, 将VB实现的hash改成JS实现的hash,并且没有了 VBClassBodies=CreateObject(\"Scripting.Dictionary\") 再也不担心IE安全级别警告了
  • FIX scanAttr模块中对绑定对象的priority值的兼容问题
  • 重构GC 垃圾回收
  • 统一为所有绑定对象添加uuid, lists属性,去掉vars属性
  • 优化 truncate过滤器
  • fix 1.4.2中对html绑定的修改造成的 BUG,当用户数据为数字布尔时就会出错
  • fix removeAll传入数组时, 只能除第一个匹配元素的BUG
  • fix bindingExecutors["if"]的 value为false, node为注释节点时,会被多次执行而抛错的BUG
  • fix $compute在IE6-8引发对象不支持此属性或方法的BUG
属性访问器工厂方法
监控属性简单访问器makeSimpleAccessor
计算属性计算访问器makeComputedAccessor
子VM或监控数组复杂访问器makeComplexAccessor

@RubyLouvre
Copy link
Owner Author

1.4.5
fix IE()方法的BUG,非IE浏览器下都返回NaN
修复加载器的捕获信息,方便调试
实现oneTime binding 在ms-xxx="::expr" 或 {{::expr}} 加上::就能实现一次绑定
9dcd497
对界定符做更严格的检测, 比如会导致生成注释节点,这个会抛错

@RubyLouvre
Copy link
Owner Author

1.4.6

修复对flexbox的CSS属性支持 #926
fix IE6-8 VBSCRIPT 对象的D,P属性遍历不出来的BUG
fix visible BUG
去掉ms-repeat过火的优化
fix ms-html属性绑定错误生成text binding的BUG
fix解决$model层次依赖丢失
公开openTag和closeTag
fix ms-class BUG
重构parseExprProxy
fix parser在repace方法中读取RegExp.rightContext时在世界之窗4.3浏览器 报错的BUG #966

@RubyLouvre
Copy link
Owner Author

1.5
加强对数组set方法的检测,index不能大于数组长度
计算属性只能定义在$computed对象中
cssNumber增加animationInteractionCount
fx gc模块中的uuid2Node泄漏点
废掉data-duplex-observe特性

@RubyLouvre
Copy link
Owner Author

1.5.1

  1. 精简自定义标签的设计
  2. fix cache内存泄漏
  3. 添加$fire("all!xxx")的支持
  4. fix ms-duplex使用拦截器时触发多次的BUG
  5. 公开openTag, closeTag到avalon.config
  6. fix isWidget BUG

@RubyLouvre
Copy link
Owner Author

1.5.2

  1. configs 改名为 config
  2. $extends  改名为 $extend
  3. fix loader不能正确处理url path map之后带query的BUG
  4. fix ms-if 与 HTML5 form validation共用时的BUG
  5. fix $watch回调this指向BUG
  6. fix ms-if 碰到子对象的属性不存在时不插入节点的 BUG
  7. fix ms-include不存在动画时不会移除旧节点的BUG

@RubyLouvre
Copy link
Owner Author

1.4.7

修复repeat clear时回收data后导致scan模版出错的问题
修复对二维数组项repeat时,变换下标不能触发视图更新,及更新前后数组长度一样时不能更新的bug

修复ms-duplex光标移动问题

@RubyLouvre
Copy link
Owner Author

1.5.4

fix 1.5.4 select 的 duplex 变成了单向的BUG

@RubyLouvre
Copy link
Owner Author

1.5.5

  1. 终于比较完美地解决光标问题
  2. fix data-duplex-changed执行两次的BUG
  3. 启动全新的UI库 avalon.bootstrap 欢迎大家踊跃参与
  4. fix IE下onchange与oninput无法共存的BUG
  5. 以 component组件进行增强,现在支持对on-xxx属性在vmodels查找回调的功能

@RubyLouvre
Copy link
Owner Author

1.5.6
修复组件样式丢失BUG
修复扫描引擎两次进入组件内部引发的BUG
实现对$watch("*", callback)的支持
更新uuid机制
修复touch模块的tap事件点击是否移动的BUG

@RubyLouvre
Copy link
Owner Author

fix {{}}里面存在换行的BUG
fix 1.5.5的clear方法与1.4.7的行为不一致的BUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant