no message

This commit is contained in:
kuaifan 2025-04-10 19:36:55 +08:00
parent 94ac3c3922
commit 5489462f90
2 changed files with 11 additions and 9 deletions

View File

@ -1348,19 +1348,16 @@ const timezone = require("dayjs/plugin/timezone");
/**
* 执行指定次数的定时任务返回一个可以取消的对象
* @param {Function} fn 要执行的函数
* @param {number} delay 首次执行的延迟时间(毫秒)
* @param {number} interval 间隔时间(毫秒)
* @param {number} times 执行次数
* @returns {object} 包含 clear 方法的对象
*/
repeatWithCount(fn, interval, times) {
repeatWithCount(fn, delay, interval = 0, times = 0) {
if (typeof fn !== 'function') {
return () => {}; // 返回空函数而不是null保持返回类型一致
}
if (interval < 0 || times < 0) {
return () => {}; // 返回空函数
}
let count = 0;
let timer = null;
@ -1393,7 +1390,7 @@ const timezone = require("dayjs/plugin/timezone");
};
// 立即开始第一次执行
timer = setTimeout(execute, 0);
timer = setTimeout(execute, delay);
// 直接返回clear函数
return clear;

View File

@ -41,7 +41,7 @@
<template v-for="tag in $A.dialogTags(dialogData)" v-if="tag.color != 'success'">
<Tag :color="tag.color" :fade="false">{{$L(tag.text)}}</Tag>
</template>
<h2>{{dialogData.name}}</h2>
<h2 class="user-select-auto">{{dialogData.name}}</h2>
<em v-if="peopleNum > 0" @click="onDialogMenu('groupInfo')">({{peopleNum}})</em>
<Tag v-if="dialogData.bot" class="after" :fade="false">{{$L('机器人')}}</Tag>
<Tag v-if="dialogData.type === 'user' && approvaUserStatus" class="after" color="red" :fade="false">{{$L(approvaUserStatus)}}</Tag>
@ -2360,14 +2360,19 @@ export default {
if ($A.isIos()) {
this.tempRepeat && this.tempRepeat()
this.tempRepeat = $A.repeatWithCount(() => {
this.$refs.footer.scrollIntoView({block: 'end'})
}, 50, 10)
this.$refs.footer?.scrollIntoView({
block: 'end',
behavior: 'smooth'
})
}, 500, 100, 3)
}
},
onEventBlur() {
this.focusTimer = setTimeout(_ => this.focusLazy = false, 10)
this.$emit("on-blur")
//
this.tempRepeat && this.tempRepeat()
},
onEventMore(e) {