File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 3131 <el-radio label =" shiftEnter" >Shift+Enter 提交</el-radio >
3232 </el-radio-group >
3333 </div >
34- <el-x-sender v-model =" submitContent" :submit-type =" submitType" placeholder =" 尝试不同提交方式..." clearable ></el-x-sender >
34+ <el-x-sender v-model =" submitContent" :submit-type =" submitType" :loading = " enterLoading " placeholder =" 尝试不同提交方式..." clearable @submit = " enterSubmit " ></el-x-sender >
3535 <div class =" demo-controls" >
3636 <p >当前提交方式:{{ submitType === 'enter' ? 'Enter 提交,Shift+Enter 换行' : 'Shift+Enter 提交,Enter 换行' }}</p >
3737 </div >
@@ -184,6 +184,7 @@ export default {
184184
185185 // 提交方式
186186 submitType: ' enter' ,
187+ enterLoading: false ,
187188 submitContent: ' ' ,
188189
189190 // 状态
@@ -237,7 +238,15 @@ export default {
237238 this .basicSubmitted = content
238239 this .basicContent = ' '
239240 },
240-
241+ // 键盘提交
242+ enterSubmit (content ){
243+ this .enterLoading = true
244+ setTimeout (() => {
245+ this .enterLoading = false
246+ this .submitContent = ' '
247+ this .$message .success (' 提交成功:' + content)
248+ }, 2000 )
249+ },
241250 // 加载状态
242251 handleLoadingSubmit (content ) {
243252 this .isLoading = true
You can’t perform that action at this time.
0 commit comments