@kayak-sj/design 1.0.44 → 1.0.45
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/assets/{components-BURG32wy.css → components-BbBdjo9j.css} +1 -1
- package/dist/chunks/{Complex-Dgv9RrF1.js → Complex-BggSDwy7.js} +1 -1
- package/dist/chunks/{components-IRqZ4PJq.js → components-YIuGuaaJ.js} +683 -686
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/k-table/index.d.ts +2 -1
- package/dist/components/k-table/report/index.d.ts +0 -1
- package/dist/components/k-table/report/useExportKTableReport.d.ts +61 -2
- package/dist/components/k-table/types.d.ts +14 -0
- package/dist/components/k-table/utils/mergeQueryConfig.d.ts +104 -0
- package/dist/components/k-upload/KUpload.d.ts +2 -2
- package/dist/components/k-upload/components/UploadTipArea.d.ts +0 -3
- package/dist/components/k-upload/types.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +5 -4
- package/src/styles/components/_k-upload.scss +0 -54
- package/dist/components/k-table/report/mergeQueryConfig.d.ts +0 -9
|
@@ -26,8 +26,8 @@ export type { DictService, DictSelectOption, KTablePageOptions, KTablePagination
|
|
|
26
26
|
export { mapGroupDictToOptions } from './k-table';
|
|
27
27
|
export type { KTableColumn } from './k-table/types';
|
|
28
28
|
export { useKFormTemplateRef } from './k-form';
|
|
29
|
-
export { DICT_KEY, useKTableTemplateRef, useKTableCrossPageSelection, type KTableSelectionMode, type UseKTableCrossPageSelectionOptions, type UseKTableCrossPageSelectionReturn } from './k-table';
|
|
30
|
-
export { exportKTableReport, exportKTableReportData, useExportKTableReport,
|
|
29
|
+
export { DICT_KEY, useKTableTemplateRef, useKTableCrossPageSelection, withQueryFieldOptions, type KTableSelectionMode, type UseKTableCrossPageSelectionOptions, type UseKTableCrossPageSelectionReturn } from './k-table';
|
|
30
|
+
export { exportKTableReport, exportKTableReportData, useExportKTableReport, type ExportKTableReportOptions, type UseExportKTableReportOptions, type KTableExportApi, type KTableExportPayload } from './k-table';
|
|
31
31
|
export type { TableAction } from './k-table/composables/useTableData';
|
|
32
32
|
export type { TreeLoadHandler } from './k-table/composables/useTableTreeLoad';
|
|
33
33
|
export type { KLinkButtonItem } from './k-link-button';
|
package/dist/components/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, L as l, M as u, N as d, O as f, R as p, S as m, T as h, U as g, V as _, W as v, _ as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, u as L, v as R, w as z, x as B, y as V, z as H } from "../chunks/components-
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, L as l, M as u, N as d, O as f, R as p, S as m, T as h, U as g, V as _, W as v, _ as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, u as L, v as R, w as z, x as B, y as V, z as H } from "../chunks/components-YIuGuaaJ.js";
|
|
2
2
|
import { a as U, d as W, i as G, l as K, n as q, r as J, u as Y } from "../chunks/editorValue-DSKvW8ty.js";
|
|
3
|
-
export { s as DICT_KEY, I as KAffix, j as KBreadcrumb, o as KButton, b as KCard, P as KCascader, _ as KCheckbox, E as KColorPicker, t as KDatePicker, g as KDialog, v as KDialogHeader, u as KForm, e as KHandlePage, z as KIcon, H as KInput, n as KLinkButton, B as KLongPage, m as KPagination, V as KPanel, R as KPanelQuery, l as KRadio, p as KSelect, y as KTable, c as KTimePicker, a as KUpload, q as countEditorHtmlWords, J as countEditorWords, M as createUploadFileItem,
|
|
3
|
+
export { s as DICT_KEY, I as KAffix, j as KBreadcrumb, o as KButton, b as KCard, P as KCascader, _ as KCheckbox, E as KColorPicker, t as KDatePicker, g as KDialog, v as KDialogHeader, u as KForm, e as KHandlePage, z as KIcon, H as KInput, n as KLinkButton, B as KLongPage, m as KPagination, V as KPanel, R as KPanelQuery, l as KRadio, p as KSelect, y as KTable, c as KTimePicker, a as KUpload, q as countEditorHtmlWords, J as countEditorWords, M as createUploadFileItem, S as exportKTableReport, C as exportKTableReportData, h as getAllLucideKebabNames, G as getEditorHtml, U as getEditorWordCount, Y as getUploadConfig, F as hasUploadSubmitFields, w as mapGroupDictToOptions, i as pascalToKebab, d as registerFormComponents, r as resolveLucideIcon, K as toKEditorValue, f as toLucidePascalName, x as toUploadFiles, k as toUploadSubmitFields, W as updateUploadConfig, L as useExportKTableReport, O as useHandlePageInit, D as useKFormTemplateRef, N as useKTableCrossPageSelection, A as useKTableTemplateRef, T as withQueryFieldOptions };
|
|
@@ -20,6 +20,7 @@ export * from './types';
|
|
|
20
20
|
export { formatCellValue } from './utils/formatCellValue';
|
|
21
21
|
export { getColumnIdentity } from './utils/columnIdentity';
|
|
22
22
|
export { getRowKeyValue } from './utils/rowKey';
|
|
23
|
+
export { injectFormFieldComponentProps, injectQueryFieldProps, withQueryFieldOptions } from './utils/mergeQueryConfig';
|
|
23
24
|
export { convertColumnBind, normalizeColumns, useCellValue } from './composables/useTableColumns';
|
|
24
25
|
export { useTablePagination } from './composables/useTablePagination';
|
|
25
26
|
export { useTableData, type TableAction } from './composables/useTableData';
|
|
@@ -30,4 +31,4 @@ export { useKTableCrossPageSelection, type KTableSelectionMode, type UseKTableCr
|
|
|
30
31
|
export { useTableRadio } from './composables/useTableRadio';
|
|
31
32
|
export { useTableTreeLoad, type TreeLoadHandler } from './composables/useTableTreeLoad';
|
|
32
33
|
export { useTableRowSort } from './composables/useTableRowSort';
|
|
33
|
-
export { convertDownloadCol, exportKTableReport, exportKTableReportData, exportReportData, exportReportTable,
|
|
34
|
+
export { convertDownloadCol, exportKTableReport, exportKTableReportData, exportReportData, exportReportTable, pickExportColumns, useExportKTableReport, type ExportKTableReportOptions, type KTableExportApi, type KTableExportPayload, type PickExportColumnsOptions, type UseExportKTableReportOptions } from './report';
|
|
@@ -2,5 +2,4 @@ export type { KTableExportApi, KTableExportPayload } from './types';
|
|
|
2
2
|
export { convertDownloadCol } from './convertDownloadCol';
|
|
3
3
|
export { pickExportColumns, type PickExportColumnsOptions } from './pickExportColumns';
|
|
4
4
|
export { exportKTableReport, exportKTableReportData, exportReportData, exportReportTable, type ExportKTableReportOptions } from './exportKTableReport';
|
|
5
|
-
export { injectFormFieldComponentProps, injectQueryFieldProps, withQueryFieldOptions } from './mergeQueryConfig';
|
|
6
5
|
export { useExportKTableReport, type UseExportKTableReportOptions } from './useExportKTableReport';
|
|
@@ -3,17 +3,76 @@ import { KTableInstance } from '../composables/useKTable';
|
|
|
3
3
|
import { KTableColumn } from '../types';
|
|
4
4
|
import { KTableExportApi } from './types';
|
|
5
5
|
import { PickExportColumnsOptions } from './pickExportColumns';
|
|
6
|
+
/**
|
|
7
|
+
* {@link useExportKTableReport} 入参。
|
|
8
|
+
*
|
|
9
|
+
* @typeParam T - 表格行数据类型
|
|
10
|
+
*/
|
|
6
11
|
export interface UseExportKTableReportOptions<T> {
|
|
12
|
+
/** KTable 实例 ref(需能调用 `getQueryRef()?.getParams()`) */
|
|
7
13
|
tableRef: Ref<KTableInstance<T> | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* 参与导出的列配置;支持 plain / ref / getter。
|
|
16
|
+
* 实际导出前会再经 `pickExportColumns` 过滤 UI 列。
|
|
17
|
+
*/
|
|
8
18
|
columns: MaybeRefOrGetter<KTableColumn<T>[]>;
|
|
19
|
+
/**
|
|
20
|
+
* 导出接口;入参为 `{ globColumnlist, jsondata }`。
|
|
21
|
+
* 业务侧通常由 `@kayak-sj/cms-base/report` 的 `createReportExportApi` 提供。
|
|
22
|
+
*/
|
|
9
23
|
exportApi: KTableExportApi;
|
|
10
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* 查询参数转换;应与列表 `:convert-params` 保持一致。
|
|
26
|
+
* 勿用 `MaybeRefOrGetter`,避免与 getter 混淆。
|
|
27
|
+
*/
|
|
11
28
|
convertParams?: (params: Record<string, unknown>) => Record<string, unknown>;
|
|
29
|
+
/** 是否排除操作列(`type/prop === 'operates'`);支持 plain / ref / getter */
|
|
12
30
|
excludeOperates?: MaybeRefOrGetter<boolean | undefined>;
|
|
31
|
+
/** 是否排除最后一列(常用于去掉操作列);支持 plain / ref / getter */
|
|
13
32
|
excludeLast?: MaybeRefOrGetter<boolean | undefined>;
|
|
14
33
|
}
|
|
15
34
|
/**
|
|
16
|
-
* KTable 报表导出 composable(adaptable
|
|
35
|
+
* KTable 报表导出 composable(adaptable:`columns` / `exclude*` 支持 ref 或 getter)。
|
|
36
|
+
*
|
|
37
|
+
* 调用 `exportTable()` 时会:
|
|
38
|
+
* 1. 若已在导出中则直接 return(由 `exportLoading` 防重)
|
|
39
|
+
* 2. `toValue` 解析 reactive 入参
|
|
40
|
+
* 3. 委托 {@link exportKTableReport} 拉取查询条件并请求 `exportApi`
|
|
41
|
+
* 4. `finally` 中复位 loading
|
|
42
|
+
*
|
|
43
|
+
* @typeParam T - 表格行数据类型
|
|
44
|
+
* @param options - 导出配置,见 {@link UseExportKTableReportOptions}
|
|
45
|
+
* @returns `exportTable` 触发导出;`exportLoading` 可用于按钮 `:loading`
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* import { KButton, KTable, useExportKTableReport, useKTableTemplateRef } from '@kayak/design'
|
|
50
|
+
*
|
|
51
|
+
* const tableRef = useKTableTemplateRef<UserRow>('tableRef')
|
|
52
|
+
*
|
|
53
|
+
* const { exportTable, exportLoading } = useExportKTableReport({
|
|
54
|
+
* tableRef,
|
|
55
|
+
* columns: userColumns,
|
|
56
|
+
* exportApi: EXPORT_USER_LIST,
|
|
57
|
+
* convertParams: convertUserParams, // 与 <KTable :convert-params="..." /> 一致
|
|
58
|
+
* excludeLast: true // 去掉末尾操作列
|
|
59
|
+
* })
|
|
60
|
+
*
|
|
61
|
+
* // 模板:
|
|
62
|
+
* // <KButton :loading="exportLoading" @click="exportTable">导出</KButton>
|
|
63
|
+
* // <KTable ref="tableRef" :columns="userColumns" :convert-params="convertUserParams" ... />
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* // columns / exclude* 也可传入 getter,随权限或视图切换实时生效
|
|
69
|
+
* const { exportTable } = useExportKTableReport({
|
|
70
|
+
* tableRef,
|
|
71
|
+
* columns: () => (isAdmin.value ? adminColumns : userColumns),
|
|
72
|
+
* exportApi: EXPORT_USER_LIST,
|
|
73
|
+
* excludeOperates: () => !showOperates.value
|
|
74
|
+
* })
|
|
75
|
+
* ```
|
|
17
76
|
*/
|
|
18
77
|
export declare function useExportKTableReport<T>(options: UseExportKTableReportOptions<T>): {
|
|
19
78
|
exportTable: () => Promise<void>;
|
|
@@ -68,6 +68,20 @@ export interface KTableColumn<T = Record<string, unknown>> {
|
|
|
68
68
|
headerAlign?: 'left' | 'center' | 'right';
|
|
69
69
|
/** 列是否固定 */
|
|
70
70
|
fixed?: boolean | 'left' | 'right';
|
|
71
|
+
/**
|
|
72
|
+
* 列是否可排序(透传 ElTableColumn)。
|
|
73
|
+
* `true`:本地排序;`'custom'`:远程排序,需监听表格 `@sort-change`。
|
|
74
|
+
*/
|
|
75
|
+
sortable?: boolean | 'custom';
|
|
76
|
+
/** 自定义本地排序函数;仅 `sortable: true` 时生效,签名同 `Array.sort` */
|
|
77
|
+
sortMethod?: (a: T, b: T) => number;
|
|
78
|
+
/**
|
|
79
|
+
* 指定排序依据;`sortable: true` 且未设 `sortMethod` 时生效。
|
|
80
|
+
* 传数组时按多字段依次比较。
|
|
81
|
+
*/
|
|
82
|
+
sortBy?: string | string[] | ((row: T, index: number) => string);
|
|
83
|
+
/** 表头点击时排序状态轮换顺序;仅 `sortable: true` 时生效 */
|
|
84
|
+
sortOrders?: Array<'ascending' | 'descending' | null>;
|
|
71
85
|
/** 字典类型,需 app 层 `provide(DICT_KEY)` */
|
|
72
86
|
dict?: string;
|
|
73
87
|
/** 列展示类型 */
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { KFormConfigItem } from '../../k-form/types';
|
|
2
|
+
import { KTableQueryConfig } from '../../k-panel-query/types';
|
|
3
|
+
import { KTablePageOptions } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* 按字段 `id` 将 `patches` 浅合并进对应表单项的 `componentProps`,返回新数组(不 mutate 原配置)。
|
|
6
|
+
*
|
|
7
|
+
* - `patches` 的 key 必须与 `formConfigs[].id` 一致才会生效
|
|
8
|
+
* - 未出现在 `patches` 中的字段原样返回同一引用
|
|
9
|
+
* - 命中字段会展开为新对象:`componentProps` = `{ ...原 componentProps, ...patch }`(后写覆盖先写)
|
|
10
|
+
*
|
|
11
|
+
* @param formConfigs - 查询表单字段配置列表
|
|
12
|
+
* @param patches - 按字段 id 索引的 `componentProps` 补丁,如 `{ status: { options: [...] } }`
|
|
13
|
+
* @returns 注入后的新 `formConfigs` 数组
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const formConfigs: KFormConfigItem[] = [
|
|
18
|
+
* { id: 'status', component: 'Select', componentProps: { clearable: true } },
|
|
19
|
+
* { id: 'name', component: 'Input' }
|
|
20
|
+
* ]
|
|
21
|
+
*
|
|
22
|
+
* const next = injectFormFieldComponentProps(formConfigs, {
|
|
23
|
+
* status: {
|
|
24
|
+
* options: [
|
|
25
|
+
* { label: '启用', value: '1' },
|
|
26
|
+
* { label: '停用', value: '0' }
|
|
27
|
+
* ]
|
|
28
|
+
* }
|
|
29
|
+
* })
|
|
30
|
+
*
|
|
31
|
+
* // next[0].componentProps => { clearable: true, options: [...] }
|
|
32
|
+
* // next[1] === formConfigs[1](未命中,同一引用)
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function injectFormFieldComponentProps(formConfigs: KFormConfigItem[], patches: Record<string, Record<string, unknown>>): KFormConfigItem[];
|
|
36
|
+
/**
|
|
37
|
+
* 克隆 `queryConfig`,并将其 `form.formConfigs` 通过 {@link injectFormFieldComponentProps} 注入字段 props。
|
|
38
|
+
*
|
|
39
|
+
* - 无 `form` 时直接返回原 `queryConfig`(不克隆)
|
|
40
|
+
* - 有 `form` 时浅克隆 `queryConfig` 与 `form`,再写入注入后的 `formConfigs`
|
|
41
|
+
* - `formConfigs` 缺省时按空数组处理
|
|
42
|
+
*
|
|
43
|
+
* @param queryConfig - KTable / KPanelQuery 的查询配置
|
|
44
|
+
* @param patches - 按字段 id 索引的 `componentProps` 补丁
|
|
45
|
+
* @returns 注入后的新 `KTableQueryConfig`(无 `form` 时为原引用)
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const query: KTableQueryConfig = {
|
|
50
|
+
* title: '查询条件',
|
|
51
|
+
* form: {
|
|
52
|
+
* formConfigs: [{ id: 'orgId', component: 'Select', label: '组织' }]
|
|
53
|
+
* }
|
|
54
|
+
* }
|
|
55
|
+
*
|
|
56
|
+
* const next = injectQueryFieldProps(query, {
|
|
57
|
+
* orgId: { options: await fetchOrgOptions(), filterable: true }
|
|
58
|
+
* })
|
|
59
|
+
*
|
|
60
|
+
* // next !== query,且 next.form.formConfigs[0].componentProps 含 options / filterable
|
|
61
|
+
* // query 本身未被修改
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function injectQueryFieldProps(queryConfig: KTableQueryConfig, patches: Record<string, Record<string, unknown>>): KTableQueryConfig;
|
|
65
|
+
/**
|
|
66
|
+
* 克隆 `tableOptions`,并对其 `query` 通过 {@link injectQueryFieldProps} 注入查询区字段 `componentProps`。
|
|
67
|
+
*
|
|
68
|
+
* 页面侧最常用入口:静态 `tableOptions` + 异步拉到的 options / 远程配置,合并后再传给 KTable。
|
|
69
|
+
*
|
|
70
|
+
* - 无 `query` 时直接返回原 `options`(不克隆)
|
|
71
|
+
* - 有 `query` 时浅克隆 `options`,并写入注入后的 `query`
|
|
72
|
+
*
|
|
73
|
+
* @typeParam T - 表格行数据类型
|
|
74
|
+
* @param options - 列表页声明式配置(`KTablePageOptions`)
|
|
75
|
+
* @param fieldComponentProps - 按查询字段 id 索引的 `componentProps` 补丁
|
|
76
|
+
* @returns 注入后的新 `KTablePageOptions`(无 `query` 时为原引用)
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const tableOptions: KTablePageOptions<UserRow> = {
|
|
81
|
+
* columns: [{ prop: 'name', label: '姓名' }],
|
|
82
|
+
* query: {
|
|
83
|
+
* form: {
|
|
84
|
+
* formConfigs: [
|
|
85
|
+
* { id: 'status', component: 'Select', label: '状态' },
|
|
86
|
+
* { id: 'deptId', component: 'Select', label: '部门' }
|
|
87
|
+
* ]
|
|
88
|
+
* }
|
|
89
|
+
* }
|
|
90
|
+
* }
|
|
91
|
+
*
|
|
92
|
+
* // 异步拿到选项后注入,再交给 KTable
|
|
93
|
+
* const statusOptions = await loadStatusDict()
|
|
94
|
+
* const deptOptions = await loadDeptList()
|
|
95
|
+
*
|
|
96
|
+
* const bound = withQueryFieldOptions(tableOptions, {
|
|
97
|
+
* status: { options: statusOptions },
|
|
98
|
+
* deptId: { options: deptOptions, filterable: true }
|
|
99
|
+
* })
|
|
100
|
+
*
|
|
101
|
+
* // <KTable v-bind="bound" :action="fetchUsers" />
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export declare function withQueryFieldOptions<T>(options: KTablePageOptions<T>, fieldComponentProps: Record<string, Record<string, unknown>>): KTablePageOptions<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadFile, UploadInstance, UploadUserFile } from 'element-plus';
|
|
2
2
|
import { KUploadFileItem } from '../../config/uploadConfig';
|
|
3
|
-
import { KUploadProps } from './types';
|
|
3
|
+
import { KUploadListType, KUploadProps } from './types';
|
|
4
4
|
declare var __VLS_10: {}, __VLS_12: {}, __VLS_27: {}, __VLS_29: {}, __VLS_43: {
|
|
5
5
|
file: UploadFile;
|
|
6
6
|
}, __VLS_57: {
|
|
@@ -45,7 +45,7 @@ declare const __VLS_base: import('vue').DefineComponent<KUploadProps, {
|
|
|
45
45
|
disabled: boolean;
|
|
46
46
|
modelValue: KUploadFileItem[];
|
|
47
47
|
limit: number;
|
|
48
|
-
listType:
|
|
48
|
+
listType: KUploadListType;
|
|
49
49
|
templateCode: string;
|
|
50
50
|
templateBtnText: string;
|
|
51
51
|
tipType: import('./types').KUploadTipType;
|
|
@@ -2,11 +2,8 @@ import { KUploadTipType } from '../types';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
tipType?: KUploadTipType;
|
|
4
4
|
tipText?: string;
|
|
5
|
-
/** picture2 上传进度(0 表示不显示) */
|
|
6
|
-
percentage?: number;
|
|
7
5
|
};
|
|
8
6
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
-
percentage: number;
|
|
10
7
|
tipType: KUploadTipType;
|
|
11
8
|
tipText: string;
|
|
12
9
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KUploadFileItem } from '../../config/uploadConfig';
|
|
2
2
|
/** KUpload 支持的列表展示类型(对齐 legacy listType) */
|
|
3
|
-
export type KUploadListType = 'text' | 'picture' | 'picture-card' | '
|
|
3
|
+
export type KUploadListType = 'text' | 'picture' | 'picture-card' | 'video' | 'audio' | 'lottie' | 'file';
|
|
4
4
|
/** 提示展示形式 */
|
|
5
5
|
export type KUploadTipType = 'tooltip' | 'text';
|
|
6
6
|
/** 图片裁剪配置(透传 vue-img-cutter,仅列出常用项) */
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, L as l, M as u, N as d, O as f, R as ee, S as te, T as ne, U as re, V as ie, W as ae, _ as oe, a as se, b as ce, c as le, d as ue, f as de, g as fe, h as pe, i as me, j as p, k as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C, v as w, w as T, x as E, y as D, z as O } from "./chunks/components-
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, L as l, M as u, N as d, O as f, R as ee, S as te, T as ne, U as re, V as ie, W as ae, _ as oe, a as se, b as ce, c as le, d as ue, f as de, g as fe, h as pe, i as me, j as p, k as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C, v as w, w as T, x as E, y as D, z as O } from "./chunks/components-YIuGuaaJ.js";
|
|
2
2
|
import { a as k, d as A, i as j, l as M, n as N, r as P, u as F } from "./chunks/editorValue-DSKvW8ty.js";
|
|
3
3
|
import { computed as I, toValue as L } from "vue";
|
|
4
4
|
//#region src/components/k-form/composables/useFormSchema.ts
|
|
@@ -214,4 +214,4 @@ function Me(e) {
|
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
//#endregion
|
|
217
|
-
export { G as BANK_ACCOUNT_PATTERN, ve as DECIMAL_MONEY_PATTERN, s as DICT_KEY, K as HTTP_URL_PATTERN, X as ID_CODE_PATTERN, S as KAffix, _ as KBreadcrumb, o as KButton, ce as KCard, b as KCascader, ie as KCheckbox, me as KColorPicker, t as KDatePicker, re as KDialog, ae as KDialogHeader, u as KForm, e as KHandlePage, T as KIcon, O as KInput, n as KLinkButton, E as KLongPage, te as KPagination, D as KPanel, w as KPanelQuery, l as KRadio, ee as KSelect, oe as KTable, c as KTimePicker, a as KUpload, J as NON_NEGATIVE_INT_PATTERN, Y as OPTIONAL_NON_NEGATIVE_INT_PATTERN, U as PHONE_PATTERN, q as POSITIVE_INT_PATTERN, W as USC_CODE_PATTERN, Se as alphaNumCodeRule, Q as bankAccountRule, be as cnAlphaNumRule, je as compareRule, N as countEditorHtmlWords, P as countEditorWords, Z as createPatternValidator, v as createUploadFileItem,
|
|
217
|
+
export { G as BANK_ACCOUNT_PATTERN, ve as DECIMAL_MONEY_PATTERN, s as DICT_KEY, K as HTTP_URL_PATTERN, X as ID_CODE_PATTERN, S as KAffix, _ as KBreadcrumb, o as KButton, ce as KCard, b as KCascader, ie as KCheckbox, me as KColorPicker, t as KDatePicker, re as KDialog, ae as KDialogHeader, u as KForm, e as KHandlePage, T as KIcon, O as KInput, n as KLinkButton, E as KLongPage, te as KPagination, D as KPanel, w as KPanelQuery, l as KRadio, ee as KSelect, oe as KTable, c as KTimePicker, a as KUpload, J as NON_NEGATIVE_INT_PATTERN, Y as OPTIONAL_NON_NEGATIVE_INT_PATTERN, U as PHONE_PATTERN, q as POSITIVE_INT_PATTERN, W as USC_CODE_PATTERN, Se as alphaNumCodeRule, Q as bankAccountRule, be as cnAlphaNumRule, je as compareRule, N as countEditorHtmlWords, P as countEditorWords, Z as createPatternValidator, v as createUploadFileItem, ue as exportKTableReport, de as exportKTableReportData, ne as getAllLucideKebabNames, ge as getDesignTheme, j as getEditorHtml, k as getEditorWordCount, F as getUploadConfig, x as hasUploadSubmitFields, Te as httpUrlRule, ke as idCodeRule, _e as initDesignTheme, he as mapFieldVisibility, fe as mapGroupDictToOptions, xe as mixedNameRule, Ae as moneyRule, De as nonNegativeIntRule, Oe as optionalNonNegativeIntRule, i as pascalToKebab, Ce as phoneRule, Ee as positiveIntRule, d as registerFormComponents, r as resolveLucideIcon, R as resolveSchemaField, H as setDesignTheme, Me as setupDesign, M as toKEditorValue, f as toLucidePascalName, le as toUploadFiles, h as toUploadSubmitFields, A as updateUploadConfig, we as uscCodeRule, C as useExportKTableReport, z as useFormSchema, m as useHandlePageInit, p as useKFormTemplateRef, y as useKTableCrossPageSelection, g as useKTableTemplateRef, pe as withQueryFieldOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayak-sj/design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "PC 组件库(Vue3 + Element Plus,对应旧 @kayak/kayak-design-vue2)",
|
|
6
6
|
"license": "ISC",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@element-plus/icons-vue": "^2.3.2",
|
|
54
|
-
"@vueuse/core": "^14.4.0",
|
|
55
54
|
"@wangeditor/editor": "^5.1.23",
|
|
56
55
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
|
57
56
|
"dayjs": "^1.11.13",
|
|
@@ -62,6 +61,7 @@
|
|
|
62
61
|
"vue-img-cutter": "3"
|
|
63
62
|
},
|
|
64
63
|
"peerDependencies": {
|
|
64
|
+
"@vueuse/core": "^14.4.0",
|
|
65
65
|
"element-plus": "^2.14.4",
|
|
66
66
|
"lucide-vue-next": "^1.0.0",
|
|
67
67
|
"vue": "^3.5.0"
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/lodash-es": "^4.17.12",
|
|
71
71
|
"@types/sortablejs": "^1.15.8",
|
|
72
|
+
"@vueuse/core": "^14.4.0",
|
|
72
73
|
"element-plus": "2.14.4",
|
|
73
74
|
"lucide-vue-next": "^1.0.0",
|
|
74
75
|
"sass": "^1.89.2",
|
|
@@ -76,8 +77,8 @@
|
|
|
76
77
|
"vite": "^8.1.5",
|
|
77
78
|
"vitest": "^4.1.10",
|
|
78
79
|
"vue": "^3.5.13",
|
|
79
|
-
"@kayak/
|
|
80
|
-
"@kayak/
|
|
80
|
+
"@kayak/vite-config": "1.0.0",
|
|
81
|
+
"@kayak/tsconfig": "1.0.0"
|
|
81
82
|
},
|
|
82
83
|
"scripts": {
|
|
83
84
|
"build": "vite build",
|
|
@@ -197,60 +197,6 @@
|
|
|
197
197
|
pointer-events: none;
|
|
198
198
|
transform: translateY(-50%);
|
|
199
199
|
}
|
|
200
|
-
|
|
201
|
-
&.k-upload--picture2 {
|
|
202
|
-
display: flex;
|
|
203
|
-
position: relative;
|
|
204
|
-
border: 1px solid var(--k-color-border);
|
|
205
|
-
border-radius: var(--k-radius-md);
|
|
206
|
-
box-sizing: border-box;
|
|
207
|
-
padding: 10px 5px 5px;
|
|
208
|
-
max-width: 100%;
|
|
209
|
-
|
|
210
|
-
.el-upload--picture-card {
|
|
211
|
-
width: min-content;
|
|
212
|
-
height: min-content;
|
|
213
|
-
border-radius: 0;
|
|
214
|
-
background-color: transparent;
|
|
215
|
-
border: 0;
|
|
216
|
-
line-height: normal;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.el-upload-list {
|
|
220
|
-
width: min-content;
|
|
221
|
-
min-width: 100px;
|
|
222
|
-
min-height: 100px;
|
|
223
|
-
line-height: 0;
|
|
224
|
-
margin: 0 10px 5px 5px;
|
|
225
|
-
border-radius: var(--k-radius-md);
|
|
226
|
-
background-color: var(--k-color-bg-muted);
|
|
227
|
-
overflow: hidden;
|
|
228
|
-
|
|
229
|
-
.el-upload-list__item {
|
|
230
|
-
width: 100px;
|
|
231
|
-
height: 100px;
|
|
232
|
-
margin: 0;
|
|
233
|
-
|
|
234
|
-
&:first-child {
|
|
235
|
-
margin-top: 0;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.el-upload__tip {
|
|
241
|
-
position: absolute;
|
|
242
|
-
left: 120px;
|
|
243
|
-
top: 45px;
|
|
244
|
-
line-height: 1.2;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.k-upload__progress {
|
|
248
|
-
width: calc(100% - 120px);
|
|
249
|
-
position: absolute;
|
|
250
|
-
left: 120px;
|
|
251
|
-
top: 80px;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
200
|
}
|
|
255
201
|
|
|
256
202
|
.k-upload-wrap {
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { KFormConfigItem } from '../../k-form/types';
|
|
2
|
-
import { KTableQueryConfig } from '../../k-panel-query/types';
|
|
3
|
-
import { KTablePageOptions } from '../types';
|
|
4
|
-
/** 按字段 id 合并 componentProps */
|
|
5
|
-
export declare function injectFormFieldComponentProps(formConfigs: KFormConfigItem[], patches: Record<string, Record<string, unknown>>): KFormConfigItem[];
|
|
6
|
-
/** 克隆 query 配置并注入字段 componentProps */
|
|
7
|
-
export declare function injectQueryFieldProps(queryConfig: KTableQueryConfig, patches: Record<string, Record<string, unknown>>): KTableQueryConfig;
|
|
8
|
-
/** 克隆 tableOptions 并注入查询区字段 componentProps */
|
|
9
|
-
export declare function withQueryFieldOptions<T>(options: KTablePageOptions<T>, fieldComponentProps: Record<string, Record<string, unknown>>): KTablePageOptions<T>;
|