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

若依前端Vue3模板——自定義主題+炫彩主題

這篇具有很好參考價(jià)值的文章主要介紹了若依前端Vue3模板——自定義主題+炫彩主題。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

若依框架新增自定義主題風(fēng)格

實(shí)現(xiàn)結(jié)果

vue3頁(yè)面模板,前端,vue

實(shí)現(xiàn)步驟

默認(rèn)主題的設(shè)置

文件位置:src/settings.js

export default {
  // ...
  /**
   * 側(cè)邊欄主題 深色主題theme-dark,淺色主題theme-light,藍(lán)色主題theme-blue,炫彩主題theme-shine
   */
  sideTheme: 'theme-blue',
  // ...
}
布局設(shè)置

vue3頁(yè)面模板,前端,vue

圖標(biāo)文件

文件位置:src/assets/images/blue.svg

復(fù)制同級(jí)的 light.svg 修改名稱(chēng)即可,將兩個(gè)顏色替換為:#409eff

<g id="配置面板" width="48" height="40" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
    <g id="setting-copy-2" width="48" height="40" transform="translate(-1190.000000, -136.000000)">
        <g id="Group-8" width="48" height="40" transform="translate(1167.000000, 0.000000)">
            <g id="Group-5-Copy-5" filter="url(#filter-1)" transform="translate(25.000000, 137.000000)">
                <mask id="mask-3" fill="#409eff">
                    <use xlink:href="#path-2"></use>
                </mask>
                <g id="Rectangle-18">
                    <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use>
                    <use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use>
                </g>
                <rect id="Rectangle-11" fill="#409eff" mask="url(#mask-3)" x="0" y="0" width="48" height="10"></rect>
                <rect id="Rectangle-18" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="16" height="40"></rect>
            </g>
        </g>
    </g>
</g>
布局組件

文件位置:src/layout/components/Settings/index.vue

template模板中添加控件如下

新增一個(gè)主題風(fēng)格選項(xiàng),主要注意的是handleTheme里面的傳參(后面會(huì)用到)和img的src圖片,例如實(shí)例中的blue.svg

<div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-blue')">
  <img src="@/assets/images/blue.svg" alt="blue" />
  <div v-if="sideTheme === 'theme-blue'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
    <i aria-label="圖標(biāo): check" class="anticon anticon-check">
      <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true"
        focusable="false" class>
        <path
          d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />
      </svg>
    </i>
  </div>
</div>
準(zhǔn)備CSS變量

文件位置:src/assets/styles/variables.module.scss

// 默認(rèn)菜單主題風(fēng)格
$base-menu-blue-color: rgba(0, 0, 0, 0.7);
$base-menu-blue-background: #ffffff;
$base-logo-blue-title-color: #ffffff;

$base-menu-shine-color: #ffffff;
$base-menu-shine-background: rgba(0, 0, 0, 0);
$base-logo-shine-title-color: #ffffff;

// ...

// 頂部菜單主題風(fēng)格
$base-navbar-color: #999093;
$base-navbar-icon-color: #5a5e66;
$base-navbar-background: #ffffff;

$base-navbar-blue-color: #ffffff;
$base-navbar-blue-background: #409eff;

$base-navbar-shine-color: #ffffff;
$base-navbar-shine-background: rgba(0, 0, 0, 0);

// ...

:export {
	menuBlueColor: $base-menu-blue-color;
	menuBlueBackground: $base-menu-blue-background;
	logoBlueTitleColor: $base-logo-blue-title-color;
	menuShineColor: $base-menu-shine-color;
	menuShineBackground: $base-menu-shine-background;
	logoShineTitleColor: $base-logo-shine-title-color;
	navbarColor: $base-navbar-color;
	navbarIconColor: $base-navbar-icon-color;
	navbarBlueColor: $base-navbar-blue-color;
	navbarShineColor: $base-navbar-shine-color;
	navbarBackground: $base-navbar-background;
	navbarBlueBackground: $base-navbar-blue-background;
	navbarShineBackground: $base-navbar-shine-background;
    // ...
}

