You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
669 B

import zhCn from '../es/locale/lang/zh-cn.mjs';
import nav from './components/navMenu.js';
// 2、定义路由
const routes = [
{ path: '/foo', component: nav }
]
// 获取路由方式
const history = VueRouter.createWebHistory()
const router = VueRouter.createRouter({
history,
routes
});
const App = {
data() {
return {
message: "Hello Element Plus"
};
},
methods: {
next() {
if (this.active++ > 2) this.active = 0
}
}
};
const app = Vue.createApp(App);
app.use(ElementPlus, {
locale: zhCn
});
app.use(router) // 挂载路由
app.mount("#app");