本文整理汇总了TypeScript中candy.View类的典型用法代码示例。如果您正苦于以下问题:TypeScript View类的具体用法?TypeScript View怎么用?TypeScript View使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了View类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
Candy.View.Pane.Chat.increaseUnreadMessages = function (roomJid: string) {
const unreadElem = this.getTab(roomJid).find('.unread');
unreadElem.text(unreadElem.text() !== '' ? parseInt(unreadElem.text(), 10) + 1 : 1);
unreadElem[0].style.display = 'inherit';
// only increase window unread messages in private chats
if (Candy.View.Pane.Chat.rooms[roomJid].type === 'chat' || Candy.View.getOptions().updateWindowOnAllMessages === true) {
Candy.View.Pane.Window.increaseUnreadMessages();
}
};
示例2:
elem.find('a.label').click(function (event: any) {
event.preventDefault();
// Check if user is online and not myCandy.View.Pane
const room = Candy.Core.getRoom(roomJid);
if (room &&
name !== Candy.View.Pane.Room.getUser(Candy.View.getCurrent().roomJid).getNick() &&
room.getRoster().get(roomJid + '/' + name)) {
if (Candy.View.Pane.PrivateRoom.open(roomJid + '/' + name, name, true) === false) {
return false;
}
}
});