标签:res exp lte port pipe log efault scope container
Just like in the command line, you can pipe a property through a filter to get a desired result. You can even chain them together!
<template> <section class="container"> <h1 class="title"> {{message | capitalize}} </h1> </section> </template> <style scoped> .title { margin: 50px 0; } </style> <script> export default { data() { return { message: ‘this is my vue!‘ } }, filters: { capitalize(value) { return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase(); } }, } </script>
[Vue] Create Filters in Vue.js
标签:res exp lte port pipe log efault scope container
原文地址:http://www.cnblogs.com/Answer1215/p/6323680.html