Skip to content

Releases: aralejs/widget

Realse v1.1.1

03 Jul 14:34
Compare
Choose a tag to compare

fixed

  • #55 修复 destroy 时会把之前绑定的事件清除的问题

improved

  • #54 标准化 DAParser 的写法
  • 升级依赖 arale/base 到 1.1.1

Realse v1.1.0

03 Jul 14:21
Compare
Choose a tag to compare

升级注意

新增点

  1. data-widget-role

  2. delegateEvents 支持其他 DOM 的事件绑定

    this.delegateEvents(this.trigger, 'click p', function() {})
    
  3. 样式方案

    在 this.element 外部会包一层容器,保证样式独立。className 为 family-name-version,css 在编译的时候也会加一层命名空间,如

    .family-name-version .ui-dialog {}
    
  4. set 增加 override

    如果是简单对象,默认是用 merge 的方式,override 可以覆盖当前对象

    Widget.extend({
        attrs: {
            a: {b:1, c:2}
        }
    });
    this.set('a', {b:2}); // => {b:2, c:2}
    this.set('a', {}, {override: true}); // => {}
    
  5. before 能阻止原方法

    this.before('show', function() {
        return false; // 阻止了 show 方法的调用
    });
    

修改点

  1. 不再使用 this.model 和 this.template,使用的时候需要当作 attribute,如 this.get('model')。

  2. templatable 从 widget 中移除,单独为一个组件,修改的时候需要修改 template 的依赖

    "templatable": "arale/templatable/0.9.0/templatable"
    
  3. 注意 attribute 的默认值,当为 '' [] {} 是还是会触发 _onRender

  4. widget 的属性 style id className 默认值改为 null

具体修改点

widget

milestone 1.1.0

  • #36 当属性值为空字符串时的处理
  • #47 不再使用 this.templatethis.model
  • #33 handlebars runtime
  • #26 支持 data-widget-role
  • �[x] #14 delegateEvents 增强
  • #25 destroy 的 bug
  • #39 彻底隔离样式冲突的 widget 方案
  • #38 销毁 widget 创建的 element
  • #40 aralejs/base#14 简化 initAttrs 参数

base

milestone 1.1.0

events