Created
August 30, 2020 08:56
-
-
Save bachhm-dev/49000761e418fa03106f4dd88dc4ea84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div id="app"> | |
| <img alt="Vue logo" src="./assets/logo.png" /> | |
| <HelloWorld msg="Welcome to Your Vue.js App" /> | |
| {{ new Date() | formatUnix}} | |
| </div> | |
| </template> | |
| <script> | |
| import HelloWorld from "./components/HelloWorld.vue"; | |
| import moment from "moment"; | |
| export default { | |
| name: "App", | |
| components: { | |
| HelloWorld, | |
| }, | |
| filters: { | |
| formatUnix(value) { | |
| if (value) { | |
| return moment(value).format("DD/MM/YYYY"); | |
| } | |
| }, | |
| }, | |
| }; | |
| </script> | |
| <style> | |
| #app { | |
| font-family: Avenir, Helvetica, Arial, sans-serif; | |
| -webkit-font-smoothing: antialiased; | |
| -moz-osx-font-smoothing: grayscale; | |
| text-align: center; | |
| color: #2c3e50; | |
| margin-top: 60px; | |
| } | |
| </style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment