1import { 2 memo, 3 __memo_context_type, 4 __memo_id_type, 5 State, 6 StateDecoratedVariable, 7 MutableState, 8 stateOf, 9 observableProxy 10} from '@ohos.arkui.stateManagement' // should be insert by ui-plugins 11 12import { 13 Text, 14 TextAttribute, 15 Column, 16 Component, 17 Button, 18 ButtonAttribute, 19 ClickEvent, 20 UserView, 21 EmbeddedComponent, 22 EmbeddedComponentAttribute, 23 EmbeddedType, 24 TerminationInfo, 25 NavDestination, 26 NavPathStack, 27 NavDestinationContext, 28 Callback 29} from '@ohos.arkui.component' // TextAttribute should be insert by ui-plugins 30 31import hilog from '@ohos.hilog' 32 33@Component 34export struct EmbeddedComponentTest { 35 36 build() { 37 NavDestination() { 38 Column(undefined) { 39 Text('embeddedComponent功能测试').fontSize(20) 40 EmbeddedComponent({ 41 bundleName: 'com.example.myapplication', 42 abilityName: 'ApplicationEmbeddedUIExtAbility', 43 }, EmbeddedType.EMBEDDED_UI_EXTENSION) 44 .width(300) 45 .height(300) 46 } 47 } 48 .title('embeddedComponent功能测试') 49 } 50} 51 52@Component 53struct Child { 54 @State stateVar: string = 'Child'; 55 build() { 56 Text(this.stateVar).fontSize(50) 57 } 58}