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

In El form item, El switch followed by El checkbox cannot be displayed #21009

Open
hnpvqve opened this issue May 16, 2021 · 1 comment
Open

Comments

@hnpvqve
Copy link

hnpvqve commented May 16, 2021

Element UI version
2.15.1

OS/Browsers version
windows 10 / Chrome 90.0.4430.212

Vue version
2.6.12

出现的问题是,在el-form-item中,el-switch后面再加一个el-checkbox,出现el-checkbox无法显示,代码如下:

			<el-row>
				<el-col :span="5">
					<el-form-item label="文章标题" prop="NameStr" :rules="{required:true,message: '请输入标题'}">
						<el-input v-model="form.NameStr" autocomplete="off" maxlength="100" />
					</el-form-item>
				</el-col>
				<el-col :span="16">

					<el-form-item label="状态">
						<el-switch v-model="form.State" active-color="#13ce66" inactive-color="#666" :active-text="form.State==1?'显示':'隐藏'" :active-value="1" :inactive-value="0" />
						<el-checkbox v-model="form.checked">推荐</el-checkbox>
					</el-form-item>
				</el-col>
			</el-row>

这样执行出来,el-checkbox控件不显示,只显示一个el-switch控件。正确应该是两个都显示

@element-bot element-bot changed the title 在el-form-item中,el-switch后跟el-checkbox无法显示 In El form item, El switch followed by El checkbox cannot be displayed May 16, 2021
@element-bot
Copy link
Member

Translation of this issue:

Element UI version
2.15.1

OS/Browsers version
windows 10 / Chrome 90.0.4430.212

Vue version
2.6.12

The problem is that in El form item, an EL check box is added after El switch, and the El check box cannot be displayed. The code is as follows:

<el-col :span="5">
< El form item label = "article title" prop = "namestr": Rules = "{ required:true , message: 'please enter the title'} ">

<el-input v-model="form.NameStr" autocomplete="off" maxlength="100" />

< El form item label = "status" >
<el-switch v-model="form.State" active-color="#13ce66" inactive-color="#666" :active-text="form.State==1?' Show ':'hide' ": active value =" 1 ": inactive value =" 0 "/ >

< El checkbox V-model = "form. Checked" > recommended < / El checkbox >

When executed in this way, only one El switch control is displayed instead of the El check box control. Correct should be both

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

No branches or pull requests

3 participants