-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathInputVue.html
97 lines (86 loc) · 2.37 KB
/
InputVue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>HTML Grasshopper Interface</title>
<meta name="author" content="Petr Mitev">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<style>
html, body {
margin: 5px;
padding: 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a { color: #42b983; }
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
</style>
</head>
<body>
<br>
<div id="app">
<input type="text" v-model="textInput" id="fname" name="textName">
<input type="button" value="Click me" name="myButton" id="myButtonid">
<br>
<input type="range" id="slide" name="slideName" v-model="sliderInput">
<br>
<img width="200" src="https://vuejs.org/images/logo.png" alt="Vue logo">
<h1>{{ greeting }}</h1>
<h3>{{ textInput }}</h3>
<h3>{{ sliderInput }}</h3>
<ul>
<li>
To learn more about Vue, visit
<a :href="docsURL" target="_blank">
{{ humanizeURL(docsURL) }}
</a>
</li>
<li>
For live help with simple questions, check out
<a :href="discordURL" target="_blank">
the Discord chat
</a>
</li>
<li>
For more complex questions, post to
<a :href="forumURL" target="_blank">
the forum
</a>
</li>
</ul>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
greeting: 'Welcome to your Vue.js app!',
docsURL: 'http://vuejs.org/guide/',
discordURL: 'https://chat.vuejs.org',
forumURL: 'http://forum.vuejs.org/',
textInput: "",
textInput2: "",
sliderInput: ""
},
methods: {
humanizeURL: function(url) {
return url
.replace(/^https?:\/\//, '')
.replace(/\/$/, '');
}
}
})
</script>
</body>
</html>