pokap/notpl 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pokap/notpl

Composer 安装命令:

composer require pokap/notpl

包简介

Fast template engine without template

关键字:

README 文档

README

Fast template engine without template

## Quick start

Clone the repo: git clone git://github.com/pokap/notpl.git.

Usage

In your html file :

<div id="container"></div>
// -------------
// controller

var $tbody = function (tbody) {
  $([["Mark", "Otto"], ["Jacob", "Thornton"]]).each(function (index, value) {
    tbody.noTpl([['tr', [
      ['td', (index + 1)],
      ['td', value[0]],
      ['td', value[1]]
    ]]]);
  });
};

// -------------
// template

$(function(){

  var container = $("#container");

  container.html("");
  container.noTpl([
    ['table', [
      ['thead', [
        ['tr', [
          ['th', '#'],
          ['th', 'First Name'],
          ['th', 'Last Name']
        ]
      ]]],
      ['tbody', $tbody]
    ], {"class": 'table table-striped'}],
    ['form', [
      ['fieldset', [
        ['input', null, {"type": 'text', "placeholder": 'Type something…'}],
        ['button', 'Submit', {"type": 'submit', "class": 'btn'}]
      ]]
    ], {"method": 'POST', "action": '#', 'class': 'form-inline'}]
  ]);

});

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-05