Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.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 xtype:textfield中的Sencha 2-0,省略号无效_Sencha Touch_Extjs_Sencha Touch 2 - Fatal编程技术网

Sencha touch xtype:textfield中的Sencha 2-0,省略号无效

Sencha touch xtype:textfield中的Sencha 2-0,省略号无效,sencha-touch,extjs,sencha-touch-2,Sencha Touch,Extjs,Sencha Touch 2,对于Sencha textfield中的文本溢出,我需要省略号而不是文本被剪裁,因此我为相同的内容添加了一些内联样式,但省略号不会出现,文本总是被剪裁,下面添加了代码以供参考 xtype: 'textfield', label: 'First Name', name: 'firstName', clearIcon: false, styl

对于Sencha textfield中的文本溢出,我需要省略号而不是文本被剪裁,因此我为相同的内容添加了一些内联样式,但省略号不会出现,文本总是被剪裁,下面添加了代码以供参考

                xtype: 'textfield',
                label: 'First Name',
                name: 'firstName',
                clearIcon: false,
                style: 'white-space:nowrap;overflow:hidden;text-overflow:ellipsis;',

谢谢

另一种方法是使用自定义CSS类,该类通过SASS源代码中的Compass编译而成:

{
  xtype: 'textfield',
  label: 'First Name',
  name: 'firstName',
  clearIcon: false,
  cls: my-textfield
}
您可以使用特定于SASS的调用包含省略号:

.my-textfield {
  @include ellipsis;
}

好了,伙计们。。我应该添加“inputCls”,而不是添加内联样式,并在其中添加“空白:nowrap;溢出:隐藏;文本溢出:省略号;”谢谢大家