feat(short-drama-agent-front): 优化分镜界面并新增弹窗手势

This commit is contained in:
GJ committed 2026-11-18 18:50:15 +08:00
1 parent b15a6011ce
commit d68f03471c
59 files changed
+2694 -857

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { ref, watch, type Ref } from 'vue'
/**
* 公共弹层仅在正文离开顶部后提示遮挡,重新开关时清除旧状态。
* @param open 当前弹层显隐
* @returns 正文滚动状态与滚动事件入口
*/
export function usePanelScrollState(open: Readonly<Ref<boolean>>) {
/** 只表达正文顶部是否有被遮挡内容,不跟随内部输入框滚动。 */
const bodyScrolled = ref(false)
/**
* 读取真实滚动容器的位置,回到顶部即时隐藏阴影。
* @param event 公共正文滚动事件
*/
function onBodyScroll(event: Event) {
bodyScrolled.value = ((event.target as HTMLElement | null)?.scrollTop ?? 0) > 0
}
watch(open, () => {
bodyScrolled.value = false
})
return { bodyScrolled, onBodyScroll }
}