urit-qf-ui 0.2.6 → 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.
Files changed (69) hide show
  1. package/README.md +88 -22
  2. package/dist/components/UBaseInfo.vue.d.ts +22 -0
  3. package/dist/components/UCascader.vue.d.ts +22 -37
  4. package/dist/components/UDialog.vue.d.ts +94 -0
  5. package/dist/components/UForm.vue.d.ts +233 -0
  6. package/dist/components/UMenu.vue.d.ts +230 -11
  7. package/dist/components/UResults.vue.d.ts +23 -0
  8. package/dist/components/USearch.vue.d.ts +51 -0
  9. package/dist/components/UTable.vue.d.ts +54 -0
  10. package/dist/components/UTablePage.vue.d.ts +152 -0
  11. package/dist/index.d.ts +35 -20
  12. package/dist/index.js +3078 -3276
  13. package/dist/index.umd.cjs +1 -2
  14. package/dist/layout/UGrid.vue.d.ts +44 -0
  15. package/dist/model/base-info.d.ts +113 -0
  16. package/dist/model/cascader.d.ts +135 -0
  17. package/dist/model/form.d.ts +143 -0
  18. package/dist/model/grid.d.ts +53 -0
  19. package/dist/model/menu.d.ts +140 -0
  20. package/dist/model/results.d.ts +90 -0
  21. package/dist/model/search.d.ts +93 -0
  22. package/dist/model/table-page.d.ts +44 -0
  23. package/dist/model/table.d.ts +163 -0
  24. package/dist/parser/cascader.d.ts +35 -0
  25. package/dist/parser/form.d.ts +7 -0
  26. package/dist/parser/menu.d.ts +5 -0
  27. package/dist/parser/table-page.d.ts +15 -0
  28. package/dist/parser/yaml-parser.d.ts +41 -0
  29. package/dist/qf/http.d.ts +50 -28
  30. package/dist/qf/interface.d.ts +45 -4
  31. package/dist/qf/qf.d.ts +52 -6
  32. package/dist/style.css +1 -1
  33. package/dist/utils/base-info.d.ts +39 -0
  34. package/dist/utils/cascader.d.ts +45 -0
  35. package/dist/utils/form.d.ts +59 -0
  36. package/dist/utils/menu.d.ts +14 -0
  37. package/dist/utils/results.d.ts +38 -0
  38. package/dist/utils/search.d.ts +8 -0
  39. package/dist/utils/table.d.ts +16 -0
  40. package/package.json +1 -1
  41. package/dist/components/UDate.vue.d.ts +0 -47
  42. package/dist/components/UDict.vue.d.ts +0 -49
  43. package/dist/components/UInput.vue.d.ts +0 -52
  44. package/dist/components/UInputNumber.vue.d.ts +0 -52
  45. package/dist/components/UToggle.vue.d.ts +0 -54
  46. package/dist/show/UCascaderShow.vue.d.ts +0 -11
  47. package/dist/show/UDateShow.vue.d.ts +0 -15
  48. package/dist/show/UDictShow.vue.d.ts +0 -9
  49. package/dist/show/UFieldView.vue.d.ts +0 -24
  50. package/dist/show/UInputShow.vue.d.ts +0 -10
  51. package/dist/show/UToggleShow.vue.d.ts +0 -12
  52. package/dist/ts/constant.d.ts +0 -24
  53. package/dist/ts/dict.d.ts +0 -105
  54. package/dist/ts/form-render.d.ts +0 -30
  55. package/dist/ts/http.d.ts +0 -13
  56. package/dist/ts/model.d.ts +0 -202
  57. package/dist/ts/notify.d.ts +0 -42
  58. package/dist/ts/table-data-service.d.ts +0 -30
  59. package/dist/ts/table-render.d.ts +0 -210
  60. package/dist/uform/FormContainer.vue.d.ts +0 -37
  61. package/dist/uform/FormField.vue.d.ts +0 -16
  62. package/dist/uform/FormGrid.vue.d.ts +0 -24
  63. package/dist/uform/FormRender.vue.d.ts +0 -104
  64. package/dist/uform/TableDetail.vue.d.ts +0 -37
  65. package/dist/uform/TableGrid.vue.d.ts +0 -51
  66. package/dist/uform/TablePagination.vue.d.ts +0 -14
  67. package/dist/uform/TableRender.vue.d.ts +0 -618
  68. package/dist/uform/TableSearch.vue.d.ts +0 -38
  69. package/dist/uform/TableToolbar.vue.d.ts +0 -31
