Extjs6的TreePane无法使用iconCls图标显示
来源:互联网 发布:MMD动作数据在哪下载 编辑:程序博客网 时间:2024/04/29 11:57
Extjs6中theme-triton主题下TreePane如果数据存在iconCls导致图标直接不显示,这个是theme-triton主题下的一个bug问题.
解决办法: 在ext/classic/theme-triton/overrides下添加tree目录加入Column.js文件(完整路径:ext/classic/theme-triton/overrides/tree/Column.js)
然后刷新项目 sencha app build --clean development
文件内容
Ext.define('Ext.theme.triton.tree.Column', { override :'Ext.tree.Column', constructor: function() { var me = this; me.callParent(arguments); }, cellTpl: [ '<tpl for="lines">', '<div class="{parent.childCls} {parent.elbowCls}-img ', '{parent.elbowCls}-<tpl if=".">line<tpl else>empty</tpl>" role="presentation"></div>', '</tpl>', '<div class="{childCls} {elbowCls}-img {elbowCls}', '<tpl if="isLast">-end</tpl><tpl if="expandable">-plus {expanderCls}</tpl>" role="presentation"></div>', '<tpl if="checked !== null">', '<div role="button" {ariaCellCheckboxAttr}', ' class="{childCls} {checkboxCls}<tpl if="checked"> {checkboxCls}-checked</tpl>"></div>', '</tpl>', '<tpl if="icon"><img src="{blankUrl}"<tpl else><div</tpl>', ' role="presentation" class="{childCls} {baseIconCls} {customIconCls} ', '{baseDefaultCls} {iconCls}" ', '<tpl if="icon">style="background-image:url({icon})"/><tpl else>></div></tpl>', '<tpl if="href">', '<a href="{href}" role="link" target="{hrefTarget}" class="{textCls} {childCls}">{value}</a>', '<tpl else>', '<span class="{textCls} {childCls}">{value}</span>', '</tpl>' ], initTemplateRendererData: function(value, metaData, record, rowIdx, colIdx, store, view) { var me = this, innerRenderer = me.innerRenderer, data = record.data, parent = record.parentNode, rootVisible = view.rootVisible, lines = [], parentData; while (parent && (rootVisible || parent.data.depth > 0)) { parentData = parent.data; lines[rootVisible ? parentData.depth : parentData.depth - 1] = parentData.isLast ? 0 : 1; parent = parent.parentNode; } return { record: record, baseIconCls: me.iconCls, baseDefaultCls: Ext.isEmpty(data.iconCls)?(me.iconCls+'-'+(data.leaf?'leaf':data.expanded?'parent-expanded':'parent')):'', customIconCls: '', iconCls: data.iconCls, icon: data.icon, checkboxCls: me.checkboxCls, checked: data.checked, elbowCls: me.elbowCls, expanderCls: me.expanderCls, textCls: me.textCls, leaf: data.leaf, expandable: record.isExpandable(), expanded: data.expanded, isLast: record.isLastVisible(), blankUrl: Ext.BLANK_IMAGE_URL, href: data.href, hrefTarget: data.hrefTarget, lines: lines, metaData: metaData, childCls: me.getChildCls ? me.getChildCls() + ' ' : '', value: innerRenderer ? innerRenderer.apply(me.rendererScope, arguments) : value }; }});
1 0
- Extjs6的TreePane无法使用iconCls图标显示
- easyui的iconCls无法显示
- iconCls使用
- ExtJs自定义iconCls图标
- Android 使用TabHost 无法显示图标
- EXT中的iconCls 图标加载
- extjs iconCls 使用
- 本地连接图标无法显示的解决
- 本地连接图标无法显示的解决
- word文件图标无法显示的问题
- Firefox无法显示google+图标的问题
- [Extjs6] 组件的显示和隐藏
- Extjs 使用icon属性添加图标 使用cls设置字体样式 使用iconCls设置图标宽高
- icon图标无法显示
- [Extjs6] 随记--如何修改font awesome图标的样式
- ExtJs框架系列之iconCls以及用于面板头部的图标
- 今天在学习bootstrap,在使用字体图标的时候,无法显示
- 使用bootstrap.css框架无法显示图标问题
- 【Java并发编程】之四:守护线程与线程阻塞的四种情况
- 内核头文件的导出
- Android数据库加解密(SQLCipher)
- eclipse中安装maven
- Android Studio集成百度地图初始化异常问题
- Extjs6的TreePane无法使用iconCls图标显示
- Paint类的介绍
- Spring源码学习(二)ContextLoaderListener
- android 选择图库 直接跳入图库界面 无选择界面
- <仅是自己做笔记。。。系列x>所有系列题目都来自v_JULY_v前辈的:精选微软等公司经典的算法面试100题
- adapter刷新的问题
- Android Studio开发调试使用
- Jenkins搭建.NET自动编译测试与发布环境
- solrj的简单增删改应用