Nhảy tới nội dung

closeLoading

Bắt đầu hỗ trợ ở phiên bản:

  • API: 2.17.0

Tắt màn hình Splash Loading. Lưu ý: bạn cần thêm 'selfControlLoading': true trong cấu hình ứng dụng

Parameters​

Object object​

PropertyTypeDefaultRequiredDescriptionMinimum Version
successfunctionCallback function khi gọi api thành công
failfunctionCallback function khi gọi api thất bại

Sample Code​

import api from 'zmp-sdk';

api.closeLoading({
success: (data) => {
// xử lý khi gọi api thành công
},
fail: (error) => {
// xử lý khi gọi api thất bại
console.log(error);
}
});

// hoặc
const test = async () => {
try {
await api.closeLoading({});
} catch (error) {
// xử lý khi gọi api thất bại
console.log(error);
}
}