refactor: 使用 Naive UI 重构后台布局与黑白双主题
This commit is contained in:
1 parent
55516537bf
commit
db8c176b55
51 files changed
+3277
-2442
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { NButton, NCheckbox } from 'naive-ui'
|
||||
import { ref, watch } from 'vue'
|
||||
import { DialogTrigger } from 'reka-ui'
|
||||
import { AppDialog } from '../../components/ui'
|
||||
|
||||
/** 耗费模型额度或覆盖结果的动作必须经过明确确认。 */
|
||||
@@ -32,32 +32,24 @@ function confirm() {
|
||||
<template>
|
||||
<AppDialog v-model:open="open" :title="label" :description="description">
|
||||
<template #trigger
|
||||
><DialogTrigger
|
||||
class="button"
|
||||
:class="primary ? 'button-primary' : 'button-secondary'"
|
||||
:disabled="disabled"
|
||||
>{{ label }}</DialogTrigger
|
||||
></template
|
||||
><NButton :type="primary ? 'primary' : 'default'" :disabled="disabled" @click="open = true">{{
|
||||
label
|
||||
}}</NButton></template
|
||||
>
|
||||
<p class="mt-5 text-sm leading-6 text-muted">
|
||||
此操作会提交到真实后端,可能调用模型并产生费用。请勿在其他页面或终端同时启动相同工作流。
|
||||
</p>
|
||||
<label v-if="acknowledgement" class="mt-5 flex items-start gap-3 text-sm leading-6"
|
||||
><input
|
||||
v-model="acknowledged"
|
||||
class="mt-1 accent-accent"
|
||||
type="checkbox"
|
||||
/>我已确认后台任务停止,当前没有同项目的生成或拆解任务在运行。</label
|
||||
<NCheckbox
|
||||
v-model:checked="acknowledged"
|
||||
v-if="acknowledgement"
|
||||
class="mt-5 flex items-start gap-3 text-sm leading-6"
|
||||
>我已确认后台任务停止,当前没有同项目的生成或拆解任务在运行。</NCheckbox
|
||||
>
|
||||
<div class="dialog-footer mt-6">
|
||||
<button class="button button-secondary" @click="open = false">取消</button
|
||||
><button
|
||||
class="button button-primary"
|
||||
:disabled="disabled || (acknowledgement && !acknowledged)"
|
||||
@click="confirm"
|
||||
<NButton @click="open = false">取消</NButton
|
||||
><NButton :disabled="disabled || (acknowledgement && !acknowledged)" @click="confirm" type="primary">
|
||||
确认{{ label }}</NButton
|
||||
>
|
||||
确认{{ label }}
|
||||
</button>
|
||||
</div>
|
||||
</AppDialog>
|
||||
</template>
|
||||
Reference in new issue
Block a user