提交 ab62ebc0 编写于 作者: W wangchensu

fixed aa067db5 from https://gitee.com/wangchensu1/xts_acts/pulls/7331

兼容API9接口修改
Signed-off-by: Nwangchensu <wangchensu@huawei.com>
Change-Id: Ifd6d6fd0cb0e26b8ca8e36477e300f6ffd97f0e4
上级 791f3447
...@@ -19,9 +19,9 @@ import plugin from "../common/plugin_component.js" ...@@ -19,9 +19,9 @@ import plugin from "../common/plugin_component.js"
@Component @Component
struct PluginUserExample { struct PluginUserExample {
@StorageLink("plugincount") plugincount: Object[] = [ @StorageLink("plugincount") plugincount: Object[] = [
{ source: 'plugincomponent1', ability: 'com.example.plugin' }, { source: 'plugincomponent1', bundleName: 'com.example.plugin' },
{ source: 'plugintemplate', ability: 'com.example.myapplication' }, { source: 'plugintemplate', bundleName: 'com.example.myapplication' },
{ source: 'plugintemplate', ability: 'com.example.myapplication' }] { source: 'plugintemplate', bundleName: 'com.example.myapplication' }]
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...@@ -48,7 +48,7 @@ struct PluginUserExample { ...@@ -48,7 +48,7 @@ struct PluginUserExample {
}) })
ForEach(this.plugincount, item => { ForEach(this.plugincount, item => {
PluginComponent({ PluginComponent({
template: { source: 'plugincomponent1', ability: 'com.example.plugin' }, template: { source: 'plugincomponent1', bundleName: 'com.example.plugin' },
data: { 'countDownStartValue': 'new countDownStartValue' } data: { 'countDownStartValue': 'new countDownStartValue' }
}).size({ width: 500, height: 100 }) }).size({ width: 500, height: 100 })
.onComplete(() => { .onComplete(() => {
......
...@@ -19,9 +19,9 @@ import plugin from "../common/plugin_component.js" ...@@ -19,9 +19,9 @@ import plugin from "../common/plugin_component.js"
@Component @Component
struct PluginUserExample { struct PluginUserExample {
@StorageLink("plugincount") plugincount: Object[] = [ @StorageLink("plugincount") plugincount: Object[] = [
{ source: 'plugincomponent1', ability: 'com.example.plugin' }, { source: 'plugincomponent1', bundleName: 'com.example.plugin' },
{ source: 'plugintemplate', ability: 'com.example.myapplication' }, { source: 'plugintemplate', bundleName: 'com.example.myapplication' },
{ source: 'plugintemplate', ability: 'com.example.myapplication' }] { source: 'plugintemplate', bundleName: 'com.example.myapplication' }]
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...@@ -48,7 +48,7 @@ struct PluginUserExample { ...@@ -48,7 +48,7 @@ struct PluginUserExample {
}) })
ForEach(this.plugincount, item => { ForEach(this.plugincount, item => {
PluginComponent({ PluginComponent({
template: { source: 'plugincomponent1', ability: 'com.example.plugin' }, template: { source: 'plugincomponent1', bundleName: 'com.example.plugin' },
data: { 'countDownStartValue': 'new countDownStartValue' } data: { 'countDownStartValue': 'new countDownStartValue' }
}).size({ width: 500, height: 100 }) }).size({ width: 500, height: 100 })
.onComplete(() => { .onComplete(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册