English
require
About 76 wordsLess than 1 minute
2025-12-16
This method allows developers to load third-party libraries.
Syntax: FxUI.libs.require(libName)
Parameters
| Parameter | Description | Type | Allowed Values | Default |
|---|---|---|---|---|
| libName | Library name (required) | string | html2canvas, jqueryQrcode, jsmind, filesaver, xlsx, vue2orgtree, jspdf, G6 | — |
For usage details of these libraries, refer to the official documentation:
Example
This method returns a Promise, as shown below:
FxUI.libs.require('xlsx').then((Xlsx) => {
console.log(Xlsx);
// todo what you want
}).catch(err => {
console.log(err);
})