zoukankan      html  css  js  c++  java
  • sencha touch overlay 里使用 list

    1 sencha touch 中 list 如果不设置一个固定高度或 flex : 1,  list 的内容就不会显示出来。

    主要是因为 list 是可滚动的,你不设置高度 ,list 的高度默认就是 0px。

    其实数据都是在的,只是没有显示出来。遇到 list 不显示的情况, 一般先看  dom 中是否有数据, 再看 store 中是否有

    数据,如果 dom 中有数据就是布局的问题了。

    2 今天在 overlay 中套了一个 list, 发现设 flex : 1 是没用的,必须设置一个固定高度才能显示。

    Ext.define('MyTest.view.Overlay', {
    	extend : "Ext.Panel",
    	xtype : 'myoverlay',
    	
    	config : {
    		modal : true,
    		hideOnMaskTap : true,
    		showAnimation : {
    			type : 'popIn',
    			duration : 250,
    			easing : 'ease-out'
    		},
    		hideAnimation : {
    			type : 'popOut',
    			duration : 250,
    			easing : 'ease-out'
    		},
    		centered : true,
    		width : 300,
    		height : 400,
    		//styleHtmlContent : true,
    		items : [ {
    			docked : 'top',
    			xtype : 'toolbar',
    			title : '测试'
    		}, {
    			xtype : 'list',
    			height : 290,  // work
    		   // flex : 1,   //not work
    			itemTpl : '{name}---{age}',
    			store : 'mystoreid'
    		} ],
    
    		scrollable : true
    	}
    });
    

      

  • 相关阅读:
    P2422 良好的感觉
    拉格朗日插值
    C# 中的委托和事件(详解)
    异步委托
    ManualResetEvent详解
    快速理解C#高级概念事件与委托的区别
    拉格朗日多项式
    oracle 插入一个从别处查询获得字段的值
    decode和nvl的用法
    C#将像素值转换为图片
  • 原文地址:https://www.cnblogs.com/lesliefang/p/3561828.html
Copyright © 2011-2022 走看看