<el-form>
<el-form-item label="password" prop="password">
<el-input type="password" autocomplete="off"></el-input>
</el-form-item>
</el-form>
It may be easy to change when not using elementUI.I want to make the label and the input on the same line and change the width of the input.How can I do it?
Adding the label and input field on the same line can be done by using the following properties label-position
and label-width
var Main = {
data() {
return {
password: ""
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
@import url("//unpkg.com/element-ui@2.15.7/lib/theme-chalk/index.css");
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@2.15.7/lib/index.js"></script>
<div id="app">
<el-form label-position="left" label-width="200px">
<el-form-item label="password" prop="password">
<el-input type="password" autocomplete="off"></el-input>
</el-form-item>
</el-form>
</div>