gpt4 book ai didi

rally - api2.0p5 cardbard.card 没有 BuildHeader 或 BuildContent

转载 作者:行者123 更新时间:2023-12-01 09:26:42 25 4
gpt4 key购买 nike

全部,

在处理 2.0p5 中发现的新卡片时,我注意到不再有可用于更改标题或实际卡片内容的模板。

有人可以确认这不可用吗,只是想确保我没有在任何地方丢失它...

真的没有办法改变卡片的显示吗?

为了帖子的清晰起见,在 2.0p2 中,您可以在 Card 的 Ext.define 中执行 buildContent 函数或 buildHeader 函数。

最佳答案

卡片不再有可以直接修改的模板,但是您可以创建自定义 CardContent 插件来显示自定义 html:

Ext.define('Rally.ui.cardboard.plugin.MyCardContent', {
alias: 'plugin.rallymycardcontent',
extend: 'Rally.ui.cardboard.plugin.CardContent',
getHtml: function() {
var html = this.callParent(arguments);
return html + '<span>mycontent</span>';
}
});

然后配置您的 CardBoard 以使用自定义插件:

Ext.create('Rally.ui.cardboard.CardBoard', {
types: ['User Story', 'Defect'],
attribute: "ScheduleState",
fieldNames: ['Tasks'], // display task information inline on card
cardConfig: {
// overriding plugins to add the custom plugin
// be sure to include the default plugins.
plugins: [
{ptype: 'rallycardheader'},
{ptype: 'rallymycardcontent'},
{ptype: 'rallycardpopover'}
]
}
});

关于rally - api2.0p5 cardbard.card 没有 BuildHeader 或 BuildContent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13729499/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com