How to use the tmpl/2.1.x/.render function in tmpl

To help you get started, we’ve selected a few tmpl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heeroluo / jraiser / lib / paginator / 1.2.x / index-debug.js View on Github external
_init: function(options) {
		var t = this;

		// 写入分页条HTML
		t._$paginator = $( Tmpl.render(options.template, {
			currentPage: options.currentPage,
			totalPages: options.totalPages,
			pageItems: t._build(),
			nextText: options.nextText,
			prevText: options.prevText,
			ellipsisText: options.ellipsisText
		}) ).appendTo(options.$appendTo);

		t._$paginator.on('click', function(e) {
			e.preventDefault();
			/**
			 * 点击分页条中的链接时触发
			 * @event click
			 * @param {Object} e 事件参数
			 *   @param {Number} e.page 页码
			 * @for Paginator

tmpl

JavaScript micro templates.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

65 / 100
Full package analysis