组件同页面文件的结构相同都加
@Entry和@Component修饰
父组件Parent.ets
import Child from './Child'
@Entry
@Component
struct Parent{
build(){
Comlumn(){
Child({
toChildData: "我是父参数"
组件同页面文件的结构相同都加
@Entry和@Component修饰
父组件Parent.ets
import Child from './Child'
@Entry
@Component
struct Parent{
build(){
Comlumn(){
Child({
toChildData: "我是父参数"