中断 AJAX 请求。
AJAX 请求编号。
import { send, cancel } from '@just4/ajax/ajax';let ajaxId = 0;send('/api/ajax/timeout', { receiveCancelId: function(id) { ajaxId = id; }});// 2s 后中断请求setTimeout(function() { cancel(ajaxId);}, 2000); Copy
import { send, cancel } from '@just4/ajax/ajax';let ajaxId = 0;send('/api/ajax/timeout', { receiveCancelId: function(id) { ajaxId = id; }});// 2s 后中断请求setTimeout(function() { cancel(ajaxId);}, 2000);
Generated using TypeDoc
中断 AJAX 请求。