1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| let code_extra = new JSONEditor(document.getElementById('code_extra'),{ theme: 'bootstrap5', iconlib: "fontawesome5", disable_properties: true, enable_array_copy: true, disable_edit_json: false, schema: { type: "object", required: ["domaind"], properties: { domaind: { title: "自身域名", type: "array", items: { format: "select2", title: "域名", type: "string", enum: [], options: { select2: { language: 'zh-CN', width: '100%', dropdownParent: $('#modal_code_edit'), allowClear: false, minimumInputLength: 0, tags: true, multiple: false, ajax: { url: "{{url_for('select2.api_select2_domaind_det')}}", dataType: 'json', delay: 250, processResults: function(data) { return { results: $.map(data.results, function(item) { return { text: item.text, id: item.id } }) }; } } } } }, }, } } });
|