Skip to content

Commit 7363348

Browse files
authored
new example
1 parent 329aa27 commit 7363348

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

example-html-edit.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Elroid Example</title>
7+
<script src="Elroid.js"></script>
8+
</head>
9+
10+
<body>
11+
<div id="app">
12+
<h1>{{title}}</h1>
13+
<button el-click="Edit">Edit Tilte</button>
14+
<button el-click="Defult">Defult</button>
15+
</div>
16+
17+
<script>
18+
const app = new Elroid({
19+
el: '#app',
20+
data: {
21+
title: 'Welcome to Elroid Library',
22+
methods: {
23+
Edit() {
24+
app.update({ title: "Home" });
25+
},
26+
Defult() {
27+
app.update({ title: 'Welcome to Elroid Library' });
28+
}
29+
}
30+
}
31+
});
32+
</script>
33+
</body>
34+
35+
</html>

0 commit comments

Comments
 (0)