q-tpl
```sh npm install q-tpl ```
Last updated 5 years ago by feix760 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install q-tpl 
SYNC missed versions from official npm registry.

install

npm install q-tpl

test

node test/test.js

tpl code

  • input
<div>
    <div q-repeat="list | getList">
        <div q-text="name" q-show="isShow" q-class="red: isRed"></div>
        <input type="text" q-value="value" />
        <input type="checkbox" q-value="value" />
        <img src="" alt="" q-src="imgSrc" />
        <img src="" alt="" q-attr="src: imgSrc" />
        <div q-attr="attrs" style=""></div>
    </div>
</div>
  • output
<div>
    <div q-repeat="list | getList">
        <div q-text="name" q-show="isShow" q-class="red: isRed" style="<% if (__filterValue(this, "isShow")) { %> display: block; <% } %>" class="<% if (__filterValue(this, "isRed")) { %> red <% } %>"><%= __filterValue(this, "name") %></div>
        <input type="text" q-value="value" value="<%= __filterValue(this, "value") %>">
        <input type="checkbox" q-value="value" checked="<%= __filterValue(this, "value") %>">
        <img src="<%= __filterValue(this, "imgSrc") %>" alt="" q-src="imgSrc">
        <img src="<%= __filterValue(this, "imgSrc") %>" alt="" q-attr="src: imgSrc">
        <div q-attr="attrs" style="" <% var tmp = __filterValue(this, "attrs");if (typeof tmp === "object" && tmp) {for (var k in tmp) { %><%= k %>=<%= tmp[k] %> <% } } %>></div>
    </div>
</div>

Current Tags

  • 0.0.11                                ...           latest (5 years ago)

10 Versions

  • 0.0.11                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 3
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |