• 1.12.1 00e81bf2c5

    v1.12.1 Stable

    yutent released this 2024-11-22 16:25:35 +08:00 | 0 commits to master since this release

    • 修复组件移除时, 状态未修改, 及事件未清空的bug
    Downloads
     
  • 1.12.0 dde82e9860

    v1.12.0 Stable

    yutent released this 2024-06-17 11:40:21 +08:00 | 2 commits to master since this release

    • 增加双向绑定方法live()的支持;
    • 增加语法糖方法when()which();
    • 更新开源协议的声明;
    
    import { live, when, which } from 'wkit'
    
    class {
    
      foo = 'blabla'
      bar = { a: 'blabla'}
      
      show = false
      tab = 'home'
    
      render() {
        return html`
          <p>${this.foo}</p>
          <p>${this.bar.a}</p>
          
          
          <input value=${this.foo} />  <!-- 普通绑定, 输入时不会同步到foo上 -->
          <input value=${live.bind(this, 'foo')} />  <!-- 双向绑定, 输入时会同步到foo上, 并且自动更新视图渲染 -->
          
          <input value=${live.bind(this, 'bar.a')} />  <!-- 支持对象子属性 -->
          
          
          
          
          
          
          <!-- 旧的三元运算符写法 -->
          ${ this.show ? html`xxxx` : '' }
          
          <!-- 使用when()方法, 默认空值可省略 -->
          ${ when(this.show, html`xxxx`) }
          
          
          
          <!-- which()方法, 可简单处理字符串模板不支持switch语法的问题 -->
          ${ 
            which(this.tab, [
              ['home', 'html`xxxx`],
              ['about', html`yyyy`],
              ...
            ]) 
          }
        
        `
      }
      
    }
    
    
    Downloads
     
  • 1.11.5 065271f2f6

    v1.11.5 Stable

    yutent released this 2024-05-17 17:53:16 +08:00 | 5 commits to master since this release

    • 优化props解析 (v1.11.4)
    • 修复input等有用户输入交互的组件, 因为value属性初值和终值都为空时, 刷新渲染不会清除输入内容的问题
    Downloads
     
  • 1.11.3 db7098c4f8

    v1.11.3 Stable

    yutent released this 2023-12-14 12:37:12 +08:00 | 7 commits to master since this release

    • 代码优化精简
    Downloads
     
  • 1.11.2 ea6010c782

    v1.11.2 Stable

    yutent released this 2023-11-30 11:46:48 +08:00 | 8 commits to master since this release

    • 优化模板解析代码, 文件体积减少了1KB(minify后不到17KB, gzip后仅7KB);
    • 优化事件GC, 非正常移除节点时保证事件能被正确回收处理;
    • 优化属性绑定的observer回调异常处理;
    • 修复历史遗留的一个属性代理逻辑bug;
    Downloads
     
  • 1.11.0 47090149f8

    v1.11.0 Stable

    yutent released this 2023-11-23 10:49:43 +08:00 | 11 commits to master since this release

    • 优化动画逻辑
    • props定义,增加特殊类型null支持; 当类型设置为null时, 不会修正赋值, 也不会监听其赋值的子属性的变化, 同时也不会显示在标签上。
    Downloads
     
  • 1.10.12 0be2bf7971

    v1.10.12 Stable

    yutent released this 2023-11-16 18:14:26 +08:00 | 14 commits to master since this release

    • 框架内置::selection样式, 为所有组件增加选中状态的文本增加前景色和背景色的预设。

      外部可通过定义css变量--selection-background--selection-color, 实现全局统一的样式。

    Downloads
     
  • 1.10.11 ff51e09e39

    v1.10.11 Stable

    yutent released this 2023-11-15 19:05:10 +08:00 | 15 commits to master since this release

    • 优化属性赋值处理逻辑
    • 调整注入机制, 提升状态管理插件的性能
    Downloads
     
  • 1.10.9 4ebf74f40f

    v1.10.9 Stable

    yutent released this 2023-09-21 10:31:21 +08:00 | 18 commits to master since this release

    • 小幅精简模板AST
    • 增加内置range方法
    • 优化异步回调的触发
    Downloads
     
  • 1.10.8 4f4e8970ca

    v1.10.8 Stable

    yutent released this 2023-09-19 18:37:27 +08:00 | 24 commits to master since this release

    • 优化异常处理, 避免某些情况下报错导致进程卡死的bug
    Downloads