This file contains 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"> | |
<p>Upper: {{ upperName }} out of {{ name }}</p> | |
</div> | |
</template> | |
<script> | |
export default { | |
data(){ | |
return { | |
name: "author", |
This file contains 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"> | |
<p>Upper: {{ upperName }} out of {{ name }}</p> | |
</div> | |
</template> | |
<script> | |
import { ref, computed } from "vue"; | |
export default { | |
setup() { | |
const name = ref("author"); |
This file contains 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> | |
<div>Amount: {{ amount }}</div> | |
<button @click="increaseAmount()">Increase Capacity</button> | |
</div> | |
</template> | |
<script> | |
export default { | |
data(){ |
This file contains 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> | |
<div>Amount: {{ amount }}</div> | |
<button @click="increaseAmount()">Increase Capacity</button> | |
</div> | |
</template> | |
<script> | |
import { ref } from "vue"; | |
export default { |
This file contains 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"> | |
<div>Name: {{ name }}</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "App", | |
data(){ |
This file contains 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>Name: {{ name }}</div> | |
</template> | |
<script> | |
import { ref } from "vue"; | |
export default { | |
setup() { | |
const name = ref('Name'); | |
return { name }; | |
} |
This file contains 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> | |
<!-- template code --> | |
</template> | |
<script> | |
export default { | |
name: "App", | |
props: { | |
/*...*/ | |
} | |
components: { |
This file contains 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> | |
<!-- your template code --> | |
</template> | |
<script> | |
export default { | |
setup() { | |
// more code to write | |
} | |
}; | |
</script> |
This file contains 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"> | |
<div>{{formatUnix(new Date())}}</div> | |
</div> | |
</template> | |
<script> | |
import formatUnix from "./Utils/DateFormat.js"; | |
export default { |
This file contains 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
import moment from "moment"; | |
const format = function formatUnix(value) { | |
if (value) { | |
return moment(value).format("DD/MM/YYYY"); | |
} | |
}; | |
export default format; |