switer / switer.github.io

Personal homepage
https://switer.github.io
5 stars 0 forks source link

think of directive and filter #7

Open switer opened 10 years ago

switer commented 10 years ago

介绍 directive 和 filter 前先说说 Ractive 的 decorator 和 adaptor

  1. decorator 在racitve作为负责修改node属性、样式、绑定交互事件的职责的一类功能模块
  2. adaptor 在ractive负责数据的过滤、修改、以适配页面的渲染需要

    再说 directive 和 filter

两者是在提供声明式编程的框架中的定义, directive 为 decorator + 声明式编程,同理,filter 为 adaptor + 声明式编程