Menu
×
×
正确
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import FishTypes from './components/FishTypes.vue'
const router = createRouter({
history: createWebHistory(),
routes: [
{ @(4): '/fish', @(9): FishTypes }
]
});
const app = createApp(App)
app.use(router);
app.mount('#app')
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import FishTypes from './components/FishTypes.vue'
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/fish', component: FishTypes }
]
});
const app = createApp(App)
app.use(router);
app.mount('#app')
不正确
点击 此处 重试 正确
下一题 ❯import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import App from './App.vue' import FishTypes from './components/FishTypes.vue' const router = createRouter({ history: createWebHistory(), routes: [ {w3exercise_input_no_0: '/fish',w3exercise_input_no_1: FishTypes } ] }); const app = createApp(App) app.use(router); app.mount('#app') |