Update navigation routing and add Element Plus plugin
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="w-[100%] border-b-[1px] border-b-[#eee] border-b-solid">
|
||||
<div class="relative ma-auto flex items-center py-[20px] w-[1500px]!">
|
||||
<img src="~/assets/images/logo5.png" alt="图夕夕" srcset="" class="h-[51px] w-[182px] cursor-pointer" @click="router.push('/index')" />
|
||||
<img src="~/assets/images/logo5.png" alt="图夕夕" srcset="" class="h-[51px] w-[182px] cursor-pointer" @click="navigateTo('/')" />
|
||||
<div class="ml-[60px] flex items-center">
|
||||
<span v-for="item in navList" :key="item" class="nav" :class="props.active === item ? 'active' : ''" @click="handleClick(item)">{{ item }}</span>
|
||||
</div>
|
||||
@ -146,7 +146,7 @@
|
||||
const handleClick = (item: string) => {
|
||||
switch (item) {
|
||||
case '首页':
|
||||
navigateTo('/') // 修改为在新窗口打开
|
||||
navigateTo({ path: '/'}) // 修改为在新窗口打开
|
||||
break
|
||||
case '图纸':
|
||||
navigateTo('/drawe') // 修改为在新窗口打开
|
||||
|
||||
9
plugins/element.ts
Normal file
9
plugins/element.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { defineNuxtPlugin } from '#app'
|
||||
import ElementPlus from 'element-plus'
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
|
||||
export default defineNuxtPlugin(nuxtApp => {
|
||||
nuxtApp.vueApp.use(ElementPlus, {
|
||||
locale: zhCn
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user