加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

定义颜色选取类

发布时间:2020-12-15 05:03:41 所属栏目:百科 来源:网络整理
导读:/**?? ?*?@class?Ext.app.ColorPicker?? ?*?@extends?Ext.container.Container?? ?*?定义颜色选取类?? ?*/?? ??? Ext.define?( 'Ext.app.ColorPicker' ,?? {?? ????extend:? 'Ext.container.Container' ,248); line-height:18px"> ????alias:? 'widget.smmco
  1. /**??
  2. ?*?@class?Ext.app.ColorPicker??
  3. ?*?@extends?Ext.container.Container??
  4. ?*?定义颜色选取类??
  5. ?*/??
  6. ???
  7. Ext.define?('Ext.app.ColorPicker',??
  8. {??
  9. ????extend:?'Ext.container.Container',248); line-height:18px"> ????alias:?'widget.smmcolorpicker',248); line-height:18px"> ????layout:?'hbox',248); line-height:18px"> ????initComponent:function()???
  10. ????{??
  11. ????????var?mefieldLabel?=?this.fieldLabel;??
  12. ????????var?mename?=?this.name;??
  13. ????????var?meheight?=?this.height;??
  14. ????????var?meid?=?this.id;??
  15. ????????this.items?=???
  16. ????????[??
  17. ????????????{??
  18. ????????????????xtype:?'textfield',248); line-height:18px"> ????????????????height:?meheight,??
  19. ????????????????id:meid+'x',248); line-height:18px"> ????????????????fieldLabel:mefieldLabel,248); line-height:18px"> ????????????????name:?mename,248); line-height:18px"> ????????????????flex:?1,248); line-height:18px"> ????????????????listeners:??
  20. ????????????????{??
  21. ????????????????????change:function(me,?newValue,?oldValue)??
  22. ????????????????????{??
  23. ????????????????????????me.bodyEl.down('input').setStyle('background-image',?'none');??
  24. ????????????????????????me.bodyEl.down('input').setStyle('background-color',?newValue);??
  25. ????????????????????}??
  26. ????????????????}??
  27. ????????????},248); line-height:18px"> ????????????????xtype:'button',248); line-height:18px"> ????????????????width:18,248); line-height:18px"> ????????????????menu:??
  28. ????????????????????xtype:'colormenu',248); line-height:18px"> ????????????????????listeners:???
  29. ????????????????????????select:?function(picker,?color)???????
  30. ????????????????????????{??
  31. ????????????????????????????var?amclr?=?Ext.getCmp(meid+'x');??
  32. ????????????????????????????amclr.setValue('#'+color);??
  33. ????????????????????????}??
  34. ????????????}??
  35. ????????];??
  36. ??????????
  37. ????????Ext.app.ColorPicker.superclass.initComponent.call(this);??
  38. ????}??
  39. }); ?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读