Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sencha touch 2 Sencha touch 2:如何在列表中显示项目_Sencha Touch 2 - Fatal编程技术网

Sencha touch 2 Sencha touch 2:如何在列表中显示项目

Sencha touch 2 Sencha touch 2:如何在列表中显示项目,sencha-touch-2,Sencha Touch 2,我正在动态地将数据从mysql服务器加载到一个列表中,该列表的itemTpl定义如下: itemTpl: "<div class=\"list-item-title\">{item_name}{item_qty}</div><div class=\"list- item-narrative\">{item_detail}</div> 您的itemTpl看起来像: itemTpl: "<div class=\"list-item-tit

我正在动态地将数据从mysql服务器加载到一个列表中,该列表的itemTpl定义如下:

itemTpl: "<div class=\"list-item-title\">{item_name}{item_qty}</div><div class=\"list-    item-narrative\">{item_detail}</div>

您的itemTpl看起来像:

itemTpl: "<div class=\"list-item-title\">{item_name}</div><div class=\"list-item-qty\">{item_qty}</div><div class=\"list-item-narrative\">{item_detail}</div>
/* Increase height of list item so title and narrative lines fit */
.x-list .x-list-item .x-list-item-label
{
 min-height: 3.5em!important;
}
/* Move up the disclosure button to account for the list item height increase */
.x-list .x-list-disclosure {
position: absolute;
bottom: 0.85em;
right: 0.44em;
}
.list-item-title
{
    float:left;
    width:100%;
    font-size:90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right:25px;
    line-height:150%;
margin-right:520px;
}
.list-item-narrative
{
    float:left;
    width:95%;

    font-size:90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right:25px;
}
.x-item-selected .list-item-title
{
    color:#ffffff;
}
.x-item-selected .list-item-narrative
{
    color:#ffffff;
}
.notes-list-empty-text
{
    padding:10px;
}
itemTpl: "<div class=\"list-item-title\">{item_name}</div><div class=\"list-item-qty\">{item_qty}</div><div class=\"list-item-narrative\">{item_detail}</div>
/* Increase height of list item so title and narrative lines fit */
.x-list .x-list-item .x-list-item-label
{
 min-height: 3.5em!important;
}
/* Move up the disclosure button to account for the list item height increase */
.x-list .x-list-disclosure {
position: absolute;
bottom: 0.85em;
right: 0.44em;
}
.list-item-title
{
    float:left;
    /*width:100%; //this can't be 100% width*/
    width: 75%; //could be more if you need
    font-size:90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right:25px;
    line-height:150%;
    /*margin-right:520px;*/
}
.list-item-qty
{
    float:right;
    font-size:90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right:25px; //You will need that when onItemDisclosure is set to true
    line-height:150%;
    clear: right;
}
.list-item-narrative
{
    float:left;
    width:95%;

    font-size:90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right:25px;
}
.x-item-selected .list-item-title
{
    color:#ffffff;
}
.x-item-selected .list-item-narrative
{
    color:#ffffff;
}
.notes-list-empty-text
{
    padding:10px;
}