This commit is contained in:
jianzhichu
2025-11-25 23:15:37 +08:00
parent 975baf80cd
commit 5b41e5eaeb
2 changed files with 60 additions and 52 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ services:
![输入图片说明](docs/set.png)
# 抖小云 功能更新清单
# 抖小云 功能和计划
1. ✅ 支持多账号同步(每个账号可单独配置存储路径)
+59 -51
View File
@@ -3,57 +3,54 @@
<a-form :model="formState" :label-col="labelCol" :rules="rules" :wrapper-col="wrapperCol" ref="formRef" label-align="right">
<!-- 任务调度配置 -->
<div class="form-section">
<h3 class="section-title">任务调度配置</h3>
<h3 class="section-title">任务调度</h3>
<a-form-item has-feedback label="同步周期(分钟)" name="Cron" :wrapper-col="{ span: 6 }">
<a-input v-model:value="formState.Cron" placeholder="请输入数字或Cron表达式" />
<div class="help-text">
<p>1. 数字表示每隔该分钟执行一次 20 表示每20分钟</p>
<p>2. Cron表达式按表达式规则执行 0 0/1 * * * 表示每小时执行一次</p>
</div>
<a-form-item label="在线Cron表达式" :wrapper-col="{ span: 12, offset: 0 }">
<a target="_blank" href="https://www.bejson.com/othertools/cron/" class="cron-link">查看示例</a>
</a-form-item>
<a-form-item has-feedback label="同步周期分钟" name="Cron" :wrapper-col="{ span: 6}" style="margin-left:30px">
<!-- <a-input v-model:value="formState.Cron" placeholder="请输入数字" /> -->
<a-input-number v-model:value="formState.Cron" placeholder="请输入数字" :min="1" :max="120" />
</a-form-item>
<a-form-item has-feedback label="每次同步(条数)" name="BatchCount" :wrapper-col="{ span:6}" style="margin-left:30px">
<a-input-number v-model:value="formState.BatchCount" placeholder="请输入查询条数" :min="1" :max="100" />
</a-form-item>
</div>
<!-- 文件保存配置 -->
<div class="form-section">
<h3 class="section-title">博主视频保存配置</h3>
<h3 class="section-title">博主视频</h3>
<a-form-item has-feedback label="标题文件名" name="UperUseViedoTitle" :wrapper-col="{ span: 6 }">
<a-form-item has-feedback label="标题文件名" name="UperUseViedoTitle" :wrapper-col="{ span: 6 }">
<a-switch v-model:checked="formState.UperUseViedoTitle" />
</a-form-item>
<a-form-item has-feedback label="不创建子文件夹" name="UperSaveTogether" :wrapper-col="{ span: 6 }">
<a-form-item has-feedback label="不创建子目录" name="UperSaveTogether" :wrapper-col="{ span: 6 }">
<a-switch v-model:checked="formState.UperSaveTogether" />
</a-form-item>
</div>
<!-- 系统配置 -->
<div class="form-section">
<h3 class="section-title">系统配置</h3>
<a-form-item has-feedback label="每次同步条数" name="BatchCount" :wrapper-col="{ span: 12 }">
<a-input-number v-model:value="formState.BatchCount" placeholder="请输入查询条数" :min="1" :max="100" />
</a-form-item>
<a-form-item has-feedback label="日志保留天数" name="LogKeepDay" :wrapper-col="{ span: 12 }">
<a-input-number v-model:value="formState.LogKeepDay" placeholder="请输入保留天数" :min="1" :max="90" />
</a-form-item>
<a-form-item v-if="downImgVideo" has-feedback label="同步图文视频" name="DownImageVideo" :wrapper-col="{ span: 6 }">
<div class="form-section" v-if="downImgVideo">
<h3 class="section-title">图文视频</h3>
<a-form-item has-feedback label="图文视频合成" name="DownImageVideo" :wrapper-col="{ span: 6 }">
<a-switch v-model:checked="formState.DownImageVideo" />
</a-form-item>
<a-form-item v-if="downImgVideo" has-feedback label="单独下载图文-音频" name="DownMp3" :wrapper-col="{ span: 6 }">
<a-form-item has-feedback label="单独下载音频" name="DownMp3" :wrapper-col="{ span: 6 }">
<a-switch v-model:checked="formState.DownMp3" />
</a-form-item>
<a-form-item v-if="downImgVideo" has-feedback label="单独下载图文-图片" name="DownImage" :wrapper-col="{ span: 6 }">
<a-form-item has-feedback label="单独下载图片" name="DownImage" :wrapper-col="{ span: 6 }">
<a-switch v-model:checked="formState.DownImage" />
</a-form-item>
</div>
<!-- 系统配置 -->
<div class="form-section">
<h3 class="section-title">其他配置</h3>
<a-form-item has-feedback label="日志保留(天数)" name="LogKeepDay" :wrapper-col="{ span: 6 }" style="margin-left:30px">
<a-input-number v-model:value="formState.LogKeepDay" placeholder="请输入保留天数" :min="1" :max="90" />
</a-form-item>
</div>
<!-- 操作按钮 -->
<a-form-item :wrapper-col="{ span: 12, offset: 5 }" class="form-actions">
<a-space size="middle">
@@ -112,27 +109,27 @@ const formState: UnwrapRef<FormState> = reactive({
// 表单校验规则
const rules: Record<string, Rule[]> = {
Cron: [
{ required: true, message: '请输入任务调度周期', trigger: 'change' },
{
validator: (rule, value) => {
// 验证数字或cron表达式
if (/^\d+$/.test(value) || /^(\d+\s*){5,6}$/.test(value)) {
return Promise.resolve();
}
return Promise.reject(new Error('请输入有效的数字或Cron表达式'));
},
trigger: 'change',
},
],
BatchCount: [
{ required: true, message: '请输入每次查询条数', trigger: 'change' },
{ type: 'number', min: 1, max: 100, message: '查询条数应在1-100之间', trigger: 'change' },
],
LogKeepDay: [
{ required: true, message: '请输入日志保留天数', trigger: 'change' },
{ type: 'number', min: 1, max: 90, message: '保留天数应在1-90之间', trigger: 'change' },
],
// Cron: [
// { required: true, message: '请输入任务调度周期', trigger: 'change' },
// {
// validator: (rule, value) => {
// // 验证数字或cron表达式
// if (/^\d+$/.test(value) || /^(\d+\s*){5,6}$/.test(value)) {
// return Promise.resolve();
// }
// return Promise.reject(new Error('请输入有效的数字或Cron表达式'));
// },
// trigger: 'change',
// },
// ],
// BatchCount: [
// { required: true, message: '请输入每次查询条数', trigger: 'change' },
// { type: 'number', min: 1, max: 100, message: '查询条数应在1-100之间', trigger: 'change' },
// ],
// LogKeepDay: [
// { required: true, message: '请输入日志保留天数', trigger: 'change' },
// { type: 'number', min: 1, max: 90, message: '保留天数应在1-90之间', trigger: 'change' },
// ],
};
// 布局配置
@@ -229,10 +226,6 @@ const onCancel = () => {
@border-radius: 4px;
.form-section {
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid #f0f0f0;
&:last-child {
border-bottom: none;
}
@@ -247,6 +240,18 @@ const onCancel = () => {
border-left: 3px solid @primary-color;
}
// // 关键改动:强制标签靠左并添加100px左侧间距
// .ant-form-item-label {
// text-align: left !important; /* 强制靠左对齐,覆盖默认右对齐 */
// padding-right: 0 !important; /* 清除默认右侧内边距 */
// margin-left: 100px !important; /* 标签左侧间距100px */
// }
// 保持配置项内容区域与标签对齐(可选,根据实际布局调整)
// .ant-form-item-control {
// margin-left: 0 !important; /* 清除之前可能添加的左侧间距,避免双重缩进 */
// }
.help-text {
margin-top: 8px;
font-size: 12px;
@@ -281,4 +286,7 @@ const onCancel = () => {
color: rgb(164 158 158) !important;
background-color: #e6e6e6 !important;
}
.ant-form-item-label {
text-align: left !important;
}
</style>