ai-front-base 0.2.3 → 0.2.6

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.
Files changed (91) hide show
  1. package/dist/components/AiDatePicker/index.vue.mjs +62 -9
  2. package/dist/components/AiDatePicker/types.ts +9 -12
  3. package/dist/components/AiDateRangePicker/index.mjs +7 -0
  4. package/dist/components/AiDateRangePicker/index.vue.mjs +33 -0
  5. package/dist/components/AiDateRangePicker/types.ts +33 -0
  6. package/dist/components/AiForm/README.md +35 -0
  7. package/dist/components/AiForm/index.mjs +4 -1
  8. package/dist/components/AiForm/index.vue.mjs +145 -36
  9. package/dist/components/AiForm/types.ts +402 -22
  10. package/dist/components/AiInput/index.vue.mjs +46 -11
  11. package/dist/components/AiInput/types.ts +7 -6
  12. package/dist/components/AiSelect/index.vue.mjs +98 -17
  13. package/dist/components/AiSelect/types.ts +10 -17
  14. package/dist/components/AiTable/index.mjs +5 -2
  15. package/dist/components/AiTable/index.vue.mjs +213 -22
  16. package/dist/components/AiTable/types.ts +196 -16
  17. package/dist/components/AiTag/types.ts +6 -7
  18. package/dist/components/README.md +1 -26
  19. package/dist/components/_virtual/_plugin-vue_export-helper.mjs +9 -0
  20. package/dist/components/install.mjs +15 -0
  21. package/dist/index.mjs +14 -50
  22. package/dist/layouts/README.md +17 -14
  23. package/dist/layouts/default.md +238 -0
  24. package/dist/styles/README.md +18 -139
  25. package/dist/styles/index.scss +5 -0
  26. package/dist/styles/light.scss +102 -0
  27. package/package.json +2 -1
  28. package/dist/components/AiAside/index.mjs +0 -4
  29. package/dist/components/AiAside/index.vue.mjs +0 -20
  30. package/dist/components/AiAside/types.ts +0 -6
  31. package/dist/components/AiBadge/index.mjs +0 -4
  32. package/dist/components/AiBadge/index.vue.mjs +0 -20
  33. package/dist/components/AiBadge/types.ts +0 -10
  34. package/dist/components/AiBreadcrumb/index.mjs +0 -4
  35. package/dist/components/AiBreadcrumb/index.vue.mjs +0 -20
  36. package/dist/components/AiBreadcrumb/types.ts +0 -7
  37. package/dist/components/AiCheckbox/index.mjs +0 -4
  38. package/dist/components/AiCheckbox/index.vue.mjs +0 -20
  39. package/dist/components/AiCheckbox/types.ts +0 -14
  40. package/dist/components/AiContainer/index.mjs +0 -4
  41. package/dist/components/AiContainer/index.vue.mjs +0 -20
  42. package/dist/components/AiContainer/types.ts +0 -6
  43. package/dist/components/AiDialog/index.mjs +0 -4
  44. package/dist/components/AiDialog/index.vue.mjs +0 -20
  45. package/dist/components/AiDialog/types.ts +0 -11
  46. package/dist/components/AiFooter/index.mjs +0 -4
  47. package/dist/components/AiFooter/index.vue.mjs +0 -20
  48. package/dist/components/AiFooter/types.ts +0 -6
  49. package/dist/components/AiHeader/index.mjs +0 -4
  50. package/dist/components/AiHeader/index.vue.mjs +0 -20
  51. package/dist/components/AiHeader/types.ts +0 -6
  52. package/dist/components/AiLoading/index.mjs +0 -5
  53. package/dist/components/AiLoading/types.ts +0 -7
  54. package/dist/components/AiMain/index.mjs +0 -4
  55. package/dist/components/AiMain/index.vue.mjs +0 -20
  56. package/dist/components/AiMain/types.ts +0 -4
  57. package/dist/components/AiMenu/index.mjs +0 -4
  58. package/dist/components/AiMenu/index.vue.mjs +0 -20
  59. package/dist/components/AiMenu/types.ts +0 -9
  60. package/dist/components/AiMessage/index.mjs +0 -5
  61. package/dist/components/AiMessage/types.ts +0 -9
  62. package/dist/components/AiNotification/index.mjs +0 -5
  63. package/dist/components/AiNotification/types.ts +0 -10
  64. package/dist/components/AiPagination/index.mjs +0 -4
  65. package/dist/components/AiPagination/index.vue.mjs +0 -15
  66. package/dist/components/AiPagination/types.ts +0 -9
  67. package/dist/components/AiProgress/index.mjs +0 -4
  68. package/dist/components/AiProgress/index.vue.mjs +0 -15
  69. package/dist/components/AiProgress/types.ts +0 -10
  70. package/dist/components/AiRadio/index.mjs +0 -4
  71. package/dist/components/AiRadio/index.vue.mjs +0 -20
  72. package/dist/components/AiRadio/types.ts +0 -8
  73. package/dist/components/AiSwitch/index.mjs +0 -4
  74. package/dist/components/AiSwitch/index.vue.mjs +0 -15
  75. package/dist/components/AiSwitch/types.ts +0 -9
  76. package/dist/components/AiTabs/index.mjs +0 -4
  77. package/dist/components/AiTabs/index.vue.mjs +0 -20
  78. package/dist/components/AiTabs/types.ts +0 -9
  79. package/dist/components/AiTimePicker/index.mjs +0 -4
  80. package/dist/components/AiTimePicker/index.vue.mjs +0 -15
  81. package/dist/components/AiTimePicker/types.ts +0 -16
  82. package/dist/components/AiUpload/index.mjs +0 -4
  83. package/dist/components/AiUpload/index.vue.mjs +0 -20
  84. package/dist/components/AiUpload/types.ts +0 -11
  85. package/dist/layouts/government.md +0 -223
  86. package/dist/layouts/union.md +0 -229
  87. package/dist/styles/blue.scss +0 -71
  88. package/dist/styles/dark.scss +0 -71
  89. package/dist/styles/element-plus-theme.css +0 -52
  90. package/dist/styles/index.css +0 -77
  91. package/dist/styles/light-blue.scss +0 -71
