首页 \ 问答 \ selectfield与情侣线sencha touch 2(selectfield with couple lines sencha touch 2)

selectfield与情侣线sencha touch 2(selectfield with couple lines sencha touch 2)

我试着把长选项放入Sencha Touch 2 selectfield 它只适用于选择器,但我需要在selectfield显示整个选项文本。 让我用图片解释一下。 我有 在此处输入图像描述 我想要(画在GIMP中) 在此处输入图像描述 我试图增加selectfield高度并应用white-space: pre-wrap !important; 但文字仍然被截断......


I'm try to put long option into Sencha Touch 2 selectfield It is work only for picker but I need to display whole option text inside selectfield too. Let me explain with pictures. I have enter image description here I want (painted in GIMP) enter image description here I tried to increase height of selectfield and apply white-space: pre-wrap !important; but text still truncated...


原文:https://stackoverflow.com/questions/16561477
更新时间:2023-06-10 20:06

最满意答案

您访问的数据错误。 如果你打印了你会看到的整个对象:

Object: {
    d: {
        results: {
            ....    
        }
    }
}

将您的回报更改为:

return angular.fromJson(data).d.results

小提琴: http//jsfiddle.net/h22f7596/124/


You were accessing the data wrong. If you would have printed the entire object you would have seen:

Object: {
    d: {
        results: {
            ....    
        }
    }
}

Change your return to:

return angular.fromJson(data).d.results

Fiddle: http://jsfiddle.net/h22f7596/124/

相关问答

更多
  • 谢谢你的评论,你允许我查明问题。 首先,我没有更新我的服务器代码,这就是为什么当你尝试这些地址时,你得到的方法是不允许的。 我一直遇到的问题是这些请求确实返回了空数组。 所以首先我的API返回一个json对象而不是数组,所以我将isArray更改为false。 所以在那之后并实际修复我的API服务器,这是我收到的: $promise: d $resolved: true data: Array[4] success: true 我的API服务器返回一个包含数据和成功的json。 所以事情正在发挥作用! 非 ...
  • 我想你错过了回归: function string(str) { /* Throw error if 'string' is not a string */ if (str.constructor !== String) throw new Error("Argument is not a string."); else return { splitAt: function() { var args = arguments, len = arg ...
  • 如果http请求完成,您是否已登记Chrome开发者工具? 在“网络”选项卡中检查它,您可以显示响应以确定它是否为空数组。 Did you check in Chrome Developer Tools if the http request is done? Check it in Network tab, and you can show the response to be sure it's an empty array or not.
  • 我认为你在表单和数据之间存在不一致。 假设表单包含一个名称title的字段。 $ data数组应该具有相同名称的键下的值: $data = array( 'title' => 'Utility Model/Patent application', 'ap_name' => 'd' ); 或者使用print_r Array ( [title] => Utility Model/Patent application [ap_name] => d ) 如果此类字段没有数据,则省略验证。 ...
  • 您访问的数据错误。 如果你打印了你会看到的整个对象: Object: { d: { results: { .... } } } 将您的回报更改为: return angular.fromJson(data).d.results 小提琴: http : //jsfiddle.net/h22f7596/124/ You were accessing the data wrong. If you would have printe ...
  • 因为list.dat是空的。 fopen with w+ 'w +'开放阅读和写作; 将文件指针放在文件的开头,并将文件截断为零长度。 如果该文件不存在,请尝试创建它。 Because list.dat is empty. fopen with w+ 'w+' Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If th ...
  • 返回数组的第一种情况实际上是第二种情况。 程序流程如下: $scope.map由工厂设置为空对象。 $scope.init被调用 $http.get向“/ api”发送http请求(但请求尚未返回) $scope.map打印到console.log ,仍然是一个空对象 在此之后的某个时刻,Web服务器返回您的http请求,此时调用.success函数。 $scope.map将$scope.map设置$scope.map一个数组 $scope.map打印到console.log ,此时它是一个数组 The f ...
  • 我终于找到了解决方案。 感谢Edit 2,我意识到,就像我90%的错误一样,这是一个愚蠢的错误。 即使在函数声明中正确初始化了代码, $start变量实际上也是空的。 这导致有一个空字符串传递给bindParam()函数。 个人评论: 我是个白痴 。 I have finally come to a solution. Thanks to Edit 2 i realized that, just like 90% of my errors, this was a stupid one. The $start ...
  • 它看起来像Photon更新中发生了变化。 更新Photon后,很多人都遇到了这个问题。 您现在需要在调用此函数之前启用AutoJoinLobby 。 PhotonNetwork.autoJoinLobby = true; It looks like something changed in the Photon update. Many people had this problem after updating Photon. You now need to enable AutoJoinLobby b ...
  • ng-submit="update_update(account.$submitted && account.$valid)"函数名称错误,而不是$scope.account_update 请参见示例plnkr 否则您的角度代码没有任何问题。 另外,您可以使用: if($scope.account.$valid){}而不是if(isValid){}并且不需要传递任何值。 Wrong function name in ng-submit="update_update(account.$submitted && ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)