select2 备份

<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<link href="/vendor/select2/select2.min.css" rel="stylesheet" />
<script src="/vendor/select2/select2.min.js"></script>
<script>
$(".author-select").select2({
    ajax: {
        url: "/authors/jsonlist",
        dataType: 'json',
        delay: 250,
        data: function (params) {
            return {
                text: params.term,
            };
        },
        processResults: function (data) {
            return {
                results: data
            };
        },
        cache: true
    },
    placeholder: "请选择",
    language: "zh-CN",
    escapeMarkup: function (markup) { return markup; }, 
    minimumInputLength: 1,
});
</script>