UNPKG

flyku

Version:

Flyku is an automated, modular development framework. The goal is to reduce duplication of work in the front-end development process, so that you pay more attention to the program itself.

26 lines (25 loc) 871 B
/** * 模板文件业务代码 */ define(function(require, exports, module) { var _$ = require('jsonselect'); // 工具类 var _g = require('global'); // 工具类 var utils = require('utils/utils'); var tpHelper = require('tpHelper'); // 用于模版模块生成的工具类,请慎重删除,___template___ 可能会用到 module.exports = { init: function() { var $ = require('jquery'); var data = { hi: 'user', hello: 'world' }; $('#html').html(require('template/example-nomodule').render(data)); $('#test a').on('click', function() { alert('Welcome to use flyku template html.'); }); }, render: function(data) { return ___template___(data); } } });