国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Vue3+Vue-Router+Element-Plus根據(jù)后端數(shù)據(jù)實(shí)現(xiàn)前端動(dòng)態(tài)路由——權(quán)限管理模塊

這篇具有很好參考價(jià)值的文章主要介紹了Vue3+Vue-Router+Element-Plus根據(jù)后端數(shù)據(jù)實(shí)現(xiàn)前端動(dòng)態(tài)路由——權(quán)限管理模塊。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

提示:文章內(nèi)容仔細(xì)看一些,或者直接粘貼復(fù)制,效果滿滿


前言

提示:文章大概

1、項(xiàng)目:前后端分離
2、前端:基于Vite創(chuàng)建的Vue3項(xiàng)目
3、后端:沒有,模擬的后端數(shù)據(jù)
4、關(guān)于路徑“@”符號(hào)——vite.config.js 文件里修改
vue3動(dòng)態(tài)路由權(quán)限,vue,前端,vue.js,javascript,elementui


提示:以下是本篇文章正文內(nèi)容,下面案例可供復(fù)制粘貼使用,嘎嘎爽

一、技術(shù)棧

  1. Vite 創(chuàng)建 Vue3 項(xiàng)目
# 1.創(chuàng)建項(xiàng)目
npm create vite@latest

# 2.下載依賴
npm install

# 3.運(yùn)行項(xiàng)目
npm run dev
  1. Element-plus
# 1.下載
npm install element-plus --save

# 2.main.js 引入
// main.ts
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'

const app = createApp(App)

app.use(ElementPlus)
app.mount('#app')
  1. Vue-Router
# 1.安裝
npm install vue-router@4
  1. nprogress (進(jìn)度條——非必選,好看而已)
npm i nprogress -S

vue3動(dòng)態(tài)路由權(quán)限,vue,前端,vue.js,javascript,elementui

二、項(xiàng)目結(jié)構(gòu)

vue3動(dòng)態(tài)路由權(quán)限,vue,前端,vue.js,javascript,elementui

三、菜單組件和數(shù)據(jù)

說明:

  1. AsideMenu.vue 引用 LeftSubMenu.vue 組件,并父傳子傳入后端數(shù)據(jù)
  2. LeftSubMenu.vue 組件加載數(shù)據(jù)
  3. menuData.json 后端模擬數(shù)據(jù)文件

1、AsideMenu.vue 組件

代碼如下(示例):

<template>
    <el-menu router :default-active="activeMenu" :class="'menu-left'" :default-openeds="openedsArr" text-color="#fff">
        <LeftSubMenu :menuData="treeMenu"></LeftSubMenu>
    </el-menu>
</template>
   
<script setup>
import LeftSubMenu from "./LeftSubMenu.vue";
import { computed } from "vue";
import { useRouter } from "vue-router";
import treeMenu from './menuData.json';


const openedsArr = treeMenu.map((item) => {
    return item.path;
});


const activeMenu = computed(() => {
    const router = useRouter();
    const { meta, path } = router.currentRoute.value;
    if (meta.matchPath2) {
        return meta.matchPath2;
    } else {
        return path;
    }
});


</script>
   

<style scoped>
.menu-left {
    flex: 1;
    padding: 0 8px;
    border-right: none;
    background: none;
}

.menu-left:deep(.el-menu),
.menu-left:deep(.el-sub-menu__title:hover) {
    background: none;
}

.menu-left:deep(.el-menu-item),
.menu-left:deep(.el-sub-menu__title) {
    height: 36px;
    margin-bottom: 4px;
    border-radius: 4px;
    color: var(--text-main-color) !important;
}

.menu-left:deep(.el-menu-item:hover .icon),
.menu-left:deep(.el-menu-item.is-active .icon) {
    filter: invert(100%);
    -webkit-filter: invert(100%);
}

.menu-left:deep(.el-menu-item:hover),
.menu-left:deep(.el-menu-item.is-active) {
    color: #ffffff !important;
    background-color: #eecece;
}
</style>

2、LeftSubMenu.vue

代碼如下(示例):

