Adding vConsole in WeDa Visual Development
Importing external JavaScript libraries (such as vConsole
) in WeDa visual development can be achieved by following these steps:
Step 1: Get the Link to the External JS Library
First, you need to obtain the CDN link for the external JS library. For example, the CDN link for vConsole
is as follows:
vConsole
JS file: https://unpkg.com/vconsole@3.13.0/dist/vconsole.min.jsvConsole
CSS file (optional): https://unpkg.com/vconsole@3.13.0/dist/vconsole.min.css
Step 2: Adding External Resources in WeDa
- Log in to the WeDa editor and enter your project.
- Click to open "Settings", then select "Development Settings".
- On the "Development Settings" page, locate the "External Resources" section.
- Click "Add External Resource", and in the pop-up dialog, enter the following information:
- Resource Type: Select
JS
orCSS
based on the type of file you need to import. - Resource Link: Paste the CDN link you obtained.
- Resource Type: Select
- Click "OK" to save your settings.
Step 3: Verify Import
- Save and preview your application to ensure that the external resources have been successfully loaded.
- Open the browser's developer tools, and in the console, you should see information about
vConsole
. - During application runtime, initialize
vConsole
:// Initialize vConsole when the page loads
export default function ({ event, data }) {
if (typeof VConsole !== "undefined") {
new VConsole();
}
}
By following the above steps, you can successfully import and use vConsole
in WeDa visual development.
Similar Issues
- How to import other external JavaScript libraries in WeDa visual development?
- How does WeDa visual development support the import of external CSS files?
- How to verify successful import after adding external resources in WeDa?
- What are the use cases of vConsole in WeDa visual development?
- How to use vConsole for debugging in WeDa projects?
- How to configure external resources in the "Development Settings" of WeDa visual development?
- Does introducing vConsole in WeDa require additional configuration?
- What methods does WeDa visual development support for adding external resources?
- Where can I find the CDN link for vConsole?
- How to initialize vConsole in a WeDa project?