html-dynamic-monitor
v0.0.5
Published
一款基于Proxy实现的HTML数据动态监听的轻量级框架
Downloads
2
Readme
html-dynamic-monitor
一款基于Proxy实现的HTML数据动态监听的轻量级框架
npm install html-dynamic-monitor --save
import HtmlDynamicMonitor from "html-dynamic-monitor"
html-dynamic-monitor使用方法
let data = {
count:0,
change:function(e){
console.log(e)
htmlDynamicMonitor.$data.count++
}
}
const htmlDynamicMonitor = new HtmlDynamicMonitor(data)
htmlDynamicMonitor.bind('#app')
<div id="app">
<p>{{count}}</p>
<button type="button" onclick="({{change}})(this)">Button</button>
</div>
具体使用方法请参阅:html-dynamic-monitor