0

我想直接将数据添加到购物车而不选择完整的条形码是否与来自源的数据匹配

 $("#ReleaseSearch").kendoAutoComplete({
            minLength: 3,
                delay: 500,
                select: onReleaseSelected,
                dataTextField: 'titleName',
                template:
            '<span class="k-state-default autocomplete-list-item clickable"><img class="mr-2" style="height:165px;width:130px;border:none;" src="#:imageUrl#"/><span class="title-name"><small class="text-muted">#: fullTitle #</small>(<span class="publisher-name">by #: publisher #</span>)</span>',
                dataSource: {
                type: "json",
                    serverFiltering: true,

                    transport: {
                    read: {
                        url: '@Url.Action("SearchRelease", "Release")',
                            beforeSend: function(xhr) {
                            xhr.setRequestHeader('Accept', 'application/json');
                        }
                        },
                        parameterMap: function() {
                        return { query: $("#ReleaseSearch").data("kendoAutoComplete").value() };
                    }

                    }
                }
        });
4

0 回答 0