成功vue覆盖!important样式

页面html

<div class="toolbar search" style="padding-bottom: 0px; height: 48px">

<el-form :inline="true">

<el-row>

<el-form-item>

<!-- <el-input v-model="EggDevelopementDisorderS" placeholder="卵障号"></el-input> -->

<el-select

v-model="SearchType"

placeholder="请选择"

style="magin: 0px 5px; width: 160px"

>

<el-option

v-for="item in SearchTypeOptions"

:key="item.SearchTypeValue"

:label="item.SearchTypeValue"

:value="item.SearchTypeValue"

></el-option>

</el-select>

</el-form-item>

<el-form-item label prop="SearchContent">

<el-input

v-model="SearchContent"

placeholder="请输入内容"

style="padding: 0px 5px; width: 200px"

></el-input>

</el-form-item>

<el-form-item

label="出库时间"

label-width="70px"

prop="DeliveryTimeStart"

>

<el-date-picker

v-model="DeliveryTimeStart"

type="datetime"

placeholder="选择日期"

style="padding: 0px 5px; width: 150px"

></el-date-picker>

</el-form-item>

<el-form-item label="至" label-width="20px" prop="DeliveryTimeEnd">

<!-- <span style="padding:0px 5px ">至</span> -->

<el-date-picker

v-model="DeliveryTimeEnd"

type="date"

placeholder="选择日期"

style="padding: 0px 5px; width: 150px"

></el-date-picker>

</el-form-item>

<el-form-item label="出库人" label-width="55px">

<el-input

v-model="DeliveryPersonSearch"

placeholder="请输入内容"

style="padding: 0px 5px; width: 85px"

></el-input>

</el-form-item>

<el-form-item>

<el-button type="primary" v-on:click="FetchDataScientificResearchSamplesStorage">查询</el-button>

<el-button

type="primary"

@click="WarehouseOutAdd"

>出库</el-button

>

</el-form-item>

</el-row>

</el-form>

</div>

页面样式

<style scoped>

.el-table >>> td,

.el-table >>> th {

padding: 0px;

}

.search .el-form-item >>> label

{

font-size:14px !important;

}

</style>

全局样式:

.search

{

background-color:#e5eef6;

}

.search .el-form-item label

{

font-family:'微软雅黑';

font-size:15px !important;//设置输入框前标签

color:black;

font-weight:normal;

line-height:40px !important;

}

备注:刚开始无论如何都覆盖不了全局样式中的.search .el-form-item label样式,最后加上!important和>>>解决

.search .el-form-item >>> label

{

font-size:14px !important;

}

(0)

相关推荐