Vue.js

[Vue.js] filters

brightlightkim 2022. 5. 11. 08:25
filters: {
	currency: function(value) {
    	return Number.parseFloat(value).toFixed(2);
	}
}
// defined out of main component

// ex:

Vue.filter('currency', function() {
	
})

// They can be chained
// filters are available in any v-bind

'Vue.js' 카테고리의 다른 글

[Vue.js] Categorizing lists  (0) 2022.05.11
[Vue.js] Toggling elements with a key  (0) 2022.05.11
[Vue.js] Buefy, Vuetify  (0) 2022.05.11
[Vue.js] Managing CSS Styles  (0) 2022.05.11
[Vue.js] Vue.js templates  (0) 2022.05.11