pvincent
4 years ago
4 changed files with 27 additions and 67 deletions
-
4.prettierrc.yml
-
33src/App.vue
-
21src/components/HelloWorld.vue
-
36src/components/HelloWorldSfc.vue
@ -1,4 +1,4 @@ |
|||
trailingComma: "none" |
|||
tabWidth: 4 |
|||
trailingComma: 'none' |
|||
tabWidth: 2 |
|||
semi: false |
|||
singleQuote: true |
@ -1,32 +1,29 @@ |
|||
<template> |
|||
<img alt="Vue logo" src="./assets/logo.png" width="150" /> |
|||
<HelloWorld :msg="title" /> |
|||
<HelloWorldSfc :msg="title" /> |
|||
<br /> |
|||
<img alt="Vue logo" src="./assets/logo.png" width="150" /> |
|||
<HelloWorld :msg="title" /> |
|||
<footer style="margin-top: 2em"> |
|||
AGPLv3 : |
|||
<a :href="origin" alt="origin"> |
|||
{{ version }} |
|||
{{ version }} |
|||
</a> |
|||
</footer> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
/* standard composition api */ |
|||
/* eslint-disable no-undef */ |
|||
|
|||
import HelloWorld from './components/HelloWorld.vue' |
|||
import HelloWorldSfc from './components/HelloWorldSfc.vue' |
|||
export default { |
|||
name: 'App', |
|||
components: { |
|||
HelloWorld, |
|||
HelloWorldSfc |
|||
}, |
|||
setup() { |
|||
return { |
|||
title: APP_TITLE, |
|||
version: APP_VERSION, |
|||
origin: APP_ORIGIN |
|||
} |
|||
name: 'App', |
|||
components: { |
|||
HelloWorld |
|||
}, |
|||
setup() { |
|||
return { |
|||
title: APP_TITLE, |
|||
version: APP_VERSION, |
|||
origin: APP_ORIGIN |
|||
} |
|||
} |
|||
} |
|||
</script> |
@ -1,36 +0,0 @@ |
|||
<template> |
|||
<h1>{{ msg }}</h1> |
|||
<button @click="count++"> |
|||
count is: {{ count }} |
|||
</button> |
|||
<button @click="inc"> |
|||
inc |
|||
</button> |
|||
<p>Hello World!</p> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
/* standard composition api */ |
|||
|
|||
import { ref } from 'vue' |
|||
|
|||
export default { |
|||
props: { |
|||
msg: { |
|||
type: String, |
|||
required: true |
|||
} |
|||
}, |
|||
setup() { |
|||
return { |
|||
count: ref(1) |
|||
} |
|||
}, |
|||
methods: { |
|||
inc() { |
|||
console.log("increment count"); |
|||
this.count++; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue