Third-party library dependencies

更新时间:
复制 MD 格式

The low-code development platform enables developers to extend application features by importing third-party code libraries. This feature is useful for scenarios that require mature JavaScript libraries to implement complex functions, such as using Lodash for data operations, Moment.js for date and time processing, Underscore.js for functional programming, or Validator.js for data validation. This code runs in the user's environment.

Key features

Add custom code libraries

You can integrate popular third-party JavaScript libraries into your applications to use their advanced features and methods.

Usage

  1. Go to Application Settings > Third-party Libraries.

  1. Click Add, enter or paste the CDN link for the third-party library, and then click Add again.

Note

For example, to add the Lodash library, enter: https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js

  1. Click Save. The platform reloads the application to apply the code changes.

  2. You can use the functions and methods from the third-party library anywhere in your code.

Notes

  • Ensure that the imported third-party library is in the Universal Module Definition (UMD) format for compatibility.

  • Use links to specific versions. Avoid using links to the latest version because future library updates can cause application instability.

  • Third-party libraries can increase the application load time. When you select a library, weigh its features against its performance impact.

  • You must understand and comply with the license terms of the third-party library.

FAQ

Q: What should I do if I no longer need a third-party library?

A: Go to the Third-party Libraries configuration page. Delete the link for the library you no longer need and save the changes.

Q: Can I edit the code of a third-party library directly on the platform?

A: No, you cannot. The code of a third-party library is not editable because it is imported through a CDN link. To make changes, you can use the library's configuration options or write additional code in your application to implement the required feature.