Managing Custom Widgets for Advanced Pages
If the functions or code of a custom widget is changed, update its version for the change to take effect on advance pages. This section uses the widgetVueTemplate template as an example to describe how to manage widget versions.
Prerequisites
You have downloaded the widgetVue3Template template and uploaded it to the custom widget library.
Updating a Custom Widget
- Go to the Huawei Cloud Astro Zero console.
- On the homepage, click Access Homepage. The application development page is displayed.
- Click
and choose Environments > Environment Configuration.
- Choose Maintenance from the main menu.
- In the navigation pane, choose Global Elements > Page Assets > Widgets.
- On the displayed page, locate the target custom widget.
- Click the target custom widget. The widget details page is displayed.
Figure 1 Widget details
- Update the widget.
- Method 1: Updating a widget using the source package
On the widget details page, click Update to upload the latest widget source code package.
- Compress the developed widget into a .zip package.
- On the widget details page, click Update.
- Select the widget package in 8.a and click Update.
- Return to the widget details page and view the newly uploaded version.
Figure 2 New widget version
- Method 2: Online editing and update
- Click Edit to access the widget editor.
- In the editor, click
in the upper right corner of the page to obtain the lock.
Figure 3 Obtaining the lock - After the widget is locked, modify the widget file.
The following shows how to edit a widget online. In this example, the value of name in the widgetVue3Template.js file is changed to Huawei Cloud Astro Zero Studio.
Figure 4 Editing a widget online - After the modification, click
in the upper right corner of the page. The page for updating the widget is displayed.
- Click the update button to return to the widget details page.
- Click the preview button. The displayed text changes to Hello, I am Huawei Cloud Astro Zero Studio.
Figure 5 Preview effect
- Method 1: Updating a widget using the source package
Managing Custom Widget Versions
Go to Page Settings > Plugin to update the widget version for changes to take effect on advance pages.
- Log in to the application designer by referring to Logging In to the Application Designer.
- In the navigation pane, choose Page.
- Choose More > Page Setting.
Figure 6 Managing widget versions
- On the Plugin tab page, click Check for Update.
- In the widget list, click
next to a widget to update the widget.
After the widget is updated, its version automatically updates to the latest version in the widget list.
Figure 7 Viewing the version of the updated custom widget
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot