<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HelloWorld</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
</head>
<body>
<div id="app">
<input type="checkbox" id="flash" value="flash" v-model="bizLines"></input>
<label for="flash">快车</label>
<input type="checkbox" id="premium" value="premium" v-model="bizLines"></input>
<label for="premium">专车</label>
<input type="checkbox" id="bus" value="bus" v-model="bizLines"></input>
<label for="bus">巴士</label>
<br/>
</div>
<script>
new Vue({
el:'#app',
data: {
bizLines:[]
}
});
</script>
</body>
</html>
The above code generates the interface:
Function:
When three checkboxes are clicked, the contents of the checkboxes will be stored in the bizLines array in the vue instance data.