开源鸿蒙 Environment

Environment is a singleton object created by the framework when the application is started. It provides the AppStorage with a series of environment state attributes required by the application. These attributes describe the device environment where the application runs. Environment and its attribute
阅读全文

openharmony 鸿蒙 js-framework-syntax-js

JavaScript You can use a .js file in the ECMAScript compliant JavaScript language to define the service logic of an HML page. With dynamic typing, JavaScript can make your application more expressive
阅读全文

openharmony 鸿蒙 js-framework-syntax-hml

HML HML is an HTML-like language that allows you to build pages based on components and events. Pages built using HML have advanced capabilities such as data binding, event binding, loop rendering, co
阅读全文

openharmony 鸿蒙 js-framework-syntax-css

CSS Cascading Style Sheets (CSS) is a style language that describes the structure of HML pages. While all components come with default styles, CSS allows you to customize the look and feel of the comp
阅读全文

openharmony 鸿蒙 js-framework-lifecycle

Lifecycle Application Lifecycle You can define the following application lifecycle methods in the app.js file. APITypeDescriptionCalled When onCreate() => voidListens for application creation.The a
阅读全文

openharmony 鸿蒙 js-framework-js-tag

"js" Tag The "js" tag contains the instance name, window style, and page route information. TagData TypeDefault ValueMandatoryDescription namestringdefaultYesName of the JavaScript instance. pagesArra
阅读全文

openharmony 鸿蒙 js-framework-js-file

app.js Application Lifecycle You can customize the lifecycle implementation logic on an application-by-application basis in app.js. The following example only prints the corresponding logs in the life
阅读全文

openharmony 鸿蒙 js-framework-file

File Organization Directory Structure The following figure shows the typical directory structure of the JavaScript module (entry/src/main/js/module) for an application with feature abilities (FA) usin
阅读全文