fix(list): wire Zibll list/card display chain end-to-end
Resolve post list mode from global list_type + surface card overrides so homepage/archives/AJAX honor admin list and card style settings.
This commit is contained in:
1 parent
b2815614d1
commit
d73a7af25e
17 files changed
+444
-151
No files matched your search
@@ -2,7 +2,7 @@
|
||||
<div class="aksrt-page-container content-page">
|
||||
<PageHeader
|
||||
title="首页配置"
|
||||
desc="按 Zibll 首页主线配置内容模型、Tab、主列表、卡片样式与基础交互。"
|
||||
desc="按 Zibll 首页主线配置内容类型、Tab、主列表与基础交互。列表/卡片显示请在「文章列表」中设置。"
|
||||
>
|
||||
<template #actions>
|
||||
<n-button type="primary" :loading="saving" @click="handleSave">保存设置</n-button>
|
||||
@@ -13,7 +13,7 @@
|
||||
<n-tab-pane name="stream" tab="主列表 & Tab">
|
||||
<n-spin :show="loading" style="width:100%; min-height:200px;">
|
||||
<n-card class="aksrt-section-card" style="margin-bottom:16px;">
|
||||
<template #header><strong>首页模型</strong></template>
|
||||
<template #header><strong>首页内容</strong></template>
|
||||
<n-form :model="form" label-placement="left" label-width="160" class="aksrt-form">
|
||||
<n-form-item label="首页内容模型">
|
||||
<n-radio-group v-model:value="form.homepage_content_model">
|
||||
@@ -152,32 +152,10 @@
|
||||
<n-tab-pane name="cards" tab="卡片 & 交互">
|
||||
<n-spin :show="loading" style="width:100%; min-height:200px;">
|
||||
<n-card class="aksrt-section-card" style="margin-bottom:16px;">
|
||||
<template #header><strong>卡片样式</strong></template>
|
||||
<n-form :model="form" label-placement="left" label-width="160" class="aksrt-form">
|
||||
<n-form-item label="卡片风格">
|
||||
<n-radio-group v-model:value="form.homepage_card_style">
|
||||
<n-space size="large">
|
||||
<n-radio-button value="default">默认</n-radio-button>
|
||||
<n-radio-button value="style2">风格 2</n-radio-button>
|
||||
<n-radio-button value="style3">风格 3</n-radio-button>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
<n-form-item label="多图卡片">
|
||||
<n-switch v-model:value="form.homepage_multi_thumb_enabled" />
|
||||
</n-form-item>
|
||||
<n-form-item v-if="form.homepage_multi_thumb_enabled" label="最少图片数">
|
||||
<n-input-number v-model:value="form.homepage_multi_thumb_min_images" :min="2" :max="4" />
|
||||
</n-form-item>
|
||||
<n-form-item label="默认视图">
|
||||
<n-radio-group v-model:value="form.homepage_default_view">
|
||||
<n-space size="large">
|
||||
<n-radio-button value="list">列表</n-radio-button>
|
||||
<n-radio-button value="card">卡片</n-radio-button>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
<template #header><strong>列表显示</strong></template>
|
||||
<n-alert type="info" :show-icon="false">
|
||||
首页文章列表/卡片模式、样式变体与缩略图比例已统一到「文章&列表 → 文章列表」设置(对齐 Zibll 全局 list_type / list_card_home)。此处不再单独维护 homepage_card_style / 默认视图。
|
||||
</n-alert>
|
||||
</n-card>
|
||||
|
||||
<n-card class="aksrt-section-card" style="margin-bottom:16px;">
|
||||
|
||||
@@ -1010,7 +1010,7 @@ export const pageDisplaySchemas = {
|
||||
fields: [
|
||||
{
|
||||
key: 'homepage_card_style',
|
||||
label: '卡片风格',
|
||||
label: '卡片风格(已弃用)',
|
||||
type: 'radio',
|
||||
default: 'default',
|
||||
options: [
|
||||
@@ -1018,18 +1018,23 @@ export const pageDisplaySchemas = {
|
||||
{ label: '风格 2', value: 'style2' },
|
||||
{ label: '风格 3', value: 'style3' },
|
||||
],
|
||||
help: '已弃用:请改用「文章列表」中的列表/卡片样式设置。',
|
||||
},
|
||||
{ key: 'homepage_multi_thumb_enabled', label: '多图卡片', type: 'switch', default: true },
|
||||
{ key: 'homepage_multi_thumb_min_images', label: '最少图片数', type: 'number', default: 3, min: 2, max: 4, dependsOn: { key: 'homepage_multi_thumb_enabled', value: true } },
|
||||
{ key: 'homepage_multi_thumb_enabled', label: '多图卡片(已弃用)', type: 'switch', default: true, help: '请改用文章列表缩略图/多图设置。' },
|
||||
{ key: 'homepage_multi_thumb_min_images', label: '最少图片数(已弃用)', type: 'number', default: 3, min: 2, max: 4 },
|
||||
{
|
||||
key: 'homepage_default_view',
|
||||
label: '默认视图',
|
||||
label: '默认视图(已弃用)',
|
||||
type: 'radio',
|
||||
default: 'list',
|
||||
options: [
|
||||
{ label: '列表', value: 'list' },
|
||||
{ label: '卡片', value: 'card' },
|
||||
],
|
||||
help: 'SSR 以文章列表全局设置为准;此字段仅作兼容保留。',
|
||||
},
|
||||
{ label: '卡片', value: 'card' },
|
||||
],
|
||||
},
|
||||
{ key: 'homepage_sidebar_mini_enabled', label: '迷你侧栏列表', type: 'switch', default: true },
|
||||
{ key: 'homepage_sort_ajax_enabled', label: '排序栏 AJAX', type: 'switch', default: true },
|
||||
|
||||
@@ -166,18 +166,19 @@ export const listSchema = {
|
||||
fields: [
|
||||
{
|
||||
key: 'post_card_style',
|
||||
label: '列表卡片样式',
|
||||
label: '默认列表模式',
|
||||
type: 'select',
|
||||
default: 'thumb',
|
||||
options: [
|
||||
{ label: '标准图文', value: 'thumb' },
|
||||
{ label: '紧凑卡', value: 'compact' },
|
||||
{ label: '大图卡', value: 'large_thumb' },
|
||||
{ label: '多图卡', value: 'multi_thumb' },
|
||||
{ label: '纯文字', value: 'text' },
|
||||
{ label: '有图则图文', value: 'thumb_if_has' },
|
||||
{ label: '列表图文模式', value: 'thumb' },
|
||||
{ label: '列表文字模式', value: 'text' },
|
||||
{ label: '列表自动图文', value: 'thumb_if_has' },
|
||||
{ label: '卡片模式', value: 'card' },
|
||||
{ label: '紧凑列表', value: 'compact' },
|
||||
{ label: '大图列表', value: 'large_thumb' },
|
||||
{ label: '多图列表', value: 'multi_thumb' },
|
||||
],
|
||||
help: '对齐 Zibll list_type:thumb/text/thumb_if_has 为列表,card 为卡片网格。首页可用下方「首页卡片模式」单独强制卡片。',
|
||||
},
|
||||
{ key: 'post_excerpt_length', label: '摘要长度', type: 'number', default: 120, min: 20, max: 500 },
|
||||
{ key: 'post_list_per_page', label: '每页文章数', type: 'number', default: 12, min: 4, max: 48 },
|
||||
@@ -223,7 +224,7 @@ export const listSchema = {
|
||||
],
|
||||
},
|
||||
{ key: 'list_card_scale', label: '卡片缩略图比例 (%)', type: 'number', default: 70, min: 20, max: 200 },
|
||||
{ key: 'list_card_home', label: '首页卡片模式', type: 'switch', default: false },
|
||||
{ key: 'list_card_home', label: '首页卡片模式', type: 'switch', default: false, help: '当默认模式不为卡片时,单独将首页列表强制为卡片(Zibll list_card_home)', dependsOn: { key: 'post_card_style', operator: '!=', value: 'card' } },
|
||||
{
|
||||
key: 'list_card_cat',
|
||||
label: '分类卡片模式',
|
||||
|
||||
Reference in new issue
Block a user