浏览代码

🎨 修改细节问题

快乐的梦鱼 1 月之前
父节点
当前提交
f961df2a9a

+ 11 - 6
src/pages/article/common/CommonListPage.ts

@@ -1,9 +1,14 @@
-export type CommonListPageItemType = 'image-large-2'|'image-large'|'article-common'|'article-character'|'simple-text';
+export type CommonListPageItemType = 'image-large-2'|'image-large'|'article-common'
+  |'article-common-2'|'article-character'|'article-character-2'
+  |'simple-text'|'simple-text-2';
 
 export const CommonListPageItemTypeOptions = [
-  { value: 'image-large-2', label: '大图2' },
-  { value: 'image-large', label: '大图' },
-  { value: 'article-common', label: '普通文章' },
-  { value: 'article-character', label: '人物文章' },
-  { value: 'simple-text', label: '简单文本' },
+  { value: 'image-large-2', label: '大图2列 (image-large-2)' },
+  { value: 'image-large', label: '大图 (image-large)' },
+  { value: 'article-common', label: '普通文章 (article-common)' },
+  { value: 'article-common-2', label: '普通文章2列 (article-common-2)' },
+  { value: 'article-character', label: '人物文章 (article-character)' },
+  { value: 'article-character-2', label: '人物文章2列 (article-character-2)' },
+  { value: 'simple-text', label: '简单文本 (simple-text)' },
+  { value: 'simple-text-2', label: '简单文本2列 (simple-text-2)' },
 ];

+ 17 - 14
src/pages/article/data/CommonCategoryBlocks.ts

@@ -11,18 +11,21 @@ export interface CategoryDefine extends Omit<IHomeCommonCategoryListTabNestCateg
     |undefined;
 }
 
-export const CommonCategoryBlockType : CategoryDefine['type'][] = [
-  'default',
-  'article',
-  'simple-article',
-  'simple-text',
-  'large-image',
-  'large-image2',
-  'large-grid2',
-  'small-grid2',
-  'horizontal-large',
-  'CalendarBlock',
-  'StatsBlock',
-  'MapBlock',
-  'AudioBlock',
+export const CommonCategoryBlockType : {
+  type: CategoryDefine['type'],
+  label: string,
+}[] = [
+  { type: 'default', label: '默认' },
+  { type: 'article', label: '文章' },
+  { type: 'simple-article', label: '简单文章' },
+  { type: 'simple-text', label: '简单文本' },
+  { type: 'large-image', label: '大图' },
+  { type: 'large-image2', label: '大图2列' },
+  { type: 'large-grid2', label: '大图2列' },
+  { type: 'small-grid2', label: '小图2列' },
+  { type: 'horizontal-large', label: '横排大图' },
+  { type: 'CalendarBlock', label: '预制块:日历块' },
+  { type: 'StatsBlock', label: '预制块:统计块' },
+  { type: 'MapBlock', label: '预制块:地图块' },
+  { type: 'AudioBlock', label: '预制块:音频块' },
 ];

+ 8 - 5
src/pages/article/data/editor/subpart/NestCategoryEditorItem.vue

@@ -38,11 +38,11 @@
         v-model:value="cat.type"
         style="width: 100%"
         allowClear
-        placeholder="请选择类型"
+        placeholder="请选择列表条目类型"
         @change="onTypeChange(cat, $event)"
       >
-        <a-select-option v-for="type in blockTypes" :key="type" :value="type">
-          {{ type }}
+        <a-select-option v-for="type in blockTypes" :key="type.type" :value="type.type">
+          {{ type.label }} ({{ type.type }})
         </a-select-option>
       </a-select>
     </a-form-item>
@@ -119,12 +119,15 @@ const emit = defineEmits<{
   (e: 'copy'): void;
 }>();
 
-const blockTypes = (CommonCategoryBlockType as string[]).concat(
+const blockTypes = (CommonCategoryBlockType as { type: string, label: string }[]).concat(
   [
     'speicalMergeItem:getColumns',
     'speicalMergeItem:getColumn',
   ].map((type) => (
-    CommonCategoryBlockType.map(p => `${type}:${p}`)
+    CommonCategoryBlockType.filter(p => !p.type?.endsWith('Block')).map(p => ({
+      type: `${type}:${p.type}`,
+      label: `自动合并栏目:${p.label}`,
+    }))
   ))
   .flat()
 );