<>WEB front end , First knowledge vue.js

<> one ,vue Knowledge points

vue.js It is a front-end framework with data processing as the core , It has the characteristics of efficient data binding and flexible component application ( modularization , assembly .vue)
pattern 1:MVVM(vue.js) M :model Data layer V: view View layer (html+css) VM:viewModel
Lamellar layer : It's a slice layer that links the data layer and the view layer (vue Examples of ) pattern 2:MVC M:model Data layer V:view View layer (html+css)
C:controller Control layer (js code )
<> two ,vue instantiation

<> Foundation template
<body> <div id="app"> {{msg}}//hello <button v-on:click="show()"> click </button> <
div:class="color" @click="show()">show Method demonstration </div> </div> </body> <script> var a=
new Vue({ el:"#app",//document.getElementById("#aa");// Mount node data:{// data msg:
"hello ", }, methods: {// method show(){ alert("hi");// Popup hi }, }, computed:{},// computing method
filters:{},// Filtration method }); </script>
<> Basic instruction use
v-model: Bidirectional binding Function and function input in value use v-if: control css Vanishing and hiding of attributes v-else: Extension is v-else-if
v-show: By controlling style properties display To display hidden elements v-for: Traversal and iteration v-text: It can be abbreviated as {{}}, It also supports logical operations v-html:
For output html
<> Grammar sugar
v-on:click( event )="show()" Event binding ——>@click="show()" v-bind Dynamic binding url class style
href ... ——>:class=""

©2019-2020 Toolsou All rights reserved,
Solve in servlet The Chinese output in is a question mark C String function and character function in language MySQL management 35 A small coup optimization Java performance —— Concise article Seven sorting algorithms (java code ) use Ansible Batch deployment SSH Password free login to remote host according to excel generate create Build table SQL sentence Spring Source code series ( sixteen )Spring merge BeanDefinition Principle of Virtual machine installation Linux course What are the common exception classes ?