<template>
    <template v-for="item in props.menuData">
        <el-sub-menu :key="item.path" v-if="item.children && item.children.length > 0" :index="item.path">

            <template #title>
                <el-icon>
                    <component :is="item.icon"></component>
                </el-icon>
                <span>{{ item.meta.title }}</span>
            </template>
            <LeftSubMenu :menuData="item.children"></LeftSubMenu>
        </el-sub-menu>


        <el-menu-item :key="item.id" v-else :index="item.path" :disabled="item.disabled">
            <template #title>
                <!-- <img class="icon pd-r-10" :src="item.icon" /> -->
                <el-icon>
                    <component :is="item.icon"></component>
                </el-icon>
                <span>{{ item.meta.title }}</span>
            </template>
        </el-menu-item>


    </template>
</template>
   
<script setup>
import LeftSubMenu from "./LeftSubMenu.vue";
import { computed, onMounted } from "vue";
import { useRouter } from "vue-router";

const props = defineProps({
    menuData: {
        type: Array,
        default: [],
    },
});

onMounted(() => {
    console.log(props.menuData, "Item打印數(shù)據(jù)");
});

const curRoute = computed(() => {
    const router = useRouter();
    const { path } = router.currentRoute.value;
    return path;
});
</script>


3、menuData.json 數(shù)據(jù)

數(shù)據(jù)參數(shù)說明:

  1. menuType: 0為菜單組,1為菜單(可跳轉(zhuǎn))
  2. children: 子路由
數(shù)據(jù)說明:不復(fù)制
{
        "id": "1",   // 唯一id
        "name": "Home",  // 組件名稱
        "path": "/home",  // 路由
        "component": "/home/index.vue",   // 組件文件位置
        "menuType": "1",  // 組件類型
        "icon": "Discount",  // 圖標(biāo)
        "sort": 0,   // 排序規(guī)則
        "meta": {
            "title": "系統(tǒng)首頁",  // 組件名稱
            "requiresAuth": null, // 是否需要身份驗(yàn)證
            "roles": [],  // 用戶角色或權(quán)限
            "breadcrumb": [  // 定義面包屑導(dǎo)航
                {}
            ],
            "keepAlive": null  // 是否需要緩存
        },
        "children": []   // 子路由
    }

代碼如下(示例):


[
    {
        "id": "1",
        "name": "Home",
        "path": "/home",
        "component": "/home/index.vue",
        "menuType": "1",
        "icon": "Discount",
        "sort": 0,
        "meta": {
            "title": "系統(tǒng)首頁",
            "requiresAuth": null,
            "roles": [],
            "breadcrumb": [
                {}
            ],
            "keepAlive": null
        },
        "children": []
    },
    {
        "id": "2",
        "name": "System",
        "path": "/system",
        "component": "/system/index.vue",
        "menuType": "0",
        "icon": "Operation",
        "sort": 0,
        "meta": {
            "title": "系統(tǒng)管理",
            "requiresAuth": null,
            "roles": [],
            "breadcrumb": [
                {}
            ],
            "keepAlive": null
        },
        "children": [
            {
                "id": "211",
                "name": "User",
                "path": "/user",
                "component": "/user/index.vue",
                "menuType": "1",
                "icon": "user",
                "sort": 0,
                "meta": {
                    "title": "用戶管理",
                    "requiresAuth": null,
                    "roles": [],
                    "breadcrumb": [
                        {}
                    ],
                    "keepAlive": null
                },
                "children": []
            },
            {
                "id": "222",
                "name": "Menu",
                "path": "/menu",
                "component": "/menu/index.vue",
                "menuType": "1",
                "icon": "Menu",
                "sort": 0,
                "meta": {
                    "title": "菜單管理",
                    "requiresAuth": null,
                    "roles": [],
                    "breadcrumb": [
                        {}
                    ],
                    "keepAlive": null
                },
                "children": []
            },
            {
                "id": "223",
                "name": "Role",
                "path": "/role",
                "component": "/role/index.vue",
                "menuType": "1",
                "icon": "Avatar",
                "sort": 0,
                "meta": {
                    "title": "角色管理",
                    "requiresAuth": null,
                    "roles": [],
                    "breadcrumb": [
                        {}
                    ],
                    "keepAlive": null
                },
                "children": []
            }
        ]
    },
    {
        "id": "3",
        "name": "Log",
        "path": "/log",
        "component": "/log/index.vue",
        "menuType": "1",
        "icon": "Notebook",
        "sort": 0,
        "meta": {
            "title": "日志管理",
            "requiresAuth": null,
            "roles": [],
            "breadcrumb": [
                {}
            ],
            "keepAlive": null
        },
        "children": []
    },
    {
        "id": "4",
        "name": "Study",
        "path": "/study",
        "component": "/study/index.vue",
        "menuType": "0",
        "icon": "Notebook",
        "sort": 0,
        "meta": {
            "title": "學(xué)習(xí)管理",
            "requiresAuth": null,
            "roles": [],
            "breadcrumb": [
                {}
            ],
            "keepAlive": null
        },
        "children": [
            {
                "id": "441",
                "name": "StudyUser",
                "path": "/studyUser",
                "component": "/study/user/index.vue",
                "menuType": "0",
                "icon": "Notebook",
                "sort": 0,
                "meta": {
                    "title": "用戶管理",
                    "requiresAuth": null,
                    "roles": [],
                    "breadcrumb": [
                        {}
                    ],
                    "keepAlive": null
                },
                "children": [
                    {
                        "id": "4441",
                        "name": "Student",
                        "path": "/student",
                        "component": "/study/user/student/index.vue",
                        "menuType": "1",
                        "icon": "Notebook",
                        "sort": 0,
                        "meta": {
                            "title": "學(xué)生管理",
                            "requiresAuth": null,
                            "roles": [],
                            "breadcrumb": [
                                {}
                            ],
                            "keepAlive": null
                        },
                        "children": []
                    },
                    {
                        "id": "4442",
                        "name": "Teacher",
                        "path": "/teacher",
                        "component": "/study/user/teacher/index.vue",
                        "menuType": "1",
                        "icon": "Notebook",
                        "sort": 0,
                        "meta": {
                            "title": "教師管理",
                            "requiresAuth": null,
                            "roles": [],
                            "breadcrumb": [
                                {}
                            ],
                            "keepAlive": null
                        },
                        "children": []
                    }
                ]
            },
            {
                "id": "3",
                "name": "Log",
                "path": "/log",
                "component": "/log/index.vue",
                "menuType": "1",
                "icon": "Notebook",
                "sort": 0,
                "meta": {
                    "title": "打卡記錄",
                    "requiresAuth": null,
                    "roles": [],
                    "breadcrumb": [
                        {}
                    ],
                    "keepAlive": null
                },
                "children": []
            }
        ]
    }
]


四、router 配置

說明:

  1. router.addRouter({}) 函數(shù)即動(dòng)態(tài)路由,它是臨時(shí)性的,就是一旦刷新就會(huì)清除掉添加的動(dòng)態(tài)路由信息
  2. 需要重新定位到 localhost:8080 來刷新,重新獲取路由信息,方便調(diào)試
  3. 因?yàn)槭乔岸遂o態(tài)數(shù)據(jù),所以正常,只要連接后端,請(qǐng)求數(shù)據(jù)后,緩存本地,每次刷新從本地獲取即可
  4. 文章只是完成動(dòng)態(tài)路由的實(shí)現(xiàn),數(shù)據(jù)的持久性存儲(chǔ),各位根據(jù)自己項(xiàng)目自身完善

1、router/index.js

代碼如下(示例):

import {
    createRouter,
    createWebHashHistory
} from 'vue-router';

import NotFound from '@/pages/404/404.vue'  // pages 文件下創(chuàng)建404文件,再創(chuàng)建一個(gè)404.vue

const routes = [
    { path: "/", component: () => import('@/pages/manage/ManageMain.vue') },  // 登錄頁
    {
        path: "/manage", name: 'Manage', component: () => import('@/pages/manage/ManageMain.vue'),  // 主頁        
    },
    { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },
]

const router = createRouter({
    // 4. 內(nèi)部提供了 history 模式的實(shí)現(xiàn)。為了簡單起見,我們?cè)谶@里使用 hash 模式。
    history: createWebHashHistory(),
    routes, // `routes: routes` 的縮寫
})

// 導(dǎo)出實(shí)例, permission.js 引入
export default router


2、permission.js (與main.js 同級(jí))

說明:

  1. 注意 NProgress 的引入、配置、使用
  2. 動(dòng)態(tài)路由的添加(主要是 router.addRoute ,其他的都是根據(jù)后端 json 文件的參數(shù)來判斷,不同的參數(shù)配置,不同的判斷,這只是我喜歡的參數(shù)配置)
  3. 路徑的拼接(component: () => import(/* @vite-ignore */ ./views${item.component}))
  4. 具體的根據(jù)自己的情況配置,打印就知道了,
  5. 按照我的配置,就不需要改動(dòng)

代碼如下(示例):

// 說明:路由守衛(wèi)文件

// 引入
import router from "./router";
// 判斷用戶無token 返回登錄頁提示有用
import { ElMessage } from 'element-plus';
// 進(jìn)度條
import NProgress from 'nprogress';

// 簡單配置  進(jìn)度條,可以不配置:在axios中我們不再做配置,以用來區(qū)分。
NProgress.inc(0.2)
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false })


// 一、前置守衛(wèi)
router.beforeEach((to, from, next) => {
    // 進(jìn)度條
    NProgress.start();
    // 1、動(dòng)態(tài)路由
    addRoutes();
    // 2、中間處理(token)
    // 3、最后放行
    next();
})

// 動(dòng)態(tài)路由獲?。鹤?之后完善項(xiàng)目直接考慮在登錄的時(shí)候直接獲取
// 直接緩存在 pinia 里
// 這里直接取數(shù)據(jù),不請(qǐng)求
import { getTreeMenu } from '@/api/index.js';
import menuData from '@/components/menu2/menuData.json';
function addRoutes() {
    // 1、后端數(shù)據(jù)
    createRouters(menuData);
    console.log("router/index.js打印router已有的路由信息", router.getRoutes());
}
// 拼接路由
function createRouters(result) {
    result.forEach((item) => {
        // 1、類型為0的菜單,子路由不為空,將子路由添加到manage里
        if (item.menuType === '0' && item.children.length > 0) {
            item.children.forEach((children) => {
                createRouterTemplate('Manage', children);
            })
        }
        // 2、menuType == 1, 子路由為空
        if (item.menuType === '1' && item.children.length === 0) {
            createRouterTemplate('Manage', item);
        }

        // 3、遞歸層級(jí)
        if (item.children.length > 0) {
            createRouters(item.children);
        }
    });
}
// 把router 的動(dòng)態(tài)路由進(jìn)行封裝
function createRouterTemplate(fatherRouter, item) {
    router.addRoute(fatherRouter, {
        path: item.path,
        name: item.name,
        meta: {
            title: item.meta.title, // 面包屑用
            requiresAuth: item.meta.requiresAuth,
            roles: item.meta.roles,
            breadcrumb: item.meta.breadcrumb,
            keepAlive: item.meta.keepAlive
        },
        // /* @vite-ignore */ :處理vite動(dòng)態(tài)導(dǎo)入的警告
        component: () => import(/* @vite-ignore */ `./views${item.component}`)
    })
}


// 二、后置守衛(wèi)
router.afterEach((to) => {
    // 標(biāo)簽抬頭
    document.title = to.meta.title;

    // 進(jìn)度條
    NProgress.done();
})


// main.js 導(dǎo)入的為這個(gè)router
export default router


3、main.js

說明:

  • 1.注意 router 的引用文件
  • 2.注意 nprogress 的引用
  • 3.注意全局定義Element-Plus圖標(biāo)
  • 4.注意Vue3動(dòng)態(tài)圖標(biāo)的使用
# Vue3 動(dòng)態(tài)圖標(biāo)的使用
 <el-icon><component :is="item.icon"></component></el-icon>

代碼如下(示例):

