Browse Source

absolute components

master
pvincent 3 years ago
parent
commit
2d104e6333
  1. 4
      src/components/App.vue
  2. 2
      src/main.ts
  3. 6
      src/shims-vue.d.ts

4
src/App.vue → src/components/App.vue

@ -2,7 +2,7 @@
<div
class="space-y-2 bg-white rounded-xl mx-auto max-w-sm py-8 px-8 shadow-md sm:space-y-0 sm:space-x-6 sm:flex sm:py-4 sm:items-center"
>
<img alt="Vue logo" src="./assets/logo.png" width="150" />
<img alt="Vue logo" src="@/assets/logo.png" width="150" />
<div class="space-y-2 text-center sm:text-left">
<div class="space-y-0.5">
<p class="font-semibold text-lg text-black">
@ -31,7 +31,7 @@
<script lang="ts">
import { defineComponent } from 'vue'
import Basket from './components/Basket.vue'
import Basket from './Basket.vue'
declare const APP_TITLE, APP_VERSION, APP_REPOSITORY, APP_LICENSE
export default defineComponent({

2
src/main.ts

@ -1,7 +1,7 @@
import { createApp } from 'vue'
import 'windi.css'
import App from '@/App.vue'
import App from '@/components/App.vue'
import '@/assets/index.css'
declare const APP_TITLE: string

6
src/shims-vue.d.ts

@ -3,9 +3,3 @@ declare module '*.vue' {
const Component: ReturnType<typeof defineComponent>
export default Component
}
/* declare const which helps leveraging visibility of defined constants, loaded from `main.ts` file */
// declare const APP_VERSION: string
// declare const APP_TITLE: string
// declare const APP_REPOSITORY: string
// declare const APP_LICENSE: string
Loading…
Cancel
Save