本文整理汇总了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:[email protected]'}},
'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;未经允许,请勿转载。 |
请发表评论