el-row el-col显示失效
问题:
在列表显示页面,头部有几个搜索框和选择框,由于搜索条件框太多,写了el-row 和el-col进行分行分列展示。测试发现并没有按照行列展示。
<el-form :inline="true" :model="paramForm" class="filter-form-inline filter-form" @keyup.enter.native="getDataList()">
<el-row>
<el-col :span="8">
<el-form-item label="省代码">
<el-input v-model="paramForm.provinceCode" placeholder="省代码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="市代码">
<el-input v-model="paramForm.cityCode" placeholder="市代码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="区县代码">
<el-input v-model="paramForm.countyCode" placeholder="区县代码" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 示例复制 -->
<el-row>
<el-col :span="8">
<el-form-item label="省代码">
<el-input v-model="paramForm.provinceCode" placeholder="省代码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="市代码">
<el-input v-model="paramForm.cityCode" placeholder="市代码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="区县代码">
<el-input v-model="paramForm.countyCode" placeholder="区县代码" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 示例复制 -->
<el-row>
<el-col :span="8">
<el-form-item label="省代码">
<el-input v-model="paramForm.provinceCode" placeholder="省代码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="市代码">
<el-input v-model="paramForm.cityCode" placeholder="市代码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="区县代码">
<el-input v-model="paramForm.countyCode" placeholder="区县代码" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
解决:
将el-row的部分用<div>包起来就可以了。