提交 aa067db5 编写于 作者: W wangchensu

兼容API9接口修改

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