同級(jí)文件:sidebar.scss

左側(cè)menu菜單的背景色和懸停樣式

//新增樣式,大概在112行
& .theme-blue .nest-menu .el-sub-menu > .el-sub-menu__title,
& .theme-blue .el-sub-menu .el-menu-item {
  background-color: $base-menu-blue-background !important;
  &:hover {
    color: $base-navbar-blue-color;
    background-color: $base-navbar-blue-background !important;
  }
}
對(duì)狀態(tài)管理庫(kù)中的主題名稱(chēng)進(jìn)行匹配

JS核心內(nèi)容如下,若沒(méi)有需手動(dòng)添加。

import variables from '@/assets/styles/variables.module.scss'
import useSettingsStore from '@/store/modules/settings'

const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);
logo圖標(biāo)組件

文件位置:src/layout/components/Sidebar/Logo.vue

主要修改幾個(gè)動(dòng)態(tài)的style

<template>
  <div class="sidebar-logo-container" :class="{ 'collapse': collapse }"
    :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : sideTheme === 'theme-blue' ? variables.navbarBlueBackground : variables.menuLightBackground }">
    <transition name="sidebarLogoFade">
      <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
        <img v-if="logo" :src="logo" class="sidebar-logo" />
        <h1 v-else class="sidebar-title"
          :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : sideTheme === 'theme-blue' ? variables.logoBlueTitleColor : variables.logoLightTitleColor }">
          {{ title }}</h1>
      </router-link>
      <router-link v-else key="expand" class="sidebar-logo-link" to="/">
        <img v-if="logo" :src="logo" class="sidebar-logo" />
        <h1 class="sidebar-title"
          :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : sideTheme === 'theme-blue' ? variables.logoBlueTitleColor : variables.logoLightTitleColor }">
          {{ title }}</h1>
      </router-link>
    </transition>
  </div>
</template>
左側(cè)導(dǎo)航欄菜單組件

文件位置:src/layout/components/Sidebar/index.vue

<template>
  <div :class="{ 'has-logo': showLogo }"
    :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : sideTheme === 'theme-blue' ? variables.menuBlueBackground : variables.menuLightBackground }">
    <logo v-if="showLogo" :collapse="isCollapse" />
    <el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
      <el-menu :default-active="activeMenu" :collapse="isCollapse"
        :background-color="sideTheme === 'theme-dark' ? variables.menuBackground : sideTheme === 'theme-blue' ? variables.menuBlueBackground : variables.menuLightBackground"
        :text-color="sideTheme === 'theme-dark' ? variables.menuColor : sideTheme === 'theme-blue' ? variables.menuBlueColor : variables.menuLightColor"
        :unique-opened="true" :active-text-color="theme" :collapse-transition="false" mode="vertical">
        <sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
          :base-path="route.path" />
      </el-menu>
    </el-scrollbar>
  </div>
</template>

樣式文件專(zhuān)門(mén)對(duì)該組件進(jìn)行了修改:src/assets/styles/sidebar.scss,若對(duì)側(cè)邊欄進(jìn)行修改實(shí)現(xiàn)不了時(shí),可查看是否是這里的問(wèn)題,里面用了好多!important定義樣式。

頂部導(dǎo)航欄組件

文件位置:src/layout/components/Navbar.vue

添加了一個(gè)動(dòng)態(tài)style,

頭像右邊的el-icon組件,添加了color屬性

<template>
  <div class="navbar"
    :style="{ backgroundColor: sideTheme === 'theme-dark' || sideTheme === 'theme-light' ? variables.navbarBackground : variables.navbarBlueBackground }">
	<!-- ... -->
        <div class="avatar-container">
        <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
          <div class="avatar-wrapper">
            <img :src="userStore.avatar" class="user-avatar" />
            <el-icon
              :color="sideTheme === 'theme-dark' || sideTheme === 'theme-light' ? variables.navbarIconColor : variables.navbarBlueColor"><caret-bottom /></el-icon>
          </div>
          <!-- ... -->
        </el-dropdown>
      </div>
  </div>
