zoukankan      html  css  js  c++  java
  • audio,carousel的学习

    在这两个例子中我们可以学到

    1.     Ext.apply({}, audioBase, {
                          enableControls: false
                      })

      这个例子告诉我们第三个参数对象和第二个参数对象合并传递给第一个对象,最后返回一个对象

    2.  if (Ext.os.is.Android) {
                  //android devices do not support the <audio> tag controls
                  items = [
                      {
                          xtype: 'container',
                          layout: {
                              type: 'vbox',
                              pack: 'center'
                          },
                          title: 'Audio Sample',
                          items: hiddenAudio
                      }
                  ];
              }

      这个例子告诉我们sencha里面带有很多对象属性值去判断你所使用的移动工具,参看api文档还可以查其他的参数

    3.  if (Ext.os.deviceType.toLowerCase() != "phone") {
                      items.push(autoAudio);
                  }

      Ext.os.deviceType可以判断你所用的工具是平板还是pc或者手机,返回值是字符串被string的内部函数属性调用小写化

    4.    horizontalCarousels.push({
                      xtype: 'carousel',
      
                      //the direction is horizontal
                      direction: 'horizontal',
      
                      //we turn on direction lock so you cannot scroll diagonally
                      directionLock: true,
      
                      //and give it the items array
                      items: items
                  });

      这句代码主要有carousel控件的两个知识点,carousel的direction的移动默认是horizontal,directionLock控制对角挪动

  • 相关阅读:
    PS转换图片——我教你
    通过Ajax——异步获取相关问题解答
    Spring的线程安全
    Spring MVC的工作机制
    Annotation的语法和使用
    Spring Bean的生命周期
    浅谈Spring
    Spring的事务管理
    行为型模式
    结构型模式
  • 原文地址:https://www.cnblogs.com/qingkong/p/2875330.html
Copyright © 2011-2022 走看看