在 Rally CardBoard 中动态设置 Card DIV 组件的 ID
Dynamically set ID of the Card DIV Component in Rally CardBoard
我想要完成的事情:在 onload
时在 cardConfig 中将 id 动态设置为卡的 div
例如:
覆盖以下组件的id
<div class="x-component iterationtrackingboard-card rui-card portfolioitem card-134459361996 editable x-component-default x-border-box drag-handle" id="rallycard-1157">
尝试失败:
cardConfig: {
editable: true,
showIconMenus: true,
listeners: {
load: function() {
// Set ID…
}
}
},
afterrender 事件怎么样?
{
listeners: {
afterrender: function(card) {
var record = card.getRecord(),
el = card.getEl();
//set id here
}
}
}
我想要完成的事情:在 onload
时在 cardConfig 中将 id 动态设置为卡的 div例如: 覆盖以下组件的id
<div class="x-component iterationtrackingboard-card rui-card portfolioitem card-134459361996 editable x-component-default x-border-box drag-handle" id="rallycard-1157">
尝试失败:
cardConfig: {
editable: true,
showIconMenus: true,
listeners: {
load: function() {
// Set ID…
}
}
},
afterrender 事件怎么样?
{
listeners: {
afterrender: function(card) {
var record = card.getRecord(),
el = card.getEl();
//set id here
}
}
}