no message

This commit is contained in:
kuaifan 2024-12-03 13:12:48 +08:00
parent 7fedb7d275
commit 96c64fbb91
9 changed files with 49 additions and 26 deletions

View File

@ -353,7 +353,10 @@ export default {
//
'classroomscreen.com',
'bigbluebutton.org'
'bigbluebutton.org',
//
'matrix.to'
];
const lowerUrl = `${url}`.toLowerCase()
return meetingDomains.some(domain => lowerUrl.indexOf(domain) !== -1);

View File

@ -1064,6 +1064,36 @@ const timezone = require("dayjs/plugin/timezone");
}
},
/**
* 给元素添加一个class过指定时间之后再去除这个class
* @param element
* @param className
* @param duration
*/
addClassWithTimeout(element, className, duration) {
if (!element || !className || !duration) return;
element.classList.add(className);
setTimeout(() => {
if (!element) return;
element.classList.remove(className);
}, duration);
},
/**
* 滚动到元素并抖动
* @param element
*/
scrollIntoAndShake(element) {
if (!element) return;
const elements = Array.isArray(element) ? element : [element];
elements.forEach(el => {
if (el) {
$A.scrollIntoViewIfNeeded(el);
$A.addClassWithTimeout(el, "common-shake", 800);
}
});
},
/**
* 等比缩放尺寸
* @param width

View File

@ -1468,11 +1468,7 @@ export default {
if (val > 0) {
this.msgActiveId = 0
const element = this.$refs.scroller.$el.querySelector(`[data-id="${val}"]`)?.querySelector(".dialog-head")
if (element) {
$A.scrollIntoViewIfNeeded(element)
element.classList.add("common-shake")
setTimeout(_ => element.classList.remove("common-shake"), 800)
}
$A.scrollIntoAndShake(element)
}
},

View File

@ -327,13 +327,7 @@ export default {
if ($e.classList.contains("common-shake")) {
return
}
$A.scrollIntoViewIfNeeded($e)
requestAnimationFrame(_ => {
$e.classList.add("common-shake")
setTimeout(_ => {
$e.classList.remove("common-shake")
}, 600)
})
$A.scrollIntoAndShake($e)
} else {
if (subtask.parent_id == this.taskId) {
return

View File

@ -1,6 +1,6 @@
<template>
<div class="task-rows">
<div v-for="(item, key) in list" :key="key">
<div v-for="(item, key) in list" :key="key" :ref="`task_${item.id}`">
<Row class="task-row" :style="item.color ? {backgroundColor: item.color, borderBottomColor: item.color} : {}">
<em v-if="item.p_name" class="priority-color" :style="{backgroundColor:item.p_color}"></em>
<Col span="12" :class="['row-name', item.complete_at ? 'complete' : '']">
@ -160,7 +160,7 @@ export default {
},
computed: {
...mapState(['cacheTasks', 'taskPriority', 'cacheColumns']),
...mapState(['cacheTasks', 'taskPriority', 'cacheColumns', 'taskLatestId']),
subTask() {
return function(task_id) {
@ -175,13 +175,19 @@ export default {
}
},
},
watch: {
taskLatestId(id) {
setTimeout(() => {
$A.scrollIntoAndShake(this.$refs[`task_${id}`]);
}, 300)
}
},
methods: {
columnName(column_id) {
const column = this.cacheColumns.find(({id}) => id == column_id)
return column ? column.name : '';
},
dropTask(task, command) {
const el = this.$refs[`taskMenu_${task.id}`];
if (!el) {

View File

@ -1778,9 +1778,7 @@ export default {
this.$nextTick(_ => {
const dom = $A(this.$el).find(`[data-id="${fileId}"]`)
if (dom.length > 0) {
$A.scrollIntoViewIfNeeded(dom[0])
$A(dom[0]).addClass("common-shake")
setTimeout(_ => $A(dom[0]).removeClass("common-shake"), 800)
$A.scrollIntoAndShake(dom)
}
})
},

View File

@ -714,13 +714,7 @@ export default {
if (el[0].classList.contains("common-shake")) {
return
}
$A.scrollIntoViewIfNeeded(el[0])
requestAnimationFrame(_ => {
el[0].classList.add("common-shake")
setTimeout(_ => {
el[0].classList.remove("common-shake")
}, 600)
})
$A.scrollIntoAndShake(el[0])
}
}
},

View File

@ -2142,6 +2142,7 @@ export default {
if (result.data.is_visible === 1) {
dispatch("addTaskSuccess", result.data)
}
state.taskLatestId = result.data.id
resolve(result)
}).catch(e => {
console.warn(e);

View File

@ -150,6 +150,7 @@ export default {
taskOperation: {},
taskArchiveView: 0,
taskTemplates: [],
taskLatestId: 0,
// 任务等待状态
taskOneLoad: {},