import { createApp } from 'vue'
import './style.css';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import App from './App.vue';
// import router from './router';  // 原router
import router from './permission'; // 現(xiàn)router
//Icon全局引入
import * as icons from "@element-plus/icons-vue";
// 進(jìn)度條
import 'nprogress/nprogress.css';

const app = createApp(App);
// ElementPlus
app.use(ElementPlus);
// Icon全局注冊(cè)
Object.keys(icons).forEach(key => {
    app.component(key, icons[key])
})

app.use(router);

app.mount('#app')

五、效果

vue3動(dòng)態(tài)路由權(quán)限,vue,前端,vue.js,javascript,elementui

vue3動(dòng)態(tài)路由權(quán)限,vue,前端,vue.js,javascript,elementui

刪除menuData.json 文件的某一個(gè)路由,界面將不展示?。?!

六、給個(gè)點(diǎn)贊和收藏

七、參考文獻(xiàn)

參考文章 — https://www.cnblogs.com/lpkshuai/p/17346600.html文章來源地址http://www.zghlxwxcb.cn/news/detail-787176.html

到了這里,關(guān)于Vue3+Vue-Router+Element-Plus根據(jù)后端數(shù)據(jù)實(shí)現(xiàn)前端動(dòng)態(tài)路由——權(quán)限管理模塊的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • NodeJS+Vue+Element-Ui/Plus+Axios+Vue-router+vuex 詳細(xì)下載、安裝、創(chuàng)建項(xiàng)目、引入

    NodeJS+Vue+Element-Ui/Plus+Axios+Vue-router+vuex 詳細(xì)下載、安裝、創(chuàng)建項(xiàng)目、引入

    1.下載過程默認(rèn)下一步 (1)這個(gè)是官網(wǎng)全版目錄,下載太慢(一般下載不了);但是它寫了所有nodejs和npm相互對(duì)應(yīng)的版本,可以以此為參考、防止版本不對(duì)應(yīng); NodeJS各個(gè)歷史版本下載 https://nodejs.org/zh-cn/download/releases/ (2)這里有一個(gè)快速下載地址,只有16.18.1這個(gè)版本,但這

    2023年04月18日
    瀏覽(36)
  • vue3使用element-plus

    vue3使用element-plus

    element-ui 是配合 vue2 使用,element-plus 是配置 vue3 使用的 1. 包管理器的方式 如果是使用?webpack 或者 vite 打包工具新建的項(xiàng)目 2. 瀏覽器直接導(dǎo)入 直接通過瀏覽器的 HTML 標(biāo)簽導(dǎo)入 Element Plus,然后就可以使用全局變量 ElementPlus 1. 導(dǎo)入全部組件且注冊(cè)所有的圖標(biāo) 聲明使用 ElementPl

    2024年02月08日
    瀏覽(35)
  • Vue3導(dǎo)入Element-plus方法

    Vue3導(dǎo)入Element-plus方法

    先引入依賴 main.js中要引入兩個(gè)依賴 然后 這個(gè)東西 我們最好還是掛載vue上 所以 還是 然后 我們可以在組件上試一下用一個(gè)ElementUi的表格組件 參考代碼如下 運(yùn)行結(jié)果如下 也是沒有任何問題

    2024年02月06日
    瀏覽(97)
  • vue3 element-plus 實(shí)現(xiàn)圖片預(yù)覽

    vue3 element-plus 實(shí)現(xiàn)圖片預(yù)覽

    element-plus下有這么一個(gè)組件 el-image-viewer /,但是這個(gè)組件是沒寫在文檔上面的,像普通組件一樣使用即可 可以通過點(diǎn)擊按鈕實(shí)現(xiàn)圖片預(yù)覽,而非el-image組件只能通過點(diǎn)擊圖片實(shí)現(xiàn)預(yù)覽 2.1封裝組件 2.3組件使用 在需要使用的地方引入,然后使用即可,這不是重點(diǎn),每個(gè)人使用的

    2024年02月15日
    瀏覽(28)
  • Vue3 封裝 element-plus 圖標(biāo)選擇器

    Vue3 封裝 element-plus 圖標(biāo)選擇器

    效果一: 效果二: ? 效果一的這個(gè)是把全部的icon圖標(biāo)都讓它顯示出來,讓我們自己選擇說選圖標(biāo) 2.1. 全局注冊(cè) icon 組件 2.2. 組件實(shí)現(xiàn)? 2.3. 使用? 效果二的這個(gè)是渲染后端返回的icon圖標(biāo) 3.1. 全局注冊(cè) icon 組件 3.2. 組件實(shí)現(xiàn)? 3.3. 使用?

    2024年02月07日
    瀏覽(239)
  • vue3+element-plus上傳文件,預(yù)覽文件

    vue3+element-plus上傳文件,預(yù)覽文件

    vue3+ts+element-plus上傳文件,預(yù)覽文件 場景:使用element-plus的el-upload標(biāo)簽,手動(dòng)上傳文件,可預(yù)覽docx,xlsx,pdf,jpg,jpeg,png(本地資源以及網(wǎng)絡(luò)資源)。 1、使用el-upload標(biāo)簽 檢查上傳文件的文件格式與大小 上傳的附件信息在fileList中,組裝接口所需數(shù)據(jù)進(jìn)行上傳 使用docx-preview插件預(yù)覽

    2024年02月11日
    瀏覽(37)
  • vue3項(xiàng)目搭建并配置element-plus

    安裝完成后,輸入如下指令查看vue的版本: 選擇一個(gè)要存放項(xiàng)目的目錄,打開小黑窗輸入如下命令: 一開始輸入項(xiàng)目名稱或者默認(rèn)vue-project,然后根據(jù)需求選擇Yes/No 生成完項(xiàng)目后,輸入如下指令: src/main.js里引入 index.css的文件位置根據(jù)實(shí)際情況寫,也有可能是 const app后面加

    2024年02月13日
    瀏覽(30)
  • Vue3+element-plus實(shí)現(xiàn)后臺(tái)管理系統(tǒng)

    Vue3+element-plus實(shí)現(xiàn)后臺(tái)管理系統(tǒng)

    ?環(huán)境:node.js軟件 、Vs code、vite、elemnt-plus、windicss(樣式框架) ? ? 1、首先,使用npm 命令構(gòu)建項(xiàng)目( vscode安裝的插件 vscode中文顯示插件 ? 2、高亮提示插件volar ? 3、vue 3 sni 代碼提示) 快速上手 | Vue.js ? ?a. npm -v 查看node.js 版本 ? ?b. ?npm ?config get registry ? 查看注冊(cè)鏡像是

    2024年02月09日
    瀏覽(33)
  • (二) Vue3 + Element-Plus 實(shí)現(xiàn)動(dòng)態(tài)菜單欄

    (二) Vue3 + Element-Plus 實(shí)現(xiàn)動(dòng)態(tài)菜單欄

    系列介紹:Vue3 + Vite + TS 從零開始學(xué)習(xí) 項(xiàng)目搭建:(一) Vue3 + Vite + TS 項(xiàng)目搭建 實(shí)現(xiàn)動(dòng)態(tài)菜單欄:(二) Vue3 + Element-Plus 實(shí)現(xiàn)動(dòng)態(tài)菜單欄 實(shí)現(xiàn)動(dòng)態(tài)面包屑:(三) Vue3 + Element-Plus 實(shí)現(xiàn)動(dòng)態(tài)面包屑 實(shí)現(xiàn)動(dòng)態(tài)標(biāo)簽頁:(四) Vue3 + Element-Plus 實(shí)現(xiàn)動(dòng)態(tài)標(biāo)簽頁 實(shí)現(xiàn)動(dòng)態(tài)主題色切換(demo):(五)

    2023年04月23日
    瀏覽(59)
  • vue3 element-plus動(dòng)態(tài)菜單及動(dòng)態(tài)圖標(biāo)

    引入element-plus 注冊(cè)圖標(biāo)組件 動(dòng)態(tài)引入圖標(biāo)代碼 完整代碼 路由如下

    2024年01月18日
    瀏覽(50)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包