首页 > 其他分享 >ExtJS 轮播图UI组件(Carousel)

ExtJS 轮播图UI组件(Carousel)

时间:2023-04-11 11:55:54浏览次数:46  
标签:Carousel 300 items height width UI carousel ExtJS xtype

ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html
转载请注明出处: https://www.cnblogs.com/cqpanda/p/17177307.html

更新记录
2023年4月11日 发布。

Carousel组件(Morden Toolkit)

基本使用

{
    xtype: 'carousel',
    width: 500,
    height: 300,
    items: [
        {
            html : 'Item 1',
            style: 'background-color: #5E99CC'
        }, {
            html : 'Item 2',
            style: 'background-color: #759E60'
        }, {
            html : 'Item 3',
            style: 'background-color: yellow'
        }
    ]
}

指定UI风格

{
    xtype: 'carousel',
    ui: 'dark',    // ui: 'light',
    width: 500,
    height: 300,
    items: [
        //...
    ]
}

指定滚动方向

{
    xtype: 'carousel',
    id: 'carouselId',
    direction: 'vertical',    // direction: 'horizontal',
    width: 500,
    height: 300,
    items: [
        //...
    ]
}

指定指示器是否显示

{
    xtype: 'carousel',
    //indicator: false,
    width: 500,
    height: 300,
    items: [
        //...
    ]
}

指定默认显示项

{
    xtype: 'carousel',
    activeItem: 1,
    width: 500,
    height: 300,
    items: [
        //...
    ]
}

向前切换

{
    xtype: 'button',
    text: 'Prev',
    listeners: {
        tap: function () {
            let carousel = Ext.ComponentQuery.query('#carouselId')[0];
            let items = carousel.getItems();
            carousel.previous();
        }
    }
},

向后切换

{
    xtype: 'button',
    text: 'Next',
    listeners: {
        tap: function () {
            let carousel = Ext.ComponentQuery.query('#carouselId')[0];
            carousel.next();
        }
    }
},

Carousel(Classic Toolkit)

默认情况下,Classic Toolkit是没有Carousel组件的。
可以在网上或者github上找找看,或者使用其他的轮播图组件。找到记得通知我啊,老铁。

标签:Carousel,300,items,height,width,UI,carousel,ExtJS,xtype
From: https://www.cnblogs.com/cqpanda/p/17177307.html

相关文章

  • ExtJS UI组件 - Titlebar
    ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html转载请注明出处:https://www.cnblogs.com/cqpanda/p/17183638.html更新记录2023年3月6日初始化。说明标题条组件。基本使用Ext.Viewport.add({xtype:'titlebar',docked:'top',title:......
  • ExtJS-UI组件-Toolbar
    ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html转载请注明出处:https://www.cnblogs.com/cqpanda/p/17183638.html更新记录2023年3月6日初始化。说明工具栏。基本使用{xtype:'panel',closable:true,draggable:true,title:'MyB......
  • ExtJS navigationview UI组件
    ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html转载请注明出处:https://www.cnblogs.com/cqpanda/p/17181663.html更新记录2023年1月5日初始化。NavigationViewisbasicallyaExt.ContainerwithaExt.layout.Cardlayout,soonlyoneviewcanbevis......
  • Pid、Uid、Tid
    一.Pidprocess 进程id,一个pid对应一个进程,每次杀死进程,再重新启动程序,系统都会赋予一个新的pid,一般情况下一个应用程序对应一个pid,但一个应用程序也可以有多个pid二.Uid用户id,如果你是root,那么你的uid就是0,0为最高权限,可以通过pid找到这个进程的uid,每个不同的应用程序都有一......
  • 迁移学习《Cluster-Guided Semi-Supervised Domain Adaptation for Imbalanced Medica
    论文信息论文标题:Cluster-GuidedSemi-SupervisedDomainAdaptationforImbalancedMedicalImageClassification论文作者:S.Harada,RyomaBise,KengoAraki论文来源:ArXiv2March2023论文地址:download 论文代码:download视屏讲解:click1摘要一种半监督域自适应方法,......
  • Linux的3种特殊权限场景实战:SUID、SGID、SBIT
    3种特殊权限在Linux系统中,有3种特殊权限,它们分别是Setuid(SUID)、Setgid(SGID)和StickyBit。Setuid权限:通过Setuid权限,普通用户可以在执行某些特定程序时,拥有与程序所有者相同的权限。也就是说,该程序在执行时,会自动获取其所有者的权限,而不是执行者的权限。这通常用于一些需要r......
  • archery entered FATAL state, too many start retries too quickly
    #################################一、配置文件:supervisord.conf(venv)[root@wy3-db245archery]#catsupervisord.conf[unix_http_server]file=supervisor.sock[supervisord]logfile=logs/supervisord.lognodaemon=false[supervisorctl]serverurl=unix://supervis......
  • 【THM】Burp Suite:Repeater(Burp Suite-重放器)-学习
    本文相关的TryHackMe实验房间链接:https://tryhackme.com/room/burpsuiterepeater本文相关内容:了解如何使用Repeater在BurpSuite中重放请求。什么是Repeater?在我们开始使用Repeater之前,了解它的作用对我们会很有帮助。简而言之,BurpSuite的Repeater模块允许我们修改并......
  • [Typescript] Generic slots, using built-in types as much as possible
    Therearetwooptionsdoingthesamethings.constmakeSafe=<TParamsextendsany[],TReturn>(func:(...args:TParams)=>TReturn)=>(...args:TParams):|{type:"success";result:TReturn;}......
  • element-ui校验表单只能输入数字
    element-ui校验表单只能输入数字原文链接:https://blog.csdn.net/q879936814/article/details/126788782接到需求,让表单中只能输入数字,使用v-model的.number可以实现,但是不能以0为开头;又试了rule加type=number校验,输入数组一直报输入的不是数字。。最后使用了onkeyup方法<el......