这是我在学习鸿蒙开发中遇见的小问题
Q1:This custom component must have a ‘build’ function.
源码
@Component
export default struct ProgressEditPanel {
}
问题
源码中没有出现build方法
解决
@Component
export default struct ProgressEditPanel {
build() {
}
}
Q2:page_title is not translated into en_US(American English)
提示:page_title is not translated into en_US(American English)
修改:三个string.json文件都需要出现相同的name和value才行,如果根据提示进行修改
Q3:Module ‘“…/CustomComponent/CustomButton”’ declares ‘CustomButton’ locally, but it is not exported.
源码
struct CustomButton {
}
问题
没有将结构跑出来
解决
export struct CustomButton {
}