</template>

該文件下沒(méi)有使用過(guò)主題名稱(chēng)匹配,需手動(dòng)引入

該組件還引用了一些子組件,都需要對(duì)主題名稱(chēng)進(jìn)行匹配


針對(duì)組件中使用到的svg-icon圖標(biāo)組件,修改如下:

組件都在src/components目錄下,以文檔地址圖標(biāo)為例,其他類(lèi)似。

<template>
  <div>
    <svg-icon icon-class="question" @click="goto"
      :color="sideTheme === 'theme-dark' || sideTheme === 'theme-light' ? variables.navbarIconColor : variables.navbarBlueColor" />
  </div>
</template>

<script setup>
import variables from '@/assets/styles/variables.module.scss'
import useSettingsStore from '@/store/modules/settings'

const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);
// ...
</script>

控制左側(cè)菜單欄收起展開(kāi)的icon圖標(biāo)

文件位置:src/components/Hamburger/index.vue

給 svg 圖標(biāo)添加 fill 屬性。

<template>
  <div style="padding: 0 15px;" @click="toggleClick">
    <svg
      :class="{'is-active':isActive}"
      :fill="sideTheme === 'theme-dark' || sideTheme === 'theme-light' ? variables.navbarIconColor : variables.navbarBlueColor"
      class="hamburger"
      viewBox="0 0 1024 1024"
      xmlns="http://www.w3.org/2000/svg"
      width="64"
      height="64"
    >
      <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
    </svg>
  </div>
</template>

<script setup>
import variables from '@/assets/styles/variables.module.scss'
import useSettingsStore from '@/store/modules/settings'

const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);
// ...
</script>

最后,是對(duì)面包屑導(dǎo)航的處理

對(duì)span標(biāo)簽 a標(biāo)簽,添加動(dòng)態(tài)style

<template>
  <el-breadcrumb class="app-breadcrumb" separator="/">
    <transition-group name="breadcrumb">
      <el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
        <span
          :style="{ color: sideTheme === 'theme-dark' || sideTheme === 'theme-light' ? variables.navbarColor : variables.navbarBlueColor }"
          v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">
          {{ item.meta.title }}</span>
        <a :style="{ color: sideTheme === 'theme-dark' || sideTheme === 'theme-light' ? variables.navbarColor : variables.navbarBlueColor }"
          v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
      </el-breadcrumb-item>
    </transition-group>
  </el-breadcrumb>
</template>
<script setup>
import variables from '@/assets/styles/variables.module.scss'
import useSettingsStore from '@/store/modules/settings'

const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);
// ...
</script>

炫彩主題

炫彩主題與自定義主題方法類(lèi)似。只是將他們的背景色去掉。

這里提供一種添加炫彩主題的思路

實(shí)現(xiàn)結(jié)果

vue3頁(yè)面模板,前端,vue

實(shí)現(xiàn)步驟

布局設(shè)置

找一張圖片,放入位置:src/assets/images/theme-bg.jpg

布局組件

文件位置:src/layout/components/Settings/index.vue

為了樣式美觀,給img標(biāo)簽添加了style屬性,svg圖標(biāo)填充顏色設(shè)為白色:fill='#ffffff'

<div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-shine')">
  <img src="@/assets/images/theme-bg.jpg" alt="shine" style="width: 48px; height: 40px;" />
  <div v-if="sideTheme === 'theme-shine'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
    <i aria-label="圖標(biāo): check" class="anticon anticon-check">
      <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" fill="#ffffff" aria-hidden="true"
        focusable="false" class>
        <path
          d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />
      </svg>
    </i>
  </div>
</div>

炫彩主題需要背景色透明,不能實(shí)現(xiàn)固定header

<div class="drawer-item">
  <span>固定 Header</span>
  <span class="comp-style">
    <!-- 炫彩主題需要背景色透明,不能實(shí)現(xiàn)固定header -->
    <el-switch v-model="fixedHeader" class="drawer-switch" :disabled="sideTheme === 'theme-shine'" />
  </span>
