Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

[缺陷] FormItem 的 For 未赋值会引发空引用异常 #281

Open
5 of 6 tasks
teacher-zhou opened this issue May 30, 2023 · 0 comments
Open
5 of 6 tasks

[缺陷] FormItem 的 For 未赋值会引发空引用异常 #281

teacher-zhou opened this issue May 30, 2023 · 0 comments
Labels
bug 程序不能正常工作

Comments

@teacher-zhou
Copy link
Collaborator

teacher-zhou commented May 30, 2023

详细描述

<FormItem Label="文本" />

重现步骤

FormItem 组件中第 139 行代码

@class = HtmlHelper.Instance.Class().Append("t-form__controls")
                                    .Append($"t-is-{StatusCssClass}", Identifier.HasValue) //Identifier is null 引发异常
                                    .Append($"t-form--success-border", StatusCssClass == Status.Success.GetCssClass()),
style = HtmlHelper.Instance.Style().Append("margin-left:60px", CascadingForm.Alignment != FormAlignment.Top)

期望结果

For 不赋值,则不引发异常

托管方式

  • Blazor Server
  • Blazor WebAssembly

浏览器版本

  • Edge
  • Chrome
  • Firefox
  • 其他
@teacher-zhou teacher-zhou added the bug 程序不能正常工作 label May 30, 2023
@teacher-zhou teacher-zhou added this to the 0.7 milestone Jun 1, 2023
@teacher-zhou teacher-zhou removed this from the 0.6.x milestone Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 程序不能正常工作
Projects
Status: No status
Development

No branches or pull requests

1 participant