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


TypeScript maquette.h函數代碼示例

本文整理匯總了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
   ]);
 }
開發者ID:AFASResearch,項目名稱:mobile-web-experiments,代碼行數:5,代碼來源:button.ts

示例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,
開發者ID:novemberborn,項目名稱:dojo2-dataviz,代碼行數:32,代碼來源:createAxesMixin.ts

示例3: foo

export default function foo (state): VNode {
  return h('div', [
    h('h1', `Root`)
  ]);
}
開發者ID:patrickarlt,項目名稱:maquette-redux-example,代碼行數:5,代碼來源:root.ts

示例4: h

						return stackPoints.map(({ columnPoints, datum }) => {
							const props: VNodeProperties = {
								key: datum.input
							};
							return h('g', props, renderColumns.call(this, columnPoints));
						});
開發者ID:novemberborn,項目名稱:dojo2-dataviz,代碼行數:6,代碼來源:createStackedColumnChart.ts

示例5: h

 renderBody: () => {
   return h('div', { class: className ? `page ${className}` : 'page', key: page}, [
     body.map(c => c.renderMaquette())
   ]);
 }
開發者ID:AFASResearch,項目名稱:mobile-web-experiments,代碼行數:5,代碼來源:page.ts

示例6: h

 renderMaquette: () => {
   return h('p', { class: 'text', innerHTML: htmlContent });
 }
開發者ID:AFASResearch,項目名稱:mobile-web-experiments,代碼行數:3,代碼來源:text.ts

示例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 })
          ]);
        }
      },
開發者ID:mrlukasbos,項目名稱:mobile-web-experiments,代碼行數:38,代碼來源:chat-list.ts

示例8: h

 renderMaquette: () => {
   return h('div', { class: 'messageComposer' }, [
     textfield.renderMaquette(),
     h('button', { class: 'send', onclick: handleSendClick })
   ]);
 }
開發者ID:mrlukasbos,項目名稱:mobile-web-experiments,代碼行數:6,代碼來源:message-composer.ts


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