-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
[Component] nuxt3使用elementplus form组件提交完一次后在el-input里输入多少次字符就自动请求多少次接口 #16801
Comments
https://github.com/element-plus/element-plus-nuxt Are you using this? |
yes |
"@element-plus/nuxt": "^1.0.9" |
Could you provide a mini reproduction? |
我知道了是get请求才这样子,post没问题 |
@moonwaystudio 我的是post提交会这样子 也是nuxt3+E plus |
可以提供具体细节吗,这样真的无法定位问题 |
Create
Reset
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
import { postFeedback } from '~/composables/apis/config'
const ruleFormRef = ref()
const ruleForm:any = reactive({
name: '',
email: '',
desc: '',
type: 7
})
const rules = reactive({
name: [
{ required: true, message: 'Please input Activity name', trigger: 'change' },
{ min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'change' },
],
email:[
{
required: true,
message: 'Please input email address',
trigger: 'blur',
},
{
type: 'email',
message: 'Please input correct email address',
trigger: ['blur', 'change'],
},
],
desc: [
{ required: true, message: 'Please input activity form', trigger: 'blur' },
],
})
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) {
return
}
await formEl.validate((valid, fields) => {
if (valid) {
ruleForm.type = 7
postFeedback(ruleForm).then(() => {
alert('111111111111111')
})
} else {
console.log('error submit!', fields)
}
})
}
const resetForm = (formEl: FormInstance | undefined) => {
if (!formEl) return
formEl.resetFields()
}
</script>``
export const postFeedback = async (params: { name: string; type: string, desc: string, email: string,phone:string }) => { |
`
|
其它控件或者原生 input 有这个问题么? |
我另外复制官方文档的例子,加了自己接口发送提交,试了也是一样。 |
发送成功后,再在表单里输入多少字符就请求接口多少次 |
Bug Type:
Component
Environment
3.4.21
2.7.1
chrome 124.0.6367.119 / macos 13.6.6
Vite
Reproduction
Related Component
el-form
el-form-item
el-input
el-tabs
Reproduction Link
Link
Steps to reproduce
What is Expected?
提交完后再el-input里面输入字符不在自动请求接口
What is actually happening?
提交完后再el-input里面输入字符在自动请求接口,输多少请求多少
Additional comments
我用的是nuxt3"nuxt": "^3.11.2",
"vue": "^3.4.21",
"vue3-puzzle-vcode": "^1.1.2-nuxt"
The text was updated successfully, but these errors were encountered: