Element-ui テーマの色を変更する

テーマの色を変更する本質は、スタイル (テキストの背景のストローク) の色を変更することです。

スタイルを使用してローカルの変更を渡すことができます 

プレーンCSS  

.root >>> .el-upload-list__item{ 
  transition:none !important; 
  -webkit-transition:nonne !important; 
}

サスレス

::v-deep .table .el-input__inner {
  ボーダー: 0; 
  パディング: 0 !重要; 
}

 

全体的に変更したい場合は、公式スタイルを直接ダウンロードして、開発の過程で徐々に色を入れ替えていく方法です。

https://unpkg.com/[email protected]/lib/theme-chalk/index.css 

main.js に導入する

import ElementUI from "element-ui";
 // import "element-ui/lib/theme-chalk/index.css" ここは通常の公式紹介で、以下はカスタム変更
import "./assets/element/index. css";

ここでは、メインカラーを黄色と赤に変更しています 

 

 

おすすめ

転載: blog.csdn.net/benlalagang/article/details/129634464