diff --git a/frontend/ops_vue_js/src/views/ScheduleView.vue b/frontend/ops_vue_js/src/views/ScheduleView.vue index c81e376..e5a4ad0 100644 --- a/frontend/ops_vue_js/src/views/ScheduleView.vue +++ b/frontend/ops_vue_js/src/views/ScheduleView.vue @@ -266,10 +266,16 @@ const calendarOptions = ref({ eventDidMount(info) { const titleEl = info.el.querySelector('.fc-event-title') - if (titleEl && titleEl.scrollWidth > titleEl.clientWidth) { - //titleEl.setAttribute('data-truncated', 'true') - //日程过长 需要特殊处理 - //console.log("--",info) + if (titleEl) { + // 等 DOM 完全渲染后再检测宽度 + requestAnimationFrame(() => { + const overflow = titleEl.scrollWidth - titleEl.clientWidth + if (overflow > 0) { + // 将溢出量存入 CSS 变量,让动画能精确滚到末尾 + titleEl.style.setProperty('--scroll-distance', `-${overflow}px`) + titleEl.setAttribute('data-truncated', 'true') + } + }) } }, @@ -802,31 +808,59 @@ onMounted(() => { \ No newline at end of file diff --git a/frontend/ops_vue_js/vite.config.js b/frontend/ops_vue_js/vite.config.js index 1c0279c..6f190a2 100644 --- a/frontend/ops_vue_js/vite.config.js +++ b/frontend/ops_vue_js/vite.config.js @@ -20,7 +20,7 @@ export default defineConfig({ server: { proxy: { "/api": { - target: "http://127.0.0.1:8080", + target: "http://192.168.13.105", changeOrigin: true, }, },