@memo function MyComponent(name: string) {
let counter = rememberMutableState(0)
Button({ color: Color.Red }) {
Text(`Hello, ${name}`)
Text(`${counter.value} times!`)
OnClick(()=> {
counter.value++
})
}
}@Entry
@Component
struct Hello {
@State myText: string = 'World';
build() {
Column() {
Text(`Hello ${this.myText}`)
.fontSize(50)
Divider()
Button('Click me')
.onClick(() => {
this.myText = 'ArkUI'
})
}
.height(50)
.width(100)
.margin({ top: 20 })
}
}Требования:
Входные данные:
Действия:
Результаты:
compiler.so
node_addon (.node/.so)
interop
C++
Managed (node)
bindings
wrappers
factory
creates/updates
visitEachChild
execution driver
binder
utils
public
Компиляторная команда
UI команда
Продуктовая команда
panda sdk
(compiler.so + .idl)
api generator
managed API library
new runtime engine
plugin
arkui plugin