We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var html = '<div class={{name}}>{{type}}</div><div>{{age}}</div><br>'; var value = [{ age:111, name:222, type: "ok" }, { age:444, name:555, type: "" } ]; // 简易模板 // str是模板字符串 // value是渲染数据的【数组】 // symbol是无数据展示的内容 var x = kit.template(html,value,"---"); console.log(x); //"<div class=222>ok</div><div>111</div><br> //<div class=555>---</div><div>444</div><br>"
var html = '<div class={{name}}>{{type}}</div><div>{{age}}</div><br>'; var value = { age:111, name:222, type: "ok" }; // 简易模板 // 需要传入一个数组 // str是模板字符串 // value是渲染数据的【数组】 // symbol是无数据展示的内容 var x = kit.template(html,value,"---"); console.log(x); //"<div class=222>ok</div><div>111</div><br>"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
数据源是数组
数据源是对象
The text was updated successfully, but these errors were encountered: