nplus-lite
v1.0.4
Published
轻量化的模板解释器,支持数据双向绑定,支持页面元素遍历,二维数据结构遍历,纯数字遍历,数据和页面分离,HTML模板结构,组件和页面分离,组件的生命周期,同名前缀Less自动引入。
Downloads
18
Readme
NpulsLite.js
Demo
Checkout the demo page to select demo.html
Docs
wait write....
Compatibility
Node.js: Only current and LTS Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.
Browser: Not IE11 :)
Installation
CLI:
npm install -g nplus-lite
In browser:
npm install nplus-lite
Usage
In Browser
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8"/>
<title>NplusLite in the browser</title>
</head>
<body>
<div id="content">
<h1 bind="text:innerText"></h1>
<div>
<h2 for="h2s">
${index}.${item}
</h2>
</div>
<div>
<h2 for="h2s" addNumber="1">
${index}.${item}
</h2>
</div>
</div>
<script>
nplusLitePage = {
data: {
text: "",
h2s: [
"firstChild",
"secondChild"
]
},
mounted() {
this.data.text = "我是文本"
}
}
</script>
<script src="./nplus-lite.js"></script>
</body>
</html>
License
Copyright (c) 2023, nano71.com. (MIT License)