@@ -0,0 +1,45 @@
1
+ import { CascaderLevel, CascaderOption, CascaderSource } from '../model/cascader';
2
+ export { getByPath, setByPath, isEmptyValue, toCssSize } from './form';
3
+ /** 该配置是否是级联(选项树里存在 children) */
4
+ export declare function isCascadedSelect(item: CascaderSource): boolean;
5
+ /**
6
+ * 该级联项一共要渲染几级 = 选项树的最大深度(至少 1 级)。
7
+ * 层级是**静态**算出来的:一级都没选也要把每一级都画出来。
8
+ */
9
+ export declare function selectDepth(item: CascaderSource): number;
10
+ /**
11
+ * 收集该项可能用到的**全部**层级字段名(第 1 级 + 树上每个节点的 field)。
12
+ * 用于「上一级改选后把更深层级清空」—— 清的不只是当前已渲染出来的那几级,
13
+ * 还有历史选过、当前分支用不到的那些字段。
14
+ */
15
+ export declare function collectLevelFields(item: CascaderSource): string[];
16
+ /**
17
+ * 算出该级联项的「层级骨架」:每一级渲染用哪个字段、标签叫什么。
18
+ *
19
+ * 完全由选项树**静态**决定,跟当前选中什么无关:
20
+ * 第 1 级 = item.field / item.fieldLabel(或 item.label);
21
+ * 之后每一级的 field / fieldLabel = 上一级里**第一个有子级的节点**的 field / fieldLabel
22
+ * (同一层的节点通常声明同一个字段名,取第一个就够)。
23
+ * 只有这样才能做到「一级都没选,3 个下拉连标签也全都画出来」。
24
+ */
25
+ export declare function buildLevelSkeleton(item: CascaderSource): Array<{
26
+ field: string;
27
+ label: string;
28
+ }>;
29
+ /**
30
+ * 按当前模型对象算出级联每一级要渲染的内容。
31
+ *
32
+ * 层级数固定 = selectDepth(**与是否选中无关**,默认全部渲染):
33
+ * - field / label 取自静态骨架(见 buildLevelSkeleton),所以未选择时标签也是对的;
34
+ * - options:第 1 级是配置的选项树,之后每一级 = 上一级**已选中节点**的 children;
35
+ * 上一级没选(或选中的节点没有下级)时就是空数组 —— 下拉照样在,只是没有可选项;
36
+ * - value:按该级的 field 从模型对象里取。
37
+ */
38
+ export declare function buildSelectLevels(item: CascaderSource, model: Record<string, any>): CascaderLevel[];
39
+ /**
40
+ * 把「普通树」规范成级联选项树(使用方从字典/接口拿到树后可以直接过一遍)。
41
+ * - 显示文字依次取 label / text / name / dict_value;
42
+ * - 值依次取 value / id / dict_code / info.code;
43
+ * - field / fieldLabel / disabled 原样保留,children 递归。
44
+ */
45
+ export declare function normalizeCascaderTree(list: any): CascaderOption[];
@@ -0,0 +1,59 @@
1
+ import { FormControlType, FormFieldConfig, FormOptions } from '../model/form';
2
+ /** 该控件类型的校验触发时机是 change 还是 blur */
3
+ export declare function getValidateTrigger(type?: FormControlType): 'change' | 'blur';
4
+ /** 按点路径读值:'info.remark' -> model.info.remark;path 为空直接返回 undefined */
5
+ export declare function getByPath(target: any, path?: string): any;
6
+ /**
7
+ * 按点路径写值(会浅拷贝沿途对象,不污染原引用)。
8
+ * 顶层对象由调用方自行拷贝,这里只保证中间层不被改写。
9
+ */
10
+ export declare function setByPath(target: any, path: string, value: any): void;
11
+ /**
12
+ * 是否空值(undefined / null / '' / 空数组,或数组里全是空值)。
13
+ * 表单、搜索栏、级联都用它判断「这个值算不算没填」,故放在这里共用。
14
+ */
15
+ export declare function isEmptyValue(value: any): boolean;
16
+ /**
17
+ * 数值 / css 尺寸归一(数字按 px):labelWidth / itemWidth / 列宽 / 宽高都用它。
18
+ *
19
+ * ⚠️ **纯数字字符串也按 px 处理**(`'240'` → `'240px'`)。因为它多半来自 YAML/JSON
20
+ * (`width: '240'`)或组件的字符串 form 值,而 CSS 的 `width: 240` 是**无效值**、
21
+ * 会静默失效(不报错、尺寸就是不生效),这种坑很难查。带单位的字符串(`'5em'` /
22
+ * `'100%'` / `'8px 24px'`)原样返回,不受影响。
23
+ */
24
+ export declare function toCssSize(value: number | string | undefined): string | undefined;
25
+ /**
26
+ * 把值转成可显示的文本(null / undefined / 空串统一走空值占位)。
27
+ * 表格单元格、报告信息栏都要用同一套「空值怎么显示」的语义,故放在这个底座文件里。
28
+ */
29
+ export declare function toDisplayText(value: any, emptyText?: string): string;
30
+ /**
31
+ * 依据配置生成表单初始数据(只取配了 default 的字段)。
32
+ * 组件本身不会自动注入默认值 —— 表单数据始终由使用方通过 v-model 掌控。
33
+ */
34
+ export declare function getDefaultModel(options: FormOptions): Record<string, any>;
35
+ /** 该字段是否必填(配置了 required 或给了一条 required 规则) */
36
+ export declare function isRequiredField(field: FormFieldConfig): boolean;
37
+ /**
38
+ * 嵌套对象 → 扁平的「点路径」模型(表单回显用)。
39
+ *
40
+ * 后端返回的是 `{id: 1, info: {remark: 'x'}}`,而表单字段写的是 `'info.remark'`,
41
+ * 扁平化后 `model['info.remark']` 才有值、控件才显示得出来。
42
+ *
43
+ * 只摊平传入的 field 列表(不是递归摊平全部)—— 表单配了哪些点路径字段就摊哪些,
44
+ * 其余键(含顶层对象本身)原样保留,这样提交时信息不丢。
45
+ *
46
+ * @param source 后端返回的原始对象
47
+ * @param fields 需要摊平的字段名(含点路径的才有作用),一般传 `formOptions.fields.map(f => f.field)`
48
+ */
49
+ export declare function nestedToFlat(source?: Record<string, any>, fields?: string[]): Record<string, any>;
50
+ /**
51
+ * 扁平的「点路径」模型 → 嵌套对象(表单提交用),是 nestedToFlat 的逆运算。
52
+ *
53
+ * 表单里填的是 `'info.remark'`,而后端接的是 `models.UserInfo`(`Info` 是嵌套对象),
54
+ * 所以要还原成 `{info: {remark: 'x'}}` 再提交。
55
+ *
56
+ * 规则:不含点号的键先原样铺一层(包括 `info` 这个对象本身),
57
+ * 再让点路径键覆盖它下面的子键 —— 所以「顶层有 info,同时又有 info.remark」时以点路径为准。
58
+ */
59
+ export declare function flattenToNested(source?: Record<string, any>): Record<string, any>;
@@ -0,0 +1,14 @@
1
+ import { MenuItem } from '../model/menu';
2
+ /**
3
+ * 规范化菜单列表(**只做兜底、不做业务**):
4
+ * - 依次尝试 label / name 当显示文字,两者都没有的节点丢弃;
5
+ * - type 缺省补 'route',path / icon 缺省补空串;
6
+ * - children 递归处理(最多 2 级,第 2 级的 children 会被丢掉)。
7
+ *
8
+ * 用来兼容 yaml 里「用 name 代替 label」这类写法。
9
+ * 字典节点(dict_value / info.code)不在这里处理 —— 那是使用方的活:
10
+ * 使用方按 dictType 取到字典树后,先用 utils/cascader 的 normalizeCascaderTree 转一遍再喂进来。
11
+ */
12
+ export declare function normalizeMenuList(list: any): MenuItem[];
13
+ /** 规范化单个菜单节点(配合 normalizeMenuList 使用) */
14
+ export declare function normalizeMenuNode(node: any): MenuItem | null;
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "urit-qf-ui",
3
- "version": "0.2.6",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",
@@ -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;
@@ -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
- };