feat: C端展示区改为单张居中无缝轮播并接入PhotoSwipe图片视频查看器,轮播间隔支持后台配置
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,6 +11,19 @@
|
||||
<n-form-item :label="t('pages.settings.watermarkText')">
|
||||
<n-input v-model:value="form.watermarkText" />
|
||||
</n-form-item>
|
||||
<n-form-item :label="t('pages.settings.carouselInterval')">
|
||||
<div style="display: flex; flex-direction: column; gap: 4px">
|
||||
<n-input-number
|
||||
v-model:value="form.carouselInterval"
|
||||
:min="0"
|
||||
:max="30"
|
||||
:step="0.5"
|
||||
:precision="1"
|
||||
style="width: 220px"
|
||||
/>
|
||||
<span style="font-size: 12px; color: #999">{{ t('pages.settings.carouselIntervalHint') }}</span>
|
||||
</div>
|
||||
</n-form-item>
|
||||
<n-button type="primary" :loading="saving" @click="save">{{ t('common.action.save') }}</n-button>
|
||||
</n-form>
|
||||
</n-card>
|
||||
@@ -25,10 +38,16 @@ import { message } from '@/utils/feedback';
|
||||
|
||||
const { t } = useI18n();
|
||||
const saving = ref(false);
|
||||
const form = reactive<{ appName: string; logRetentionDays: number; watermarkText: string }>({
|
||||
const form = reactive<{
|
||||
appName: string;
|
||||
logRetentionDays: number;
|
||||
watermarkText: string;
|
||||
carouselInterval: number;
|
||||
}>({
|
||||
appName: '',
|
||||
logRetentionDays: 365,
|
||||
watermarkText: '',
|
||||
carouselInterval: 3,
|
||||
});
|
||||
|
||||
async function load() {
|
||||
@@ -36,6 +55,7 @@ async function load() {
|
||||
form.appName = s.appName || '';
|
||||
form.logRetentionDays = Number(s.logRetentionDays || 365);
|
||||
form.watermarkText = s.watermarkText || '';
|
||||
form.carouselInterval = Number(s.carouselInterval ?? 3);
|
||||
}
|
||||
async function save() {
|
||||
saving.value = true;
|
||||
@@ -44,6 +64,7 @@ async function save() {
|
||||
appName: form.appName,
|
||||
logRetentionDays: String(form.logRetentionDays),
|
||||
watermarkText: form.watermarkText,
|
||||
carouselInterval: String(form.carouselInterval),
|
||||
});
|
||||
message.success(t('pages.settings.saved'));
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user