repo_name string | dataset string | owner string | lang string | func_name string | code string | docstring string | url string | sha string |
|---|---|---|---|---|---|---|---|---|
workbench | github_2023 | yhtt2020 | typescript | TUIContactServer.handleUserStatus | public async handleUserStatus(displayOnlineStatus: boolean, userIDList: Array<string>): Promise<void> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
setTimeout(async () => {
if (displayOnlineStatus) {
await this.subscribeUserStatus(userIDList);
await this.getUserStatus(userIDList);
} else {
await this.unsubscribeUserStatus(userIDList);
}
}, 1000);
} catch (error) {
reject(error);
}
});
} | /**
* 处理 用户状态(订阅并获取用户状态 / 取消订阅用户状态)
* Handle users' status ( subscribe and get user status / unsubscribe user status )
*
* @param {boolean} displayOnlineStatus 是否展示用户在线状态 / whether to display the user's online status
* @param {Array<string>} userIDList 用户 userID 列表 / userID list
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIContact/server.ts#L498-L513 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIContactServer.getUserNick | public async getUserNick(list:Array<string>){
return this.handlePromiseCallback(async(resolve:any,reject:any)=>{
try {
const imResponse = await this.TUICore.tim.getUserProfile({userIDList:list})
if(this.store.systemMessageList !== undefined){
this.store.systemMessageList = this.store.systemMessageList.map((item:any)=>{
return{
...item,userInfo:imResponse.data
}
})
}
} catch (error) {
reject(error)
}
})
} | /**
* 获取用户昵称
* @param list 用户ID列表
* **/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIContact/server.ts#L519-L534 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIContactServer.bind | public async bind(params: any) {
const chat:any = chatStore();
this.currentStore = params;
await this.getGroupList();
await this.getConversationList();
await this.getFriendList();
const option = {
noticeNum:params.systemMessageList === undefined ? 0 : params.systemMessageList.length
}
chat.updateNum(option)
if(params.systemMessageList !== undefined){
const arr = params.systemMessageList.map((item:any)=>{
return item.payload.operatorID
})
await this.getUserNick(arr)
}else{
return;
}
return this.currentStore;
} | /**
* 赋值
* Bind
*
* @param {Object} params 使用的数据/params data
* @returns {Object} 数据/data
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIContact/server.ts#L543-L568 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.destroyed | public destroyed() {
this.unbindTIMEvent();
} | /**
* 组件销毁
*
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L26-L28 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.updateStore | updateStore(newValue: any, oldValue: any) {
if (!this?.currentStore?.conversationData) {
return;
}
this.currentStore.conversationData.list = newValue.conversationList;
this.currentStore.userIDList = this.currentStore.conversationData.list
?.filter((item: any) => item?.userProfile?.userID)
.map((item: any) => item?.userProfile?.userID);
} | /**
* 数据监听回调
*
* @param {any} newValue 新数据
* @param {any} oldValue 旧数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L36-L44 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.handlePromiseCallback | private handlePromiseCallback(callback: any) {
return new Promise<void>((resolve, reject) => {
const config = {
TUIName: 'TUIConversation',
callback: () => {
callback && callback(resolve, reject);
},
};
this.TUICore.setAwaitFunc(config.TUIName, config.callback);
});
} | /**
* 处理异步函数
*
* @param {callback} callback 回调函数
* @returns {Promise} 返回异步函数
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L52-L62 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.bindTIMEvent | private bindTIMEvent() {
this.TUICore.tim.on(this.TUICore.TIM.EVENT.CONVERSATION_LIST_UPDATED, this.handleConversationListUpdate, this);
this.TUICore.tim.on(this.TUICore.TIM.EVENT.NET_STATE_CHANGE, this.handleNetStateChange, this);
} | /**
* /////////////////////////////////////////////////////////////////////////////////
* //
* // TIM 事件监听注册接口
* //
* /////////////////////////////////////////////////////////////////////////////////
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L72-L75 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.handleFilterSystem | private handleFilterSystem(list: any) {
const options = {
allConversationList: list,
conversationList: [],
};
const currentList = list.filter((item: any) => item?.conversationID === this?.currentStore?.currentConversationID);
if (currentList.length === 0) {
this.handleCurrentConversation({});
}
options.conversationList = list.filter((item: any) => item.type !== this.TUICore.TIM.TYPES.CONV_SYSTEM);
this.store.allConversationList = options.allConversationList;
this.store.conversationList = options.conversationList;
return options;
} | /**
* 处理conversationList
*
* @param {Array} list conversationList
* @returns {Object}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L96-L109 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.setMessageRead | public async setMessageRead(conversationID: string) {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse: any = await this.TUICore.tim.setMessageRead({ conversationID });
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 设置会话内消息为已读状态
* Set the message within the conversation to read
*
* @param {string} conversationID 会话ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L126-L135 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.deleteConversation | public async deleteConversation(conversationID: string) {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse: any = await this.TUICore.tim.deleteConversation(conversationID);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 删除会话
*
* @param {string} conversationID 会话ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L143-L152 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.pinConversation | public async pinConversation(options: any) {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse: any = await this.TUICore.tim.pinConversation(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 置顶会话
*
* @param {Object} options 置顶参数
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L160-L169 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.muteConversation | public async muteConversation(options: any) {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse: any = await this.TUICore.tim.setMessageRemindType(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* C2C消息免打扰
*
* @param {Object} options 消息免打扰参数
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L177-L186 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.getConversationProfile | public async getConversationProfile(conversationID: string) {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getConversationProfile(conversationID);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取 conversationList
*
* @param {string} conversationID 会话ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L193-L202 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.getConversationList | public async getConversationList() {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getConversationList();
this.handleFilterSystem(imResponse.data.conversationList);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /*
* 获取 conversationList
*
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L209-L219 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.getUserProfile | public async getUserProfile(userIDList: Array<string>) {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getUserProfile({ userIDList });
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取其他用户资料
*
* @param {Array<string>} userIDList 用户的账号列表
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L227-L236 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.bind | public async bind(params: any) {
this.currentStore = params;
await this.getConversationList();
return this.currentStore;
} | /**
* 赋值
*
* @param {Object} params 使用的数据
* @returns {Object} 数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L252-L256 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIConversationServer.handleCurrentConversation | public handleCurrentConversation(value: any) {
// 通知 TUIChat 切换会话或关闭会话
this.TUICore.getStore().TUIChat.conversation = value || {};
if (!value?.conversationID) {
this.currentStore.currentConversationID = '';
return;
}
// Prevent group chat that is currently open from entering from the address book, resulting in no jump.
if (this.currentStore.currentConversationID === value?.conversationID) {
this.currentStore.currentConversationID = '';
}
if (this.currentStore.currentConversationID) {
this.setMessageRead(this.currentStore.currentConversationID);
}
this.currentStore.currentConversationID = value?.conversationID;
this.setMessageRead(value.conversationID);
// 切换会话将社群消息数进行清除
// const community:any = communityStore();
// community.getCommunityTree();
} | // 切换当前会话 | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIConversation/server.ts#L259-L279 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.destroyed | public destroyed() {
this.unbindTIMEvent();
} | /**
* 组件销毁
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L25-L27 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.updateStore | updateStore(newValue: any, oldValue: any) {
this.currentStore.groupList = newValue.groupList;
this.currentStore.searchGroup = newValue.searchGroup;
} | /**
* 数据监听回调
*
* @param {any} newValue 新数据
* @param {any} oldValue 旧数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L35-L38 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.bindTIMEvent | private bindTIMEvent() {
this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED, this.handleGroupListUpdated, this);
this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_ATTRIBUTES_UPDATED, this.handleGroupAttributesUpdated, this);
} | /**
* /////////////////////////////////////////////////////////////////////////////////
* //
* // TIM 事件监听注册接口
* //
* /////////////////////////////////////////////////////////////////////////////////
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L48-L51 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.handlePromiseCallback | public handlePromiseCallback(callback: any) {
return new Promise<void>((resolve, reject) => {
const config = {
TUIName: 'TUIGroup',
callback: () => {
callback && callback(resolve, reject);
},
};
this.TUICore.setAwaitFunc(config.TUIName, config.callback);
});
} | /**
* 处理异步函数
*
* @param {callback} callback 回调函数
* @returns {Promise} 返回异步函数
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L80-L90 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.getGroupList | public async getGroupList(options?: any) {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
let imResponse: any = {};
if (!options) {
imResponse = await this.TUICore.tim.getGroupList();
} else {
imResponse = await this.TUICore.tim.getGroupList(options);
}
this.store.groupList = imResponse.data.groupList;
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取群组列表
*
* @param {any} options 参数
* @param {Array.<String>} options.groupProfileFilter 群资料过滤器
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L106-L121 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.getGroupProfile | public getGroupProfile(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getGroupProfile(options);
this.store.groupList = imResponse.data.groupList;
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取群组属性
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Array.<String>} options.groupProfileFilter 群资料过滤器
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L131-L141 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.createGroup | public createGroup(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.createGroup(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 创建群组
*
* @param {any} options 参数
* @param {String} options.name 群组名称
* @param {String} options.type 群组类型
* @param {String} options.groupID 群组ID
* @param {String} options.introduction 群简介
* @param {String} options.notification 群公告
* @param {String} options.avatar 群头像 URL
* @param {Number} options.maxMemberNum 最大群成员数量
* @param {Number} options.joinOption 申请加群处理方式
* @param {Array.<Object>} options.memberList 初始群成员列表
* @param {Array.<Object>} options.groupCustomField 群组维度的自定义字段
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L159-L168 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.dismissGroup | public dismissGroup(groupID: string): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.dismissGroup(groupID);
this.store.groupProfile = imResponse.data.group;
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 删除群组
*
* @param {String} groupID 群组ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L176-L186 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.updateGroupProfile | public updateGroupProfile(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.updateGroupProfile(options);
this.store.groupProfile = imResponse.data.group;
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 修改群组资料
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {String} options.name 群组名称
* @param {String} options.introduction 群简介
* @param {String} options.notification 群公告
* @param {String} options.avatar 群头像 URL
* @param {Number} options.maxMemberNum 最大群成员数量
* @param {Number} options.joinOption 申请加群处理方式
* @param {Array.<Object>} options.groupCustomField 群组维度的自定义字段
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L202-L212 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.joinGroup | public joinGroup(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.joinGroup(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 申请加群
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {String} options.applyMessage 附言
* @param {String} options.type 群组类型
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L223-L232 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.quitGroup | public quitGroup(groupID: string): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.quitGroup(groupID);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 退出群组
*
* @param {String} groupID 群组ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L240-L249 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.searchGroupByID | public searchGroupByID(groupID: string): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.searchGroupByID(groupID);
this.store.searchGroup = imResponse.data.group;
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 通过 groupID 搜索群组
*
* @param {String} groupID 群组ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L257-L267 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.getGroupOnlineMemberCount | public getGroupOnlineMemberCount(groupID: string): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getGroupOnlineMemberCount(groupID);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取群在线人数
* - 只用于查询直播群在线人数
*
* @param {String} groupID 群组ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L276-L285 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.changeGroupOwner | public changeGroupOwner(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.changeGroupOwner(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 转让群组
* - 只有群主有权限操作
*
* @param {any} options 参数
* @param {String} options.groupID 待转让的群组 ID
* @param {String} options.newOwnerID 新群主的 ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L296-L305 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.handleGroupApplication | public handleGroupApplication(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.handleGroupApplication(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 处理申请加群
* - 管理员
*
* @param {any} options 参数
* @param {String} options.handleAction 处理结果 Agree(同意) / Reject(拒绝)
* @param {String} options.handleMessage 附言
* @param {Message} options.message 对应【群系统通知】的消息实例
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L317-L326 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.initGroupAttributes | public initGroupAttributes(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.initGroupAttributes(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 初始化群属性
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Object} options.groupAttributes 群属性
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L336-L345 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.setGroupAttributes | public setGroupAttributes(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.setGroupAttributes(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 设置群属性
* - 仅适用于直播群
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Object} options.groupAttributes 群属性
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L356-L365 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.deleteGroupAttributes | public deleteGroupAttributes(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.deleteGroupAttributes(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 删除群属性
* - 仅适用于直播群
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Array.<String>} options.keyList 群属性 key 列表
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L376-L385 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.getGroupAttributes | public getGroupAttributes(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getGroupAttributes(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取群属性
* - 仅适用于直播群
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Array.<String>} options.keyList 群属性 key 列表
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L396-L405 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.getGroupMemberList | public getGroupMemberList(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getGroupMemberList(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取群成员列表
*
* @param {Object} options 获取群成员参数
* @param {String} options.groupID 群组的 ID
* @param {Number} options.count 需要拉取的数量。最大值:100
* @param {Number} options.offset 偏移量,默认从0开始拉取
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L416-L425 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.addGroupMember | public addGroupMember(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.addGroupMember(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 添加群成员
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Array.<String>} options.userIDList 待添加的群成员 ID 数组
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L435-L444 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.deleteGroupMember | public deleteGroupMember(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.deleteGroupMember(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 删除群成员
* - 群主可移除群成员
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Array.<String>} options.userIDList 待删除的群成员的 ID 列表
* @param {String} options.reason 踢人的原因
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L456-L465 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.setGroupMemberMuteTime | public setGroupMemberMuteTime(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.setGroupMemberMuteTime(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 设置群成员的禁言时间
* - 只有群主和管理员拥有该操作权限
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {String} options.userID 用户 ID
* @param {Number} options.muteTime 禁言时长,单位秒; 设为0,则表示取消禁言。
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L477-L486 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.setGroupMemberRole | public setGroupMemberRole(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.setGroupMemberRole(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 修改群成员角色
* - 群主拥有操作的权限
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {String} options.userID 用户 ID
* @param {String} options.role 可选值:TIM.TYPES.GRP_MBR_ROLE_ADMIN(群管理员),TIM.TYPES.GRP_MBR_ROLE_MEMBER(群普通成员),TIM.TYPES.GRP_MBR_ROLE_CUSTOM(自定义群成员角色,仅社群支持)
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L498-L507 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.setGroupMemberNameCard | public setGroupMemberNameCard(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.setGroupMemberNameCard(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 设置群成员名片
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {String} options.userID 可选,默认修改自身的群名片
* @param {String} options.nameCard 群成员名片
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L518-L527 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.getGroupMemberProfile | public getGroupMemberProfile(options: any): Promise<any> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getGroupMemberProfile(options);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取群成员资料
*
* @param {any} options 参数
* @param {String} options.groupID 群组ID
* @param {Array.<String>} options.userIDList 要查询的群成员用户 ID 列表
* @param { Array.<String>} options.memberCustomFieldFilter 群成员自定义字段筛选
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L538-L547 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIGroupServer.bind | public async bind(params: any) {
this.currentStore = params;
await this.getGroupList();
return this.currentStore;
} | /**
* 赋值
*
* @param {Object} params 使用的数据
* @returns {Object} 数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIGroup/server.ts#L555-L559 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.destroyed | public destroyed() {
this.unbindTIMEvent();
} | /**
* 组件销毁
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L28-L30 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.updateStore | updateStore(newValue:any, oldValue:any) {
this.currentStore.profile = JSON.parse(JSON.stringify(newValue.profile));
} | /**
* 数据监听回调
*
* @param {any} newValue 新数据
* @param {any} oldValue 旧数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L38-L40 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.bindTIMEvent | private bindTIMEvent() {
this.TUICore.tim.on(this.TUICore.TIM.EVENT.PROFILE_UPDATED, this.handleProfileUpdated, this);
} | /**
* /////////////////////////////////////////////////////////////////////////////////
* //
* // TIM 事件监听注册接口
* //
* /////////////////////////////////////////////////////////////////////////////////
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L51-L53 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.handlePromiseCallback | public handlePromiseCallback(callback:any): Promise<any> {
return new Promise<void>((resolve, reject) => {
const config = {
TUIName: 'TUIProfile',
callback: () => {
callback && callback(resolve, reject);
},
};
this.TUICore.setAwaitFunc(config.TUIName, config.callback);
});
} | /**
* 处理异步函数
*
* @param {callback} callback 回调函数
* @returns {Promise} 返回异步函数
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L83-L93 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.getMyProfile | public async getMyProfile(): Promise<any> {
return this.handlePromiseCallback(async (resolve:any, reject:any) => {
try {
const imResponse = await this.TUICore.tim.getMyProfile();
this.store.profile = imResponse.data;
this.currentStore.profile = JSON.parse(JSON.stringify(this.store.profile));
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取个人资料
*
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L108-L119 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.getUserProfile | public async getUserProfile(userIDList:Array<string>): Promise<any> {
return this.handlePromiseCallback(async (resolve:any, reject:any) => {
try {
const imResponse = await this.TUICore.tim.getUserProfile({ userIDList });
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取其他用户资料
*
* @param {Array<string>} userIDList 用户的账号列表
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L127-L136 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.updateMyProfile | public async updateMyProfile(options:any): Promise<any> {
return this.handlePromiseCallback(async (resolve:any, reject:any) => {
try {
const imResponse = await this.TUICore.tim.updateMyProfile(options);
this.store.profile = imResponse.data;
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 更新用户资料
*
* @param {Object} options 资料参数--[详细参数,请点击查看详情](https://web.sdk.qcloud.com/im/doc/zh-cn//SDK.html#updateMyProfile)
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L144-L154 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.bind | public async bind(params:unknown): Promise<any> {
this.currentStore = params;
this.getMyProfile();
return this.currentStore;
} | /**
* 赋值
*
* @param {any} params 使用的数据
* @returns {any} 数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L162-L166 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIProfileServer.setEdit | public setEdit(params:boolean): boolean {
this.currentStore.isEdit = params;
return this.currentStore.isEdit;
} | /**
* 赋值
*
* @param {Boolean} params 使用的数据
* @returns {boolean} 数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUIProfile/server.ts#L174-L177 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.destroyed | public destroyed() {
this.unbindTIMEvent();
} | /**
* 组件销毁
*
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L24-L26 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.updateStore | updateStore(newValue: any, oldValue: any) {
if (this?.currentStore?.conversationData?.list) {
this.currentStore.conversationData.list = newValue.conversationList;
}
} | /**
* 数据监听回调
*
* @param {any} newValue 新数据
* @param {any} oldValue 旧数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L34-L38 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.handlePromiseCallback | private handlePromiseCallback(callback: any) {
return new Promise<void>((resolve, reject) => {
const config = {
TUIName: 'TUISearch',
callback: () => {
callback && callback(resolve, reject);
},
};
this.TUICore.setAwaitFunc(config.TUIName, config.callback);
});
} | /**
* 处理异步函数
*
* @param {callback} callback 回调函数
* @returns {Promise} 返回异步函数
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L46-L56 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.bindTIMEvent | private bindTIMEvent() {
this.TUICore.tim.on(this.TUICore.TIM.EVENT.FRIEND_LIST_UPDATED, this.handleFriendListUpdated, this);
} | /**
* /////////////////////////////////////////////////////////////////////////////////
* //
* // TIM 事件监听注册接口
* //
* /////////////////////////////////////////////////////////////////////////////////
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L66-L68 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.getConversationProfile | public async getConversationProfile(conversationID: string): Promise<void> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getConversationProfile(conversationID);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取 conversationList
*
* @param {string} conversationID 会话ID
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L93-L102 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.getUserProfile | public async getUserProfile(userIDList: Array<string>): Promise<void> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getUserProfile({ userIDList });
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取其他用户资料
*
* @param {Array<string>} userIDList 用户的账号列表
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L110-L119 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.getFriendList | public async getFriendList(): Promise<void> {
return this.handlePromiseCallback(async (resolve: any, reject: any) => {
try {
const imResponse = await this.TUICore.tim.getFriendList();
this.currentStore.searchUserList = imResponse.data.map((item: any) => item?.profile);
this.currentStore.allUserList = imResponse.data.map((item: any) => item?.profile);
resolve(imResponse);
} catch (error) {
reject(error);
}
});
} | /**
* 获取 SDK 缓存的好友列表
*
* @param {Array<string>} userIDList 用户的账号列表
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L127-L138 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUISearchServer.bind | public async bind(params: any) {
this.currentStore = params;
await this.getFriendList();
return this.currentStore;
} | /**
* 赋值
*
* @param {Object} params 使用的数据
* @returns {Object} 数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIComponents/container/TUISearch/server.ts#L154-L158 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.init | static init(options:TUICoreParams) {} | /**
* 初始化TUICore
*
* @param {TUICoreParams} options 初始化参数
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L9-L9 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.install | public install(app:any) {} | /**
* TUICore 挂载vue方法
*
* @param {Vue} app vue createApp实例
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L16-L16 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.getInstance | public getInstance() {} | /**
* 获取TUICore实例
*
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L22-L22 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.login | public login(options:TUICoreLoginParams): Promise<any> {
return new Promise<void>((resolve, reject) => {
});
} | /**
* TUICore 登录
*
* @param {TUICoreLoginParams} options 登录参数
* @param {string} options.userID 当前用户名
* @param {string} options.userSig 当前用户名签名
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L32-L35 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.destroyed | public destroyed() {} | /**
* TUICore 销毁
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L40-L40 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.component | public component(TUIName: string, TUIComponent:any) {} | /**
* 组件挂载
*
* @param {string} TUIName 挂载的组件名
* @param {any} TUIComponent 挂载的组件
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L48-L48 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.use | public use(TUIPlugin:any, options?: any) { } | /**
* 插件注入
*
* @param {any} TUIPlugin 需要挂载模块的服务
* @param {any} options 需要挂载模块的服务
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L57-L57 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.setAwaitFunc | public setAwaitFunc(TUIName: string, callback: any) {} | /**
* 方法调用
*
* @param {string} TUIName 组件名
* @param {callback} callback 调用的方法
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L65-L65 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.setCommonStore | public setCommonStore(store: Record<string, unknown>) {} | /**
* 设置公共数据
*
* @param {object} store 设置全局的数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L72-L72 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.setComponentStore | public setComponentStore(TUIName:string, store: any, updateCallback?:any) {} | /**
* 挂载组件数据
*
* @param {string} TUIName 模块名
* @param {any} store 挂载的数据
* @param {callback} updateCallback 更新数据 callback
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L81-L81 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.getStore | public getStore() {} | /**
* 获取 store 数据库
*
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L87-L87 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIServer.storeCommonListener | public storeCommonListener(keys:Array<string>, callback: any) {} | /**
* 监听全局数据
*
* @param {Array} keys 需要监听的数据key
* @param {callback} callback 数据变化回调
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIServer.ts#L95-L95 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIStore.setCommonStore | public setCommonStore(store: any) {} | /**
* 设置公共数据
*
* @param {any} store 设置全局的数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIStore.ts#L8-L8 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIStore.setComponentStore | public setComponentStore(TUIName:string, store: any, updateCallback?: any) {} | /**
* 挂载组件数据
*
* @param {string} TUIName 模块名
* @param {any} store 挂载的数据
* @param {callback} updateCallback 更新数据 callback
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIStore.ts#L17-L17 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | ITUIStore.storeCommonListener | public storeCommonListener(keys:Array<string>, callback: any) {} | /**
* 监听全局数据
*
* @param {Array} keys 需要监听的数据key
* @param {callback} callback 数据变化回调
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/interfaces/ITUIStore.ts#L25-L25 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.init | static init(options: TUICoreParams) {
if (!TUICore.instance) {
TUICore.instance = new TUICore(options);
}
const { isH5 } = TUIEnv();
(window as any).TUIKitTUICore = TUICore.instance;
TUICore.instance.use(TUITheme);
TUICore.instance.use(TUIi18n);
return TUICore.instance;
} | /**
* 初始化TUICore
*
* @param {TUICoreParams} options 初始化参数
* @returns {TUICore} TUICore的实例
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L67-L76 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.install | public install(app: any) {
app.config.globalProperties.$TUIKit = this.getInstance();
let flag = true;
this.installedPlugins.forEach((element) => {
app.use(element);
if (element.name === 'TUIComponents') {
flag = false;
}
});
flag &&
this.TUIComponents.forEach((element) => {
app.component(element.name, element.component);
});
TUIDirective(app);
} | /**
* TUICore 挂载vue方法
*
* @param {Vue} app vue createApp实例
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L83-L100 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.getInstance | public getInstance() {
return TUICore.instance;
} | /**
* 获取TUICore实例
*
* @returns {TUICore} TUICore的实例
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L107-L109 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.login | public login(options: TUICoreLoginParams): Promise<any> {
return new Promise<void>((resolve, reject) => {
this.tim
.login(options)
.then(() => {
this.loginResolveRejectCache.push({
resolve,
reject,
});
TUICore.isLogin = true;
(window as any)._isTIMCallKit = true;
TUICore?.instance?.TUIServer?.TUICallKit?.init({
SDKAppID: this.SDKAppID,
userID: options.userID,
userSig: options.userSig,
tim: this.tim,
});
return null;
})
.catch((error: any) => {
reject(error);
});
});
} | /**
* TUICore 登录
*
* @param {TUICoreLoginParams} options 登录参数
* @param {string} options.userID 当前用户名
* @param {string} options.userSig 当前用户名签名
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L119-L142 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.logout | public logout(): Promise<any> {
return new Promise<void>((resolve, reject) => {
this.tim
.logout()
.then((imResponse: any) => {
this.isSDKReady = false;
TUICore.isLogin = false;
resolve(imResponse);
})
.catch((error: any) => {
reject(error);
});
});
} | /**
* TUICore 退出登录
*
* @returns {Promise}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L149-L162 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.bindTIMEvent | private bindTIMEvent() {
this.tim.on(TIM.EVENT.SDK_READY, this.handleSDKReady, this);
// this.tim.on(TIM.EVENT.SDK_NOT_READY,)
// this.tim.on(TIM.EVENT.KICKED_OUT,)
// this.tim.on(TIM.EVENT.ERROR, )
// this.tim.on(TIM.EVENT.NET_STATE_CHANGE, )
// this.tim.on(TIM.EVENT.SDK_RELOAD, )
} | /**
* /////////////////////////////////////////////////////////////////////////////////
* //
* // TIM 事件监听注册接口
* //
* /////////////////////////////////////////////////////////////////////////////////
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L171-L178 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.handleSDKReady | private handleSDKReady() {
this.isSDKReady = true;
this.handelAwaitFunc(TUICore.TUIServerFunMap);
this.loginResolveRejectCache.forEach(({ resolve }) => {
resolve({
msg: '登录成功,且SDK Ready',
});
});
} | /**
* SDK ready 回调函数
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L192-L200 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.handelAwaitFunc | private handelAwaitFunc(awaitFunList: Map<string, any>) {
const keys = Object.keys(this.TUIServer);
for (let i = 0; i < keys.length; i++) {
const TUIServerFunList = awaitFunList?.get(keys[i]) || [];
TUIServerFunList.length > 0 && TUIServerFunList.map((callback: any) => callback());
awaitFunList?.delete(keys[i]);
}
return awaitFunList;
} | /**
* 处理等待函数
*
* @param {Map} awaitFunList 等待调用的函数
* @returns {Map} 执行完的数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L208-L216 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.destroyed | public destroyed() {
this.unbindTIMEvent();
this.isSDKReady = false;
} | /**
* TUICore 销毁
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L221-L224 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.component | public component(TUIName: string, TUIComponent: any) {
const TUICore = this.getInstance();
if (!this.TUIServer) {
this.TUIServer = {};
}
// const Server = TUIComponent.server;
this.TUIServer[TUIName] = TUIComponent.server;
if (this.TUIComponents.has(TUIComponent)) {
console.warn(`${TUIName} component has already been applied to target TUICore.`);
} else {
this.TUIComponents.add(TUIComponent);
}
return TUICore;
} | /**
* 组件挂载
*
* @param {string} TUIName 挂载的组件名
* @param {any} TUIComponent 挂载的组件
* @returns {TUICore} 挂载后的实例
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L233-L246 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.use | public use(TUIPlugin: any, options?: any) {
const TUICore = this.getInstance();
if (this.installedPlugins.has(TUIPlugin)) {
console.warn('Plugin has already been applied to target TUICore.');
} else if (TUIPlugin && isFunction(TUIPlugin?.plugin)) {
this.installedPlugins.add(TUIPlugin);
TUIPlugin?.plugin(TUICore, options);
} else if (isFunction(TUIPlugin)) {
this.installedPlugins.add(TUIPlugin);
TUIPlugin(TUICore, options);
} else {
console.warn('A plugin must either be a function or an object with an "plugin" ' + 'function.');
}
return TUICore;
} | /**
* 插件注入
*
* @param {any} TUIPlugin 需要挂载模块的服务
* @param {any} options 其他参数
* @returns {TUICore} 挂载后的实例
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L255-L269 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.setAwaitFunc | public setAwaitFunc(TUIName: string, callback: any) {
if (this.isSDKReady) {
callback();
} else {
if (!TUICore.TUIServerFunMap) {
TUICore.TUIServerFunMap = new Map();
}
const TUIServerFunList: Array<void> = TUICore.TUIServerFunMap.get(TUIName) || [];
TUIServerFunList.push(callback);
TUICore.TUIServerFunMap.set(TUIName, TUIServerFunList);
}
} | /**
* 方法调用
*
* @param {string} TUIName 组件名
* @param {callback} callback 调用的方法
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L287-L299 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.setCommonStore | public setCommonStore(store: Record<string, unknown>) {
return this.store.setCommonStore(store);
} | /**
* 设置公共数据
*
* @param {object} store 设置全局的数据
* @returns {proxy} 设置完成的数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L307-L309 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.setComponentStore | public setComponentStore(TUIName: string, store: any, updateCallback?: any) {
return this.store.setComponentStore(TUIName, store, updateCallback);
} | /**
* 挂载组件数据
*
* @param {string} TUIName 模块名
* @param {any} store 挂载的数据
* @param {callback} updateCallback 更新数据 callback
* @returns {proxy} 挂载完成的模块数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L319-L321 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.getStore | public getStore() {
return this.store.store;
} | /**
* 获取 store 数据库
*
* @returns {any} store 数据库
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L328-L330 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUICore.storeCommonListener | public storeCommonListener(keys: Array<string>, callback: any) {
return this.store.storeCommonListener(keys, callback);
} | /**
* 监听全局数据
*
* @param {Array} keys 需要监听的数据key
* @param {callback} callback 数据变化回调
* @returns {addStoreUpdate}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/server/index.ts#L339-L341 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIStore.setCommonStore | public setCommonStore(store: any) {
Object.keys(store).forEach((key: string) => {
if (key in this.store.common) {
return new Error(`${key} 在公共数据已存在,请重新设置`);
}
this.store.common[key] = store[key];
});
return this.store;
} | /**
* 设置全局数据
*
* @param {any} store 设置全局的数据
* @returns {proxy} 设置完成的数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/store/index.ts#L38-L46 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIStore.setComponentStore | public setComponentStore(TUIName:string, store: any, updateCallback?: any) {
if (TUIName in this.store) {
return new Error(`${TUIName} 该数据模块已存在,请重新设置`);
}
return this.store[TUIName] = new Proxy(store, {
get: (target:any, name:string) => target[name],
set: (target:any, name:string, value:any) => {
const oldValue:TUIStoreType = {};
Object.assign(oldValue, target);
// eslint-disable-next-line no-param-reassign
target[name] = value;
if (target[name] !== oldValue[name]) {
updateCallback && updateCallback(target, oldValue);
}
return target;
},
});
} | /**
* 挂载组件数据
*
* @param {string} TUIName 模块名
* @param {any} store 挂载的数据
* @param {callback} updateCallback 更新数据 callback
* @returns {proxy} 挂载完成的模块数据
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/store/index.ts#L57-L74 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUIStore.storeCommonListener | public storeCommonListener(keys:Array<string>, callback: any) {
this.storeListener = {
keys,
callback,
};
} | /**
* 监听全局数据
*
* @param {Array} keys 需要监听的数据key
* @param {callback} callback 数据变化回调
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUICore/store/index.ts#L82-L87 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | start | const start = (e:any) => {
if (e.type === 'click' && e.button !== 0) {
return;
}
if (pressTimer === null) {
pressTimer = setTimeout(() => {
// 执行函数
handler(e);
}, 1000);
}
}; | // 定义函数处理程序 | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIPlugin/TUIDirective/index.ts#L19-L29 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | cancel | const cancel = (e:any) => {
// 检查计时器是否有值
if (pressTimer !== null) {
clearTimeout(pressTimer);
pressTimer = null;
}
}; | // 取消计时器 | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIPlugin/TUIDirective/index.ts#L31-L37 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | handler | const handler = (e:any) => {
// 执行传递给指令的方法
binding.value(e);
}; | // 运行函数 | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIPlugin/TUIDirective/index.ts#L39-L42 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUINotification.getInstance | static getInstance(options?: any): TUINotification {
if (!TUINotification.instance) {
TUINotification.instance = new TUINotification(options);
}
return TUINotification.instance;
} | /**
* 获取 TUINotification 实例
*
* @returns {TUINotification}
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIPlugin/TUINotification/index.ts#L31-L36 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
workbench | github_2023 | yhtt2020 | typescript | TUINotification.plugin | static plugin(TUICore: any, options?: any): void {
TUICore.config.notification = this.getInstance(options);
this.TUICore = TUICore;
} | /**
* 挂载到 TUICore
*
* @param {TUICore} TUICore TUICore实例
*/ | https://github.com/yhtt2020/workbench/blob/3d30910f185bdd2f72c14bff51d39fb2e774dd0a/vite/packages/table/TUIKit/TUIPlugin/TUINotification/index.ts#L43-L46 | 3d30910f185bdd2f72c14bff51d39fb2e774dd0a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.