diff --git a/resources/assets/js/functions/common.js b/resources/assets/js/functions/common.js index bcbc50fab..2308146b8 100755 --- a/resources/assets/js/functions/common.js +++ b/resources/assets/js/functions/common.js @@ -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; diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 907ce76f3..018104c3b 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -41,7 +41,7 @@ -

{{dialogData.name}}

+

{{dialogData.name}}

({{peopleNum}}) {{$L('机器人')}} {{$L(approvaUserStatus)}} @@ -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) {