style(admin): 内容页改为数据管理
- Tab 名称:内容 -> 数据管理 - 说明文案:数据只属于一个分组;前面加「说明:」 - 新建条目 -> 新建数据,与分组下拉按 8px 间距紧挨 - 操作列:编辑、删除配上图标
This commit is contained in:
@@ -975,6 +975,17 @@
|
|||||||
gap: var(--su-space-2);
|
gap: var(--su-space-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 数据管理:分组下拉与「新建数据」紧挨着 */
|
||||||
|
.entry-toolbar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--su-space-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-toolbar-select {
|
||||||
|
width: 260px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 折叠箭头:与前台侧栏 Menu 的 caret 同一套画法(CSS 画的 6px 角标) */
|
/* 折叠箭头:与前台侧栏 Menu 的 caret 同一套画法(CSS 画的 6px 角标) */
|
||||||
.group-caret {
|
.group-caret {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ export function AdminNext() {
|
|||||||
className="admin-tabs"
|
className="admin-tabs"
|
||||||
items={[
|
items={[
|
||||||
{ key: 'groups', label: '分组管理' },
|
{ key: 'groups', label: '分组管理' },
|
||||||
{ key: 'content', label: '内容' },
|
{ key: 'content', label: '数据管理' },
|
||||||
{ key: 'home', label: '首页' },
|
{ key: 'home', label: '首页' },
|
||||||
{ key: 'header', label: '页头' },
|
{ key: 'header', label: '页头' },
|
||||||
{ key: 'profile', label: '资料' },
|
{ key: 'profile', label: '资料' },
|
||||||
@@ -973,11 +973,11 @@ function ContentPanel({ groups, onReload }: { groups: GroupNode[]; onReload: ()
|
|||||||
return (
|
return (
|
||||||
<Space direction="column" gap="md" align="stretch" className="admin-form">
|
<Space direction="column" gap="md" align="stretch" className="admin-form">
|
||||||
<Text size="sm" tone="muted">
|
<Text size="sm" tone="muted">
|
||||||
条目只属于一个分组;选中主分组时会连同其所有子分组的条目一起列出。
|
说明:数据只属于一个分组;选中主分组时会连同其所有子分组的数据一起列出。
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Space gap="sm" wrap>
|
<div className="entry-toolbar">
|
||||||
<div style={{ width: 260 }}>
|
<div className="entry-toolbar-select">
|
||||||
<Select
|
<Select
|
||||||
options={options.map((option) => ({
|
options={options.map((option) => ({
|
||||||
value: option.key,
|
value: option.key,
|
||||||
@@ -988,13 +988,14 @@ function ContentPanel({ groups, onReload }: { groups: GroupNode[]; onReload: ()
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
|
variant="secondary"
|
||||||
icon={<Icon name="add_line" />}
|
icon={<Icon name="add_line" />}
|
||||||
disabled={group === undefined}
|
disabled={group === undefined}
|
||||||
onClick={() => setDialog({ key: null, groupKey })}
|
onClick={() => setDialog({ key: null, groupKey })}
|
||||||
>
|
>
|
||||||
新增条目
|
新建数据
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</div>
|
||||||
|
|
||||||
<Text size="sm" tone="muted">
|
<Text size="sm" tone="muted">
|
||||||
{group?.title ?? ''} 下共 {rows.length} 条(含子分组)
|
{group?.title ?? ''} 下共 {rows.length} 条(含子分组)
|
||||||
@@ -1035,6 +1036,7 @@ function ContentPanel({ groups, onReload }: { groups: GroupNode[]; onReload: ()
|
|||||||
className="group-action"
|
className="group-action"
|
||||||
onClick={() => setDialog({ key: entry.id, groupKey: owner.key })}
|
onClick={() => setDialog({ key: entry.id, groupKey: owner.key })}
|
||||||
>
|
>
|
||||||
|
<Icon name="edit_4_line" />
|
||||||
编辑
|
编辑
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@@ -1050,6 +1052,7 @@ function ContentPanel({ groups, onReload }: { groups: GroupNode[]; onReload: ()
|
|||||||
onReload()
|
onReload()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<Icon name="delete_2_line" />
|
||||||
删除
|
删除
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user