</div>

核心代碼:

頁(yè)面加載時(shí)向body元素中插入一個(gè)img元素,切換主題時(shí)控制img元素的顯示/隱藏。

handleTheme()是主題切換時(shí)觸發(fā)的函數(shù)。

import exampleImg from '@/assets/images/theme-bg.jpg'

// ...
// 在body下插入一個(gè)img元素,作為炫彩主題的背景
const body = document.querySelector('body');
const img = document.createElement('img');
img.setAttribute('src', exampleImg);
img.style.minWidth = '100%';
img.style.minHeight = '100%';
img.style.position = 'fixed';
img.style.left = '0';
img.style.top = '0';
img.style.zIndex = '-1';
// 獲取當(dāng)前主題名稱(chēng),若當(dāng)不是炫彩主題,將其隱藏
if (settingsStore.sideTheme !== 'theme-shine') {
  img.style.display = 'none';
}
body.appendChild(img);
function handleTheme(val) {
  // 選中炫彩主題,并且背景圖為隱藏狀態(tài)
  if (val == 'theme-shine' && img.style.display == 'none') {
    img.style.display = 'inline-block';
    // 炫彩主題需要背景色透明,不能實(shí)現(xiàn)固定header
    fixedHeader.value = false;
  } else {
    img.style.display = 'none';
  }
  settingsStore.changeSetting({ key: 'sideTheme', value: val })
  sideTheme.value = val;
}
// ...
其他

剩下的修改的地方與上面類(lèi)似。

下面是炫彩主題特有的:

展示內(nèi)容的路由出口

文件位置:src/layout/components/AppMain.vue

添加動(dòng)態(tài)style屬性

樣式修改如下:主要是讓.app-main控件看著更舒服

<template>
  <section class="app-main" :style="{ opacity: sideTheme === 'theme-shine' ? 0.9 : 1 }">
    <!-- ... -->
  </section>
</template>

<script setup>
import useSettingsStore from '@/store/modules/settings'

const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);
</script>

<style lang="scss" scoped>
.app-main {
  border-radius: 5px;
  margin: 5px;
  background-color: rgba(255, 255, 255, 1);
  /* 50= navbar  50  */
  // min-height: calc(100vh - 50px);
  // width: 100%;
  position: relative;
  overflow: hidden;
}

.fixed-header+.app-main {
  padding-top: 50px;
}

.hasTagsView {
  .app-main {
    /* 84 = navbar + tags-view = 50 + 34 */
    // min-height: calc(100vh - 84px);
  }

  .fixed-header+.app-main {
    padding-top: 84px;
  }
}
</style>
布局設(shè)置-開(kāi)啟topNav后,頂部展示的組件

組件位置:src/components/TopNav/index.vue

添加兩個(gè)動(dòng)態(tài):background-color屬性

(這里改的比較粗糙,用到的時(shí)候再詳細(xì)修改)

<template>
  <el-menu
    :background-color="sideTheme === 'theme-shine' ? ' variables.navbarShineBackground' : variables.navbarBackground"
    :default-active="activeMenu" mode="horizontal" @select="handleSelect" :ellipsis="false">
    <!-- ... -->

    <!-- 頂部菜單超出數(shù)量折疊 -->
    <el-sub-menu
      :background-color="sideTheme === 'theme-shine' ? ' variables.navbarShineBackground' : variables.navbarBackground"
      :style="{ '--theme': theme }" index="more" v-if="topMenus.length > visibleNumber">
      <template #title>更多菜單</template>
      <!-- ... -->
    </el-sub-menu>
  </el-menu>
</template>
打開(kāi)頁(yè)面切換的TagesViews

文件位置:src/layout/components/TagsView/index.vue

添加動(dòng)態(tài)style屬性。

<template>
  <div :style="{ background: sideTheme === 'theme-shine' ? variables.navbarShineBackground : variables.navbarBackground }"
    id="tags-view-container" class="tags-view-container">
    <!-- ... -->
  </div>
