當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript dom.span函數代碼示例

本文整理匯總了TypeScript中@cycle/dom.span函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript span函數的具體用法?TypeScript span怎麽用?TypeScript span使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了span函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: renderSpeedPicker

export function renderSpeedPicker(speed: ZapSpeed): VNode {
  return div(`.speedPicker.${styles.speedPickerStyle}`, [
    span(`.${styles.speedPickerLabelStyle}`, 'Speed'),

    button({
      class: {
        'slowSpeedButton': true,
        [styles.speedPickerSlowStyle]: true,
        [styles.speedPickerSelectedStyle]: speed === 'slow',
      },
    }, '\u003E'),

    button({
      class: {
        'normalSpeedButton': true,
        [styles.speedPickerNormalStyle]: true,
        [styles.speedPickerSelectedStyle]: speed === 'normal',
      },
    }, '\u226B'),

    button({
      class: {
        'fastSpeedButton': true,
        [styles.speedPickerFastStyle]: true,
        [styles.speedPickerSelectedStyle]: speed === 'fast',
      },
    }, '\u22D9'),
  ]);
}
開發者ID:cyclejs,項目名稱:cyclejs,代碼行數:29,代碼來源:view.ts

示例2: div

 .map(([props, value]) =>
   div('.labeled-slider', [
     span('.label', [ props.label + ' ' + value + props.unit ]),
     input('.slider', {
       attrs: {type: 'range', min: props.min, max: props.max, value: value}
     }),
   ]),
開發者ID:joeldentici,項目名稱:cyclejs,代碼行數:7,代碼來源:LabeledSlider.ts

示例3: div

        ...Object.keys(errorLevels[actorId]).map(scenarioId => {
          let scenarioName = "";

          if (scenarioId !== "_total") {
            const scenario = project.scenarios.find(
              scenario => scenario.id === scenarioId
            );

            scenarioName = scenario && scenario.name || "";
          } else {
            scenarioName = "Total";
          }

          return div(".error-level", [
            span(".emoji", errorLevelEmoji(errorLevels[actorId][scenarioId])),
            span(scenarioName)
          ]);
        })
開發者ID:helix-pi,項目名稱:helix-pi,代碼行數:18,代碼來源:editor.ts

示例4: div

 ).map(([
   scoreDom,
   newGameDom,
   gridDom
 ]) => {
   return div('#root', [
     div('.container', [
       header([
         div('.title.bar', [
           h1(['Recall']),
           scoreDom
         ]),
         div('.info', [
           p([
             'Click on the ',
             strong(['nine tiles you see']),
             ' to win!'
           ]),
           newGameDom
         ])
       ]),
       main([
         div('.panel', [gridDom])
       ]),
       footer([
         'Made with ',
         span('.heart', '❤'),
         ' using ',
         span('.cycle', 'Cycle.js'),
         ' by ',
         a('.author', { props: { href: 'https://github.com/artfuldev' } }, '@artfuldev'),
         div([
           a('.source', { props: { href: 'https://github.com/artfuldev/recall-cycle/tree/gh-pages/' } }, 'View Source')
         ])
       ])
     ])
   ]);
 });
開發者ID:artfuldev,項目名稱:recall-cycle,代碼行數:38,代碼來源:view.ts

示例5: vFooter

function vFooter() {
  return div('#footer', [
    a(
      '.footlink',
      {props: {href: 'https://github.com/wizardwerdna/FRPBowlingKata'}},
      'FRP Bowling'
    ),
    span(' built by '),
    a(
      '.footlinke',
      {props: {href: 'mailto:wizardwerdna@gmail.com'}},
      'Andrew C. Greenberg'
    )
  ]);
}
開發者ID:wizardwerdna,項目名稱:FRPBowlingKata,代碼行數:15,代碼來源:view.ts

示例6: li

 ...selected.map(each => li([
   b(each.PRODUCTNAME),
   span(` SKU ${each.PRODUCTSKU} (${each.TYPE})`),
   br(),
   ul('.list-unstyled.list-group', [
     ...each.TYPE === 'Kit' ?  [
       li('.list-group-item', `[Buy1Kit id="${each.PRODUCTID}" price="${each.PRICE1}]"`),
       li('.list-group-item', `[ReturnToSpecials]`)
     ] : [
       li('.list-group-item', `[Buy1Bottle id="${each.PRODUCTID}" price="${each.PRICE1}"]`),
       li('.list-group-item', `[Buy1Case id="${each.PRODUCTID}" price="${each.PRICE2}"]`),
       li('.list-group-item',  `[ReturnToShop]`)
     ]
   ])
 ]))
開發者ID:wizardwerdna,項目名稱:CycleSimpleFormExample,代碼行數:15,代碼來源:boilerplate.ts

示例7: view

  function view([name, editing]: [string, boolean]): VNode {
    if (editing) {
      return div(".project-name-container", [
        div([
          input(".project-name-input", { props: { value: name } }),
          a(".save-project-name", " ✓ "),
          a(".cancel-editing-project-name", " ✖ ")
        ])
      ]);
    }

    return div(".project-name-container", [
      div([span(".project-name", `${name}`), a(".edit-project-name", " ✎ ")])
    ]);
  }
開發者ID:helix-pi,項目名稱:helix-pi,代碼行數:15,代碼來源:editor.ts

示例8: div

 .map(state =>
   div('.cell', [
     span('.' + CellState[state].toLowerCase())
   ]));
開發者ID:artfuldev,項目名稱:recall-cycle,代碼行數:4,代碼來源:cell.ts

示例9: div

 .map(([{ data, time, complete }, draggable]) =>
   !!complete
     ? div('.complete', getOptions(time, false, true))
     : div('.marble', getOptions(time, draggable, false), [span([data])])
開發者ID:artfuldev,項目名稱:xstream-marbles,代碼行數:4,代碼來源:MarbleView.ts

示例10: div

 .map(score => div('.scores', [
   div('.current.score', [span([score.toString()])]),
   div('.best.score', [span([score.toString()])])
 ]));
開發者ID:artfuldev,項目名稱:recall-cycle,代碼行數:4,代碼來源:scoreboard.ts


注:本文中的@cycle/dom.span函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。