element-ui修改el-form-item樣式的詳細(xì)示例
更新時間:2022年11月14日 11:20:25 作者:程序猿想成程序獅
在使用element-ui組件庫的時候經(jīng)常需要修改原有樣式,下面這篇文章主要給大家介紹了關(guān)于element-ui修改el-form-item樣式的詳細(xì)示例,文中通過實例代碼介紹的非常詳細(xì),需要的朋友可以參考下
form結(jié)構(gòu)
<el-form :model="formData" label-width="80px">
<el-form-item label="label1">
<el-input v-model="formData.value1"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">提交</el-button>
<el-button>取消</el-button>
</el-form-item>
</el-form>
修改el-form-item所有樣式
<style lang="less" scoped>
.el-form {
.el-form-item {
/deep/ * {
font-size: 18px;
color: blue;
}
}
}
</style>

只修改label
<style lang="less" scoped>
.el-form {
.el-form-item {
/deep/ .el-form-item__label {
font-size: 18px;
color: blue;
}
}
}
</style>

只修改content
<style lang="less" scoped>
.el-form {
.el-form-item {
/deep/ .el-form-item__content {
* {
font-size: 18px;
color: blue;
}
}
}
}
</style>

只修改input
<style lang="less" scoped>
.el-form {
.el-form-item {
/deep/ .el-form-item__content {
input {
font-size: 18px;
color: blue;
}
}
}
}
</style>

只修改button
<style lang="less" scoped>
.el-form {
.el-form-item {
/deep/ .el-form-item__content {
button {
font-size: 18px;
color: blue;
}
}
}
}
</style>

總結(jié)
到此這篇關(guān)于element-ui修改el-form-item樣式的文章就介紹到這了,更多相關(guān)element-ui修改el-form-item樣式內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
vue使用window.open()跳轉(zhuǎn)頁面的代碼案例
這篇文章主要介紹了vue中對window.openner的使用,vue使用window.open()跳轉(zhuǎn)頁面的代碼案例,本文通過實例代碼給大家詳細(xì)講解,需要的朋友可以參考下2022-11-11
vue3?reactive數(shù)據(jù)更新視圖不更新問題解決
這篇文章主要為大家介紹了vue3?reactive數(shù)據(jù)更新視圖不更新問題解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-06-06
Vue使用NProgress實現(xiàn)頁面頂部的進(jìn)度條顯示效果
這篇文章主要介紹了vue Nprogress頁面頂部進(jìn)度條功能實現(xiàn),NProgress是頁面跳轉(zhuǎn)是出現(xiàn)在瀏覽器頂部的進(jìn)度條,本文通過實例代碼給大家講解,需要的朋友可以參考下2022-12-12
使用imba.io框架得到比 vue 快50倍的性能基準(zhǔn)
imba 是一種新的編程語言,可以編譯為高性能的 JavaScript??梢灾苯佑糜?Web 編程(服務(wù)端與客戶端)開發(fā)。這篇文章主要介紹了使用imba.io框架,得到比 vue 快50倍的性能基準(zhǔn),需要的朋友可以參考下2019-06-06
vue菜單欄聯(lián)動內(nèi)容頁面tab的實現(xiàn)示例
本文主要介紹了vue菜單欄聯(lián)動內(nèi)容頁面tab的實現(xiàn)示例,左側(cè)菜單欄與右側(cè)內(nèi)容部分聯(lián)動,當(dāng)點擊左側(cè)的菜單,右側(cè)會展示對應(yīng)的tab,具有一定的參考價值,感興趣的可以了解一下2024-01-01

