本文整理匯總了TypeScript中maquette.h函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript h函數的具體用法?TypeScript h怎麽用?TypeScript h使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了h函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: h
renderMaquette: () => {
return h('button', { class: 'button', classes: { ['primary']: config.primary }, onclick: handleClick }, [
config.text
]);
}
示例2: if
y2 -= length;
}
else if (side === 'left') {
x2 = length;
}
else if (side === 'right') {
x2 -= length;
}
else if (side === 'top') {
y2 += length;
}
return h('line', {
key: `${side}-axis-line-${index}`,
stroke: 'black',
x1: String(x1),
x2: String(x2),
y1: String(y1),
y2: String(y2)
});
},
createAxisLabel(
{
anchor = 'middle',
dominantBaseline,
offset = 0,
rotation = 0,
textAnchor
}: LabelConfiguration,
text: string,
side: Side,
示例3: foo
export default function foo (state): VNode {
return h('div', [
h('h1', `Root`)
]);
}
示例4: h
return stackPoints.map(({ columnPoints, datum }) => {
const props: VNodeProperties = {
key: datum.input
};
return h('g', props, renderColumns.call(this, columnPoints));
});
示例5: h
renderBody: () => {
return h('div', { class: className ? `page ${className}` : 'page', key: page}, [
body.map(c => c.renderMaquette())
]);
}
示例6: h
renderMaquette: () => {
return h('p', { class: 'text', innerHTML: htmlContent });
}
示例7: toUserId
renderRow: (item: MessageInfo) => {
let userId = toUserId();
// if the user id of the other user has changed, we need to change the queries of the database
if (userId !== oldUserId) {
updateChatRoomId();
updateOtherUserSubscription();
updateMessagesSubscription();
oldUserId = userId;
}
if (item.fromUserId === userId) {
return h('div', { class: 'chatrow', classes: {right: false}, afterCreate: scrollpage }, [
otherUser ? [
h('img', { class: 'profile-picture', src: item.fromUserId === userId ? otherUser.image : user.image, onclick: item.fromUserId === userId ? toggleModal : undefined }),
h('div', {key: item, class: 'messagecontainer' }, [
h('div', { class: 'messageTitleContainer'}, [
h('b', [ otherUser.firstName ]),
h('span', {class: 'messageTimeStamp'}, [getFormattedDate(item.date)])
]),
h('span', [item.text])
]) ] : undefined
]);
} else {
return h('div', { class: 'chatrow', classes: {right: true}, afterCreate: scrollpage }, [
h('div', {key: item, class: 'messagecontainer' }, [
h('div', { class: 'messageTitleContainer'}, [
h('b', ['me']),
h('span', {class: 'messageTimeStamp'}, [getFormattedDate(item.date)])
]),
h('span', [item.text])
]),
h('img', { class: 'profile-picture', src: item.fromUserId === userId ? otherUser.image : user.image })
]);
}
},
示例8: h
renderMaquette: () => {
return h('div', { class: 'messageComposer' }, [
textfield.renderMaquette(),
h('button', { class: 'send', onclick: handleSendClick })
]);
}