fix: prevent video generate button drag capture
This commit is contained in:
@@ -22,12 +22,12 @@
|
|||||||
class="text-sm font-medium bg-[var(--bg-tertiary)] text-[var(--text-secondary)] px-1 rounded outline-none border border-blue-500"
|
class="text-sm font-medium bg-[var(--bg-tertiary)] text-[var(--text-secondary)] px-1 rounded outline-none border border-blue-500"
|
||||||
/>
|
/>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<button @click="handleDuplicate" class="p-1 hover:bg-[var(--bg-tertiary)] rounded transition-colors" title="复制节点">
|
<button type="button" @pointerdown.stop @mousedown.stop @click.stop.prevent="handleDuplicate" class="nodrag nopan p-1 hover:bg-[var(--bg-tertiary)] rounded transition-colors" title="复制节点">
|
||||||
<n-icon :size="14">
|
<n-icon :size="14">
|
||||||
<CopyOutline />
|
<CopyOutline />
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</button>
|
</button>
|
||||||
<button @click="handleDelete" class="p-1 hover:bg-[var(--bg-tertiary)] rounded transition-colors" title="删除节点">
|
<button type="button" @pointerdown.stop @mousedown.stop @click.stop.prevent="handleDelete" class="nodrag nopan p-1 hover:bg-[var(--bg-tertiary)] rounded transition-colors" title="删除节点">
|
||||||
<n-icon :size="14">
|
<n-icon :size="14">
|
||||||
<TrashOutline />
|
<TrashOutline />
|
||||||
</n-icon>
|
</n-icon>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<span class="text-xs text-[var(--text-secondary)]">模型</span>
|
<span class="text-xs text-[var(--text-secondary)]">模型</span>
|
||||||
<n-dropdown trigger="click" :options="modelOptions" @select="handleModelSelect">
|
<n-dropdown trigger="click" :options="modelOptions" @select="handleModelSelect">
|
||||||
<button class="flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
<button type="button" @pointerdown.stop @mousedown.stop @click.stop class="nodrag nopan flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
||||||
{{ displayModelName }}
|
{{ displayModelName }}
|
||||||
<n-icon :size="12"><ChevronDownOutline /></n-icon>
|
<n-icon :size="12"><ChevronDownOutline /></n-icon>
|
||||||
</button>
|
</button>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<span class="text-xs text-[var(--text-secondary)]">比例</span>
|
<span class="text-xs text-[var(--text-secondary)]">比例</span>
|
||||||
<n-dropdown trigger="click" :options="ratioOptions" @select="handleRatioSelect">
|
<n-dropdown trigger="click" :options="ratioOptions" @select="handleRatioSelect">
|
||||||
<button class="flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
<button type="button" @pointerdown.stop @mousedown.stop @click.stop class="nodrag nopan flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
||||||
{{ localRatio }}
|
{{ localRatio }}
|
||||||
<n-icon :size="12">
|
<n-icon :size="12">
|
||||||
<ChevronForwardOutline />
|
<ChevronForwardOutline />
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<span class="text-xs text-[var(--text-secondary)]">时长</span>
|
<span class="text-xs text-[var(--text-secondary)]">时长</span>
|
||||||
<n-dropdown trigger="click" :options="durationOptions" @select="handleDurationSelect">
|
<n-dropdown trigger="click" :options="durationOptions" @select="handleDurationSelect">
|
||||||
<button class="flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
<button type="button" @pointerdown.stop @mousedown.stop @click.stop class="nodrag nopan flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
||||||
{{ localDuration }}s
|
{{ localDuration }}s
|
||||||
<n-icon :size="12">
|
<n-icon :size="12">
|
||||||
<ChevronForwardOutline />
|
<ChevronForwardOutline />
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<span class="text-xs text-[var(--text-secondary)]">清晰度</span>
|
<span class="text-xs text-[var(--text-secondary)]">清晰度</span>
|
||||||
<n-dropdown trigger="click" :options="resolutionOptions" @select="handleResolutionSelect">
|
<n-dropdown trigger="click" :options="resolutionOptions" @select="handleResolutionSelect">
|
||||||
<button class="flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
<button type="button" @pointerdown.stop @mousedown.stop @click.stop class="nodrag nopan flex items-center gap-1 text-sm text-[var(--text-primary)] hover:text-[var(--accent-color)]">
|
||||||
{{ localResolution }}
|
{{ localResolution }}
|
||||||
<n-icon :size="12">
|
<n-icon :size="12">
|
||||||
<ChevronForwardOutline />
|
<ChevronForwardOutline />
|
||||||
@@ -118,8 +118,8 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<!-- Generate button | 生成按钮 -->
|
<!-- Generate button | 生成按钮 -->
|
||||||
<button @click="handleGenerate" :disabled="isGenerating || !canGenerate"
|
<button type="button" @pointerdown.stop @mousedown.stop @touchstart.stop @click.stop.prevent="handleGenerate" :disabled="isGenerating || !canGenerate"
|
||||||
class="w-full flex items-center justify-center gap-2 py-2 px-4 rounded-lg bg-[var(--accent-color)] hover:bg-[var(--accent-hover)] text-white text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed">
|
class="nodrag nopan w-full flex items-center justify-center gap-2 py-2 px-4 rounded-lg bg-[var(--accent-color)] hover:bg-[var(--accent-hover)] text-white text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
<n-spin v-if="isGenerating" :size="14" />
|
<n-spin v-if="isGenerating" :size="14" />
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<n-icon :size="16">
|
<n-icon :size="16">
|
||||||
|
|||||||
Reference in New Issue
Block a user