@campus-admin/ui 1.0.0 → 2.0.1
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/README.md +138 -335
- package/dist/campus/card/index.d.ts +9 -0
- package/dist/campus/index.d.ts +7 -0
- package/dist/campus/parent/index.d.ts +9 -0
- package/dist/campus/student/index.d.ts +9 -0
- package/dist/campus/teacher/index.d.ts +9 -0
- package/dist/campus/tel/index.d.ts +9 -0
- package/dist/{base/empty/src/empty.vue.d.ts → components/basic/CaIcon.vue.d.ts} +4 -7
- package/dist/components/basic/CaPageActions.vue.d.ts +15 -0
- package/dist/components/basic/icons.d.ts +48 -0
- package/dist/components/basic/index.d.ts +838 -0
- package/dist/components/button/index.d.ts +348 -0
- package/dist/components/chart/bar-chart/CaBarChart.vue.d.ts +31 -0
- package/dist/components/chart/chart-math.d.ts +178 -0
- package/dist/components/chart/gauge/CaGauge.vue.d.ts +31 -0
- package/dist/components/chart/index.d.ts +195 -0
- package/dist/components/chart/line-chart/CaLineChart.vue.d.ts +40 -0
- package/dist/components/chart/parts/ChartLegend.vue.d.ts +28 -0
- package/dist/{atom/slogan/src/slogan.vue.d.ts → components/chart/parts/ChartStatus.vue.d.ts} +3 -5
- package/dist/components/chart/parts/ChartTable.vue.d.ts +19 -0
- package/dist/components/chart/parts/ChartTooltip.vue.d.ts +23 -0
- package/dist/components/chart/pie-chart/CaPieChart.vue.d.ts +25 -0
- package/dist/components/chart/sparkline/CaSparkline.vue.d.ts +20 -0
- package/dist/components/chart/use-chart.d.ts +36 -0
- package/dist/components/config/CaConfigProvider.vue.d.ts +16 -0
- package/dist/components/config/index.d.ts +33 -0
- package/dist/components/display/index.d.ts +99 -0
- package/dist/{base/copyright/src/copyright.vue.d.ts → components/display/stat-card/CaStatCard.vue.d.ts} +7 -11
- package/dist/{base/skeleton/src/skeleton.vue.d.ts → components/display/status-tag/CaStatusTag.vue.d.ts} +4 -7
- package/dist/components/display/types.d.ts +7 -0
- package/dist/components/form/index.d.ts +112 -0
- package/dist/components/form/schema-form/CaSchemaForm.vue.d.ts +31 -0
- package/dist/components/form/types.d.ts +17 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/layout/index.d.ts +34 -0
- package/dist/components/navigation/CaMenu.vue.d.ts +13 -0
- package/dist/components/navigation/index.d.ts +64 -0
- package/dist/components/overlay/index.d.ts +1511 -0
- package/dist/components/table/data-table/CaDataTable.vue.d.ts +49 -0
- package/dist/components/table/index.d.ts +33 -0
- package/dist/components/table/types.d.ts +46 -0
- package/dist/index.d.ts +21 -1106
- package/dist/index.js +2187 -0
- package/dist/oms/index.d.ts +3 -0
- package/dist/oms/school/index.d.ts +10 -0
- package/dist/shared/inject.d.ts +8 -0
- package/dist/shared/registry.d.ts +5 -0
- package/dist/shared/types.d.ts +9 -0
- package/dist/shared/wrap.d.ts +7 -0
- package/dist/style.css +2 -0
- package/package.json +17 -49
- package/dist/atom/attendance-badge/index.d.ts +0 -5
- package/dist/atom/attendance-badge/src/attendance-badge.vue.d.ts +0 -13
- package/dist/atom/attendance-badge/src/core.d.ts +0 -11
- package/dist/atom/avatar/index.d.ts +0 -3
- package/dist/atom/avatar/src/avatar.vue.d.ts +0 -14
- package/dist/atom/button/index.d.ts +0 -3
- package/dist/atom/button/src/button.vue.d.ts +0 -40
- package/dist/atom/checkbox/index.d.ts +0 -3
- package/dist/atom/checkbox/src/checkbox.vue.d.ts +0 -24
- package/dist/atom/icon/index.d.ts +0 -3
- package/dist/atom/icon/src/icon.vue.d.ts +0 -27
- package/dist/atom/index.d.ts +0 -444
- package/dist/atom/input/index.d.ts +0 -3
- package/dist/atom/input/src/input.vue.d.ts +0 -43
- package/dist/atom/progress/index.d.ts +0 -4
- package/dist/atom/progress/src/core.d.ts +0 -9
- package/dist/atom/progress/src/progress.vue.d.ts +0 -19
- package/dist/atom/select/index.d.ts +0 -5
- package/dist/atom/select/src/core.d.ts +0 -9
- package/dist/atom/select/src/select.vue.d.ts +0 -22
- package/dist/atom/slogan/index.d.ts +0 -3
- package/dist/atom/switch/index.d.ts +0 -3
- package/dist/atom/switch/src/switch.vue.d.ts +0 -16
- package/dist/atom/tag/index.d.ts +0 -3
- package/dist/atom/tag/src/tag.vue.d.ts +0 -31
- package/dist/atom/textarea/index.d.ts +0 -3
- package/dist/atom/textarea/src/textarea.vue.d.ts +0 -19
- package/dist/base/breadcrumb/index.d.ts +0 -4
- package/dist/base/breadcrumb/src/breadcrumb.vue.d.ts +0 -29
- package/dist/base/class-tree/index.d.ts +0 -5
- package/dist/base/class-tree/src/class-tree.vue.d.ts +0 -29
- package/dist/base/class-tree/src/core.d.ts +0 -30
- package/dist/base/copyright/index.d.ts +0 -3
- package/dist/base/drawer/index.d.ts +0 -3
- package/dist/base/drawer/src/drawer.vue.d.ts +0 -36
- package/dist/base/empty/index.d.ts +0 -3
- package/dist/base/index.d.ts +0 -651
- package/dist/base/menu/core.d.ts +0 -34
- package/dist/base/menu/index.d.ts +0 -13
- package/dist/base/menu/side-menu/index.d.ts +0 -5
- package/dist/base/menu/side-menu/src/side-menu.vue.d.ts +0 -59
- package/dist/base/modal/index.d.ts +0 -4
- package/dist/base/modal/src/core.d.ts +0 -8
- package/dist/base/modal/src/modal.vue.d.ts +0 -46
- package/dist/base/page-header/index.d.ts +0 -3
- package/dist/base/page-header/src/page-header.vue.d.ts +0 -27
- package/dist/base/pagination/index.d.ts +0 -5
- package/dist/base/pagination/src/core.d.ts +0 -11
- package/dist/base/pagination/src/pagination.vue.d.ts +0 -26
- package/dist/base/search-form/index.d.ts +0 -3
- package/dist/base/search-form/src/search-form.vue.d.ts +0 -34
- package/dist/base/skeleton/index.d.ts +0 -3
- package/dist/base/statistic/index.d.ts +0 -3
- package/dist/base/statistic/src/statistic.vue.d.ts +0 -16
- package/dist/base/table/index.d.ts +0 -5
- package/dist/base/table/src/core.d.ts +0 -25
- package/dist/base/table/src/table.vue.d.ts +0 -44
- package/dist/base/toast/index.d.ts +0 -5
- package/dist/base/toast/src/store.d.ts +0 -56
- package/dist/base/toast/src/toast-container.vue.d.ts +0 -3
- package/dist/campus-ui.css +0 -2
- package/dist/campus-ui.js +0 -2229
- package/dist/campus-ui.umd.cjs +0 -1
- package/dist/core/index.d.ts +0 -4
- package/dist/core/namespace.d.ts +0 -16
- package/dist/core/theme.d.ts +0 -49
- package/dist/feature/daily-agenda/index.d.ts +0 -5
- package/dist/feature/daily-agenda/src/core.d.ts +0 -25
- package/dist/feature/daily-agenda/src/daily-agenda.vue.d.ts +0 -12
- package/dist/feature/daily-agenda/src/data.d.ts +0 -3
- package/dist/feature/index.d.ts +0 -61
- package/dist/feature/student-picker/index.d.ts +0 -5
- package/dist/feature/student-picker/src/core.d.ts +0 -19
- package/dist/feature/student-picker/src/student-picker.vue.d.ts +0 -26
- package/dist/feature/weekly-timetable/index.d.ts +0 -6
- package/dist/feature/weekly-timetable/src/core.d.ts +0 -33
- package/dist/feature/weekly-timetable/src/data.d.ts +0 -3
- package/dist/feature/weekly-timetable/src/weekly-timetable.vue.d.ts +0 -7
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DataColumn, SearchField, TableRequest } from '../types.js';
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
columns: DataColumn[];
|
|
5
|
+
request: TableRequest<T>;
|
|
6
|
+
search?: SearchField[];
|
|
7
|
+
rowKey?: string;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
/** 搜索表单之外的固定条件(如页签筛选),变化时回到第一页并重新查询 */
|
|
10
|
+
params?: Record<string, unknown>;
|
|
11
|
+
/** 是否显示多选列;选择结果通过 selection-change 向外提供 */
|
|
12
|
+
selection?: boolean;
|
|
13
|
+
actionsLabel?: string;
|
|
14
|
+
actionsWidth?: number | string;
|
|
15
|
+
} & {
|
|
16
|
+
"onSelection-change"?: ((rows: T[]) => any) | undefined;
|
|
17
|
+
}> & (typeof globalThis extends {
|
|
18
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
19
|
+
} ? P : {});
|
|
20
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
21
|
+
reload: () => Promise<void>;
|
|
22
|
+
reset: () => void;
|
|
23
|
+
}>) => void;
|
|
24
|
+
attrs: any;
|
|
25
|
+
slots: {
|
|
26
|
+
[x: `cell-${string}`]: ((props: {
|
|
27
|
+
row: import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow;
|
|
28
|
+
value: any;
|
|
29
|
+
}) => any) | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
toolbar?: (props: {
|
|
32
|
+
reload: () => Promise<void>;
|
|
33
|
+
}) => any;
|
|
34
|
+
} & {
|
|
35
|
+
actions?: (props: {
|
|
36
|
+
row: import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow;
|
|
37
|
+
}) => any;
|
|
38
|
+
};
|
|
39
|
+
emit: (evt: "selection-change", rows: T[]) => void;
|
|
40
|
+
}>) => import("vue").VNode & {
|
|
41
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
42
|
+
};
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
46
|
+
[K in keyof T]: T[K];
|
|
47
|
+
} : {
|
|
48
|
+
[K in keyof T as K]: T[K];
|
|
49
|
+
}) & {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 分类:表格(table)
|
|
3
|
+
*
|
|
4
|
+
* 目录约定:每一种表格样式一个子文件夹,组件名统一 Ca + 样式名 + Table:
|
|
5
|
+
* table/data-table/ CaDataTable 标准数据表格:搜索栏 + 表格 + 分页
|
|
6
|
+
* table/xxx-table/ 以后新增,如卡片式、树形、可编辑等
|
|
7
|
+
* 各样式共用 ./types.ts 里的列、搜索条件和请求约定,平台的取数函数可以复用。
|
|
8
|
+
*
|
|
9
|
+
* 新增一种样式的步骤:
|
|
10
|
+
* 1. 新建子文件夹和组件,遵守同一套类型约定;
|
|
11
|
+
* 2. 在本文件导出并加入 tableComponents;
|
|
12
|
+
* 3. 在演示站补一个示例页。
|
|
13
|
+
*/
|
|
14
|
+
import { ElTable, ElTableColumn, ElTableV2, ElAutoResizer } from 'element-plus';
|
|
15
|
+
import 'element-plus/es/components/table-v2/style/css';
|
|
16
|
+
import 'element-plus/es/components/table/style/css';
|
|
17
|
+
import 'element-plus/es/components/table-column/style/css';
|
|
18
|
+
import 'element-plus/es/components/pagination/style/css';
|
|
19
|
+
import 'element-plus/es/components/loading/style/css';
|
|
20
|
+
import CaDataTable from './data-table/CaDataTable.vue';
|
|
21
|
+
export declare const CaTable: typeof ElTable;
|
|
22
|
+
export declare const CaTableColumn: typeof ElTableColumn;
|
|
23
|
+
export declare const CaTableV2: typeof ElTableV2;
|
|
24
|
+
export declare const CaAutoResizer: typeof ElAutoResizer;
|
|
25
|
+
export { CaDataTable };
|
|
26
|
+
export type { DataColumn, SearchField, TableQuery, TableRequest, TableResult } from './types.js';
|
|
27
|
+
export declare const tableComponents: {
|
|
28
|
+
CaTable: typeof CaTable;
|
|
29
|
+
CaTableColumn: typeof CaTableColumn;
|
|
30
|
+
CaTableV2: typeof CaTableV2;
|
|
31
|
+
CaAutoResizer: typeof CaAutoResizer;
|
|
32
|
+
CaDataTable: typeof CaDataTable;
|
|
33
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表格分类的公共类型。
|
|
3
|
+
*
|
|
4
|
+
* 为什么放在 table/ 根目录而不是某个具体表格里:
|
|
5
|
+
* 以后会有多种表格样式(如卡片式、树形、可编辑),它们共用同一套“列、搜索条件、请求”约定,
|
|
6
|
+
* 这样平台把数据请求函数写一次,就可以在不同样式之间切换。
|
|
7
|
+
*/
|
|
8
|
+
import type { Option } from '../../shared/types.js';
|
|
9
|
+
/** 一列的定义 */
|
|
10
|
+
export interface DataColumn {
|
|
11
|
+
prop: string;
|
|
12
|
+
label: string;
|
|
13
|
+
width?: number | string;
|
|
14
|
+
minWidth?: number | string;
|
|
15
|
+
align?: 'left' | 'center' | 'right';
|
|
16
|
+
/** 由服务端处理该列排序;未设置时保持普通展示列 */
|
|
17
|
+
sortable?: boolean;
|
|
18
|
+
/** 简单文本转换;复杂展示用具名插槽 cell-<prop> */
|
|
19
|
+
formatter?: (row: any) => string;
|
|
20
|
+
}
|
|
21
|
+
/** 搜索条件里的一个字段 */
|
|
22
|
+
export interface SearchField {
|
|
23
|
+
prop: string;
|
|
24
|
+
label: string;
|
|
25
|
+
type?: 'input' | 'select' | 'date';
|
|
26
|
+
options?: Option[];
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
}
|
|
29
|
+
/** 表格向平台请求数据时带的参数:分页 + 搜索条件 */
|
|
30
|
+
export interface TableQuery {
|
|
31
|
+
page: number;
|
|
32
|
+
pageSize: number;
|
|
33
|
+
query: Record<string, unknown>;
|
|
34
|
+
/** 可选的服务端排序条件;未启用排序时省略,兼容现有请求函数 */
|
|
35
|
+
sort?: {
|
|
36
|
+
prop: string;
|
|
37
|
+
order: 'ascending' | 'descending';
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** 平台返回的数据:当前页的行和总条数 */
|
|
41
|
+
export interface TableResult<T> {
|
|
42
|
+
list: T[];
|
|
43
|
+
total: number;
|
|
44
|
+
}
|
|
45
|
+
/** 平台提供的取数函数:表格负责分页、加载态、错误态、过时请求丢弃,平台只管取数 */
|
|
46
|
+
export type TableRequest<T> = (query: TableQuery) => Promise<TableResult<T>>;
|