本文主要是介绍element ui栅栏el-col el-row 兼容浏览器问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在页面使用规整的el-col 结构,如下所示,但是页面在谷歌浏览器中显示正常,但在360浏览器中显示换行,原因是浏览器不兼容,有些行会高一些,则会出现换行效果。
<el-col :span="12"><el-form-item label="张三"><el-input v-model="formData.name" :></el-input></el-form-item></el-col><el-col :span="12"><el-form-item label="手机号码"><el-input v-model="formData.phone"></el-input></el-form-item></el-col><el-col :span="12"><el-form-item label="性别"><el-input v-model="formData.sex" :></el-input></el-form-item></el-col><el-col :span="12"><el-form-item label="年龄"><el-input v-model="formData.age"></el-input></el-form-item></el-col>
解决方法:在写上el-row就不会出错
<el-row><el-col :span="12"><el-form-item label="张三"><el-input v-model="formData.name" :></el-input></el-form-item></el-col><el-col :span="12"><el-form-item label="手机号码"><el-input v-model="formData.phone"></el-input></el-form-item></el-col></el-row><el-row><el-col :span="12"><el-form-item label="性别"><el-input v-model="formData.sex" :></el-input></el-form-item></el-col><el-col :span="12"><el-form-item label="年龄"><el-input v-model="formData.age"></el-input></el-form-item></el-col></el-row>
这篇关于element ui栅栏el-col el-row 兼容浏览器问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!