模板语法
静态模板渲染
渲染静态模板是最简单的
import {html, render} from 'foxview'; |
动态模板渲染
文本绑定
渲染静态模板是最简单的
import {html, render} from 'foxview'; |
attribute绑定
import {html, render} from 'foxview'; |
事件绑定
import {html, render} from 'foxview'; |
组合渲染
import {html, render} from 'foxview'; |
条件渲染
html`<div> |
列表渲染
html` |
WebComponent特殊语法
WebComponent语法在前面介绍的语法上做了部分的拓展
property绑定
const myTemplate = (btnType) => |
FoxView会识别 .[property] ,给my-button的实例的type赋值为btnType
boolean绑定
const myTemplate = (disable) => |
FoxView会识别 ![property] ,将值转成布尔值
发现错误?想参与编辑?
在 GitHub 上编辑此页!