We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.32.1
3.2.25
103.0.5060.134
Windows 11
https://codesandbox.io/s/cranky-scott-p02pq8?file=/src/App.vue
在 value 有初始值时,能够支持异步选项传入(选项可能为表单打开后从后端接口请求生成)
在 value 有初始值时,由于 options 起初为空数组,optionsMapRef 就是一个空 map,导致 targetOptionsRef 的值均为 undefined,导致 canBeClearedRef 方法中无法获取到 option 的 disabled 属性,导致报错。 相关代码位于 src/transfer/src/use-transfer-data.ts
表单在编辑选项的时候经常会遇到有初始值,但是相关选项需要从接口异步获取生成的场景。
The text was updated successfully, but these errors were encountered:
进一步尝试之后发现旧版穿梭框有类似的逻辑。 这个问题从另一个角度来说,就是当 value 中存在了 options 不存在的值,该如何表现。比如编辑表单的时候,原有的值对应的选项已经不存在了
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
TuSimple/naive-ui version (版本)
2.32.1
Vue version (Vue 版本)
3.2.25
Browser and its version (浏览器及其版本)
103.0.5060.134
System and its version (系统及其版本)
Windows 11
Node version (Node 版本)
Reappearance link (重现链接)
https://codesandbox.io/s/cranky-scott-p02pq8?file=/src/App.vue
Reappearance steps (重现步骤)
Expected results (期望的结果)
在 value 有初始值时,能够支持异步选项传入(选项可能为表单打开后从后端接口请求生成)
Actual results (实际的结果)
在 value 有初始值时,由于 options 起初为空数组,optionsMapRef 就是一个空 map,导致 targetOptionsRef 的值均为 undefined,导致 canBeClearedRef 方法中无法获取到 option 的 disabled 属性,导致报错。
相关代码位于 src/transfer/src/use-transfer-data.ts
Remarks (补充说明)
表单在编辑选项的时候经常会遇到有初始值,但是相关选项需要从接口异步获取生成的场景。
The text was updated successfully, but these errors were encountered: