feat: GlassCard双视图、数据看板重构、地址粘贴识别、AI平台与素材库增强
This commit is contained in:
@@ -44,6 +44,26 @@ alwaysApply: true
|
||||
- HTTP 请求统一用 `requestClient`(来自 `#/api/request`),**禁止直接 axios / fetch**
|
||||
- 行操作和工具栏按钮统一用 `<TableAction>` 组件(来自 `#/components/table-action`)
|
||||
- 业务选择器(员工、医生、门店、推广员、地区等)必须复用 `#/components/form/components/*-picker.vue`,不要重写
|
||||
- **卡片统一用液态玻璃组件**:新增/改动的卡片一律用 `GlassCard`(`#/components/glass-card`),禁止再手写一套 `backdrop-filter` 玻璃样式或新起 antd `Card`;历史页面暂不强制回改
|
||||
- 列表页需要「列表/卡片」双视图时:`useViewMode` + `ViewModeSwitch`(`#/components/view-mode-switch`)切换,卡片模式用 `GlassCardList`(分页拉数)+ `#card` 插槽里放 `GlassCard`;搜索表单抽到页面顶部两种视图共用(参考 `business/order/product-order/index.vue`)
|
||||
- **GlassCard 底部操作按钮(强制)**:统一用 `CardActions`(`#/components/table-action`),默认即玻璃胶囊(`variant` 默认 `glass`:半透明底 + blur + 1px 同色系边框微光;主操作 primary、危险 destructive);布局默认 `layout="fill"` 等分沾满 footer,需要居中时显式 `layout="center"`;尺寸用 `size`:`xs` 超级小 / `sm` 小 / `md` 中(默认) / `lg` 大 / `half` 沾满一半 / `full` 沾满整行。放在 `GlassCard` 的 `#footer` 插槽里,**禁止**再在卡片里用 antd `Button` / `TableAction` 的 link 文字链或灰框 default 按钮;禁止包一层 `flex justify-end` 把按钮挤到一角。示例:
|
||||
|
||||
```vue
|
||||
<GlassCard ...>
|
||||
<!-- 内容 -->
|
||||
<template #footer>
|
||||
<CardActions
|
||||
size="md"
|
||||
:max-visible="3"
|
||||
:actions="[
|
||||
{ label: '绑定等级', icon: 'lucide:link-2', onClick: ... },
|
||||
{ label: '编辑', icon: 'lucide:pencil', onClick: ... },
|
||||
{ label: '删除', icon: 'lucide:trash-2', danger: true, popConfirm: ... },
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</GlassCard>
|
||||
```
|
||||
|
||||
## API 层规范
|
||||
|
||||
|
||||
Reference in New Issue
Block a user