element-plus的button组件动态显示名称异常
<el-button@click="getPhoneCodeClick" :disabled="registerForm.phoneCodeDisabled">{{registerForm.phoneCodeText}}</el-button>
const registerForm = reactive({ phoneCodeText: '获取验证码', phoneCodeDisabled: false, })
let count = 60 let timer: Ref = ref('') const getPhoneCodeClick = () => { registerForm.phoneCodeDisabled = true // 校验图片验证码 $http.getPhoneCode(params).then((res: AxiosResponse<string>)=> { registerForm.phoneCodeText =
${count}S后重新发送 timer.value = setInterval(()=> { count-- registerForm.phoneCodeText =
${count}S后重新发送 if (count === 0 && timer) { clearInterval(timer.value) timer.value = '' registerForm.phoneCodeText = '获取验证码' registerForm.phoneCodeDisabled = false count = 60 } }, 1000) })
目前只在一台电脑上复现了这个问题,点击了这个按钮之后,禁用的样式是可以成功的,但是按钮名称却没有随着定时器设置的值变更,并且我们对返回状态添加了响应拦截器,这个接口调用失败的时候,打开控制台接口返回的message是‘发送频率过快’,显示的却是‘发送过快’ At present, this problem is only repeated on one computer. After clicking this button, the disabled style can succeed, but the button name does not change with the value set by the timer, and we have added a response interceptor for the return status. When this interface call fails, the message returned by opening the console interface is "too fast transmission frequency", 'Send too fast 'is displayed
Hello, thank you for taking time filling this issue!
However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).
I hope to see your helper-created issue very soon!
你好,你的 issue 不符合我们所要求的格式,因此已被自动关闭。为了确保每个 issue 都提供必需的相关信息,请务必使用我们的 Issue 向导 来创建新 issue,谢谢!