【解决方案1】:

请将您的脚本替换为:

$.ajax({
        url: '/tags/suggest',
        method: 'GET',
        data: {},
        success: function(response) {
            var suggestions = response;
            suggestionList(suggestions);
        }
    });

    function suggestionList(suggestions) {
        var input = document.querySelector('#tagsInput'),
        // init Tagify script on the above inputs
        tagify = new Tagify(input, {
        whitelist: suggestions,             // <- 
        maxTags: 5,
        dropdown: {
            maxItems: 20,           // <- mixumum allowed rendered suggestions
            classname: "tags-look", // <- custom classname for this dropdown, so it could be targeted
            enabled: 0,             // <- show suggestions on focus
            closeOnSelect: false    // <- do not hide the suggestions dropdown once an item has been selected
        }
        });
    }

【讨论】: