随笔 - 435  文章 - 0  评论 - 111  阅读 - 62万 

Steps列表有9条记录,循环9次总是出错,写i<8就没问题,百思不得其解

 然后 改成这样,循环steps.count-1次,然后第最后一个元素再copy一次html,就不报错

然后网友提示

for里面要临时变量,for里面要临时变量,var index=i, 或者foreach

 

 

 

 

<PropertyColumn Width="30%" Property="c=>c.Name" Title="期望日期">
<DatePicker @bind-Value="@ParseFileExtension(context.Extension).ExpectDate"
TValue="DateTime" Format="yyyy-MM-dd" Mask="yyyy-MM-dd" Placeholder="@("yyyy-MM-dd")" Style="width:100%;" OnChange="@(e => HandleDateChange(context, e))" />
</PropertyColumn>
<PropertyColumn Width="30%" Property="c=>c.Name" Title="延迟日期">
<Input TValue="int" Type="text" @bind-Value="ParseFileExtension(context.Extension).DelayDays" OnChange="@(e => HandleInputChange(context, e))" />
</PropertyColumn>

 

 

private string inputValue;
private void HandleInputChange(SysFile context,int value)
{
// 更新 inputValue 的值
inputValue = value.ToString();

context.Extension = "{\"ExpectDate\":\""+ ParseFileExtension(context.Extension).ExpectDate +"\",\"DelayDays\":\""+ inputValue +"\"}";
Console.WriteLine($"Input changed to: {inputValue}");
}
private void HandleDateChange(SysFile context, DateTimeChangedEventArgs<DateTime> e)
{
Console.WriteLine("OnDateChange:" + e.DateString);
context.Extension = "{\"ExpectDate\":\"" + e.DateString + "\",\"DelayDays\":\"" + ParseFileExtension(context.Extension).DelayDays + "\"}";
Console.WriteLine($"Input changed to: {inputValue}");

}

posted on   Gu  阅读(5)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
点击右上角即可分享
微信分享提示