Browse Source

no more problems in typescript

master
pvincent 4 years ago
parent
commit
9f04ff057e
  1. 7
      src/App.vue
  2. 5
      src/main.ts
  3. 1
      src/shims-vue.d.ts

7
src/App.vue

@ -1,11 +1,8 @@
<template> <template>
<img alt="Vue logo" src="./assets/logo.png" /> <img alt="Vue logo" src="./assets/logo.png" />
<HelloWorld msg="vapara-vue3" />
<br />
{{ title }}
<br />
{{ version }}
<HelloWorld :msg="title" />
<br /> <br />
version: {{ version }}
</template> </template>
<script lang="ts"> <script lang="ts">

5
src/main.ts

@ -2,6 +2,7 @@ import { createApp } from 'vue'
import App from './App.vue' import App from './App.vue'
import './index.css' import './index.css'
// define title and version from package.json
document.title = APP_TITLE
createApp(App).mount('#app')
document.title = APP_TITLE
createApp(App).mount('#app')

1
src/shims-vue.d.ts

@ -4,5 +4,6 @@ declare module "*.vue" {
export default Component export default Component
} }
/* declare const helps constant visibility in main.ts file */
declare const APP_VERSION: string declare const APP_VERSION: string
declare const APP_TITLE: string declare const APP_TITLE: string
Loading…
Cancel
Save