urit-qf-ui 0.2.7 → 1.0.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/README.md +88 -22
- package/dist/components/UBaseInfo.vue.d.ts +22 -0
- package/dist/components/UCascader.vue.d.ts +22 -37
- package/dist/components/UDialog.vue.d.ts +94 -0
- package/dist/components/UForm.vue.d.ts +233 -0
- package/dist/components/UMenu.vue.d.ts +230 -11
- package/dist/components/UResults.vue.d.ts +23 -0
- package/dist/components/USearch.vue.d.ts +51 -0
- package/dist/components/UTable.vue.d.ts +54 -0
- package/dist/components/UTablePage.vue.d.ts +152 -0
- package/dist/index.d.ts +33 -18
- package/dist/index.js +2962 -3147
- package/dist/index.umd.cjs +1 -2
- package/dist/layout/UGrid.vue.d.ts +44 -0
- package/dist/model/base-info.d.ts +113 -0
- package/dist/model/cascader.d.ts +135 -0
- package/dist/model/form.d.ts +143 -0
- package/dist/model/grid.d.ts +53 -0
- package/dist/model/menu.d.ts +140 -0
- package/dist/model/results.d.ts +90 -0
- package/dist/model/search.d.ts +93 -0
- package/dist/model/table-page.d.ts +44 -0
- package/dist/model/table.d.ts +163 -0
- package/dist/parser/cascader.d.ts +35 -0
- package/dist/parser/form.d.ts +7 -0
- package/dist/parser/menu.d.ts +5 -0
- package/dist/parser/table-page.d.ts +15 -0
- package/dist/parser/yaml-parser.d.ts +41 -0
- package/dist/qf/interface.d.ts +22 -0
- package/dist/qf/qf.d.ts +23 -1
- package/dist/style.css +1 -1
- package/dist/utils/base-info.d.ts +39 -0
- package/dist/utils/cascader.d.ts +45 -0
- package/dist/utils/form.d.ts +59 -0
- package/dist/utils/menu.d.ts +14 -0
- package/dist/utils/results.d.ts +38 -0
- package/dist/utils/search.d.ts +8 -0
- package/dist/utils/table.d.ts +16 -0
- package/package.json +1 -1
- package/dist/components/UDate.vue.d.ts +0 -47
- package/dist/components/UDict.vue.d.ts +0 -49
- package/dist/components/UInput.vue.d.ts +0 -52
- package/dist/components/UInputNumber.vue.d.ts +0 -52
- package/dist/components/UToggle.vue.d.ts +0 -54
- package/dist/show/UCascaderShow.vue.d.ts +0 -11
- package/dist/show/UDateShow.vue.d.ts +0 -15
- package/dist/show/UDictShow.vue.d.ts +0 -9
- package/dist/show/UFieldView.vue.d.ts +0 -24
- package/dist/show/UInputShow.vue.d.ts +0 -10
- package/dist/show/UToggleShow.vue.d.ts +0 -12
- package/dist/ts/constant.d.ts +0 -24
- package/dist/ts/dict.d.ts +0 -105
- package/dist/ts/form-render.d.ts +0 -30
- package/dist/ts/http.d.ts +0 -13
- package/dist/ts/model.d.ts +0 -202
- package/dist/ts/notify.d.ts +0 -42
- package/dist/ts/table-data-service.d.ts +0 -30
- package/dist/ts/table-render.d.ts +0 -210
- package/dist/uform/FormContainer.vue.d.ts +0 -37
- package/dist/uform/FormField.vue.d.ts +0 -16
- package/dist/uform/FormGrid.vue.d.ts +0 -24
- package/dist/uform/FormRender.vue.d.ts +0 -104
- package/dist/uform/TableDetail.vue.d.ts +0 -37
- package/dist/uform/TableGrid.vue.d.ts +0 -51
- package/dist/uform/TablePagination.vue.d.ts +0 -14
- package/dist/uform/TableRender.vue.d.ts +0 -618
- package/dist/uform/TableSearch.vue.d.ts +0 -38
- package/dist/uform/TableToolbar.vue.d.ts +0 -31
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ResultsAlign, ResultsColumn, ResultsOptions } from '../model/results';
|
|
2
|
+
import { getByPath, toCssSize, toDisplayText } from './form';
|
|
3
|
+
export { getByPath, toCssSize, toDisplayText };
|
|
4
|
+
/** 默认表头背景(浅灰,跟 EP 表格一致) */
|
|
5
|
+
export declare const DEFAULT_HEADER_BG = "#f5f7fa";
|
|
6
|
+
/** 默认表头文字色 */
|
|
7
|
+
export declare const DEFAULT_HEADER_COLOR = "#303133";
|
|
8
|
+
/** 默认数据行背景 */
|
|
9
|
+
export declare const DEFAULT_ITEM_BG = "#fff";
|
|
10
|
+
/** 默认斑马纹底色(比数据行深一档) */
|
|
11
|
+
export declare const DEFAULT_STRIPE_BG = "#fafafa";
|
|
12
|
+
/** 分隔线颜色(外框 / 行线 / 列线)—— 固定值,不开放配置 */
|
|
13
|
+
export declare const RESULTS_LINE_COLOR = "#ebeef5";
|
|
14
|
+
/** 对齐方式归一:只有明确写 center / right 才用,其余一律 left */
|
|
15
|
+
export declare function resolveAlign(align?: ResultsAlign): ResultsAlign;
|
|
16
|
+
/** 该列单元格走哪个插槽(字符串 = 插槽名;true = 用 prop 当插槽名);没配返回 undefined */
|
|
17
|
+
export declare function resolveResultsSlotName(column?: ResultsColumn): string | undefined;
|
|
18
|
+
/** 取该单元格的原始值:按 `column.prop` 从行数据里取(prop 为空返回 undefined) */
|
|
19
|
+
export declare function getCellValue(row: any, column?: ResultsColumn): any;
|
|
20
|
+
/**
|
|
21
|
+
* 列定义 → CSS Grid 的 `grid-template-columns`。
|
|
22
|
+
* 表头与每一个数据行都用同一份模板,所以列天然对齐、不需要任何宽度计算。
|
|
23
|
+
*
|
|
24
|
+
* 每列的取值顺序:`width` → `minmax(minWidth, 1fr)` → `minmax(0, 1fr)`。
|
|
25
|
+
* `minmax(0, ...)` 的 0 下限是必须的 —— 否则长文本会把整列撑开、挤坏其它列。
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildGridTemplate(columns?: ResultsColumn[]): string;
|
|
28
|
+
/** 组件外框尺寸:宽默认 100%,高不给就随内容自适应 */
|
|
29
|
+
export declare function resolveSize(options?: ResultsOptions | null): {
|
|
30
|
+
width: string;
|
|
31
|
+
height?: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 颜色 → CSS 变量(组件样式里用 `var(--u-results-header-bg)` 取)。
|
|
35
|
+
* 走变量而不是直接拼样式,是为了让「表头 / 数据行 / 斑马纹」这些底色能被 CSS 的
|
|
36
|
+
* 结构选择器(`:nth-child` 等)复用 —— 内联 style 是没法参与选择器的。
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveColorVars(options?: ResultsOptions | null): Record<string, string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SearchItem } from '../model/search';
|
|
2
|
+
export { getByPath, setByPath, isEmptyValue, toCssSize } from './form';
|
|
3
|
+
export { isCascadedSelect, selectDepth, collectLevelFields, buildLevelSkeleton, buildSelectLevels, normalizeCascaderTree, } from './cascader';
|
|
4
|
+
export type { CascaderOption, CascaderLevel } from '../model/cascader';
|
|
5
|
+
/** 默认占位提示(与 UForm 同一套措辞) */
|
|
6
|
+
export declare function defaultPlaceholder(item: SearchItem): string;
|
|
7
|
+
/** 去掉空值后的查询条件(不改原对象) */
|
|
8
|
+
export declare function cleanParams(model?: Record<string, any>): Record<string, any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TableColumnConfig, TableColumnOption } from '../model/table';
|
|
2
|
+
import { getByPath } from './form';
|
|
3
|
+
export { getByPath };
|
|
4
|
+
export declare const getTableValue: typeof getByPath;
|
|
5
|
+
export { toCssSize } from './form';
|
|
6
|
+
export { toDisplayText } from './form';
|
|
7
|
+
/** tag 列:按 options 映射出文字与颜色;没配 options 就原样显示 */
|
|
8
|
+
export declare function resolveTagOption(value: any, options?: TableColumnOption[]): TableColumnOption | null;
|
|
9
|
+
/** 取列最终的宽度(快捷写法优先于 props.width) */
|
|
10
|
+
export declare function resolveColumnWidth(column: TableColumnConfig): number | string | undefined;
|
|
11
|
+
/** 取列最终的最小宽度 */
|
|
12
|
+
export declare function resolveColumnMinWidth(column: TableColumnConfig): number | string | undefined;
|
|
13
|
+
/** 该列是否需要用插槽渲染(slot 传字符串时用字符串当插槽名,其余用 field) */
|
|
14
|
+
export declare function resolveColumnSlotName(column: TableColumnConfig): string | undefined;
|
|
15
|
+
/** index / selection / expand 三类列由 el-table 自带渲染,不挂默认插槽 */
|
|
16
|
+
export declare function isBareColumn(column: TableColumnConfig): boolean;
|
package/package.json
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
fieldLabel?: string;
|
|
3
|
-
labelPosition?: 'top' | 'left';
|
|
4
|
-
labelWidth?: number | string;
|
|
5
|
-
labelAlign?: 'left' | 'center' | 'right';
|
|
6
|
-
required?: boolean;
|
|
7
|
-
modelValue?: any;
|
|
8
|
-
mode?: 'single' | 'multiple' | 'range';
|
|
9
|
-
locale?: 'zh-CN' | 'en-US';
|
|
10
|
-
mask?: string;
|
|
11
|
-
min?: string;
|
|
12
|
-
max?: string;
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
16
|
-
labelPosition: string;
|
|
17
|
-
mode: string;
|
|
18
|
-
locale: string;
|
|
19
|
-
mask: string;
|
|
20
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
22
|
-
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
23
|
-
labelPosition: string;
|
|
24
|
-
mode: string;
|
|
25
|
-
locale: string;
|
|
26
|
-
mask: string;
|
|
27
|
-
}>>> & Readonly<{
|
|
28
|
-
[x: `on${Capitalize<string>}`]: ((...args: unknown[] & []) => any) | undefined;
|
|
29
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
|
-
export default _default;
|
|
31
|
-
type __VLS_WithDefaults<P, D> = {
|
|
32
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
33
|
-
default: D[K];
|
|
34
|
-
}> : P[K];
|
|
35
|
-
};
|
|
36
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
-
type __VLS_TypePropsToOption<T> = {
|
|
38
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
|
-
} : {
|
|
41
|
-
type: import('vue').PropType<T[K]>;
|
|
42
|
-
required: true;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
type __VLS_PrettifyLocal<T> = {
|
|
46
|
-
[K in keyof T]: T[K];
|
|
47
|
-
} & {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
fieldLabel?: string;
|
|
3
|
-
labelPosition?: 'top' | 'left';
|
|
4
|
-
labelWidth?: number | string;
|
|
5
|
-
labelAlign?: 'left' | 'center' | 'right';
|
|
6
|
-
required?: boolean;
|
|
7
|
-
modelValue?: any;
|
|
8
|
-
outlined?: boolean;
|
|
9
|
-
dense?: boolean;
|
|
10
|
-
filled?: boolean;
|
|
11
|
-
borderless?: boolean;
|
|
12
|
-
label?: string;
|
|
13
|
-
hint?: string;
|
|
14
|
-
error?: boolean;
|
|
15
|
-
errorMessage?: string;
|
|
16
|
-
type?: string;
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
disable?: boolean;
|
|
19
|
-
readonly?: boolean;
|
|
20
|
-
dictType?: string;
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}
|
|
23
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
24
|
-
labelPosition: string;
|
|
25
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
27
|
-
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
28
|
-
labelPosition: string;
|
|
29
|
-
}>>> & Readonly<{
|
|
30
|
-
[x: `on${Capitalize<string>}`]: ((...args: unknown[] & []) => any) | undefined;
|
|
31
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
32
|
-
export default _default;
|
|
33
|
-
type __VLS_WithDefaults<P, D> = {
|
|
34
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
35
|
-
default: D[K];
|
|
36
|
-
}> : P[K];
|
|
37
|
-
};
|
|
38
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
39
|
-
type __VLS_TypePropsToOption<T> = {
|
|
40
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
41
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
42
|
-
} : {
|
|
43
|
-
type: import('vue').PropType<T[K]>;
|
|
44
|
-
required: true;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
type __VLS_PrettifyLocal<T> = {
|
|
48
|
-
[K in keyof T]: T[K];
|
|
49
|
-
} & {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
fieldLabel?: string;
|
|
3
|
-
labelPosition?: 'top' | 'left';
|
|
4
|
-
labelWidth?: number | string;
|
|
5
|
-
labelAlign?: 'left' | 'center' | 'right';
|
|
6
|
-
required?: boolean;
|
|
7
|
-
modelValue?: any;
|
|
8
|
-
outlined?: boolean;
|
|
9
|
-
dense?: boolean;
|
|
10
|
-
filled?: boolean;
|
|
11
|
-
borderless?: boolean;
|
|
12
|
-
label?: string;
|
|
13
|
-
hint?: string;
|
|
14
|
-
error?: boolean;
|
|
15
|
-
errorMessage?: string;
|
|
16
|
-
type?: string;
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
disable?: boolean;
|
|
19
|
-
readonly?: boolean;
|
|
20
|
-
prefix?: string;
|
|
21
|
-
suffix?: string;
|
|
22
|
-
mask?: string;
|
|
23
|
-
maxlength?: number | string;
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}
|
|
26
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
27
|
-
labelPosition: string;
|
|
28
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
30
|
-
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
31
|
-
labelPosition: string;
|
|
32
|
-
}>>> & Readonly<{
|
|
33
|
-
[x: `on${Capitalize<string>}`]: ((...args: unknown[] & []) => any) | undefined;
|
|
34
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
35
|
-
export default _default;
|
|
36
|
-
type __VLS_WithDefaults<P, D> = {
|
|
37
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
38
|
-
default: D[K];
|
|
39
|
-
}> : P[K];
|
|
40
|
-
};
|
|
41
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
42
|
-
type __VLS_TypePropsToOption<T> = {
|
|
43
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
44
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
45
|
-
} : {
|
|
46
|
-
type: import('vue').PropType<T[K]>;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
type __VLS_PrettifyLocal<T> = {
|
|
51
|
-
[K in keyof T]: T[K];
|
|
52
|
-
} & {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
fieldLabel?: string;
|
|
3
|
-
labelPosition?: 'top' | 'left';
|
|
4
|
-
labelWidth?: number | string;
|
|
5
|
-
labelAlign?: 'left' | 'center' | 'right';
|
|
6
|
-
required?: boolean;
|
|
7
|
-
modelValue?: number;
|
|
8
|
-
outlined?: boolean;
|
|
9
|
-
dense?: boolean;
|
|
10
|
-
filled?: boolean;
|
|
11
|
-
borderless?: boolean;
|
|
12
|
-
label?: string;
|
|
13
|
-
hint?: string;
|
|
14
|
-
error?: boolean;
|
|
15
|
-
errorMessage?: string;
|
|
16
|
-
type?: string;
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
disable?: boolean;
|
|
19
|
-
readonly?: boolean;
|
|
20
|
-
min?: number;
|
|
21
|
-
max?: number;
|
|
22
|
-
step?: number;
|
|
23
|
-
precision?: number;
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}
|
|
26
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
27
|
-
labelPosition: string;
|
|
28
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
30
|
-
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
31
|
-
labelPosition: string;
|
|
32
|
-
}>>> & Readonly<{
|
|
33
|
-
[x: `on${Capitalize<string>}`]: ((...args: unknown[] & []) => any) | undefined;
|
|
34
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
35
|
-
export default _default;
|
|
36
|
-
type __VLS_WithDefaults<P, D> = {
|
|
37
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
38
|
-
default: D[K];
|
|
39
|
-
}> : P[K];
|
|
40
|
-
};
|
|
41
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
42
|
-
type __VLS_TypePropsToOption<T> = {
|
|
43
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
44
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
45
|
-
} : {
|
|
46
|
-
type: import('vue').PropType<T[K]>;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
type __VLS_PrettifyLocal<T> = {
|
|
51
|
-
[K in keyof T]: T[K];
|
|
52
|
-
} & {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
fieldLabel?: string;
|
|
3
|
-
labelPosition?: 'top' | 'left';
|
|
4
|
-
labelWidth?: number | string;
|
|
5
|
-
labelAlign?: 'left' | 'center' | 'right';
|
|
6
|
-
required?: boolean;
|
|
7
|
-
modelValue?: any;
|
|
8
|
-
dense?: boolean;
|
|
9
|
-
color?: string;
|
|
10
|
-
trueValue?: any;
|
|
11
|
-
falseValue?: any;
|
|
12
|
-
label?: string;
|
|
13
|
-
hint?: string;
|
|
14
|
-
disable?: boolean;
|
|
15
|
-
readonly?: boolean;
|
|
16
|
-
activeText?: string;
|
|
17
|
-
inactiveText?: string;
|
|
18
|
-
activeColor?: string;
|
|
19
|
-
inactiveColor?: string;
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
23
|
-
labelPosition: string;
|
|
24
|
-
dense: boolean;
|
|
25
|
-
trueValue: boolean;
|
|
26
|
-
falseValue: boolean;
|
|
27
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
29
|
-
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
30
|
-
labelPosition: string;
|
|
31
|
-
dense: boolean;
|
|
32
|
-
trueValue: boolean;
|
|
33
|
-
falseValue: boolean;
|
|
34
|
-
}>>> & Readonly<{
|
|
35
|
-
[x: `on${Capitalize<string>}`]: ((...args: unknown[] & []) => any) | undefined;
|
|
36
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
37
|
-
export default _default;
|
|
38
|
-
type __VLS_WithDefaults<P, D> = {
|
|
39
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
40
|
-
default: D[K];
|
|
41
|
-
}> : P[K];
|
|
42
|
-
};
|
|
43
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
44
|
-
type __VLS_TypePropsToOption<T> = {
|
|
45
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
46
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
47
|
-
} : {
|
|
48
|
-
type: import('vue').PropType<T[K]>;
|
|
49
|
-
required: true;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
type __VLS_PrettifyLocal<T> = {
|
|
53
|
-
[K in keyof T]: T[K];
|
|
54
|
-
} & {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
modelValue?: any;
|
|
3
|
-
cascaderKey?: string;
|
|
4
|
-
separator?: string;
|
|
5
|
-
showRawValue?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
-
separator: string;
|
|
9
|
-
showRawValue: boolean;
|
|
10
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
modelValue?: any;
|
|
3
|
-
mode?: 'single' | 'multiple' | 'range';
|
|
4
|
-
locale?: 'zh-CN' | 'en-US';
|
|
5
|
-
format?: string;
|
|
6
|
-
separator?: string;
|
|
7
|
-
rangeSeparator?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
|
-
mode: "single" | "multiple" | "range";
|
|
11
|
-
locale: "zh-CN" | "en-US";
|
|
12
|
-
separator: string;
|
|
13
|
-
rangeSeparator: string;
|
|
14
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
modelValue?: any;
|
|
3
|
-
dictType?: string;
|
|
4
|
-
defaultText?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
7
|
-
defaultText: string;
|
|
8
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
|
-
export default _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
type?: 'input' | 'dict' | 'switch' | 'cascader' | 'date' | 'text';
|
|
3
|
-
modelValue?: any;
|
|
4
|
-
dictType?: string;
|
|
5
|
-
mode?: 'single' | 'multiple' | 'range';
|
|
6
|
-
locale?: 'zh-CN' | 'en-US';
|
|
7
|
-
format?: string;
|
|
8
|
-
text?: string;
|
|
9
|
-
trueText?: string;
|
|
10
|
-
falseText?: string;
|
|
11
|
-
useYesNo?: boolean;
|
|
12
|
-
cascaderKey?: string;
|
|
13
|
-
multiline?: boolean;
|
|
14
|
-
defaultText?: string;
|
|
15
|
-
}
|
|
16
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
|
-
type: "input" | "dict" | "switch" | "cascader" | "date" | "text";
|
|
18
|
-
locale: "zh-CN" | "en-US";
|
|
19
|
-
trueText: string;
|
|
20
|
-
falseText: string;
|
|
21
|
-
useYesNo: boolean;
|
|
22
|
-
defaultText: string;
|
|
23
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
modelValue?: any;
|
|
3
|
-
multiline?: boolean;
|
|
4
|
-
maxLines?: number;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
7
|
-
multiline: boolean;
|
|
8
|
-
maxLines: number;
|
|
9
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
10
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
modelValue?: any;
|
|
3
|
-
trueText?: string;
|
|
4
|
-
falseText?: string;
|
|
5
|
-
useYesNo?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
-
trueText: string;
|
|
9
|
-
falseText: string;
|
|
10
|
-
useYesNo: boolean;
|
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
|
-
export default _default;
|
package/dist/ts/constant.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API 统一配置
|
|
3
|
-
*/
|
|
4
|
-
export type CfgType = 'forms' | 'tables' | 'menus';
|
|
5
|
-
export declare const apis: {
|
|
6
|
-
/**
|
|
7
|
-
* 获取表单配置:GET /api/form?type=<forms|tables|menus>&id=<配置文件名称>
|
|
8
|
-
* 后端读取 ./config/<type>/<id>.yaml
|
|
9
|
-
* @param id 配置文件名称(不带 .yaml)
|
|
10
|
-
* @param type 配置类别:forms(表单)/ tables(表格)/ menus(菜单)
|
|
11
|
-
*/
|
|
12
|
-
formCfgApi(id: string, type?: CfgType): string;
|
|
13
|
-
/**
|
|
14
|
-
* 获取完整字典列表:GET /api/dict/full-list?dict_type=<key>
|
|
15
|
-
* 不带层级,返回该 dict_type 下的全部数据(含各级子节点)
|
|
16
|
-
*/
|
|
17
|
-
dictApi(key: string): string;
|
|
18
|
-
/**
|
|
19
|
-
* 获取带子集的字典列表:GET /api/dict/tree-list?dict_type=<key>&children=<bool>
|
|
20
|
-
* 按 parent_id 组成树形返回,默认 children=true(返回完整子树)
|
|
21
|
-
* children=false 时只返回顶级数据(parent_id = 0)
|
|
22
|
-
*/
|
|
23
|
-
cascaderApi(key: string, children?: boolean): string;
|
|
24
|
-
};
|
package/dist/ts/dict.d.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 全局字典缓存
|
|
3
|
-
* 提供字典数据的缓存和翻译功能
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 把后端字典项规范化为 { label, value } 结构
|
|
7
|
-
*
|
|
8
|
-
* 后端字典项(DictInfo / DictTreeInfo):
|
|
9
|
-
* { id, dict_type, dict_code, dict_value, sort, parent_id, info, children? }
|
|
10
|
-
* 其中 dict_value 是展示文本(label),dict_code 是代号(value)。
|
|
11
|
-
* 同时兼容旧的 { label, value } 结构。
|
|
12
|
-
*/
|
|
13
|
-
export declare function normalizeDictNode(node: any): {
|
|
14
|
-
label: string;
|
|
15
|
-
value: any;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* 将树形字典转换为带 children 的 { label, value } 树(供级联 el-select 使用)
|
|
20
|
-
* @param list 原始数组(可能是树)
|
|
21
|
-
* @returns 规范化后的树
|
|
22
|
-
*/
|
|
23
|
-
export declare function mapDictTree(list: any): Array<{
|
|
24
|
-
label: string;
|
|
25
|
-
value: any;
|
|
26
|
-
children?: any[];
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}>;
|
|
29
|
-
/**
|
|
30
|
-
* 把后端 /api/dict/full-list 返回的完整列表(不带层级)规范化为 { label, value } 一维选项
|
|
31
|
-
* @param list 原始数组
|
|
32
|
-
* @returns 规范化后的一维选项数组
|
|
33
|
-
*/
|
|
34
|
-
export declare function toDictOptions(list: any): Array<{
|
|
35
|
-
label: string;
|
|
36
|
-
value: any;
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
}>;
|
|
39
|
-
/**
|
|
40
|
-
* 将树形字典扁平化为一维选项(可选:/api/dict/tree-list 的返回是带 children 的树)
|
|
41
|
-
* @param list 原始数组(可能是树)
|
|
42
|
-
* @returns 扁平后的选项数组
|
|
43
|
-
*/
|
|
44
|
-
export declare function flattenDictTree(list: any): Array<{
|
|
45
|
-
label: string;
|
|
46
|
-
value: any;
|
|
47
|
-
[key: string]: any;
|
|
48
|
-
}>;
|
|
49
|
-
/**
|
|
50
|
-
* 获取字典数据
|
|
51
|
-
* 先从缓存读取,如果没有则从后端获取并缓存
|
|
52
|
-
* @param dictKey 字典类型 key
|
|
53
|
-
* @returns 字典选项数组
|
|
54
|
-
*/
|
|
55
|
-
export declare function getDict(dictKey: string): Promise<Array<{
|
|
56
|
-
label: string;
|
|
57
|
-
value: any;
|
|
58
|
-
}>>;
|
|
59
|
-
/**
|
|
60
|
-
* 翻译字典值
|
|
61
|
-
* @param dictKey 字典类型 key
|
|
62
|
-
* @param value 要翻译的值
|
|
63
|
-
* @param defaultText 默认文本(翻译失败时显示)
|
|
64
|
-
* @returns 翻译后的标签
|
|
65
|
-
*/
|
|
66
|
-
export declare function translateDict(dictKey: string, value: any, defaultText?: string): Promise<string>;
|
|
67
|
-
/**
|
|
68
|
-
* 同步翻译字典值(仅从缓存读取)
|
|
69
|
-
* @param dictKey 字典类型 key
|
|
70
|
-
* @param value 要翻译的值
|
|
71
|
-
* @param defaultText 默认文本
|
|
72
|
-
* @returns 翻译后的标签
|
|
73
|
-
*/
|
|
74
|
-
export declare function translateDictSync(dictKey: string, value: any, defaultText?: string): string;
|
|
75
|
-
/**
|
|
76
|
-
* 预加载多个字典
|
|
77
|
-
* @param dictKeys 字典类型 key 数组
|
|
78
|
-
*/
|
|
79
|
-
export declare function preloadDicts(dictKeys: string[]): Promise<void>;
|
|
80
|
-
/**
|
|
81
|
-
* 清除字典缓存
|
|
82
|
-
* @param dictKey 可选,指定清除某个字典,不指定则清除所有
|
|
83
|
-
*/
|
|
84
|
-
export declare function clearDictCache(dictKey?: string): void;
|
|
85
|
-
/**
|
|
86
|
-
* 设置字典缓存(用于外部注入数据)
|
|
87
|
-
* @param dictKey 字典类型 key
|
|
88
|
-
* @param options 字典选项数组
|
|
89
|
-
*/
|
|
90
|
-
export declare function setDictCache(dictKey: string, options: Array<{
|
|
91
|
-
label: string;
|
|
92
|
-
value: any;
|
|
93
|
-
}>): void;
|
|
94
|
-
export declare const dictMethods: {
|
|
95
|
-
getDict: typeof getDict;
|
|
96
|
-
getLabel: typeof translateDict;
|
|
97
|
-
getDictSync: typeof translateDictSync;
|
|
98
|
-
preloadDicts: typeof preloadDicts;
|
|
99
|
-
clearDictCache: typeof clearDictCache;
|
|
100
|
-
setDictCache: typeof setDictCache;
|
|
101
|
-
};
|
|
102
|
-
export declare const dictData: Record<string, {
|
|
103
|
-
label: string;
|
|
104
|
-
value: any;
|
|
105
|
-
}[]>;
|
package/dist/ts/form-render.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { FieldConfig, FormConfig, ParsedQuery, ValidationError } from './model';
|
|
2
|
-
declare class FormRenderData {
|
|
3
|
-
formConfig: FormConfig | null;
|
|
4
|
-
formData: Record<string, any>;
|
|
5
|
-
loading: boolean;
|
|
6
|
-
submitting: boolean;
|
|
7
|
-
visible: boolean;
|
|
8
|
-
isEditMode: boolean;
|
|
9
|
-
errors: ValidationError[];
|
|
10
|
-
currentQuery: ParsedQuery;
|
|
11
|
-
}
|
|
12
|
-
declare class FormRender {
|
|
13
|
-
data: FormRenderData;
|
|
14
|
-
parseQuery(query: string): ParsedQuery;
|
|
15
|
-
fetchFormConfig(formId: string): Promise<FormConfig>;
|
|
16
|
-
fetchFormData(url: string, query: string): Promise<any>;
|
|
17
|
-
submitForm(url: string, data: any): Promise<any>;
|
|
18
|
-
buildInitialData(fields: FieldConfig[]): Record<string, any>;
|
|
19
|
-
checkIsEditMode(query: string): boolean;
|
|
20
|
-
validate(): boolean;
|
|
21
|
-
getFieldError(field: string): string | null;
|
|
22
|
-
clearErrors(): void;
|
|
23
|
-
openForm(formId: string, query?: string): Promise<void>;
|
|
24
|
-
doSubmit(): Promise<any>;
|
|
25
|
-
closeForm(): void;
|
|
26
|
-
resetForm(): void;
|
|
27
|
-
flattenToNested(data: Record<string, any>): Record<string, any>;
|
|
28
|
-
nestedToFlat(obj: Record<string, any>, prefix?: string): Record<string, any>;
|
|
29
|
-
}
|
|
30
|
-
export { FormRender };
|
package/dist/ts/http.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
-
export interface HttpResponse<T = any> {
|
|
3
|
-
code?: number;
|
|
4
|
-
status?: number;
|
|
5
|
-
data: T;
|
|
6
|
-
message?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const http: {
|
|
9
|
-
get<T = any>(url: string, config?: AxiosRequestConfig): Promise<HttpResponse<T>>;
|
|
10
|
-
post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<HttpResponse<T>>;
|
|
11
|
-
instance: AxiosInstance;
|
|
12
|
-
};
|
|
13
|
-
export default http;
|