</template>

補(bǔ)充非顯示頁(yè)面的標(biāo)簽樣式

// ...
import variables from '@/assets/styles/variables.module.scss'

const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);


// ...

function activeStyle(tag) {
  if (!isActive(tag)) return {
    'color': sideTheme.value === 'theme-shine' ? variables.navbarShineColor : '',
    'background-color': sideTheme.value === 'theme-shine' ? variables.navbarShineBackground : ''
  };
  return {
    "background-color": theme.value,
    "border-color": theme.value
  };
}

好了,圓滿(mǎn)結(jié)束。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-627960.html

到了這里,關(guān)于若依前端Vue3模板——自定義主題+炫彩主題的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(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)文章

  • vue3+element Plus+ts 自定義主題色,以及生成主題色各種透明度

    vue3+element Plus+ts 自定義主題色,以及生成主題色各種透明度

    目錄 思路? 安裝css-color-function【接收一個(gè)顏色值,生成不同的透明度】 獲取后臺(tái)配置的主題色或者使用ColorPicker修改主題色 ?最終結(jié)果如下 本篇文章的主體思路是從element Plus官網(wǎng)引申而來(lái)。結(jié)合了我以前用vue2+element-ui配置主題色生成透明度(light-1至linght-9)的方法。 utils/

    2024年02月21日
    瀏覽(17)
  • #vue3 實(shí)現(xiàn)前端下載excel文件模板功能

    #vue3 實(shí)現(xiàn)前端下載excel文件模板功能

    一、需求: 前端無(wú)需通過(guò)后端接口,即可實(shí)現(xiàn)模板下載功能。 通過(guò)構(gòu)造一個(gè) JSON 對(duì)象,使用前端常用的 第三方庫(kù) xlsx ,可以直接將該 JSON 對(duì)象轉(zhuǎn)換成 Excel 文件,讓用戶(hù)下載模板 二、效果: 三、源碼如下:

    2024年01月19日
    瀏覽(127)
  • csdn新星計(jì)劃vue3+ts+antd賽道——利用inscode搭建vue3(ts)+antd前端模板

    csdn新星計(jì)劃vue3+ts+antd賽道——利用inscode搭建vue3(ts)+antd前端模板

    大家好,我是yma16,本文分享利用inscode搭建vue3(ts)+antd前端模板。 2023 新星計(jì)劃 vue(ts)+antd賽道報(bào)名入口:https://bbs.csdn.net/topics/616574177 搭建vue3+ts+antd的指引:認(rèn)識(shí)vite_vue3 初始化項(xiàng)目到打包 InsCode 是一個(gè)一站式的軟件開(kāi)發(fā)服務(wù)平臺(tái),從開(kāi)發(fā)-部署-運(yùn)維-運(yùn)營(yíng),都可以在 InsCode 輕松

    2024年02月16日
    瀏覽(22)
  • 前端mqtt的詳細(xì)使用(包含mqtt服務(wù)器部署,前端vue3使用mqtt連接、訂閱主題、發(fā)布等)

    前端mqtt的詳細(xì)使用(包含mqtt服務(wù)器部署,前端vue3使用mqtt連接、訂閱主題、發(fā)布等)

    ? MQTT(消息隊(duì)列遙測(cè)傳輸協(xié)議),是一種基于發(fā)布/訂閱(publish/subscribe)模式的通訊協(xié)議,該協(xié)議構(gòu)建于TCP/IP協(xié)議上。MQTT最大優(yōu)點(diǎn)在于,可以以極少的代碼和有限的帶寬,為連接遠(yuǎn)程設(shè)備提供實(shí)時(shí)可靠的消息服務(wù)。MQTT 協(xié)議的應(yīng)用場(chǎng)景包括物聯(lián)網(wǎng)、移動(dòng)應(yīng)用、車(chē)聯(lián)網(wǎng)、智能

    2024年02月08日
    瀏覽(33)
  • vue3前端excel導(dǎo)出;組件表格,自定義表格導(dǎo)出;Vue3 + xlsx + xlsx-style

    vue3前端excel導(dǎo)出;組件表格,自定義表格導(dǎo)出;Vue3 + xlsx + xlsx-style

    當(dāng)畫(huà)面有自定義的表格或者樣式過(guò)于復(fù)雜的表格時(shí),導(dǎo)出功能可以由前端實(shí)現(xiàn) 1. 使用的插件 : sheet.js-xlsx 文檔地址:https://docs.sheetjs.com/ 中文地址:https://geekdaxue.co/read/SheetJS-docs-zh/README.md xlsx-style:https://www.npmjs.com/package/xlsx-style 2. 安裝引用 安裝插件-vue3 引用插件 3. 組件表格

    2024年04月26日
    瀏覽(30)
  • vue3+elementPlus:前端自定義el-tree圖標(biāo)icon

    重點(diǎn):template蒙版下svg和use,然后前端遍歷添加key和value,取判斷放圖標(biāo) HTML結(jié)構(gòu):el-tree里面包裹template(關(guān)鍵點(diǎn)) 方法一:使用for循環(huán) for循環(huán)數(shù)據(jù),前端自定義tree圖標(biāo)第一種方法,后端key沒(méi)有icon字段,自己添加 方法二: 使用map遍歷 直接map遍歷前端自定義tree圖標(biāo) 作者上一

    2024年02月15日
    瀏覽(19)
  • 基于VUE3+Layui從頭搭建通用后臺(tái)管理系統(tǒng)(前端篇)八:自定義組件封裝上

    基于VUE3+Layui從頭搭建通用后臺(tái)管理系統(tǒng)(前端篇)八:自定義組件封裝上

    ??本章實(shí)現(xiàn)一些自定義組件的封裝,包括數(shù)據(jù)字典組件的封裝、下拉列表組件封裝、復(fù)選框單選框組件封裝、單選框組件封裝、文件上傳組件封裝、級(jí)聯(lián)選擇組件封裝、富文本組件封裝等。 1. 詳細(xì)課程地址: https://edu.csdn.net/course/detail/38183 2. 源碼下載地址: 點(diǎn)擊下載

    2024年02月12日
    瀏覽(26)
  • VUE3、ElementPlus 重構(gòu)若依vue2 表單構(gòu)建功能

    VUE3、ElementPlus 重構(gòu)若依vue2 表單構(gòu)建功能

    若依官方的Vue3 版本發(fā)布已經(jīng)有段時(shí)間了,就是這個(gè)表單構(gòu)建功能一直沒(méi)有安排計(jì)劃去適配到Vue3! 前段時(shí)間公司需要做個(gè)類(lèi)似的功能,就直接借鑒若依Vue2的來(lái)直接改了 吐槽下:vuedraggable-vue3 坑真多,官方文檔一言難盡,現(xiàn)在不推薦使用; vuedraggable-vue3官方文檔 優(yōu)秀文章:

    2024年02月15日
    瀏覽(20)
  • vue3 antd項(xiàng)目實(shí)戰(zhàn)——table表格的自定義篩選【純前端filters過(guò)濾、自定義篩選table表格數(shù)據(jù)】

    vue3 antd項(xiàng)目實(shí)戰(zhàn)——table表格的自定義篩選【純前端filters過(guò)濾、自定義篩選table表格數(shù)據(jù)】

    文章內(nèi)容 文章鏈接 vue3 antd table 表格的基礎(chǔ)搭建 https://blog.csdn.net/XSL_HR/article/details/128072745 ant design vue 組件庫(kù)的引入與使用 https://blog.csdn.net/XSL_HR/article/details/127396384 在 后臺(tái)管理系統(tǒng) 中,我們需要 對(duì)大量的數(shù)據(jù)進(jìn)行展示、處理和操作 ,table表格也因此無(wú)處不在。而 ant design

    2024年01月25日
    瀏覽(28)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

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

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包