重命名pagetype默认模板文件
This commit is contained in:
parent
2453af3686
commit
aa06768238
@ -2,7 +2,7 @@ import { defineComponent, onMounted, shallowRef, markRaw, computed, watch, h } f
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { usePageTypeSlug } from '@/shared/utils/slug'
|
||||
import { resolvePagetypeDetailOverride } from '@/core/registry/pagetypeOverride'
|
||||
import GenericDetailPage from '@/core/pagetype/GenericDetailPage.vue'
|
||||
import DefaultDetail from '@/core/pagetype/default.vue'
|
||||
|
||||
/**
|
||||
* 详情页路由分发器:决定使用覆盖组件还是默认组件
|
||||
@ -43,7 +43,7 @@ export default defineComponent({
|
||||
if (overrideComponent.value) {
|
||||
return h(overrideComponent.value, { context: context.value })
|
||||
}
|
||||
return h(GenericDetailPage)
|
||||
return h(DefaultDetail)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -2,7 +2,7 @@ import { defineComponent, onMounted, shallowRef, markRaw, computed, watch, h } f
|
||||
import { useRoute } from 'vue-router'
|
||||
import { usePageTypeSlug } from '@/shared/utils/slug'
|
||||
import { resolvePagetypeListOverride } from '@/core/registry/pagetypeOverride'
|
||||
import GenericListPage from '@/core/pagetype/GenericListPage.vue'
|
||||
import DefaultList from '@/core/pagetype/default_list.vue'
|
||||
|
||||
/**
|
||||
* 列表页路由分发器:决定使用覆盖组件还是默认组件
|
||||
@ -40,7 +40,7 @@ export default defineComponent({
|
||||
if (overrideComponent.value) {
|
||||
return h(overrideComponent.value, { context: context.value })
|
||||
}
|
||||
return h(GenericListPage)
|
||||
return h(DefaultList)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 如果是单页模式,直接显示单页详情组件 -->
|
||||
<SinglePageDetail v-if="isSinglePage" />
|
||||
<DefaultSingle v-if="isSinglePage" />
|
||||
<div v-else class="page">
|
||||
<!-- 头部,与 AI 智能体列表一致的结构 -->
|
||||
<div class="page-header">
|
||||
@ -37,7 +37,7 @@
|
||||
@create="createRecordHandler"
|
||||
@delete-selected="handleDeleteSelected"
|
||||
/>
|
||||
<GenericListPageToolBar
|
||||
<DefaultListToolbar
|
||||
v-else
|
||||
:entity="entity"
|
||||
:search-query="searchQuery"
|
||||
@ -68,7 +68,7 @@
|
||||
@filter-change="onFilterChange"
|
||||
/>
|
||||
<!-- 默认过滤栏 -->
|
||||
<GenericListPageFilterBar
|
||||
<DefaultListFilterBar
|
||||
v-else-if="!isSinglePage && metaFields.length > 0"
|
||||
:fields="metaFields"
|
||||
v-model:filters="filters"
|
||||
@ -165,7 +165,7 @@
|
||||
@delete="deleteRecord(row.name)"
|
||||
/>
|
||||
<!-- 默认操作按钮 -->
|
||||
<GenericListPageActions
|
||||
<DefaultListActions
|
||||
v-else
|
||||
:row="row"
|
||||
:entity="entity"
|
||||
@ -265,7 +265,7 @@
|
||||
@delete="deleteRecord(row.name)"
|
||||
/>
|
||||
<!-- 默认操作按钮 -->
|
||||
<GenericListPageActions
|
||||
<DefaultListActions
|
||||
v-else
|
||||
:row="row"
|
||||
:entity="entity"
|
||||
@ -296,10 +296,10 @@ import { t } from '@/shared/i18n'
|
||||
import { get_session_api_headers } from '@/shared/api/auth'
|
||||
import { usePageTypeSlug } from '@/shared/utils/slug'
|
||||
import { isSinglePageType } from '@/shared/utils/pagetype'
|
||||
import SinglePageDetail from './SinglePageDetail.vue'
|
||||
import GenericListPageToolBar from './GenericListPageToolBar.vue'
|
||||
import GenericListPageFilterBar from './GenericListPageFilterBar.vue'
|
||||
import GenericListPageActions from './GenericListPageActions.vue'
|
||||
import DefaultSingle from './default_single.vue'
|
||||
import DefaultListToolbar from './default_list_toolbar.vue'
|
||||
import DefaultListFilterBar from './default_list_filterbar.vue'
|
||||
import DefaultListActions from './default_list_actions.vue'
|
||||
import {
|
||||
resolvePagetypeListToolbarOverride,
|
||||
resolvePagetypeListFilterBarOverride,
|
||||
@ -1460,7 +1460,7 @@ function formatDisplayValue(value: any, fieldName: string) {
|
||||
/* 工具栏容器样式(保留用于布局) */
|
||||
.header-right { display: flex; align-items: center; gap: 12px; }
|
||||
|
||||
/* 注意:操作列的样式现在由 GenericListPageActions 组件和自定义操作组件自己管理 */
|
||||
/* 注意:操作列的样式现在由 DefaultListActions 组件和自定义操作组件自己管理 */
|
||||
/* 父组件不再定义 card-actions 和 col-actions 样式,符合组件自包含的最佳实践 */
|
||||
|
||||
/* 列表样式 - 与 AgentList 完全一致 */
|
||||
@ -1555,7 +1555,7 @@ function formatDisplayValue(value: any, fieldName: string) {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 操作列容器样式(用于网格布局,按钮样式由 GenericListPageActions 组件处理) */
|
||||
/* 操作列容器样式(用于网格布局,按钮样式由 DefaultListActions 组件处理) */
|
||||
.col-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
Loading…
x
Reference in New Issue
Block a user