v-html
- Expression
v-once
- Not Changable
- Not gonna update
v-bind
- ex: <img :class="'img-fluid" v-bind="products[0].image" :alt="products[0].name">
- : (Shortcut)
- :
- ex: <img :class ="imgClass + ' ' + 'w-25'">
- Make it to 25% of the size
v-bind="{
class: imgClass,
src : products[2].image,
alt : products[2].name
}
//You can make a class to bind multiple objects
computed properties:
- Caching >> Update >> So fast
data: {
slugText: "hello"
}
computed: {
slugetize: function () {
return this.slugText
.toLowerCase()
.replace(/[^\w ] )
}
}
Using Methods:
methods: {
now: function() {
//function...
}
}
'Vue.js' 카테고리의 다른 글
[Vue.js] Toggling elements with a key (0) | 2022.05.11 |
---|---|
[Vue.js] filters (0) | 2022.05.11 |
[Vue.js] Buefy, Vuetify (0) | 2022.05.11 |
[Vue.js] Managing CSS Styles (0) | 2022.05.11 |
[Vue.js] Basics with Vue.js (0) | 2022.05.10 |