fix vue router
This commit is contained in:
1 parent
c639af403f
commit
7b98c36a1e
5 files changed
+23
-26
No files matched your search
-17
@@ -1,20 +1,3 @@
|
||||
<script setup lang="ts">
|
||||
// This starter template is using Vue 3 <script setup> SFCs
|
||||
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
|
||||
import HelloWorld from './components/HelloWorld.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<router-view />
|
||||
</template>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
<template>
|
||||
<div>ddd</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
components: {
|
||||
// LayoutHome
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
</template>
|
||||
<style lang="scss"></style>
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
import { createApp } from 'vue';
|
||||
import App from './App.vue';
|
||||
import './style.css';
|
||||
import router from './router/index';
|
||||
|
||||
createApp(App).mount('#app');
|
||||
createApp(App).use(router).mount('#app');
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
import Home from '@/component/HelloWorld.vue';
|
||||
import Home from '@/components/HelloWorld.vue';
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
|
||||
Reference in new issue
Block a user