当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript makeShy.makeShy函数代码示例

本文整理汇总了TypeScript中app/utils/makeShy.makeShy函数的典型用法代码示例。如果您正苦于以下问题:TypeScript makeShy函数的具体用法?TypeScript makeShy怎么用?TypeScript makeShy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了makeShy函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: createDatePickerButton

function createDatePickerButton(dateField) {
  var style = {
    width: '20px',
    height: '20px',
    padding: '0',
    border: 'none',
    backgroundColor: 'transparent',
    backgroundImage: 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAYAAAF4VF24AAAAAXNSR0IArs4c6QAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAG9JREFUGBltTu0RgCAIFc4FWiHdoJ1sptqpWVrAg3x2eHTGDx+8DyQEVEqp9CbkNSvhwTiaV/PMLFnIsK9C0Ig54lW4GISvT0RJ906Q0iksV8MDbggsvDUs3VClLn6N9ZHjPc4BiU/tPJujuYF/mx55tzEWYjQMAAAAAABJRU5ErkJggg==")',
    backgroundPosition: '50% 50%',
    backgroundRepeat: 'no-repeat',
    marginTop: '2px',
    marginLeft: '-18px',
    position: 'absolute'
  };

  var attributes = {
    'title': 'Deschide calendarul'
  };

  var button = createDOMElement('button', style, attributes);

  makeShy(button);
  button.addEventListener('click', toggleDatePickerFor(dateField));
  hideOnEscapeOrOutsideClick(DatePicker.instance);

  return button;
}
开发者ID:gurdiga,项目名称:xo,代码行数:27,代码来源:DateFieldInput.ts

示例2: createCloseButton

  function createCloseButton() {
    var style = {
      borderWidth: '0px',
      backgroundColor: 'transparent',
      position: 'absolute',
      top: '0px',
      left: '0px',
      padding: '10px',
      lineHeight: '0.5em',
      fontSize: '20px'
    };

    var button = createDOMElement('button', style);

    button.type = 'close';
    button.textContent = '×';
    button.title = 'Închide';

    makeShy(button);

    button.addEventListener('click', function() {
      domElement.style.display = 'none';
    });

    return button;
  }
开发者ID:gurdiga,项目名称:xo,代码行数:26,代码来源:NewCaseDialog.ts

示例3: createButton

function createButton(additionalStyle) {
  var style = _.extend({}, buttonStyle, additionalStyle);
  var button = createDOMElement('button', style);
  button.style.left = '-' + (parseInt(button.style.fontSize, 10) + 2);

  button.textContent = '×';
  button.title = 'Elimină';
  button.setAttribute('type', 'remove');

  makeShy(button);

  return button;
}
开发者ID:gurdiga,项目名称:xo,代码行数:13,代码来源:makeRemovable.ts

示例4: before

  before(function() {
    domElement = document.createElement('div');
    domElement.style.transition = 'padding 0.8s linear';

    makeShy(domElement);
  });
开发者ID:gurdiga,项目名称:xo,代码行数:6,代码来源:makeShyTest.ts


注:本文中的app/utils/makeShy.makeShy函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。