我有一个创建食谱线的类。
public class RecipeLine
{
[Key]
public int RecipeLineId { get; set; }
public int RecipeId { get; set; }
public double Quantity { get; set; }
public virtual UnitOfMeasureModel UnitOfMeasure { get; set; }
public virtual IngredientModel Ingredient { get; set; }
public string QuantityUomIngredient => $"{Quantity} {UnitOfMeasure?.Abbreviation ?? ""} {Ingredient?.Name ?? ""}";
}
public string QuantityUOMIngredient用于填充数据库,并创建自定义绑定器以填充单独的字段。
在QuantityUOMIngredient网站的输入字段中输入信息时,应该有一个自动完成功能。我已经阅读了关于jquery但我不完全确定如何解决这个问题。
这条线看起来像这样 即1公斤土豆
在" 1"只会有一个验证。
按下空格键并输入" k"后,我们应该会看到一个自动完成下拉列表,其中包含" k"的所有可能性。
再次输入空格键并输入" p"该成分应该有一个自动完成下拉列表。
也应该可以在字符串中自动完成并发现轻微的拼写错误。即当有人进入" poto"时,自动完成下拉列表应显示"马铃薯"。
提前致谢。