Professional Documents
Culture Documents
Point of Vue
Point of Vue
Point of Vue
An Introduction to Vuejs
Hemant Rai
Cloudnaut Technologies
@hemantisme thisDOTname
Introduction
1 Progressive framework
3 Declarative
5 Easy to maintain
6 Reactive
7 VirtualDOM
<script>
Vue Instance
let vm = new Vue({
// Options
});
</script>
Vue Instance Lifecycle
Data & Methods
// Data
2 v-html 9 v-bind
3 v-show 10 v-model
4 v-if 11 v-pre
5 v-else 12 v-cloak
6 v-else-if 13 v-once
7 v-for
1 Conditional Rendering 3 Event Handling
<h1 v-show="ok">Hello!</h1>
// v-if / v-else
2 Key Modifiers
4 .exact Modifier
2 Value Bindings
3 Modifiers
Computed Properties
Watchers
Class & Style Bindings
// Object Syntax // Inline Syntax
<my-component v-bind:class="{
active: isActive
}"></my-component>
Components
1 Props 3 Child component events
2 v-model 4 Slots
Single File Component
<template>
<div>
<!-- Write your HTML templates with Vue in here -->
</div>
</template>
<script>
export default {
// Write your Vue component logic here
}
</script>
<style scoped>
/* Write your styles for the component here */
</style>
<template>
<div>
<content></content>
</div>
</template>
<script>
import content from “./components/content.vue”;
export default {
component: {
content
}
};
</script>
<style scoped>
/* Write your styles for the component here */
</style>
Filters
<script>
//Global filter
// Syntax Vue.filter(‘filterName’, (value) => {
return //formatted value
{{ data | filter }} });
filters: {
filterName(value) {
// Example
return //formatted value
{{ text | capitalize }} }
}
{{ bill | tip | round }}
</script>
{{ date | display(tz, format) }}
Thank you.
@hemantisme thisDOTname