diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d007b29..8c53fe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - run: pnpm install --frozen-lockfile - name: Type check - run: npx vue-tsc --noEmit + run: pnpm exec vue-tsc --noEmit - name: Build run: pnpm build @@ -102,7 +102,7 @@ jobs: - run: pnpm install --frozen-lockfile - name: Build Tauri app - run: pnpm tauri build --target ${{ matrix.target }} + run: pnpm tauri build - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/src/components/common/ContextMenu.vue b/src/components/common/ContextMenu.vue index 7103522..7a8be79 100644 --- a/src/components/common/ContextMenu.vue +++ b/src/components/common/ContextMenu.vue @@ -18,7 +18,6 @@ const visible = ref(false) const x = ref(0) const y = ref(0) let targetEl: HTMLElement | null = null -let cleanup: (() => void) | null = null function show(ev: MouseEvent, el: HTMLElement) { x.value = ev.clientX @@ -51,7 +50,6 @@ onMounted(() => { onUnmounted(() => { document.removeEventListener('click', onClickOutside) - if (cleanup) cleanup() }) defineExpose({ show, hide }) diff --git a/src/components/dashboard/GlobalVariableManager.vue b/src/components/dashboard/GlobalVariableManager.vue index 661b749..5c3b242 100644 --- a/src/components/dashboard/GlobalVariableManager.vue +++ b/src/components/dashboard/GlobalVariableManager.vue @@ -50,7 +50,7 @@ function refreshEntries() { :model-value="showPanel" title="全局变量管理" width="500px" - @update:model-value="(val) => showPanel = val" + @update:model-value="(val: boolean) => showPanel = val" @open="refreshEntries" @closed="newVarName = ''; newVarValue = ''" > diff --git a/src/components/dashboard/LogPanel.vue b/src/components/dashboard/LogPanel.vue index fd4ec21..b9a1bdb 100644 --- a/src/components/dashboard/LogPanel.vue +++ b/src/components/dashboard/LogPanel.vue @@ -57,8 +57,8 @@ async function handleOpenLogDir() { logDirPath.value = await mqttGetLogDir() } // Try to open the directory using the opener plugin - const { open } = await import('@tauri-apps/plugin-opener') - await open(logDirPath.value) + const { openPath } = await import('@tauri-apps/plugin-opener') + await openPath(logDirPath.value) } catch (e: any) { ElMessage.warning(`日志目录: ${logDirPath.value || '未知'}`) }