代码整理,ai相关配置转luban,聊天气泡缓存
This commit is contained in:
@@ -48,6 +48,12 @@ export class ChatPanel extends li_BaseView {
|
||||
private _nodeTab: any = {};
|
||||
|
||||
nameKey: string;
|
||||
|
||||
private onLanguageChangeCallback = () => {
|
||||
if (!this.girlName) return;
|
||||
this.girlName.string = LanguageUtils.getText(this.nameKey);
|
||||
};
|
||||
|
||||
openUIDataCT(data) {
|
||||
this.id = data;
|
||||
// 设置当前聊天的角色ID
|
||||
@@ -67,14 +73,10 @@ export class ChatPanel extends li_BaseView {
|
||||
this.onDialogUpdate
|
||||
);
|
||||
|
||||
Utils.addInnerEL(InnerMsgCode.LanguageChange, this, () => {
|
||||
this.girlName.string = LanguageUtils.getText(this.nameKey);
|
||||
});
|
||||
Utils.addInnerEL(InnerMsgCode.LanguageChange, this, this.onLanguageChangeCallback);
|
||||
}
|
||||
onDestroy(): void {
|
||||
Utils.removeInnerEL(InnerMsgCode.LanguageChange, this, () => {
|
||||
this.girlName.string = LanguageUtils.getText(this.nameKey);
|
||||
});
|
||||
Utils.removeInnerEL(InnerMsgCode.LanguageChange, this, this.onLanguageChangeCallback);
|
||||
}
|
||||
refresh(id: number) {
|
||||
this.id = id;
|
||||
|
||||
Reference in New Issue
Block a user