`

NestedList的item样式定制

 
阅读更多
NestedList没有提供itemTpl属性,但实际上可以通过设置listConfig对元素的显示样式进行定制。如下:
Ext.define('Portal.view.Production', {
    extend: 'Ext.dataview.NestedList',

    requires: [
        'Ext.data.TreeStore'
    ],

    config: {
        id: 'production',
        hideOnMaskTap: true,
        backText: '返回',
        displayField: 'name',
        emptyText: '更多产品敬请期待……',
        store: 'Production',
        useSimpleItems: false,
        listConfig: {
            itemTpl: new Ext.XTemplate(
            '<table style="margin:0px;padding:0px" border=0><tr><td align="center"><tpl if="leaf == false"><div class="x-unsized x-list-disclosure" id="{id}" style="margin:0px 5px 10px 0px;float:left"></div><tpl elseif="images"><img style="margin:0px 10px 0px 0px" src="{[values.images.split(",")[0]]}" width="100px"></tpl></td><td align="left">{name}</td></tr></table>')
        },
        listeners: [
            {
                fn: 'onProductionListItemTap',
                event: 'itemtap'
            }
        ]
    },
分享到:
评论

相关推荐

    java-leetcode题解之Flatten Nested List Iterator.java

    1. 理解题目要求:Flatten Nested List Iterator这道题目要求我们实现一个迭代器,可以遍历嵌套列表。这种列表中的元素可以是一个整数或者另一个嵌套列表。 2. 掌握嵌套列表的概念:在Leetcode中,嵌套列表通常以...

    Nested list and file.txt

    You're going to write a program that lets the user enter a sentence and translates it to another language. The program will learn. When it first comes across a word it doesn't have in its dictionary, ...

    react-native-nested-list

    @natalia.li/react-native-nested-list 一个 React Native UI 组件,用于创建具有 N 级嵌套的可自定义列表。视觉效果它适用于任何大小的列表,包括那些包含许多项目的列表。 您可以在 /examples 文件夹中找到此预览...

    nested-list

    import NestedList from '@editorjs/nested-list' ; 从CDN加载 从加载脚本并连接到页面。 &lt; script src =" https://cdn.jsdelivr.net/npm/@editorjs/nested-list@latest " &gt; &lt;/ script &gt; 用法 将Nested...

    oracle nested table demo

    它支持多种高级数据结构,其中就包括嵌套表(Nested Table)。嵌套表是一种特殊类型的集合类型,允许在一个列中存储一组行,这些行可以是同一种类型的数据。本示例“Oracle Nested Table Demo”将向我们展示如何在...

    PyPI 官网下载 | Nested-List-1.0.4.tar.gz

    标题中的“PyPI 官网下载 | Nested-List-1.0.4.tar.gz”表明这是一个从Python Package Index(PyPI)官方源下载的软件包,名为“Nested-List”。这个包的版本是1.0.4,且是以tar.gz格式压缩的。这种格式是一种常见的...

    Spring Nested事务简单案例

    在本案例中,我们关注的是Spring中的Nested事务,这是一个相对复杂的特性,但非常有用,特别是在需要子事务处理的场景下。下面将详细解释这个概念。 Nested事务是基于JDBC的Savepoint机制实现的,它可以让我们在一...

    open-mbee.github.io

    openmbee.org的网站Github Pages目前是为master分支设置的,任何推送到master的更改都将自动生效。... nested list item 1*italicized***bolded*****bold and italic***[link text](link url)[link text]

    sencha touch1.1.0

    这个压缩包包含了基于 Sencha Touch 1.1.0 版本的一个示例项目,名为 "nestedList",这通常是一个演示如何在移动应用中实现嵌套列表功能的实例。 Sencha Touch 是 Sencha 公司推出的一款 JavaScript 框架,主要针对...

    json嵌套list

    item.put("nestedItems", nestedList); list.put(item); } ``` 2. **配置Struts2 JSON插件**:确保在Struts2的配置文件(struts.xml)中启用了JSON插件,并正确配置了相应的拦截器栈。 ```xml *" class="your....

    material-ui-nested-menu-item:使用无限嵌套菜单直接替换MUI的MenuItem,并在悬停时打开

    请注意,`NestedMenuItem`可能需要根据你的需求进行定制,例如添加自定义样式、事件处理函数等。你可以通过传递额外的props来实现这一点,例如`onClick`处理函数,或者使用Material UI的`styles` API来自定义样式。 ...

    Weblogic9异常解决nested errors.txt

    标题和描述均提到了“Weblogic9异常解决nested errors”,这指向了在使用WebLogic Server 9版本时可能遇到的特定错误处理问题。WebLogic Server是Oracle公司提供的一款功能强大的应用服务器,它支持多种标准协议,如...

    Nested2Find:向EPiServer Find的.NET API添加嵌套过滤

    Nested2Find 向EPiServer Find的.NET API添加嵌套过滤 建造 为了构建Nested2Find,必须还原它依赖的NuGet软件包。 参见 用法 将嵌套约定添加到约定: ... public NestedList &lt; Player&gt; Players { get

    json--nested-sample

    例如,`Person`类可能有一个`List&lt;Phone&gt;`成员: ```java public class Person { private String name; private List&lt;Phone&gt; phones; // getters and setters } public class Phone { private String ...

    The Nested Model 树形结构

    但是,相比于传统的“Adjacency List Model”(邻接列表模型),嵌套模型的插入和删除操作可能较为复杂,因为需要更新相关节点的路径或深度信息。 在给定的`nested_category.sql`文件中,我们可以预期它包含了创建...

    Laravel开发-laravel-nested

    "laravel-nested"很可能是一个用于在Laravel中实现嵌套集合(Nested Set)模型的库或者教程。嵌套集合是一种常用的数据结构,特别适合表示具有层级关系的数据,比如目录结构、组织架构等。 在Laravel中,我们通常...

    基于Nested Logit模型的出行路线方式选择和时间价值计算

    基于Nested Logit模型的出行路线方式选择和时间价值计算,宗芳,祁文田,本文介绍了Nested Logit模型的效用最大化理论、选择树的建立以及其概率表达式;时间价值的基本计算公式。对人们由长春到吉林的出行路

    Laravel开发-eloquent-nested-attributes

    Laravel开发-eloquent-nested-attributes 嵌套属性允许您通过父级保存关联记录的属性。默认情况下,嵌套属性更新被关闭,您可以使用$nested属性启用它。启用嵌套属性时,将在模型上定义属性编写器。

    react-在React中进行嵌套拖放的概念证明

    &lt;NestedList key={list.id} list={list} /&gt; ))} ); } // 处理拖放结束事件 function handleDragEnd(result) { // 根据result更新你的数据模型 } ``` 在这个例子中,`App`组件包含了所有的`NestedList`组件...

    code for Holistically-Nested Edge Detection

    We develop a new edge detection algorithm, holistically-nested edge detection (HED), which performs image-to-image prediction by means of a deep learning model that leverages fully convolutional ...

Global site tag (gtag.js) - Google Analytics