Riot 4.6.0 发布,JavaScript 的 MVP 框架

栏目: 软件资讯 · 发布时间: 4年前

内容简介:Riot 4.6.0 发布了,更新内容如下: 修复了在<template>标签中呈现文本表达式的情况下的小写问题 更新改进了核心代码、编译器和 dom 绑定 通过<slot>属性添加对 HOC(高阶组件)组件的支持,例如: Provider <...

Riot 4.6.0 发布了,更新内容如下:

  • 修复了在<template>标签中呈现文本表达式的情况下的小写问题
  • 更新改进了核心代码、编译器和 dom 绑定
  • 通过<slot>属性添加对 HOC(高阶组件)组件的支持,例如:

Provider

<hoc-component>
  <slot message={ message } theme={ theme }/>
  
  <script>
    export default { 
      message: 'hello', 
      theme: 'dark' 
    }
  </script>
</hoc-component>

Consumer

<app>
  <hoc-component>
    <!-- the {message} property will be provided by the <hoc-component> -->
    <h1>{ message }</h1>

    <!-- the {theme} property will be provided by the <hoc-component> -->
    <sidebar theme={ theme }/>
  </hoc-component>

  <!-- the {message} property is not available outside of the <hoc-component> -->
  <p>{ message }</p>
</app>

Riot 是一个简单而优雅的基于组件的 UI 库,为所有现代浏览器带来了自定义组件。其支持浏览器包括:

Riot 4.6.0 发布,JavaScript 的 MVP 框架

它的体积也很小,只有 6k:

Riot 4.6.0 发布,JavaScript 的 MVP 框架


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

程序正义论

程序正义论

徐亚文 / 山东人民出版社 / 2004-3-1 / 22.00元

程序正义论,ISBN:9787209033916,作者:徐亚文著一起来看看 《程序正义论》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具