問題タブ [inputbinding]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
azure-functions - Az Function .net5 のクエリ文字列からの文字列配列入力
先日、Azure Function を .net5 に移行しましたが、現在、基本的な入力バインディングに苦労しています。
私のクエリ => /api/query?sgtins=foo1&sgtins=foo2
バージョン 3.1 では、単純な req.Query["sgtins"] で十分です。しかし、現在.net5ではわかりません。文字列、int などを使用しても問題ありませんが、IEnumerable を使用するとすぐに実行時にクラッシュします。何か案は?.net5に関するドキュメントは、現時点では哀れです:(
これは私のデモコードです。上記のようにURLを使用します。
これは例外です。
[2021-06-14T08:34:53.015Z] 'Functions.QueryProductEntities' を実行しました (失敗、Id=5f33b8ab-fdb2-483c-93fc-6dac3bb25ddc、期間=531ms) [2021-06-14T08:34:53.015Z] システム.Private.CoreLib: 関数の実行中に例外が発生しました: Functions.QueryProductEntities。System.Private.CoreLib: 結果: 失敗 [2021-06-14T08:34:53.015Z] 例外: Microsoft.Azure.Functions.Worker.Diagnostics.Exceptions.FunctionInputConverterException: 関数 'QueryProductEntities' の 1 つの入力パラメーターの変換中にエラーが発生しました: 変換できませんタイプ「System.Collections.Generic.IEnumerable`1[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]」への入力パラメータ「sgtins」弦'。[2021-06-14T08:34:53.015Z] Microsoft.Azure.Functions.Worker.Context.Features で。
vue.js - Vue js 配列バインディング
ここでは、選択したオプションを食事[インデックス] [0]だけにバインドしたいと考えています。たとえば、食事配列のすべての要素にバインドされています。現在、食事[0] [0]、食事[1] [0]、食事[2] [0]、....に結合されているため、食事の入力[0][0] 他のすべての入力が変更されます。