Help Center/
Huawei Cloud Astro Canvas/
User Guide/
Custom Widget Development Specifications/
Code Structure Introduction/
Description of Directory Files/
packageinfo.json
Updated on 2025-03-24 GMT+08:00
packageinfo.json
File Introduction
The packageinfo.json file is the metadata description file of the widget, and is used to configure the basic information about the widget.
File Example
{ "widgetApi": [{ "name": "EchartsWidgetTemplate" }], "widgetDescription": "Echarts widget template", "authorName": "Li Si", "width": "500", "height": "360", "i18n": [{ "name": "messages-en" }, { "name": "messages-zh" } ], "requires": [{ "name": "global_Vue", "version": "100.8.7" }, { "name": "global_VueI18n", "version": "100.7.8" }, { "name": "global_echarts", "version": "102.0.4" } ] }
File Field Description
- widegtApi > name: widget name. For example, EchartsWidgetTemplate.
- widgetDescription: widget description.
- authorName: widget author.
- width: default widget width when the widget is added to an advanced page with an absolute layout. The unit is pixel. If this parameter is not specified, the default value 200 pixels is used.
- height: default widget height when the widget is added to an advanced page with an absolute layout. The unit is pixel. If this parameter is not specified, the default value 200 pixels is used.
- i18n: resource file for internationalization. For details, see i18n.json.
- requires: name and version of the dependency library.
Parent topic: Description of Directory Files
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot