s2
parent
93581983e8
commit
419f1a9a88
|
@ -2,7 +2,7 @@
|
|||
"name": "vite-vue3-tailwind-starter",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"dev": "vite --host --port 2004",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"serve": "vite preview"
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@ useHead({
|
|||
<template>
|
||||
<header class="bg-white shadow">
|
||||
<div class="mx-auto max-w-7xl py-6 px-4 sm:px-6 lg:px-8">
|
||||
<h1 class="text-3xl font-bold leading-tight text-gray-900">Not Found</h1>
|
||||
<h1 class="text-3xl font-bold leading-tight text-gray-900">404 Not Found</h1>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<template>
|
||||
<div class="container-fluid bg-white mx-auto mt-3 p-0">
|
||||
<div v-if="isLoading">
|
||||
<h2>Loading ...</h2>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-html="page[0].content" class="container">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
page: null,
|
||||
isLoading: true
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
fetch('https://api8.siliconpin.com/items/scc22?filter[slug][_eq]=' + this.$route.params.id)
|
||||
// fetch('https://api8.siliconpin.com/items/scc22?slug=about-us')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
this.page = data.data
|
||||
console.log(data)
|
||||
this.isLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -37,6 +37,7 @@ declare module 'vue-router/auto/routes' {
|
|||
export interface RouteNamedMap {
|
||||
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
|
||||
'/[...404]': RouteRecordInfo<'/[...404]', '/:404(.*)', { 404: ParamValue<true> }, { 404: ParamValue<false> }>,
|
||||
'/[id]': RouteRecordInfo<'/[id]', '/:id', { id: ParamValue<true> }, { id: ParamValue<false> }>,
|
||||
'/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
|
||||
'/gallery': RouteRecordInfo<'/gallery', '/gallery', Record<never, never>, Record<never, never>>,
|
||||
'/index2': RouteRecordInfo<'/index2', '/index2', Record<never, never>, Record<never, never>>,
|
||||
|
|
Loading…
Reference in New Issue