ai-front-base 0.1.11 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AiAside/index.mjs +4 -0
- package/dist/components/AiAside/index.vue.mjs +20 -0
- package/dist/components/AiAside/types.ts +6 -0
- package/dist/components/AiBadge/index.mjs +4 -0
- package/dist/components/AiBadge/index.vue.mjs +20 -0
- package/dist/components/AiBadge/types.ts +10 -0
- package/dist/components/AiBreadcrumb/index.mjs +4 -0
- package/dist/components/AiBreadcrumb/index.vue.mjs +20 -0
- package/dist/components/AiBreadcrumb/types.ts +7 -0
- package/dist/components/AiCheckbox/index.mjs +4 -0
- package/dist/components/AiCheckbox/index.vue.mjs +20 -0
- package/dist/components/AiCheckbox/types.ts +14 -0
- package/dist/components/AiContainer/index.mjs +4 -0
- package/dist/components/AiContainer/index.vue.mjs +20 -0
- package/dist/components/AiContainer/types.ts +6 -0
- package/dist/components/AiDatePicker/index.mjs +4 -0
- package/dist/components/AiDatePicker/index.vue.mjs +15 -0
- package/dist/components/AiDatePicker/types.ts +17 -0
- package/dist/components/AiDialog/index.mjs +4 -0
- package/dist/components/AiDialog/index.vue.mjs +20 -0
- package/dist/components/AiDialog/types.ts +11 -0
- package/dist/components/AiFooter/index.mjs +4 -0
- package/dist/components/AiFooter/index.vue.mjs +20 -0
- package/dist/components/AiFooter/types.ts +6 -0
- package/dist/components/AiHeader/index.mjs +4 -0
- package/dist/components/AiHeader/index.vue.mjs +20 -0
- package/dist/components/AiHeader/types.ts +6 -0
- package/dist/components/AiLoading/index.mjs +5 -0
- package/dist/components/AiLoading/types.ts +7 -0
- package/dist/components/AiMain/index.mjs +4 -0
- package/dist/components/AiMain/index.vue.mjs +20 -0
- package/dist/components/AiMain/types.ts +4 -0
- package/dist/components/AiMenu/index.mjs +4 -0
- package/dist/components/AiMenu/index.vue.mjs +20 -0
- package/dist/components/AiMenu/types.ts +9 -0
- package/dist/components/AiMessage/index.mjs +5 -0
- package/dist/components/AiMessage/types.ts +9 -0
- package/dist/components/AiNotification/index.mjs +5 -0
- package/dist/components/AiNotification/types.ts +10 -0
- package/dist/components/AiPagination/index.mjs +4 -0
- package/dist/components/AiPagination/index.vue.mjs +15 -0
- package/dist/components/AiPagination/types.ts +9 -0
- package/dist/components/AiProgress/index.mjs +4 -0
- package/dist/components/AiProgress/index.vue.mjs +15 -0
- package/dist/components/AiProgress/types.ts +10 -0
- package/dist/components/AiRadio/index.mjs +4 -0
- package/dist/components/AiRadio/index.vue.mjs +20 -0
- package/dist/components/AiRadio/types.ts +8 -0
- package/dist/components/AiSwitch/index.mjs +4 -0
- package/dist/components/AiSwitch/index.vue.mjs +15 -0
- package/dist/components/AiSwitch/types.ts +9 -0
- package/dist/components/AiTabs/index.mjs +4 -0
- package/dist/components/AiTabs/index.vue.mjs +20 -0
- package/dist/components/AiTabs/types.ts +9 -0
- package/dist/components/AiTag/index.mjs +4 -0
- package/dist/components/AiTag/index.vue.mjs +20 -0
- package/dist/components/AiTag/types.ts +9 -0
- package/dist/components/AiTimePicker/index.mjs +4 -0
- package/dist/components/AiTimePicker/index.vue.mjs +15 -0
- package/dist/components/AiTimePicker/types.ts +16 -0
- package/dist/components/AiUpload/index.mjs +4 -0
- package/dist/components/AiUpload/index.vue.mjs +20 -0
- package/dist/components/AiUpload/types.ts +11 -0
- package/dist/components/README.md +36 -28
- package/dist/index.mjs +52 -8
- package/dist/layouts/government.md +203 -58
- package/dist/layouts/union.md +208 -57
- package/dist/standards/README.md +45 -0
- package/dist/styles/README.md +155 -17
- package/dist/styles/blue.scss +68 -4
- package/dist/styles/dark.scss +69 -5
- package/dist/styles/element-plus-theme.css +52 -0
- package/dist/styles/index.css +70 -0
- package/dist/styles/light-blue.scss +68 -4
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as o, resolveComponent as r, openBlock as n, createBlock as a, normalizeProps as s, guardReactiveProps as l, withCtx as p, renderSlot as i } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ o({
|
|
3
|
+
name: "AiTag",
|
|
4
|
+
inheritAttrs: !0,
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(_) {
|
|
7
|
+
return (e, c) => {
|
|
8
|
+
const t = r("el-tag");
|
|
9
|
+
return n(), a(t, s(l(e.$attrs)), {
|
|
10
|
+
default: p(() => [
|
|
11
|
+
i(e.$slots, "default")
|
|
12
|
+
]),
|
|
13
|
+
_: 3
|
|
14
|
+
}, 16);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
u as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as t, resolveComponent as n, openBlock as o, createBlock as i, normalizeProps as c, guardReactiveProps as p } from "vue";
|
|
2
|
+
const _ = /* @__PURE__ */ t({
|
|
3
|
+
name: "AiTimePicker",
|
|
4
|
+
inheritAttrs: !0,
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(m) {
|
|
7
|
+
return (e, a) => {
|
|
8
|
+
const r = n("el-time-picker");
|
|
9
|
+
return o(), i(r, c(p(e.$attrs)), null, 16);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
_ as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AiTimePicker - 时间选择器
|
|
3
|
+
* 基于 Element Plus TimePicker 封装
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <AiTimePicker v-model="time" placeholder="选择时间" />
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface AiTimePickerProps {
|
|
10
|
+
modelValue?: Date | string
|
|
11
|
+
placeholder?: string
|
|
12
|
+
disabled?: boolean
|
|
13
|
+
clearable?: boolean
|
|
14
|
+
format?: string
|
|
15
|
+
valueFormat?: string
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as t, resolveComponent as r, openBlock as n, createBlock as a, normalizeProps as l, guardReactiveProps as p, withCtx as s, renderSlot as d } from "vue";
|
|
2
|
+
const c = /* @__PURE__ */ t({
|
|
3
|
+
name: "AiUpload",
|
|
4
|
+
inheritAttrs: !0,
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(i) {
|
|
7
|
+
return (e, u) => {
|
|
8
|
+
const o = r("el-upload");
|
|
9
|
+
return n(), a(o, l(p(e.$attrs)), {
|
|
10
|
+
default: s(() => [
|
|
11
|
+
d(e.$slots, "default")
|
|
12
|
+
]),
|
|
13
|
+
_: 3
|
|
14
|
+
}, 16);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
c as default
|
|
20
|
+
};
|
|
@@ -26,33 +26,41 @@ import { AiForm } from 'ai-front-base'
|
|
|
26
26
|
|
|
27
27
|
## 组件列表
|
|
28
28
|
|
|
29
|
-
###
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
29
|
+
### 表单类组件
|
|
30
|
+
- **[AiInput](AiInput/types.ts)** - 输入框
|
|
31
|
+
- **[AiSelect](AiSelect/types.ts)** - 选择器
|
|
32
|
+
- **[AiDatePicker](AiDatePicker/types.ts)** - 日期选择器
|
|
33
|
+
- **[AiTimePicker](AiTimePicker/types.ts)** - 时间选择器
|
|
34
|
+
- **[AiCheckbox](AiCheckbox/types.ts)** - 复选框
|
|
35
|
+
- **[AiRadio](AiRadio/types.ts)** - 单选框
|
|
36
|
+
- **[AiSwitch](AiSwitch/types.ts)** - 开关
|
|
37
|
+
- **[AiUpload](AiUpload/types.ts)** - 上传
|
|
38
|
+
- **[AiForm](AiForm/types.ts)** - 表单
|
|
39
|
+
|
|
40
|
+
### 数据展示组件
|
|
41
|
+
- **[AiTable](AiTable/types.ts)** - 表格
|
|
42
|
+
- **[AiPagination](AiPagination/types.ts)** - 分页
|
|
43
|
+
- **[AiTag](AiTag/types.ts)** - 标签
|
|
44
|
+
- **[AiBadge](AiBadge/types.ts)** - 徽章
|
|
45
|
+
- **[AiProgress](AiProgress/types.ts)** - 进度条
|
|
46
|
+
|
|
47
|
+
### 导航组件
|
|
48
|
+
- **[AiMenu](AiMenu/types.ts)** - 菜单
|
|
49
|
+
- **[AiBreadcrumb](AiBreadcrumb/types.ts)** - 面包屑
|
|
50
|
+
- **[AiTabs](AiTabs/types.ts)** - 标签页
|
|
51
|
+
|
|
52
|
+
### 反馈组件
|
|
53
|
+
- **[AiDialog](AiDialog/types.ts)** - 对话框
|
|
54
|
+
- **[AiMessage](AiMessage/types.ts)** - 消息提示(函数式)
|
|
55
|
+
- **[AiNotification](AiNotification/types.ts)** - 通知(函数式)
|
|
56
|
+
- **[AiLoading](AiLoading/types.ts)** - 加载(指令式/函数式)
|
|
57
|
+
|
|
58
|
+
### 布局组件
|
|
59
|
+
- **[AiContainer](AiContainer/types.ts)** - 容器
|
|
60
|
+
- **[AiHeader](AiHeader/types.ts)** - 头部
|
|
61
|
+
- **[AiAside](AiAside/types.ts)** - 侧边栏
|
|
62
|
+
- **[AiMain](AiMain/types.ts)** - 主体
|
|
63
|
+
- **[AiFooter](AiFooter/types.ts)** - 底部
|
|
56
64
|
|
|
57
65
|
## 使用规范(强制)
|
|
58
66
|
|
|
@@ -61,7 +69,7 @@ import { AiForm } from 'ai-front-base'
|
|
|
61
69
|
导入方式:
|
|
62
70
|
```vue
|
|
63
71
|
<script setup>
|
|
64
|
-
import { AiInput, AiSelect, AiTable, AiForm } from '
|
|
72
|
+
import { AiInput, AiSelect, AiTable, AiForm } from 'ai-front-base'
|
|
65
73
|
</script>
|
|
66
74
|
```
|
|
67
75
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,54 @@
|
|
|
1
|
-
import { default as a } from "./components/
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
1
|
+
import { default as a } from "./components/AiInput/index.vue.mjs";
|
|
2
|
+
import { default as t } from "./components/AiSelect/index.vue.mjs";
|
|
3
|
+
import { default as i } from "./components/AiDatePicker/index.vue.mjs";
|
|
4
|
+
import { default as m } from "./components/AiTimePicker/index.vue.mjs";
|
|
5
|
+
import { default as p } from "./components/AiCheckbox/index.vue.mjs";
|
|
6
|
+
import { default as x } from "./components/AiRadio/index.vue.mjs";
|
|
7
|
+
import { default as u } from "./components/AiSwitch/index.vue.mjs";
|
|
8
|
+
import { default as c } from "./components/AiUpload/index.vue.mjs";
|
|
9
|
+
import { default as b } from "./components/AiForm/index.vue.mjs";
|
|
10
|
+
import { default as T } from "./components/AiTable/index.vue.mjs";
|
|
11
|
+
import { default as M } from "./components/AiPagination/index.vue.mjs";
|
|
12
|
+
import { default as B } from "./components/AiTag/index.vue.mjs";
|
|
13
|
+
import { default as D } from "./components/AiBadge/index.vue.mjs";
|
|
14
|
+
import { default as S } from "./components/AiProgress/index.vue.mjs";
|
|
15
|
+
import { default as H } from "./components/AiMenu/index.vue.mjs";
|
|
16
|
+
import { default as L } from "./components/AiBreadcrumb/index.vue.mjs";
|
|
17
|
+
import { default as R } from "./components/AiTabs/index.vue.mjs";
|
|
18
|
+
import { default as j } from "./components/AiDialog/index.vue.mjs";
|
|
19
|
+
import { AiMessage as v } from "./components/AiMessage/index.mjs";
|
|
20
|
+
import { AiNotification as z } from "./components/AiNotification/index.mjs";
|
|
21
|
+
import { AiLoading as G } from "./components/AiLoading/index.mjs";
|
|
22
|
+
import { default as K } from "./components/AiContainer/index.vue.mjs";
|
|
23
|
+
import { default as Q } from "./components/AiHeader/index.vue.mjs";
|
|
24
|
+
import { default as W } from "./components/AiAside/index.vue.mjs";
|
|
25
|
+
import { default as Y } from "./components/AiMain/index.vue.mjs";
|
|
26
|
+
import { default as _ } from "./components/AiFooter/index.vue.mjs";
|
|
5
27
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
28
|
+
W as AiAside,
|
|
29
|
+
D as AiBadge,
|
|
30
|
+
L as AiBreadcrumb,
|
|
31
|
+
p as AiCheckbox,
|
|
32
|
+
K as AiContainer,
|
|
33
|
+
i as AiDatePicker,
|
|
34
|
+
j as AiDialog,
|
|
35
|
+
_ as AiFooter,
|
|
36
|
+
b as AiForm,
|
|
37
|
+
Q as AiHeader,
|
|
38
|
+
a as AiInput,
|
|
39
|
+
G as AiLoading,
|
|
40
|
+
Y as AiMain,
|
|
41
|
+
H as AiMenu,
|
|
42
|
+
v as AiMessage,
|
|
43
|
+
z as AiNotification,
|
|
44
|
+
M as AiPagination,
|
|
45
|
+
S as AiProgress,
|
|
46
|
+
x as AiRadio,
|
|
47
|
+
t as AiSelect,
|
|
48
|
+
u as AiSwitch,
|
|
49
|
+
T as AiTable,
|
|
50
|
+
R as AiTabs,
|
|
51
|
+
B as AiTag,
|
|
52
|
+
m as AiTimePicker,
|
|
53
|
+
c as AiUpload
|
|
10
54
|
};
|
|
@@ -12,67 +12,212 @@
|
|
|
12
12
|
|
|
13
13
|
**推荐主题**:
|
|
14
14
|
- `blue` - 蓝色专业主题
|
|
15
|
-
- `
|
|
16
|
-
|
|
15
|
+
- `dark` - 深色科技主题
|
|
16
|
+
|
|
17
|
+
## 整体布局结构
|
|
18
|
+
|
|
19
|
+
### 标准后台布局
|
|
20
|
+
```
|
|
21
|
+
┌─────────────────────────────────────┐
|
|
22
|
+
│ Header (60px) │
|
|
23
|
+
├──────┬──────────────────────────────┤
|
|
24
|
+
│ │ │
|
|
25
|
+
│ Aside│ Main │
|
|
26
|
+
│(200px│ Content │
|
|
27
|
+
│ │ │
|
|
28
|
+
├──────┴──────────────────────────────┤
|
|
29
|
+
│ Footer (60px) │
|
|
30
|
+
└─────────────────────────────────────┘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**布局规范**:
|
|
34
|
+
- Header高度:60px,固定定位
|
|
35
|
+
- Aside宽度:200px(收起时64px)
|
|
36
|
+
- Main内边距:24px
|
|
37
|
+
- Footer高度:60px
|
|
38
|
+
|
|
39
|
+
### 页面内容区布局
|
|
40
|
+
```
|
|
41
|
+
┌─────────────────────────────────────┐
|
|
42
|
+
│ 面包屑导航 (margin-bottom: 16px) │
|
|
43
|
+
├─────────────────────────────────────┤
|
|
44
|
+
│ 页面标题 + 操作按钮 │
|
|
45
|
+
│ (margin-bottom: 24px) │
|
|
46
|
+
├─────────────────────────────────────┤
|
|
47
|
+
│ │
|
|
48
|
+
│ 主内容区 │
|
|
49
|
+
│ (padding: 24px) │
|
|
50
|
+
│ │
|
|
51
|
+
└─────────────────────────────────────┘
|
|
52
|
+
```
|
|
17
53
|
|
|
18
54
|
## 页面类型布局指导
|
|
19
55
|
|
|
20
|
-
### 1.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
56
|
+
### 1. 列表页
|
|
57
|
+
|
|
58
|
+
**结构**:
|
|
59
|
+
- 搜索区:padding 24px,背景色 bg-light
|
|
60
|
+
- 表格区:margin-top 16px
|
|
61
|
+
- 分页器:margin-top 16px,居右对齐
|
|
62
|
+
|
|
63
|
+
**间距规范**:
|
|
64
|
+
- 搜索表单项间距:16px
|
|
65
|
+
- 表格行高:48px
|
|
66
|
+
- 操作按钮间距:8px
|
|
67
|
+
|
|
68
|
+
**组件使用**:
|
|
69
|
+
```vue
|
|
70
|
+
<AiContainer>
|
|
71
|
+
<AiMain>
|
|
72
|
+
<!-- 搜索区 -->
|
|
73
|
+
<div style="padding: var(--ai-padding-lg); background: var(--ai-bg-light)">
|
|
74
|
+
<AiForm :inline="true">
|
|
75
|
+
<AiInput placeholder="搜索" />
|
|
76
|
+
<AiSelect placeholder="状态" />
|
|
77
|
+
</AiForm>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<!-- 表格区 -->
|
|
81
|
+
<AiTable :data="list" style="margin-top: var(--ai-margin-md)" />
|
|
82
|
+
|
|
83
|
+
<!-- 分页 -->
|
|
84
|
+
<AiPagination style="margin-top: var(--ai-margin-md)" />
|
|
85
|
+
</AiMain>
|
|
86
|
+
</AiContainer>
|
|
87
|
+
```
|
|
31
88
|
|
|
32
89
|
### 2. 详情页
|
|
33
90
|
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
91
|
+
**结构**:
|
|
92
|
+
- 基本信息卡片:margin-bottom 16px
|
|
93
|
+
- 详细信息卡片:margin-bottom 16px
|
|
94
|
+
- 操作历史:margin-bottom 16px
|
|
95
|
+
|
|
96
|
+
**间距规范**:
|
|
97
|
+
- 卡片内边距:24px
|
|
98
|
+
- 信息项间距:16px
|
|
99
|
+
- 标签与值间距:8px
|
|
100
|
+
|
|
101
|
+
**组件使用**:
|
|
102
|
+
```vue
|
|
103
|
+
<AiContainer>
|
|
104
|
+
<AiMain>
|
|
105
|
+
<!-- 基本信息 -->
|
|
106
|
+
<div style="padding: var(--ai-padding-lg); background: var(--ai-bg-base); border-radius: var(--ai-radius-base); margin-bottom: var(--ai-margin-md)">
|
|
107
|
+
<h3>基本信息</h3>
|
|
108
|
+
<div style="margin-top: var(--ai-margin-md)">
|
|
109
|
+
<div style="margin-bottom: var(--ai-margin-md)">
|
|
110
|
+
<span>姓名:</span><span>张三</span>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</AiMain>
|
|
115
|
+
</AiContainer>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 3. 表单页
|
|
119
|
+
|
|
120
|
+
**结构**:
|
|
121
|
+
- 表单容器:padding 24px
|
|
122
|
+
- 表单项:margin-bottom 24px
|
|
123
|
+
- 按钮组:margin-top 32px,居中或居右
|
|
124
|
+
|
|
125
|
+
**间距规范**:
|
|
126
|
+
- 表单项间距:24px
|
|
127
|
+
- 标签宽度:120px
|
|
128
|
+
- 按钮间距:16px
|
|
129
|
+
|
|
130
|
+
**组件使用**:
|
|
131
|
+
```vue
|
|
132
|
+
<AiContainer>
|
|
133
|
+
<AiMain>
|
|
134
|
+
<div style="padding: var(--ai-padding-lg); background: var(--ai-bg-base)">
|
|
135
|
+
<AiForm :label-width="120">
|
|
136
|
+
<AiInput label="姓名" />
|
|
137
|
+
<AiSelect label="部门" />
|
|
138
|
+
<div style="margin-top: var(--ai-margin-xl); text-align: center">
|
|
139
|
+
<el-button type="primary">提交</el-button>
|
|
140
|
+
<el-button>取消</el-button>
|
|
141
|
+
</div>
|
|
142
|
+
</AiForm>
|
|
143
|
+
</div>
|
|
144
|
+
</AiMain>
|
|
145
|
+
</AiContainer>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 4. 看板页
|
|
149
|
+
|
|
150
|
+
**结构**:
|
|
151
|
+
- 统计卡片行:margin-bottom 16px
|
|
152
|
+
- 图表区:2列或3列布局
|
|
153
|
+
- 卡片间距:16px
|
|
154
|
+
|
|
155
|
+
**间距规范**:
|
|
156
|
+
- 卡片内边距:20px
|
|
157
|
+
- 卡片间距:16px
|
|
158
|
+
- 标题与内容间距:16px
|
|
159
|
+
|
|
160
|
+
**组件使用**:
|
|
161
|
+
```vue
|
|
162
|
+
<AiContainer>
|
|
163
|
+
<AiMain>
|
|
164
|
+
<!-- 统计卡片 -->
|
|
165
|
+
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--ai-spacing-md); margin-bottom: var(--ai-margin-md)">
|
|
166
|
+
<div style="padding: var(--ai-padding-lg); background: var(--ai-bg-base)">
|
|
167
|
+
<AiStatistic title="总数" :value="1000" />
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<!-- 图表区 -->
|
|
172
|
+
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--ai-spacing-md)">
|
|
173
|
+
<div style="padding: var(--ai-padding-lg); background: var(--ai-bg-base)">
|
|
174
|
+
图表内容
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</AiMain>
|
|
178
|
+
</AiContainer>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 5. 弹窗
|
|
182
|
+
|
|
183
|
+
**间距规范**:
|
|
184
|
+
- 弹窗内边距:24px
|
|
185
|
+
- 标题与内容间距:20px
|
|
186
|
+
- 按钮组间距:16px
|
|
187
|
+
|
|
188
|
+
**组件使用**:
|
|
189
|
+
```vue
|
|
190
|
+
<AiDialog title="标题" width="600px">
|
|
191
|
+
<div style="padding: var(--ai-padding-lg)">
|
|
192
|
+
内容区
|
|
193
|
+
</div>
|
|
194
|
+
<template #footer>
|
|
195
|
+
<el-button type="primary">确定</el-button>
|
|
196
|
+
<el-button>取消</el-button>
|
|
197
|
+
</template>
|
|
198
|
+
</AiDialog>
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## 间距规范总结
|
|
202
|
+
|
|
203
|
+
| 场景 | 间距值 | CSS变量 |
|
|
204
|
+
|------|--------|---------|
|
|
205
|
+
| 页面内边距 | 24px | --ai-padding-lg |
|
|
206
|
+
| 卡片间距 | 16px | --ai-margin-md |
|
|
207
|
+
| 表单项间距 | 24px | --ai-margin-lg |
|
|
208
|
+
| 按钮间距 | 8px | --ai-margin-sm |
|
|
209
|
+
| 小元素间距 | 4px | --ai-margin-xs |
|
|
210
|
+
|
|
211
|
+
## 响应式规则
|
|
212
|
+
|
|
213
|
+
**断点**:
|
|
214
|
+
- 大屏:>1920px
|
|
215
|
+
- 标准:1440px-1920px
|
|
216
|
+
- 小屏:1280px-1440px
|
|
217
|
+
- 最小:<1280px
|
|
218
|
+
|
|
219
|
+
**适配规则**:
|
|
220
|
+
- 大屏:Main内边距增加到32px
|
|
221
|
+
- 标准:使用默认24px
|
|
222
|
+
- 小屏:Aside收起,Main内边距减少到16px
|
|
223
|
+
- 最小:不支持,提示使用更大屏幕
|