@aplus-frontend/ui 0.0.15 → 0.0.16

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 (29) hide show
  1. package/es/src/ap-form/modal-form/index.vue.mjs +1 -1
  2. package/es/src/ap-table/ap-table.vue.d.ts +2 -2
  3. package/es/src/ap-table/ap-table.vue.mjs +1 -1
  4. package/es/src/ap-table/interface.d.ts +12 -11
  5. package/es/src/ap-table/utils.d.ts +2188 -5
  6. package/es/src/business/title/style.css +29 -9
  7. package/es/src/editable-table/hooks/use-get-columns.d.ts +26 -3
  8. package/es/src/editable-table/hooks/use-get-columns.mjs +54 -52
  9. package/es/src/editable-table/interface.d.ts +24 -7
  10. package/es/src/theme/antd-global-overwrite/admin/index.css +6 -6
  11. package/es/src/theme/antd-global-overwrite/admin/modal.css +6 -6
  12. package/es/src/theme/antd-global-overwrite/aplus/index.css +6 -6
  13. package/es/src/theme/antd-global-overwrite/aplus/modal.css +6 -6
  14. package/es/src/theme/ap-title/ap-title.css +29 -9
  15. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  16. package/lib/src/ap-table/ap-table.vue.d.ts +2 -2
  17. package/lib/src/ap-table/ap-table.vue.js +1 -1
  18. package/lib/src/ap-table/interface.d.ts +12 -11
  19. package/lib/src/ap-table/utils.d.ts +2188 -5
  20. package/lib/src/business/title/style.css +29 -9
  21. package/lib/src/editable-table/hooks/use-get-columns.d.ts +26 -3
  22. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  23. package/lib/src/editable-table/interface.d.ts +24 -7
  24. package/lib/src/theme/antd-global-overwrite/admin/index.css +6 -6
  25. package/lib/src/theme/antd-global-overwrite/admin/modal.css +6 -6
  26. package/lib/src/theme/antd-global-overwrite/aplus/index.css +6 -6
  27. package/lib/src/theme/antd-global-overwrite/aplus/modal.css +6 -6
  28. package/lib/src/theme/ap-title/ap-title.css +29 -9
  29. package/package.json +1 -1
@@ -97,7 +97,7 @@ const Se = /* @__PURE__ */ q({
97
97
  defaultValue: !1
98
98
  }), {
99
99
  t: v
100
- } = oe(), h = ie("uiMode"), {
100
+ } = oe(), h = ie("uiMode", "aplus"), {
101
101
  b: M,
102
102
  e: C
103
103
  } = se("ap-form-modal-form");
