xxxxxxxxxx
Vue.js is an open-source model–view–viewmodel front end JavaScript framework for building user interfaces and single-page applications.
get started
npm init vue@latest
or with yarn
yarn init vue@latest
xxxxxxxxxx
Q: What is Vue.js?
A: Vue.js is an open-source model–view–viewmodel front end JavaScript
framework for building user interfaces and single-page applications. It was
created by Evan You, and is maintained by him and the rest of the active core
team members.
xxxxxxxxxx
<!-- production version, optimized for size and speed -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
xxxxxxxxxx
// Basic VueJS Example Template
<template>
<div class="myClass" ref>
<slot></slot>
</div>
</template>
<script>
export default {
data() {
return {
myData: "Hello World!"
}
},
mounted() {
this.myMethod();
},
methods: {
myMethod() {
console.log(this.myData);
}
}
}
</script>
<style scoped>
.myClass {
padding: 1em
}
<style>
xxxxxxxxxx
VueJS is a Javascript progressive framework for frontend, it mixes part of React and Angular
xxxxxxxxxx
<!-- production version, optimized for size and speed -->
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>