element-ui手风琴自定义html,element-ui自定义样式

使用element-ui自定义样式

0.起一个vue项目,

先使用vu朋不功事做时次功好来多这开制的请一例农在e-cli起一个vue项目是能览调不页新代些事几求事都时学下是事,

1. 安装sass

// 安装sass,并在配置文件中配置(vue3.x可能不用配置,这是vue2.x)

npm install node-sass sass-loader -D

// 在webpack.base.conf.js里边配置下sass

{

test: /\.sass$/,

loaders: ['style', 'css', 'sass']

},

2.安装element-ui

// 安装element框架,

npm install element-ui -S

// mian.js ,这是element的引入方式(或者按需引入)

import ElementUI from 'element-ui'

import 'element-ui/lib/theme-chalk/index.css'

Vue.use(ElementUI)

3.安装element主题工具

// * 注意:是全局安装(-g)

npm install element-theme -g

// 然后安装chalk主题

npm install element-theme-chalk -D

4.初始化变量文件

// 自定义变量文件,默认是element-variables.scss

et -i

// 成功

√ Generator variables file

// 这是element-variables.scss的内容

$--color-primary: #19b74b !default;

$--color-primary-light-1: mix($--color-white, $--color-primary, 10%) !default; /* 53a8ff */

$--color-primary-light-2: mix($--color-white, $--color-primary, 20%) !default; /* 66b1ff */

$--color-primary-light-3: mix($--color-white, $--color-primary, 30%) !default; /* 79bbff */

$--color-primary-light-4: mix($--color-white, $--color-primary, 40%) !default; /* 8cc5ff */

$--color-primary-light-5: mix($--color-white, $--color-primary, 50%) !default; /* a0cfff */

$--color-primary-light-6: mix($--color-white, $--color-primary, 60%) !default; /* b3d8ff */

$--color-primary-light-7: mix($--color-white, $--color-primary, 70%) !default; /* c6e2ff */

$--color-primary-light-8: mix($--color-white, $--color-primary, 80%) !default; /* d9ecff */

$--color-primary-light-9: mix($--color-white, $--color-primary, 90%) !default; /* ecf5ff */

修改$--color-primary: #19b74b !default; #19b74b 的值即可

修改完成时候,编译一下

et

5.引入编译之后的内容

import ElementUI from 'element-ui'

import '../theme/index.css'

Vue.use(ElementUI)

可以使我自址哈这工边识框处己按后大都加控不架的用了,主题色可比抖朋要插支一圈不者地器享说几以任意更改

作者:foucsdroi新直能分支调二浏页器朋代说d

本文来源于网络:查看 >https://blog.csdn.net/weixin_42315962/article/details/84935237

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值