@@ -34,7 +34,7 @@ type ApTableSlots = {
34
34
  */
35
35
  declare function setSearchFormValues(fields: any): void;
36
36
  declare function getSearchFormValues(): Partial<any> | undefined;
37
- declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any, "text">>, {
37
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any>>, {
38
38
  bordered: boolean;
39
39
  childrenColumnName: string;
40
40
  defaultExpandAllRows: boolean;
@@ -59,7 +59,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
59
59
  setSearchFormValues: typeof setSearchFormValues;
60
60
  getSearchFormValues: typeof getSearchFormValues;
61
61
  dataSource: ComputedRef<any[]>;
62
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any, "text">>, {
62
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any>>, {
63
63
  bordered: boolean;
64
64
  childrenColumnName: string;
65
65
  defaultExpandAllRows: boolean;
@@ -136,7 +136,7 @@ const Pe = {
136
136
  } = Te(), {
137
137
  e: y,
138
138
  b: u
139
- } = Be("ap-table"), W = ve("uiMode"), {
139
+ } = Be("ap-table"), W = ve("uiMode", "aplus"), {
140
140
  height: _,
141
141
  contentRef: j
142
142
  } = we(), h = d(() => {
@@ -54,6 +54,7 @@ export type ApTableValueFields = {
54
54
  */
55
55
  password: ApFormItemTextPasswordProps;
56
56
  };
57
+ export type ApTableValueTypes = keyof ApTableValueFields;
57
58
  export type ValueEnum = Record<string, ValueEnumType>;
58
59
  export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'> & {
59
60
  sorter?: string | boolean | CompareFn<T> | {
@@ -62,8 +63,8 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'>
62
63
  multiple?: number;
63
64
  };
64
65
  };
65
- export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = ExtraProColumnType<RecordType> & {
66
- children?: ApColumnType<any, RecordType>[];
66
+ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes = ApTableValueTypes> = ValueType extends ApTableValueTypes ? ExtraProColumnType<RecordType> & {
67
+ children?: ApColumnType<RecordType, ValueType>[];
67
68
  /**
68
69
  * 表单项所占据的格子数(1-24格)
69
70
  */
@@ -91,11 +92,11 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', Re
91
92
  /**
92
93
  * 自定义查询表单渲染
93
94
  */
94
- customRenderFormItem?: (config: ApColumnType) => any;
95
+ customRenderFormItem?: (config: ApColumnType<RecordType, ValueType>) => any;
95
96
  /**
96
97
  * 指定值类型(将会用于默认渲染和查询表单生成)
97
98
  */
98
- valueType?: keyof ApTableValueFields;
99
+ valueType?: ValueType;
99
100
  /**
100
101
  * 值类型额外配置的参数(用于查询表单渲染)
101
102
  */
@@ -105,7 +106,7 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', Re
105
106
  record: RecordType;
106
107
  index: number;
107
108
  renderIndex: number;
108
- column: ApColumnType<ValueType, RecordType>;
109
+ column: ApColumnType<RecordType, ValueType>;
109
110
  }) => ApTableValueFields[ValueType]);
110
111
  /**
111
112
  * 用于表单项排序的字段
@@ -116,16 +117,16 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', Re
116
117
  * 表头的菜单筛选项,设置为true后会尝试使用valueEnum生成filters
117
118
  */
118
119
  filters?: ColumnType<RecordType>['filters'] | true;
119
- };
120
+ } : never;
120
121
  export type RequestData<T> = {
121
122
  data: T[] | undefined;
122
123
  total: number;
123
124
  } & Record<string, any>;
124
- export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends keyof ApTableValueFields = 'text'> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size'> & {
125
+ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size'> & {
125
126
  /**
126
127
  * 列配置
127
128
  */
128
- columns?: ApColumnType<any, RecordType>[];
129
+ columns?: ApColumnType<RecordType, any>[];
129
130
  /**
130
131
  * 是否启用卡片样式
131
132
  */
@@ -138,13 +139,13 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
138
139
  * 自定义渲染搜索表单
139
140
  * @deprecated 未实现 暂不可用
140
141
  */
141
- searchFormRender?: (props: ApTableProps<RecordType, ParamsType, ValueType>, defaultDom: any) => any;
142
+ searchFormRender?: (props: ApTableProps<RecordType, ParamsType>, defaultDom: any) => any;
142
143
  /**
143
144
  * 请求获取dataSource
144
145
  * @param params
145
146
  * @returns
146
147
  */
147
- request?: (params: ParamsType & {
148
+ request?: (params: Partial<ParamsType> & {
148
149
  pageSize?: number;
149
150
  current?: number;
150
151
  sort?: Record<string, SortOrder>;
@@ -229,6 +230,6 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
229
230
  */
230
231
  dataSource: ComputedRef<RecordType>;
231
232
  };
232
- export type FixedApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = Omit<ApColumnType<ValueType, RecordType>, 'filters'> & {
233
+ export type FixedApColumnType<RecordType = any, ValueType extends ApTableValueTypes = ApTableValueTypes> = Omit<ApColumnType<RecordType, ValueType>, 'filters'> & {
233
234
  filters?: ColumnType<RecordType>['filters'];
234
235
  };