扩展combo

简介: 扩展combo

在实际项目使用中为了方便combo的使用,扩展了下combo

Ext.ns("Miracle.form")
Miracle.form.ComboBox=Ext.extend(Ext.form.ComboBox,{
  typeAhead : true,
  mode : 'remote',
  forceSelection : true,
  triggerAction : 'all',
  emptyText : '',
  selectOnFocus : true,
  displayField : 'name',
  valueField : 'code',
  hideTrigger : false,
  queryDelay : 500,
  url:'',
  idProperty:'code',
  fields:['code', 'name'],
  getStore :function(){
    this.store=new Ext.data.JsonStore({
      idProperty : this.idProperty,
      url : this.url,
      fields : this.fields
    })
  },
    constructor : function(config) {
      Ext.apply(this,config);
      if(!this.store){
        this.getStore();
      }
      Miracle.form.ComboBox.superclass.constructor.call(this);
    }
})
Ext.reg("miraclecombox",Miracle.form.ComboBox);

使用时

new Miracle.form.ComboBox({
       url :'你的URL',
  fieldLabel : 'label',
  hiddenName : 'name'
 })
目录
相关文章
|
4月前
扩展EXT.BUTTON
扩展EXT.BUTTON
40 8
|
4月前
扩展combo下拉树
扩展combo下拉树
19 2
|
前端开发
ant design table实现上下行拖拽功能(类组件)
ant design table实现上下行拖拽功能(类组件)
318 0
ant design table实现上下行拖拽功能(类组件)(1)
ant design table实现上下行拖拽功能(类组件)
178 0
ant design table实现上下行拖拽功能(类组件)(2)
ant design table实现上下行拖拽功能(类组件)
124 0
扩展icon
扩展icon
199 0
扩展icon
|
存储 Android开发 iOS开发
iOS8新特性扩展(Extension)应用之一——Today扩展
iOS8新特性扩展(Extension)应用之一——Today扩展
289 0
iOS8新特性扩展(Extension)应用之一——Today扩展
|
存储 算法 物联网
AliOS Things KV组件的写平衡特性
KV组件的写平衡(磨损平衡)特性就是通过异地更新、垃圾回收等策略来平衡flash介质各个存储区块的磨损程度,以避免某些“特定”存储区块因过度使用而形成坏区,从而延长flash的使用寿命。
4262 1
|
C# API 开发者
[UWP]用Shape做动画(2):使用与扩展PointAnimation
原文:[UWP]用Shape做动画(2):使用与扩展PointAnimation 上一篇几乎都在说DoubleAnimation的应用,这篇说说PointAnimation。 1. 使用PointAnimation 使用PointAnimation可以让Shape变形,但实际上没看到多少人会这么用,毕竟WPF做的软件多数不需要这么花俏。
941 0
|
C# Windows
WPF 4 动态覆盖图标(Dynamic Overlay Icon)
原文:WPF 4 动态覆盖图标(Dynamic Overlay Icon)      在《WPF 4 开发Windows 7 任务栏》一文中我们学习了任务栏的相关开发内容,同时也对覆盖图标(Overlay Icon)功能进行了一些介绍,其中覆盖图标是以静态方式呈现的。
1154 0

热门文章

最新文章