Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline模式下antd 的select宽度不正常问题 #336

Open
InsHomePgup opened this issue May 7, 2021 · 2 comments
Open

inline模式下antd 的select宽度不正常问题 #336

InsHomePgup opened this issue May 7, 2021 · 2 comments

Comments

@InsHomePgup
Copy link

@form-create/element-ui@2.5.6

"ant-design-vue": "^1.7.2",

inline模式下的select没有宽度

//实例对象
fApi: {},
//表单数据
value: {},
//表单生成规则
rule: [
{
type: 'input',
field: 'goods_name',
// wrap: {
// labelCol: {span:12},
// wrapperCol: {span:12}
// },
col:{
span:10
},
props: {
placeholder: '111'
}
// title: '商品名称'
},
{
type: 'select', // 这个select宽度不正确
field: 'location',
// options: [],
title:"123123",
wrap: {
labelCol: {span:12},
wrapperCol: {span:12}
},
props: {
placeholder: '区域'
}
},
{
type: 'datePicker',
field: 'created_at'
// title: '创建时间'
}
],
//组件参数配置
option: {
form: {
hideRequiredMark: false,
layout: 'inline', // 这里用的inline模式
labelAlign: 'right',
labelCol: {
span: 4
},
wrapperCol: {
span: 10
},
wrap: {
labelCol: {span:12},
wrapperCol: {span:12}
},
colon: undefined,
validateOnRuleChange: true
},
//表单提交事件
onSubmit: function(formData) {
alert(JSON.stringify(formData))
}
}

宽度根据全局配置走
wrap: {
labelCol: {span:12},
wrapperCol: {span:12}
},

@InsHomePgup
Copy link
Author

下下策,全局添加了一个公共类。

.ant-select-selection{
min-width: 200px;
}

@fenghong007
Copy link

vue 有解决方法吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants