tags: Work javascript front end

The corresponding code is as follows:
template.helper('time',function (v) {
let d = new Date(v * 1000);// The timestamp is 10 -bit*1000, and the timestamp is 13 digits. No need to multiply 1000
let yyyy = d.getFullYear() + '-';
let MM = (d.getMonth() < 10 ? '0'+(d.getMonth()+1) : (d.getMonth())+1) + '-';
let dd = (d.getDate() < 10 ? '0'+d.getDate() : d.getDate());
return yyyy + MM + dd;
})

result:

This article mainly introduces the use of the JavaScript template engine Template.js in detail, which has certain reference value. Interested friends can refer to it template.js A JavaScript template ...
1. Under what circumstances is recommendedtemplate.js (1)There are the same modules in your page layout, you can propose common modules for easy maintenance Note: The loop is used here to reduce ...
definition: art-template is a simple and super fast template engine. It uses scope pre-declaration technology to optimize template rendering speed, so as to obtain running performance close to the lim...
The article mainly introduces the use of JavaScript template engine template.js for everyone. Template.js an JavaScript template engine, simple, easy to use. Provide a template syntax, the user can wr...
JS template engine Template.js use template.js source code Instructions HTML code js code Expansion usage...
Code: Output: If you want to encapsulate a method:...
First, click the corresponding button, the outer SWIPER boot map slides: Second, when the boot slides, the following numbers, text and progress strips will follow: Note: Companies with HTML Third, rem...
...
template.js a JavaScript templating engine, simple and easy to use. Syntax provides a set of templates, the user can write a template block, each based on the incoming data, generates HTML data corres...
art-template is a js template engine with excellent performancehttps://aui.github.io/art-template/ Chinese document addresshttps://aui.github.io/art-template/zh-cn/docs/ download link: https://github....