@@ -1,4 +1,7 @@
1
- import f from "./index.vue.mjs";
1
+ import o from "./index.vue.mjs";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.mjs";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-674d64bb"]]);
2
5
  export {
3
- f as default
6
+ p as default
4
7
  };
@@ -1,30 +1,221 @@
1
- import { defineComponent as i, openBlock as e, createElementBlock as t, createElementVNode as l, Fragment as a, renderList as u, normalizeStyle as m, toDisplayString as d } from "vue";
2
- const c = { class: "ai-table" }, k = /* @__PURE__ */ i({
1
+ import { defineComponent as U, useSlots as W, ref as k, computed as z, resolveComponent as d, openBlock as a, createElementBlock as m, createVNode as N, mergeProps as P, withCtx as u, createBlock as r, createCommentVNode as g, createElementVNode as _, Fragment as q, renderList as G, createSlots as J, renderSlot as f, resolveDynamicComponent as C, toDisplayString as R, createTextVNode as Q, h as H } from "vue";
2
+ const X = { class: "ai-table" }, Y = { key: 3 }, ee = /* @__PURE__ */ U({
3
3
  __name: "index",
4
4
  props: {
5
5
  columns: {},
6
- data: {}
6
+ data: {},
7
+ fit: { type: Boolean },
8
+ selection: { type: [Boolean, String], default: "multiple" },
9
+ showIndex: { type: Boolean, default: !0 },
10
+ pagination: {},
11
+ size: {},
12
+ width: {},
13
+ height: {},
14
+ maxHeight: {},
15
+ stripe: { type: Boolean },
16
+ border: { type: Boolean },
17
+ rowKey: {},
18
+ context: {},
19
+ showHeader: { type: Boolean },
20
+ showSummary: { type: Boolean },
21
+ sumText: {},
22
+ summaryMethod: {},
23
+ rowClassName: {},
24
+ rowStyle: {},
25
+ cellClassName: {},
26
+ cellStyle: {},
27
+ headerRowClassName: {},
28
+ headerRowStyle: {},
29
+ headerCellClassName: {},
30
+ headerCellStyle: {},
31
+ highlightCurrentRow: { type: Boolean },
32
+ currentRowKey: {},
33
+ emptyText: {},
34
+ expandRowKeys: {},
35
+ defaultExpandAll: { type: Boolean },
36
+ rowExpandable: {},
37
+ defaultSort: {},
38
+ tooltipEffect: {},
39
+ tooltipOptions: {},
40
+ spanMethod: {},
41
+ selectOnIndeterminate: { type: Boolean },
42
+ indent: {},
43
+ treeProps: {},
44
+ lazy: { type: Boolean },
45
+ load: {},
46
+ className: {},
47
+ style: { type: [Boolean, null, String, Object, Array] },
48
+ tableLayout: {},
49
+ scrollbarAlwaysOn: { type: Boolean },
50
+ flexible: { type: Boolean },
51
+ showOverflowTooltip: { type: [Boolean, Object] },
52
+ tooltipFormatter: {},
53
+ appendFilterPanelTo: {},
54
+ scrollbarTabindex: {},
55
+ nativeScrollbar: { type: Boolean }
7
56
  },
8
- setup(r) {
9
- return (p, y) => (e(), t("table", c, [
10
- l("thead", null, [
11
- l("tr", null, [
12
- (e(!0), t(a, null, u(r.columns, (n) => (e(), t("th", {
13
- key: n.prop,
14
- style: m({ width: n.width })
15
- }, d(n.label), 5))), 128))
16
- ])
17
- ]),
18
- l("tbody", null, [
19
- (e(!0), t(a, null, u(r.data, (n, s) => (e(), t("tr", { key: s }, [
20
- (e(!0), t(a, null, u(r.columns, (o) => (e(), t("td", {
21
- key: o.prop
22
- }, d(n[o.prop]), 1))), 128))
23
- ]))), 128))
24
- ])
25
- ]));
57
+ emits: ["init", "selection-change", "sort-change"],
58
+ setup(l, { emit: O }) {
59
+ const s = l, y = O, p = W(), T = k(), S = k(), c = z({
60
+ get: () => {
61
+ var e;
62
+ return ((e = s.pagination) == null ? void 0 : e.currentPage) || 1;
63
+ },
64
+ set: (e) => {
65
+ s.pagination && (s.pagination.currentPage = e);
66
+ }
67
+ }), h = z({
68
+ get: () => {
69
+ var e;
70
+ return ((e = s.pagination) == null ? void 0 : e.pageSize) || 10;
71
+ },
72
+ set: (e) => {
73
+ s.pagination && (s.pagination.pageSize = e);
74
+ }
75
+ }), $ = (e) => {
76
+ if (e === "slot" || e === "slotHeader" || e === "slotBoth") return "div";
77
+ try {
78
+ return d(e);
79
+ } catch {
80
+ try {
81
+ return d("el-" + e.replace(/^Ai/, "").toLowerCase());
82
+ } catch {
83
+ return "span";
84
+ }
85
+ }
86
+ }, E = (e) => {
87
+ var o;
88
+ const n = (o = p[e]) == null ? void 0 : o.call(p);
89
+ return n && n[0] ? () => n[0] : () => H("span");
90
+ }, j = (e) => {
91
+ var o;
92
+ const n = (o = p[e]) == null ? void 0 : o.call(p);
93
+ return n && n[1] ? () => n[1] : () => H("span");
94
+ }, A = (e) => {
95
+ y("selection-change", e);
96
+ }, V = (e) => {
97
+ S.value = e, y("selection-change", [e]);
98
+ }, F = ({ prop: e, order: n }) => {
99
+ y("sort-change", { prop: e, order: n });
100
+ }, I = () => {
101
+ y("init", c.value, h.value);
102
+ }, K = () => {
103
+ y("init", c.value, h.value);
104
+ };
105
+ return (e, n) => {
106
+ var b, v, w, B;
107
+ const o = d("el-table-column"), L = d("el-radio"), D = d("el-table"), M = d("el-pagination");
108
+ return a(), m("div", X, [
109
+ N(D, P({
110
+ ref_key: "tableRef",
111
+ ref: T,
112
+ data: l.data
113
+ }, e.$attrs, {
114
+ onSelectionChange: A,
115
+ onSortChange: F
116
+ }), {
117
+ default: u(() => [
118
+ l.selection === "multiple" ? (a(), r(o, {
119
+ key: 0,
120
+ type: "selection",
121
+ width: "55",
122
+ fixed: "left"
123
+ })) : g("", !0),
124
+ l.selection === "single" ? (a(), r(o, {
125
+ key: 1,
126
+ width: "55",
127
+ fixed: "left"
128
+ }, {
129
+ default: u(({ row: t }) => [
130
+ N(L, {
131
+ "model-value": S.value === t,
132
+ onChange: (i) => V(t)
133
+ }, {
134
+ default: u(() => [...n[2] || (n[2] = [
135
+ _("span", null, null, -1)
136
+ ])]),
137
+ _: 1
138
+ }, 8, ["model-value", "onChange"])
139
+ ]),
140
+ _: 1
141
+ })) : g("", !0),
142
+ l.showIndex !== !1 ? (a(), r(o, {
143
+ key: 2,
144
+ type: "index",
145
+ label: "序号",
146
+ width: "60",
147
+ fixed: "left",
148
+ align: "center"
149
+ })) : g("", !0),
150
+ (a(!0), m(q, null, G(l.columns, (t) => (a(), r(o, {
151
+ key: t.prop,
152
+ prop: t.prop,
153
+ label: t.label,
154
+ width: t.width,
155
+ "min-width": t.minWidth,
156
+ sortable: t.sortable !== !1,
157
+ align: t.align || "center"
158
+ }, J({
159
+ default: u(({ row: i, $index: x }) => [
160
+ t.type === "slot" ? f(e.$slots, t.prop, {
161
+ key: 0,
162
+ row: i,
163
+ index: x
164
+ }, void 0, !0) : t.type === "slotBoth" ? (a(), r(C(j(t.prop)), {
165
+ key: 1,
166
+ row: i,
167
+ index: x
168
+ }, null, 8, ["row", "index"])) : t.type ? (a(), r(C($(t.type)), P({
169
+ key: 2,
170
+ "model-value": i[t.prop]
171
+ }, { ref_for: !0 }, t.attrs), null, 16, ["model-value"])) : (a(), m("span", Y, R(i[t.prop]), 1))
172
+ ]),
173
+ _: 2
174
+ }, [
175
+ t.type === "slotHeader" || t.type === "slotBoth" ? {
176
+ name: "header",
177
+ fn: u(() => [
178
+ t.type === "slotHeader" ? f(e.$slots, `${t.prop}Header`, { key: 0 }, () => [
179
+ Q(R(t.label), 1)
180
+ ], !0) : t.type === "slotBoth" ? (a(), r(C(E(t.prop)), { key: 1 })) : g("", !0)
181
+ ]),
182
+ key: "0"
183
+ } : void 0
184
+ ]), 1032, ["prop", "label", "width", "min-width", "sortable", "align"]))), 128)),
185
+ e.$slots.action ? (a(), r(o, {
186
+ key: 3,
187
+ label: "操作",
188
+ fixed: "right",
189
+ align: "center"
190
+ }, {
191
+ default: u(({ row: t, $index: i }) => [
192
+ f(e.$slots, "action", {
193
+ row: t,
194
+ index: i
195
+ }, void 0, !0)
196
+ ]),
197
+ _: 3
198
+ })) : g("", !0)
199
+ ]),
200
+ _: 3
201
+ }, 16, ["data"]),
202
+ ((b = l.pagination) == null ? void 0 : b.show) !== !1 ? (a(), r(M, {
203
+ key: 0,
204
+ "current-page": c.value,
205
+ "onUpdate:currentPage": n[0] || (n[0] = (t) => c.value = t),
206
+ "page-size": h.value,
207
+ "onUpdate:pageSize": n[1] || (n[1] = (t) => h.value = t),
208
+ total: ((v = l.pagination) == null ? void 0 : v.total) || 0,
209
+ "page-sizes": ((w = l.pagination) == null ? void 0 : w.pageSizes) || [10, 20, 50, 100],
210
+ layout: ((B = l.pagination) == null ? void 0 : B.layout) || "total, sizes, prev, pager, next, jumper",
211
+ onCurrentChange: I,
212
+ onSizeChange: K,
213
+ style: { "margin-top": "16px", "justify-content": "flex-end" }
214
+ }, null, 8, ["current-page", "page-size", "total", "page-sizes", "layout"])) : g("", !0)
215
+ ]);
216
+ };
26
217
  }
27
218
  });
28
219
  export {
29
- k as default
220
+ ee as default
30
221
  };
@@ -1,27 +1,207 @@
1
1
  /**
2
- * AiTable - 表格组件
2
+ * AiTable - 动态表格组件
3
+ * 基于Element Plus el-table封装,支持JSON配置驱动
3
4
  *
4
- * 用法示例:
5
- * <AiTable :columns="columns" :data="tableData" />
5
+ * ==================== 重要说明 ====================
6
+ * 1. 表格宽度会自动充满容器
7
+ * 2. 建议至少一列不设置width,让其自动填充剩余空间
8
+ * 3. 分页默认显示,需传入pagination对象(包含total)
6
9
  *
7
- * 配置示例:
10
+ * ==================== 基础用法 ====================
11
+ * <AiTable
12
+ * :columns="columns"
13
+ * :data="tableData"
14
+ * :pagination="pagination"
15
+ * />
16
+ *
17
+ * ==================== 完整示例 ====================
8
18
  * const columns = [
9
- * { prop: 'name', label: '姓名', width: '100px' },
10
- * { prop: 'age', label: '年龄' },
11
- * { prop: 'address', label: '地址', width: '200px' }
12
- * ]
13
- * const tableData = [
14
- * { name: '张三', age: 18, address: '北京' }
19
+ * { prop: 'name', label: '姓名', width: 120 },
20
+ * { prop: 'age', label: '年龄', width: 80 },
21
+ * { prop: 'address', label: '地址' } // 不设置width,自动填充
15
22
  * ]
23
+ *
24
+ * const tableData = ref([
25
+ * { name: '张三', age: 20, address: '北京市朝阳区' }
26
+ * ])
27
+ *
28
+ * // 分页配置(必须包含total)
29
+ * const pagination = ref({
30
+ * total: 100, // 必填:总条数
31
+ * currentPage: 1, // 当前页
32
+ * pageSize: 10 // 每页条数
33
+ * })
34
+ *
35
+ * ==================== 插槽用法 ====================
36
+ * <AiTable :columns="columns" :data="tableData">
37
+ * <!-- slot: 自定义单元格内容 -->
38
+ * <template #date="{ row }">
39
+ * <span>{{ formatDate(row.date) }}</span>
40
+ * </template>
41
+ *
42
+ * <!-- slotHeader: 自定义表头 -->
43
+ * <template #nameHeader>
44
+ * <span style="color: red">姓名 *</span>
45
+ * </template>
46
+ *
47
+ * <!-- slotBoth: 同时自定义表头和内容 -->
48
+ * <template #status>
49
+ * <div><span>状态</span></div>
50
+ * <div><el-tag>{{ row.status }}</el-tag></div>
51
+ * </template>
52
+ *
53
+ * <!-- 操作列插槽 -->
54
+ * <template #action="{ row, $index }">
55
+ * <el-button @click="handleEdit(row)">编辑</el-button>
56
+ * <el-button @click="handleDelete(row)">删除</el-button>
57
+ * </template>
58
+ * </AiTable>
16
59
  */
17
60
 
61
+ import type { TableProps } from 'element-plus'
62
+
63
+ /**
64
+ * 表格列配置接口
65
+ */
18
66
  export interface ITableColumn {
19
- prop: string // 列字段名
20
- label: string // 列标题
21
- width?: string // 列宽度
67
+ /**
68
+ * 列字段名
69
+ */
70
+ prop: string
71
+
72
+ /**
73
+ * 列标题
74
+ */
75
+ label: string
76
+
77
+ /**
78
+ * 列宽度(固定宽度)
79
+ */
80
+ width?: string | number
81
+
82
+ /**
83
+ * 列最小宽度(自动扩展以充满剩余空间)
84
+ */
85
+ minWidth?: string | number
86
+
87
+ /**
88
+ * 控件类型
89
+ * - 不传默认为普通文本
90
+ * - 支持:AiTag/AiInput/el-tag等
91
+ * - 支持:slot/slotHeader/slotBoth
92
+ */
93
+ type?: string
94
+
95
+ /**
96
+ * 透传给控件的属性
97
+ */
98
+ attrs?: Record<string, any>
99
+
100
+ /**
101
+ * 是否可排序
102
+ * - 默认true
103
+ */
104
+ sortable?: boolean
105
+
106
+ /**
107
+ * 对齐方式
108
+ * - 默认center
109
+ */
110
+ align?: 'left' | 'center' | 'right'
111
+ }
112
+
113
+ /**
114
+ * 分页配置接口
115
+ */
116
+ export interface IPagination {
117
+ /**
118
+ * 是否显示分页
119
+ * - 默认true
120
+ */
121
+ show?: boolean
122
+
123
+ /**
124
+ * 当前页码(响应式)
125
+ */
126
+ currentPage?: number
127
+
128
+ /**
129
+ * 每页条数(响应式)
130
+ */
131
+ pageSize?: number
132
+
133
+ /**
134
+ * 总条数
135
+ */
136
+ total?: number
137
+
138
+ /**
139
+ * 每页条数选项
140
+ */
141
+ pageSizes?: number[]
142
+
143
+ /**
144
+ * 布局
145
+ */
146
+ layout?: string
147
+ }
148
+
149
+ /**
150
+ * 表格组件Props接口
151
+ */
152
+ export interface IAiTableProps extends Omit<Partial<TableProps<any>>, 'data'> {
153
+ /**
154
+ * 列配置数组(必填)
155
+ */
156
+ columns: ITableColumn[]
157
+
158
+ /**
159
+ * 表格数据(必填)
160
+ */
161
+ data: Record<string, any>[]
162
+
163
+ /**
164
+ * 列宽是否自撑开(默认true)
165
+ */
166
+ fit?: boolean
167
+
168
+ /**
169
+ * 选择模式
170
+ * - false: 不显示选择列
171
+ * - 'multiple': 多选(默认)
172
+ * - 'single': 单选
173
+ */
174
+ selection?: false | 'multiple' | 'single'
175
+
176
+ /**
177
+ * 是否显示序号列
178
+ * - 默认true
179
+ */
180
+ showIndex?: boolean
181
+
182
+ /**
183
+ * 分页配置
184
+ */
185
+ pagination?: IPagination
22
186
  }
23
187
 
24
- export interface IAiTableProps {
25
- columns: ITableColumn[] // 列配置数组
26
- data: Record<string, any>[] // 表格数据数组
188
+ /**
189
+ * 表格组件事件接口
190
+ */
191
+ export interface IAiTableEmits {
192
+ /**
193
+ * 分页变化事件
194
+ * - 用于查询数据
195
+ */
196
+ (e: 'init', currentPage: number, pageSize: number): void
197
+
198
+ /**
199
+ * 选择变化事件
200
+ */
201
+ (e: 'selection-change', rows: Record<string, any>[]): void
202
+
203
+ /**
204
+ * 排序变化事件
205
+ */
206
+ (e: 'sort-change', data: { prop: string; order: string | null }): void
27
207
  }
@@ -1,9 +1,8 @@
1
1
  /**
2
- * AiTag - 标签
2
+ * AiTag - 标签组件
3
+ * 基于Element Plus el-tag封装
3
4
  */
4
- export interface AiTagProps {
5
- type?: 'success' | 'info' | 'warning' | 'danger'
6
- closable?: boolean
7
- size?: 'large' | 'default' | 'small'
8
- effect?: 'dark' | 'light' | 'plain'
9
- }
5
+
6
+ import type { TagProps } from 'element-plus'
7
+
8
+ export interface IAiTagProps extends Partial<TagProps> {}
@@ -42,37 +42,12 @@ import { AiForm } from 'ai-front-base'
42
42
  - **[AiInput](AiInput/types.ts)** - 输入框
43
43
  - **[AiSelect](AiSelect/types.ts)** - 选择器
44
44
  - **[AiDatePicker](AiDatePicker/types.ts)** - 日期选择器
45
- - **[AiTimePicker](AiTimePicker/types.ts)** - 时间选择器
46
- - **[AiCheckbox](AiCheckbox/types.ts)** - 复选框
47
- - **[AiRadio](AiRadio/types.ts)** - 单选框
48
- - **[AiSwitch](AiSwitch/types.ts)** - 开关
49
- - **[AiUpload](AiUpload/types.ts)** - 上传
45
+ - **[AiDateRangePicker](AiDateRangePicker/types.ts)** - 日期范围选择器
50
46
  - **[AiForm](AiForm/types.ts)** - 表单
51
47
 
52
48
  ### 数据展示组件
53
49
  - **[AiTable](AiTable/types.ts)** - 表格
54
- - **[AiPagination](AiPagination/types.ts)** - 分页
55
50
  - **[AiTag](AiTag/types.ts)** - 标签
56
- - **[AiBadge](AiBadge/types.ts)** - 徽章
57
- - **[AiProgress](AiProgress/types.ts)** - 进度条
58
-
59
- ### 导航组件
60
- - **[AiMenu](AiMenu/types.ts)** - 菜单
61
- - **[AiBreadcrumb](AiBreadcrumb/types.ts)** - 面包屑
62
- - **[AiTabs](AiTabs/types.ts)** - 标签页
63
-
64
- ### 反馈组件
65
- - **[AiDialog](AiDialog/types.ts)** - 对话框
66
- - **[AiMessage](AiMessage/types.ts)** - 消息提示(函数式)
67
- - **[AiNotification](AiNotification/types.ts)** - 通知(函数式)
68
- - **[AiLoading](AiLoading/types.ts)** - 加载(指令式/函数式)
69
-
70
- ### 布局组件
71
- - **[AiContainer](AiContainer/types.ts)** - 容器
72
- - **[AiHeader](AiHeader/types.ts)** - 头部
73
- - **[AiAside](AiAside/types.ts)** - 侧边栏
74
- - **[AiMain](AiMain/types.ts)** - 主体
75
- - **[AiFooter](AiFooter/types.ts)** - 底部
76
51
 
77
52
 
78
53
  导入方式:
@@ -0,0 +1,9 @@
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
7
+ export {
8
+ s as default
9
+ };
@@ -0,0 +1,15 @@
1
+ import m from "./AiForm/index.mjs";
2
+ import i from "./AiTable/index.mjs";
3
+ import n from "./AiInput/index.vue.mjs";
4
+ import t from "./AiSelect/index.vue.mjs";
5
+ import e from "./AiDatePicker/index.vue.mjs";
6
+ import r from "./AiDateRangePicker/index.mjs";
7
+ import c from "./AiTag/index.vue.mjs";
8
+ const g = {
9
+ install(o) {
10
+ o.component("AiForm", m), o.component("AiTable", i), o.component("AiInput", n), o.component("AiSelect", t), o.component("AiDatePicker", e), o.component("AiDateRangePicker", r), o.component("AiTag", c);
11
+ }
12
+ };
13
+ export {
14
+ g as default
15
+ };
package/dist/index.mjs CHANGED
@@ -1,54 +1,18 @@
1
- import { default as a } from "./components/AiInput/index.vue.mjs";
2
- import { default as t } from "./components/AiSelect/index.vue.mjs";
1
+ import { default as t } from "./components/AiInput/index.vue.mjs";
2
+ import { default as o } from "./components/AiSelect/index.vue.mjs";
3
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";
4
+ import { default as m } from "./components/AiDateRangePicker/index.mjs";
5
+ import { default as s } from "./components/AiForm/index.mjs";
6
+ import { default as d } from "./components/AiTable/index.mjs";
7
+ import { default as A } from "./components/AiTag/index.vue.mjs";
8
+ import { default as n } from "./components/install.mjs";
27
9
  export {
28
- W as AiAside,
29
- D as AiBadge,
30
- L as AiBreadcrumb,
31
- p as AiCheckbox,
32
- K as AiContainer,
33
10
  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
11
+ m as AiDateRangePicker,
12
+ s as AiForm,
13
+ n as AiFrontBase,
14
+ t as AiInput,
15
+ o as AiSelect,
16
+ d as AiTable,
17
+ A as AiTag
54
18
  };
@@ -1,23 +1,26 @@
1
1
  # Layouts布局规则
2
2
 
3
- AI组件库布局规则库
3
+ AI组件库默认布局规则 - 确保页面风格统一、布局合理
4
4
 
5
- ## 使用
5
+ ## 布局规则
6
6
 
7
- ### 确定布局规则(必须)
7
+ 本组件库提供统一的默认布局规则,适用于所有企业级后台管理系统。
8
8
 
9
- **这是UI/UX的关键前置步骤**,必须先确定业务系统遵守的布局规则:
9
+ 详见:[default.md](default.md)
10
10
 
11
- ### 可选布局规则
12
- - **government** - 政务服务布局规则(详见 [government.md](government.md))**【默认】**
13
- - **union** - 工会系统布局规则(详见 [union.md](union.md))
11
+ ## 核心要点
14
12
 
15
- **默认规则:** 如未指定布局规则,默认使用政务服务布局规则(government)
13
+ 1. **必须使用CSS变量** - 禁止硬编码颜色、圆角等样式
14
+ 2. **固定页面结构** - 使用标准的 `.page-container` + `.search-section` + `.table-section` 结构
15
+ 3. **统一命名规范** - 使用规定的class命名
16
+ 4. **统一间距** - 页面20px,卡片20-24px
16
17
 
17
- ## 行业布局规则说明
18
+ ## 开发规范
18
19
 
19
- 行业布局规则以Markdown格式提供,包含:
20
- - 场景概述和适用范围
21
- - 主题配色方案
22
- - 页面类型的详细布局指导
23
- - 推荐组件列表
20
+ **开发任何页面前,必须先阅读 [default.md](default.md) 中的布局规则**
21
+
22
+ - ✅ 使用规范中的页面结构模板
23
+ - ✅ 使用CSS变量而非硬编码
24
+ - ✅ 遵循命名和间距规范
25
+ - ❌ 不要自创页面结构
26
+ - ❌ 不要使用硬编码样式