Files
short-drama-agent-front/src/components/ui/WorkspaceTools.vue
T

67 lines
1.9 KiB
Vue

<script setup lang="ts">
import { NButton } from 'naive-ui'
import AppDialog from './AppDialog.vue'
import { Settings2 } from '@lucide/vue'
/** 批量设置与回执属于临时操作,统一使用大尺寸弹窗;完整制作流程继续保留独立页面。 */
withDefaults(defineProps<{ title: string; label?: string; hasReceipt?: boolean; triggerless?: boolean }>(), {
label: '操作与回执',
triggerless: false
})
const open = defineModel<boolean>('open', { default: false })
</script>
<template>
<NButton
v-if="!triggerless"
class="workspace-tools-trigger"
data-workspace-tools
:aria-label="label"
aria-haspopup="dialog"
:aria-expanded="open"
@click="open = true"
>
<template #icon><Settings2 :size="15" /></template>
<span class="workspace-tools-label">{{ label }}</span
><span v-if="hasReceipt" class="text-xs text-muted"> · 有回执</span>
</NButton>
<AppDialog v-model:open="open" :title="title" description="" wide>
<div class="workspace-tools-body"><slot /></div>
</AppDialog>
</template>
<style>
/* 本组件专属布局与 Naive 内部结构覆盖。 */
@reference "../../styles/styles.css";
.workspace-tools-body {
@apply px-0 pb-5;
}
.workspace-tools-body > * + * {
@apply mt-5;
}
.workspace-tools-body .panel {
@apply p-5;
}
.workspace-tools-body .overview-content {
@apply pb-0;
}
.workspace-tools-body .storyboard-controls,
.workspace-tools-body .production-controls {
@apply grid grid-cols-[repeat(auto-fit,_minmax(160px,_1fr))] gap-4 my-5;
}
.workspace-tools-body .storyboard-coverage {
@apply my-5;
}
.workspace-tools-body .generation-row {
@apply block;
}
.workspace-tools-body .generation-row > div + div {
@apply mt-3.5;
}
.workspace-tools-body .production-pipeline {
@apply grid-cols-[repeat(auto-fit,_minmax(min(100%,_230px),_1fr))];
}
</style>