示例#1
0
        private void AddComponent(TagHelperOutput output)
        {
            var selectedItems = GetSelectedItemsToJsonString();

            var rawPickerHtml = new HtmlString(
                "<div data-bind='component: { name: \"picker\", params: { search: \"\", hiddenId: \"" + Id + "\", url: \"" +
                Url + "\", selectedItemsTitle: \"" + SelectedItemsTitle + "\", searchInputPlaceholder: \"" +
                SearchInputPlaceholder + "\", selectedItems: " + selectedItems + ", minSearchText: " + MinSearchText +
                ", multipleSelect: " + MultipleSelect.ToString().ToLower() + " }}'></div>");

            output.Content.AppendHtml(rawPickerHtml);
        }
示例#2
0
        private void AddComponent(TagHelperOutput output)
        {
            var selectedItems = GetSelectedItemsToJsonString();

            var rawPickerHtml = new HtmlString($"<div data-bind=\'component: {{ name: \"picker\", params: {{ search: \"\", hiddenId: \"{Id}\", url: \"{Url}\", selectedItemsTitle: \"{SelectedItemsTitle}\", allowSuggestedItems: {AllowSuggestedItems.ToString().ToLower()}, searchResultTitle: \"{SearchResultTitle}\", suggestedItemsTitle: \"{SuggestedItemsTitle}\", noItemSelectedTitle: \"{NoItemSelectedTitle}\", searchInputPlaceholder: \"{SearchInputPlaceholder}\", showAllItemsTitle: \"{ShowAllItemsTitle}\", selectedItems: {selectedItems}, minSearchText: {MinSearchText}, topSuggestedItems: {TopSuggestedItems} ,multipleSelect: {MultipleSelect.ToString().ToLower()} }}}}\'></div>");

            output.Content.AppendHtml(rawPickerHtml);
        }