@manohub/ui 0.6.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 +141 -0
- package/dist/components/avatar/index.d.ts +283 -0
- package/dist/components/avatar/index.js +167 -0
- package/dist/components/badge/index.d.ts +132 -0
- package/dist/components/badge/index.js +99 -0
- package/dist/components/button/index.d.ts +578 -0
- package/dist/components/button/index.js +191 -0
- package/dist/components/capsule/index.d.ts +161 -0
- package/dist/components/capsule/index.js +101 -0
- package/dist/components/card/index.d.ts +456 -0
- package/dist/components/card/index.js +231 -0
- package/dist/components/checkbox/index.d.ts +331 -0
- package/dist/components/checkbox/index.js +165 -0
- package/dist/components/code/index.d.ts +134 -0
- package/dist/components/code/index.js +117 -0
- package/dist/components/code-editor/index.d.ts +163 -0
- package/dist/components/code-editor/index.js +98 -0
- package/dist/components/collapse/index.d.ts +125 -0
- package/dist/components/collapse/index.js +95 -0
- package/dist/components/control-size.d.ts +8 -0
- package/dist/components/dialog/index.d.ts +224 -0
- package/dist/components/dialog/index.js +194 -0
- package/dist/components/divider/index.d.ts +64 -0
- package/dist/components/divider/index.js +62 -0
- package/dist/components/drawer/index.d.ts +226 -0
- package/dist/components/drawer/index.js +190 -0
- package/dist/components/filter/index.d.ts +391 -0
- package/dist/components/filter/index.js +203 -0
- package/dist/components/form/index.d.ts +704 -0
- package/dist/components/form/index.js +329 -0
- package/dist/components/input/index.d.ts +980 -0
- package/dist/components/input/index.js +334 -0
- package/dist/components/layout/index.d.ts +162 -0
- package/dist/components/layout/index.js +100 -0
- package/dist/components/list-view/index.d.ts +563 -0
- package/dist/components/list-view/index.js +221 -0
- package/dist/components/loading/index.d.ts +77 -0
- package/dist/components/loading/index.js +40 -0
- package/dist/components/nav/index.d.ts +293 -0
- package/dist/components/nav/index.js +164 -0
- package/dist/components/notice/index.d.ts +137 -0
- package/dist/components/notice/index.js +101 -0
- package/dist/components/notification/index.d.ts +118 -0
- package/dist/components/notification/index.js +99 -0
- package/dist/components/page/index.d.ts +276 -0
- package/dist/components/page/index.js +351 -0
- package/dist/components/page/split-resize.d.ts +42 -0
- package/dist/components/page/split-resize.js +36 -0
- package/dist/components/pagination/index.d.ts +171 -0
- package/dist/components/pagination/index.js +226 -0
- package/dist/components/panel/index.d.ts +401 -0
- package/dist/components/panel/index.js +193 -0
- package/dist/components/part-padding.d.ts +27 -0
- package/dist/components/part-padding.js +23 -0
- package/dist/components/query-state/index.d.ts +207 -0
- package/dist/components/query-state/index.js +181 -0
- package/dist/components/radio/index.d.ts +473 -0
- package/dist/components/radio/index.js +250 -0
- package/dist/components/search/index.d.ts +167 -0
- package/dist/components/search/index.js +105 -0
- package/dist/components/select/index.d.ts +252 -0
- package/dist/components/select/index.js +281 -0
- package/dist/components/skeleton/index.d.ts +88 -0
- package/dist/components/skeleton/index.js +56 -0
- package/dist/components/steps/index.d.ts +199 -0
- package/dist/components/steps/index.js +117 -0
- package/dist/components/switch/index.d.ts +150 -0
- package/dist/components/switch/index.js +103 -0
- package/dist/components/table/index.d.ts +351 -0
- package/dist/components/table/index.js +286 -0
- package/dist/components/tabs/index.d.ts +179 -0
- package/dist/components/tabs/index.js +153 -0
- package/dist/components/tabset/index.d.ts +105 -0
- package/dist/components/tabset/index.js +68 -0
- package/dist/components/tag/index.d.ts +203 -0
- package/dist/components/tag/index.js +144 -0
- package/dist/components/toast/index.d.ts +271 -0
- package/dist/components/toast/index.js +116 -0
- package/dist/components/tooltip/index.d.ts +126 -0
- package/dist/components/tooltip/index.js +97 -0
- package/dist/components/tree/index.d.ts +317 -0
- package/dist/components/tree/index.js +251 -0
- package/dist/components/upload/index.d.ts +384 -0
- package/dist/components/upload/index.js +172 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +102 -0
- package/dist/services/base.d.ts +21 -0
- package/dist/services/base.js +42 -0
- package/dist/services/dialog.d.ts +41 -0
- package/dist/services/dialog.js +83 -0
- package/dist/services/index.d.ts +12 -0
- package/dist/services/loading.d.ts +21 -0
- package/dist/services/loading.js +41 -0
- package/dist/services/toast.d.ts +40 -0
- package/dist/services/toast.js +74 -0
- package/dist/styles/components/avatar.css +128 -0
- package/dist/styles/components/avatar.tokens.css +24 -0
- package/dist/styles/components/badge.css +237 -0
- package/dist/styles/components/button.css +454 -0
- package/dist/styles/components/button.tokens.css +56 -0
- package/dist/styles/components/capsule.css +120 -0
- package/dist/styles/components/capsule.tokens.css +27 -0
- package/dist/styles/components/card.css +192 -0
- package/dist/styles/components/checkbox.css +145 -0
- package/dist/styles/components/checkbox.tokens.css +26 -0
- package/dist/styles/components/code-editor.css +91 -0
- package/dist/styles/components/code-editor.tokens.css +24 -0
- package/dist/styles/components/code.css +153 -0
- package/dist/styles/components/code.tokens.css +29 -0
- package/dist/styles/components/collapse.css +62 -0
- package/dist/styles/components/collapse.tokens.css +20 -0
- package/dist/styles/components/dialog.css +106 -0
- package/dist/styles/components/dialog.tokens.css +24 -0
- package/dist/styles/components/divider.css +71 -0
- package/dist/styles/components/divider.tokens.css +21 -0
- package/dist/styles/components/drawer.css +143 -0
- package/dist/styles/components/drawer.tokens.css +22 -0
- package/dist/styles/components/filter.css +41 -0
- package/dist/styles/components/filter.tokens.css +14 -0
- package/dist/styles/components/form.css +220 -0
- package/dist/styles/components/form.tokens.css +15 -0
- package/dist/styles/components/input.css +445 -0
- package/dist/styles/components/input.tokens.css +41 -0
- package/dist/styles/components/layout.css +198 -0
- package/dist/styles/components/list-view.css +244 -0
- package/dist/styles/components/loading.css +76 -0
- package/dist/styles/components/loading.tokens.css +23 -0
- package/dist/styles/components/nav.css +48 -0
- package/dist/styles/components/notice.css +153 -0
- package/dist/styles/components/notice.tokens.css +17 -0
- package/dist/styles/components/notification.css +159 -0
- package/dist/styles/components/notification.tokens.css +37 -0
- package/dist/styles/components/page.css +473 -0
- package/dist/styles/components/pagination.css +297 -0
- package/dist/styles/components/pagination.tokens.css +32 -0
- package/dist/styles/components/panel.css +77 -0
- package/dist/styles/components/query-state.css +88 -0
- package/dist/styles/components/radio.css +271 -0
- package/dist/styles/components/radio.tokens.css +26 -0
- package/dist/styles/components/search.css +30 -0
- package/dist/styles/components/select.css +242 -0
- package/dist/styles/components/select.tokens.css +33 -0
- package/dist/styles/components/skeleton.css +60 -0
- package/dist/styles/components/skeleton.tokens.css +27 -0
- package/dist/styles/components/steps.css +157 -0
- package/dist/styles/components/steps.tokens.css +42 -0
- package/dist/styles/components/switch.css +165 -0
- package/dist/styles/components/switch.tokens.css +26 -0
- package/dist/styles/components/table.css +439 -0
- package/dist/styles/components/table.tokens.css +41 -0
- package/dist/styles/components/tabs.css +234 -0
- package/dist/styles/components/tabs.tokens.css +30 -0
- package/dist/styles/components/tag.css +200 -0
- package/dist/styles/components/tag.tokens.css +30 -0
- package/dist/styles/components/toast.css +150 -0
- package/dist/styles/components/toast.tokens.css +26 -0
- package/dist/styles/components/tooltip.css +89 -0
- package/dist/styles/components/tooltip.tokens.css +25 -0
- package/dist/styles/components/tree.css +139 -0
- package/dist/styles/components/tree.tokens.css +20 -0
- package/dist/styles/components/upload.css +150 -0
- package/dist/styles/components/upload.tokens.css +27 -0
- package/dist/styles/index.css +149 -0
- package/dist/styles/operations/collapse.css +84 -0
- package/dist/styles/operations/popup.css +189 -0
- package/dist/styles/operations/tabset.css +57 -0
- package/dist/utils/state-illustration.d.ts +31 -0
- package/dist/utils/state-illustration.js +156 -0
- package/package.json +62 -0
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
import { type PropType, type SlotsType, type VNodeChild } from 'vue';
|
|
2
|
+
import { type Padding } from '../part-padding';
|
|
3
|
+
/** 表单内距:与 `PanelPadding` **同一口径同一实现**(`number` = 四边同值;`{ y, x }` = 上下 / 左右分别给) */
|
|
4
|
+
export type FormPadding = Padding;
|
|
5
|
+
/** label 列的水平对齐:`right`(默认,与 farris / 主流水平表单一致)或 `left` */
|
|
6
|
+
export type FormLabelAlign = 'left' | 'right';
|
|
7
|
+
/** 表单值:**字段名 → 值**(键就是 `Form.Item` 的 `name`) */
|
|
8
|
+
export type FormValues = Record<string, unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* 带 `name` 的 `Form.Item` 的默认插槽作用域:控件由消费方渲染,本件只把绑定值交出去。
|
|
11
|
+
* 不带 `name` 的项(纯布局 / 只读行)不需要这些,作用域里的值恒为 `undefined`。
|
|
12
|
+
*/
|
|
13
|
+
export interface FormItemSlotScope {
|
|
14
|
+
/** 当前字段值(Form 里的原值,不做任何归一) */
|
|
15
|
+
value: unknown;
|
|
16
|
+
/** 写入该字段(随即可在 `Form` 的 `onChange` 收到新快照) */
|
|
17
|
+
setValue: (value: unknown) => void;
|
|
18
|
+
/** 清空该字段(等价于 `setValue(undefined)`) */
|
|
19
|
+
clear: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface FormProps {
|
|
22
|
+
/** 表单级 label 列宽(px);缺省取令牌 `--ui-form-label-width`(120)。px 不跟随根字号,见 CONTRACT「已知偏差」 */
|
|
23
|
+
labelWidth?: number;
|
|
24
|
+
/**
|
|
25
|
+
* 表单级 label 对齐:`right`(默认,文本贴着控件列)或 `left`(所有 label 起点一致)。
|
|
26
|
+
* `Form.Item` 上再写则只改那一行。
|
|
27
|
+
*/
|
|
28
|
+
labelAlign?: FormLabelAlign;
|
|
29
|
+
/**
|
|
30
|
+
* 表单级控件列宽上限(px);缺省**撑满**剩余宽度。
|
|
31
|
+
*
|
|
32
|
+
* 宽表单(>600px)里让输入框一路拉到右边缘很难看,两种收法二选一:
|
|
33
|
+
* ① 收宽度 —— 传 `controlWidth={360}`,控件列封顶、右侧留白;
|
|
34
|
+
* ② 分两列 —— 传 `columns={2}`,把行并排起来(更充分地用宽度,见下)。
|
|
35
|
+
*/
|
|
36
|
+
controlWidth?: number;
|
|
37
|
+
/**
|
|
38
|
+
* 列数:`1`(默认,逐行)或 `2`(**容器够宽才并排**,窄了按列最小宽度自动回落一列)。
|
|
39
|
+
*
|
|
40
|
+
* 两列下每一行都要能独立成格,所以「整行内容」(说明行、卡片组、表格、文本域)记得
|
|
41
|
+
* 在对应 `Form.Item` 上给 `fullWidth`,否则会被压成半宽。
|
|
42
|
+
*/
|
|
43
|
+
columns?: 1 | 2;
|
|
44
|
+
/**
|
|
45
|
+
* 表单内距(**px 数字**,与 `Panel` 同一口径):`number` = 四边同值;`{ y, x }` = 上下 / 左右分别给。
|
|
46
|
+
*
|
|
47
|
+
* **缺省 0**:表单贴容器边,内距由所在容器给(页面里的表单在 `Panel.Body` 里,那块自带内距)。
|
|
48
|
+
* 弹窗 / 抽屉里没有别的容器给内距时用它自带 —— 如 `padding={{ y: 16, x: 20 }}`,
|
|
49
|
+
* 这样就不必再给表单挂一个「只写 padding」的应用侧类。
|
|
50
|
+
*/
|
|
51
|
+
padding?: FormPadding;
|
|
52
|
+
/** 行距(px,字段行之间 / 与 `Form.Header` 之间);缺省沿用样式里的 8px 档 */
|
|
53
|
+
gap?: number;
|
|
54
|
+
/**
|
|
55
|
+
* 受控表单值(**字段名 → 值**,键就是 `Form.Item` 的 `name`);不传即非受控(由 `defaultValue` 起)。
|
|
56
|
+
*
|
|
57
|
+
* 值变更时 `emit('update:modelValue')` 与 `onChange` **双走**(`v-model` 落地 + 回调)。
|
|
58
|
+
*/
|
|
59
|
+
modelValue?: FormValues;
|
|
60
|
+
/** 非受控初值;其中的键会一并成为快照的键(不必等字段挂载) */
|
|
61
|
+
defaultValue?: FormValues;
|
|
62
|
+
/** 值变更(快照含**全部已登记字段**,未设值的字段为 `undefined`) */
|
|
63
|
+
onChange?: (values: FormValues) => void;
|
|
64
|
+
}
|
|
65
|
+
export interface FormItemProps {
|
|
66
|
+
/**
|
|
67
|
+
* **字段名**(绑定的键):带了它,本行就从 `Form` 取值并把写值交出去
|
|
68
|
+
* (默认插槽作用域 `{ value, setValue, clear }`);不带则与从前一样 ——
|
|
69
|
+
* 纯布局行,值由消费方自己在控件上绑定(静态摘要 / 只读行都属这一类)。
|
|
70
|
+
*/
|
|
71
|
+
name?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 字段名(label 文本)。缺省且非必填时**不渲染 label 列**:控件列占满整行
|
|
74
|
+
* —— 用于无字段名的整块内容(如列编辑区)与纯说明行。
|
|
75
|
+
*/
|
|
76
|
+
label?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 必填标记:星号渲染在 label 文本**之后**(`服务名称*`)—— 星号是字段名的一部分,
|
|
79
|
+
* 跟着字段名走;与 farris 动态表单「星号在左」的写法**有意不同**(本仓口径)。
|
|
80
|
+
*/
|
|
81
|
+
required?: boolean;
|
|
82
|
+
/** 校验错误文案:非空即进入 invalid 态,文案排布在控件**下方**(不遮挡后续行) */
|
|
83
|
+
error?: string;
|
|
84
|
+
/** 字段说明文案(常驻,排在错误之后) */
|
|
85
|
+
hint?: string;
|
|
86
|
+
/** 本行 label 列宽(px);覆盖 `Form` 的表单级设置 */
|
|
87
|
+
labelWidth?: number;
|
|
88
|
+
/** 本行 label 对齐;覆盖 `Form` 的表单级设置 */
|
|
89
|
+
labelAlign?: FormLabelAlign;
|
|
90
|
+
/**
|
|
91
|
+
* 本行控件列宽上限(px);覆盖 `Form` 的表单级设置。
|
|
92
|
+
* 缺省撑满剩余宽度(宽表单里的选型字段用它收敛,避免长条下拉)。
|
|
93
|
+
*/
|
|
94
|
+
controlWidth?: number;
|
|
95
|
+
/** 在两列表单里跨满整行(说明行 / 卡片组 / 表格 / 文本域等整块内容) */
|
|
96
|
+
fullWidth?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* **只读文本形态**:传了它(含空串)即不走控件插槽,改为在控件位渲染纯文本 ——
|
|
99
|
+
* 用于「摘要 / 详情」这类静态表单行(同一个表单里 label 列、行距、错误、说明全部复用)。
|
|
100
|
+
*
|
|
101
|
+
* 空值(`''` / 全空白)由组件统一显示 `—`,消费方不必每处写 `value || '—'`;
|
|
102
|
+
* 换行符原样保留(SQL where 这类多行文本回显不会被压成一行)。
|
|
103
|
+
*
|
|
104
|
+
* 传了它这一行的 label 会降一档**次要色**(与正文色的值拉开层级),控件行不受影响。
|
|
105
|
+
*/
|
|
106
|
+
text?: string;
|
|
107
|
+
/**
|
|
108
|
+
* **只读展示行**:只把 label 弱化(次要色),内容仍走默认插槽 ——
|
|
109
|
+
* 用于控件位不是纯文本的只读内容(徽标 / 链接这类)。
|
|
110
|
+
*
|
|
111
|
+
* 纯文本一律用 `text`(它自带只读语义,不必再传本开关);本开关与 `text` 互斥不会冲突 ——
|
|
112
|
+
* 两个都给时 `text` 优先(`readonly` 只是把 label 的弱化带过去)。
|
|
113
|
+
*/
|
|
114
|
+
readonly?: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* 表单行(**自建**):`label + 控件 + 错误 + 说明` 四件。
|
|
118
|
+
*
|
|
119
|
+
* 为什么不封装 farris 的 `FDynamicFormGroup`:那是动态表单(元数据驱动)体系里的分组件 ——
|
|
120
|
+
* 控件要经 `editor` 描述对象交给它渲染,label 宽度 / 控件限宽由 farris 表单类写死
|
|
121
|
+
* (inline 6rem 右对齐、字段 max-width 26.625rem),校验信息走**绝对定位的浮层提示条**。
|
|
122
|
+
* 与本仓三条口径冲突:① 控件由消费方直接写(不构造底层配置对象);② 数据入参只收朴素业务值;
|
|
123
|
+
* ③ 错误与说明按文档流排布(浮层在弹窗里会压住下一行的控件)。故按「缺件处置流程」自建,
|
|
124
|
+
* 必填星号固定在 label 文本**之后**(`服务名称*`,有意偏离 farris 的「星号在左」);
|
|
125
|
+
* **label 对齐是维度**(`labelAlign`,
|
|
126
|
+
* 默认 `right`(与 farris / 主流水平表单一致),`left` 时所有 label 起点一致)。
|
|
127
|
+
*
|
|
128
|
+
* ## 宽表单怎么处理(两条杠杆,可叠加)
|
|
129
|
+
*
|
|
130
|
+
* - **限宽**:`controlWidth` 封顶控件列(表单级给默认、逐行可覆盖)—— 单列表单不至于把输入框拉成长条;
|
|
131
|
+
* - **分两列**:`columns={2}` 让行并排,宽度用得更充分;列最小宽度取令牌
|
|
132
|
+
* `--ui-form-column-min`(默认 320),所以窄容器会**自动回落成一列**,不需要消费方写媒体查询。
|
|
133
|
+
* 两列下「整块内容」记得 `fullWidth`。
|
|
134
|
+
*
|
|
135
|
+
* `Form.Item` 是唯一入口(`Form` 只承载表单级设置、行间距/列数与容器内距),
|
|
136
|
+
* 控件从默认插槽进,因此输入框 / 下拉 / 文本域 / 自绘分组卡片共用同一个容器。
|
|
137
|
+
*
|
|
138
|
+
* ## 容器内距(`padding`)
|
|
139
|
+
*
|
|
140
|
+
* 与 `Panel` **同一口径同一实现**(`src/components/part-padding.ts`):`number` 四边同值、
|
|
141
|
+
* `{ y, x }` 上下 / 左右分别给,缺省 0(贴容器边)。页面里的表单在 `Panel.Body` 里、内距由那块给;
|
|
142
|
+
* **弹窗 / 抽屉里没有别的容器**给内距,就用表单自带的 `padding={{ y: 16, x: 20 }}`。
|
|
143
|
+
*
|
|
144
|
+
* ## 静态表单(摘要 / 详情)
|
|
145
|
+
*
|
|
146
|
+
* `Form.Item` 传 `text` 即切成**只读文本行**,三类行可以在同一个表单里混排 ——
|
|
147
|
+
* label 列宽、行距、错误与说明全部共用,所以「向导最后一步的确认摘要」「详情弹窗」不需要
|
|
148
|
+
* 另起一套描述列表件(自绘表格的 label/value 几何与表单行迟早会漂开)。
|
|
149
|
+
* 空值占位 `—`、长文案折行、换行符保留都由组件给;只读行的 label 自动降一档次要色,
|
|
150
|
+
* 字段名与取值一眼分得开(应用侧写不了 `color`,这层区分只能由组件给)。
|
|
151
|
+
* 控件位要放徽标 / 链接这类**非文本**只读内容时传 `readonly`:内容走默认插槽,label 的弱化照旧。
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* <Form labelWidth={120} columns={2}>
|
|
155
|
+
* <Form.Item label="编码" required error={errors.code} hint="保存后不可修改">
|
|
156
|
+
* <Input modelValue={form.code} onChange={(v) => (form.code = v)} />
|
|
157
|
+
* </Form.Item>
|
|
158
|
+
* <Form.Item label="缓存策略" controlWidth={360}>
|
|
159
|
+
* <Select options={cacheOptions} modelValue={form.cache} onChange={…} />
|
|
160
|
+
* </Form.Item>
|
|
161
|
+
* <Form.Item label="过滤条件" fullWidth>
|
|
162
|
+
* <Textarea modelValue={form.filter} onChange={…} />
|
|
163
|
+
* </Form.Item>
|
|
164
|
+
* </Form>
|
|
165
|
+
*/
|
|
166
|
+
export declare const FormItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
167
|
+
/** 字段名(绑定的键);不传即纯布局行(值由消费方自己在控件上绑定) */
|
|
168
|
+
name: {
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
default: undefined;
|
|
171
|
+
};
|
|
172
|
+
label: {
|
|
173
|
+
type: StringConstructor;
|
|
174
|
+
default: undefined;
|
|
175
|
+
};
|
|
176
|
+
required: {
|
|
177
|
+
type: BooleanConstructor;
|
|
178
|
+
default: boolean;
|
|
179
|
+
};
|
|
180
|
+
error: {
|
|
181
|
+
type: StringConstructor;
|
|
182
|
+
default: string;
|
|
183
|
+
};
|
|
184
|
+
hint: {
|
|
185
|
+
type: StringConstructor;
|
|
186
|
+
default: string;
|
|
187
|
+
};
|
|
188
|
+
labelWidth: {
|
|
189
|
+
type: NumberConstructor;
|
|
190
|
+
default: undefined;
|
|
191
|
+
};
|
|
192
|
+
labelAlign: {
|
|
193
|
+
type: PropType<FormLabelAlign>;
|
|
194
|
+
default: undefined;
|
|
195
|
+
};
|
|
196
|
+
controlWidth: {
|
|
197
|
+
type: NumberConstructor;
|
|
198
|
+
default: undefined;
|
|
199
|
+
};
|
|
200
|
+
fullWidth: {
|
|
201
|
+
type: BooleanConstructor;
|
|
202
|
+
default: boolean;
|
|
203
|
+
};
|
|
204
|
+
/** `undefined` 与「传了空串」必须区分:前者走插槽(控件形态),后者是「值为空的只读行」 */
|
|
205
|
+
text: {
|
|
206
|
+
type: StringConstructor;
|
|
207
|
+
default: undefined;
|
|
208
|
+
};
|
|
209
|
+
/** 只读展示行(label 弱化,内容走插槽):用于控件位是徽标 / 链接这类非文本的只读内容 */
|
|
210
|
+
readonly: {
|
|
211
|
+
type: BooleanConstructor;
|
|
212
|
+
default: boolean;
|
|
213
|
+
};
|
|
214
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
215
|
+
/** 字段名(绑定的键);不传即纯布局行(值由消费方自己在控件上绑定) */
|
|
216
|
+
name: {
|
|
217
|
+
type: StringConstructor;
|
|
218
|
+
default: undefined;
|
|
219
|
+
};
|
|
220
|
+
label: {
|
|
221
|
+
type: StringConstructor;
|
|
222
|
+
default: undefined;
|
|
223
|
+
};
|
|
224
|
+
required: {
|
|
225
|
+
type: BooleanConstructor;
|
|
226
|
+
default: boolean;
|
|
227
|
+
};
|
|
228
|
+
error: {
|
|
229
|
+
type: StringConstructor;
|
|
230
|
+
default: string;
|
|
231
|
+
};
|
|
232
|
+
hint: {
|
|
233
|
+
type: StringConstructor;
|
|
234
|
+
default: string;
|
|
235
|
+
};
|
|
236
|
+
labelWidth: {
|
|
237
|
+
type: NumberConstructor;
|
|
238
|
+
default: undefined;
|
|
239
|
+
};
|
|
240
|
+
labelAlign: {
|
|
241
|
+
type: PropType<FormLabelAlign>;
|
|
242
|
+
default: undefined;
|
|
243
|
+
};
|
|
244
|
+
controlWidth: {
|
|
245
|
+
type: NumberConstructor;
|
|
246
|
+
default: undefined;
|
|
247
|
+
};
|
|
248
|
+
fullWidth: {
|
|
249
|
+
type: BooleanConstructor;
|
|
250
|
+
default: boolean;
|
|
251
|
+
};
|
|
252
|
+
/** `undefined` 与「传了空串」必须区分:前者走插槽(控件形态),后者是「值为空的只读行」 */
|
|
253
|
+
text: {
|
|
254
|
+
type: StringConstructor;
|
|
255
|
+
default: undefined;
|
|
256
|
+
};
|
|
257
|
+
/** 只读展示行(label 弱化,内容走插槽):用于控件位是徽标 / 链接这类非文本的只读内容 */
|
|
258
|
+
readonly: {
|
|
259
|
+
type: BooleanConstructor;
|
|
260
|
+
default: boolean;
|
|
261
|
+
};
|
|
262
|
+
}>> & Readonly<{}>, {
|
|
263
|
+
text: string;
|
|
264
|
+
name: string;
|
|
265
|
+
label: string;
|
|
266
|
+
error: string;
|
|
267
|
+
required: boolean;
|
|
268
|
+
readonly: boolean;
|
|
269
|
+
hint: string;
|
|
270
|
+
labelWidth: number;
|
|
271
|
+
labelAlign: FormLabelAlign;
|
|
272
|
+
controlWidth: number;
|
|
273
|
+
fullWidth: boolean;
|
|
274
|
+
}, SlotsType<{
|
|
275
|
+
default?: (scope: FormItemSlotScope) => VNodeChild;
|
|
276
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
277
|
+
export interface FormHeaderProps {
|
|
278
|
+
/**
|
|
279
|
+
* 表单头标题。不传则该行不渲染标题文本 —— 但给了 `extra` 时这一行**照渲染**
|
|
280
|
+
* (右端操作位不能凭空消失,与 `Panel`「只给 toolbar / actions、不给 title」同一条口径)。
|
|
281
|
+
*/
|
|
282
|
+
title?: string;
|
|
283
|
+
/** 标题下的说明小字(一行话,讲清这块表单是做什么的) */
|
|
284
|
+
description?: string;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* 表单头(`Form` 的成员件,**单头**):标题行 + 右端操作位(`extra`)。
|
|
288
|
+
*
|
|
289
|
+
* 一个 `Form` 只有一个头,且**渲染在最前** —— 在 default 插槽里写第几个都一样(成员归位,
|
|
290
|
+
* 与 `Page` / `Panel` 同一手法,所以「读代码的顺序」不必等于「视觉顺序」)。
|
|
291
|
+
*
|
|
292
|
+
* 它只做**标题排版**与操作位,不承担区块分组(那是 `Panel` 的职责);三样(`title` /
|
|
293
|
+
* `extra` / `description`)都没有时整组不渲染 —— 空盒子同样占一档 `Form` 的 gap,会凭空多出间距。
|
|
294
|
+
*
|
|
295
|
+
* @example 筛选条的头(标题 + 右侧查询/重置)—— 插槽走 `h()` 的对象形态:
|
|
296
|
+
* TSX 的 `v-slots={{…}}` 在 vitest 的 JSX 管线里会被当**普通属性**丢掉(见 `list-view/index.tsx` 同款记录)
|
|
297
|
+
* {h(Form, {}, {
|
|
298
|
+
* default: () => [
|
|
299
|
+
* h(Form.Header, { title: '高级筛选' }, { extra: () => h(Button, { variant: 'primary' }, '筛选') }),
|
|
300
|
+
* h(Form.Item, { name: 'keyword', label: '技能名称' }, { default: () => h(Input) }),
|
|
301
|
+
* ],
|
|
302
|
+
* })}
|
|
303
|
+
*
|
|
304
|
+
* @example 只要操作位(不要标题):`h(Form.Header, {}, { extra: () => … })`
|
|
305
|
+
*/
|
|
306
|
+
export declare const FormHeader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
307
|
+
title: {
|
|
308
|
+
type: StringConstructor;
|
|
309
|
+
default: undefined;
|
|
310
|
+
};
|
|
311
|
+
description: {
|
|
312
|
+
type: StringConstructor;
|
|
313
|
+
default: undefined;
|
|
314
|
+
};
|
|
315
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
316
|
+
title: {
|
|
317
|
+
type: StringConstructor;
|
|
318
|
+
default: undefined;
|
|
319
|
+
};
|
|
320
|
+
description: {
|
|
321
|
+
type: StringConstructor;
|
|
322
|
+
default: undefined;
|
|
323
|
+
};
|
|
324
|
+
}>> & Readonly<{}>, {
|
|
325
|
+
title: string;
|
|
326
|
+
description: string;
|
|
327
|
+
}, SlotsType<{
|
|
328
|
+
extra?: () => VNodeChild;
|
|
329
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
330
|
+
/** 复合件入口:`Form` + `Form.Header` + `Form.Item`(与 `Page` 等同款 Object.assign 复合写法,成员不平级导出) */
|
|
331
|
+
export declare const Form: {
|
|
332
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
333
|
+
/** 表单级 label 列宽(px);`Form.Item` 的 `labelWidth` 优先级更高 */
|
|
334
|
+
labelWidth: {
|
|
335
|
+
type: NumberConstructor;
|
|
336
|
+
default: undefined;
|
|
337
|
+
};
|
|
338
|
+
/** 表单级 label 对齐;`Form.Item` 的 `labelAlign` 优先级更高 */
|
|
339
|
+
labelAlign: {
|
|
340
|
+
type: PropType<FormLabelAlign>;
|
|
341
|
+
default: undefined;
|
|
342
|
+
};
|
|
343
|
+
/** 表单级控件列宽上限(px);`Form.Item` 的 `controlWidth` 优先级更高 */
|
|
344
|
+
controlWidth: {
|
|
345
|
+
type: NumberConstructor;
|
|
346
|
+
default: undefined;
|
|
347
|
+
};
|
|
348
|
+
/** 列数:1(逐行,默认)/ 2(容器够宽才并排,窄了自动回落一列) */
|
|
349
|
+
columns: {
|
|
350
|
+
type: PropType<1 | 2>;
|
|
351
|
+
default: number;
|
|
352
|
+
};
|
|
353
|
+
/** 表单内距(px 数字,或 `{ y, x }`);缺省 0 = 贴容器边(弹窗 / 抽屉里常用它自带内距) */
|
|
354
|
+
padding: {
|
|
355
|
+
type: PropType<FormPadding>;
|
|
356
|
+
default: undefined;
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* 排布:`horizontal`(label 在左,缺省)/ `vertical`(label 在控件上方)。
|
|
360
|
+
*
|
|
361
|
+
* 窄容器(抽屉 / 移动端)与「字段名很长」的场景请用纵向 —— 横向时 label 列宽会把控件压得很窄。
|
|
362
|
+
*/
|
|
363
|
+
layout: {
|
|
364
|
+
type: PropType<"horizontal" | "vertical">;
|
|
365
|
+
default: string;
|
|
366
|
+
};
|
|
367
|
+
/**
|
|
368
|
+
* 行距(px,字段行之间 / 与 `Form.Header` 之间);缺省沿用样式里的 8px 档。
|
|
369
|
+
*
|
|
370
|
+
* 筛选条这类「上行 + 一行字段」的紧凑排布要 16(设计稿口径);长表单也可以调松。
|
|
371
|
+
*/
|
|
372
|
+
gap: {
|
|
373
|
+
type: NumberConstructor;
|
|
374
|
+
default: undefined;
|
|
375
|
+
};
|
|
376
|
+
/** 受控表单值(字段名 → 值);不传即非受控(由 `defaultValue` 起) */
|
|
377
|
+
modelValue: {
|
|
378
|
+
type: PropType<FormValues>;
|
|
379
|
+
default: undefined;
|
|
380
|
+
};
|
|
381
|
+
/** 非受控初值;其中的键会一并成为快照的键(不必等字段挂载) */
|
|
382
|
+
defaultValue: {
|
|
383
|
+
type: PropType<FormValues>;
|
|
384
|
+
default: undefined;
|
|
385
|
+
};
|
|
386
|
+
/** 值变更(快照含**全部已登记字段**,未设值的字段为 `undefined`) */
|
|
387
|
+
onChange: {
|
|
388
|
+
type: PropType<(values: FormValues) => void>;
|
|
389
|
+
default: undefined;
|
|
390
|
+
};
|
|
391
|
+
}>> & Readonly<{
|
|
392
|
+
"onUpdate:modelValue"?: ((values: FormValues) => any) | undefined;
|
|
393
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
394
|
+
'update:modelValue': (values: FormValues) => true;
|
|
395
|
+
}, import("vue").PublicProps, {
|
|
396
|
+
padding: Padding;
|
|
397
|
+
layout: "horizontal" | "vertical";
|
|
398
|
+
onChange: (values: FormValues) => void;
|
|
399
|
+
defaultValue: FormValues;
|
|
400
|
+
gap: number;
|
|
401
|
+
columns: 1 | 2;
|
|
402
|
+
modelValue: FormValues;
|
|
403
|
+
labelWidth: number;
|
|
404
|
+
labelAlign: FormLabelAlign;
|
|
405
|
+
controlWidth: number;
|
|
406
|
+
}, true, {}, SlotsType<{
|
|
407
|
+
default?: () => VNodeChild;
|
|
408
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
409
|
+
P: {};
|
|
410
|
+
B: {};
|
|
411
|
+
D: {};
|
|
412
|
+
C: {};
|
|
413
|
+
M: {};
|
|
414
|
+
Defaults: {};
|
|
415
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
416
|
+
/** 表单级 label 列宽(px);`Form.Item` 的 `labelWidth` 优先级更高 */
|
|
417
|
+
labelWidth: {
|
|
418
|
+
type: NumberConstructor;
|
|
419
|
+
default: undefined;
|
|
420
|
+
};
|
|
421
|
+
/** 表单级 label 对齐;`Form.Item` 的 `labelAlign` 优先级更高 */
|
|
422
|
+
labelAlign: {
|
|
423
|
+
type: PropType<FormLabelAlign>;
|
|
424
|
+
default: undefined;
|
|
425
|
+
};
|
|
426
|
+
/** 表单级控件列宽上限(px);`Form.Item` 的 `controlWidth` 优先级更高 */
|
|
427
|
+
controlWidth: {
|
|
428
|
+
type: NumberConstructor;
|
|
429
|
+
default: undefined;
|
|
430
|
+
};
|
|
431
|
+
/** 列数:1(逐行,默认)/ 2(容器够宽才并排,窄了自动回落一列) */
|
|
432
|
+
columns: {
|
|
433
|
+
type: PropType<1 | 2>;
|
|
434
|
+
default: number;
|
|
435
|
+
};
|
|
436
|
+
/** 表单内距(px 数字,或 `{ y, x }`);缺省 0 = 贴容器边(弹窗 / 抽屉里常用它自带内距) */
|
|
437
|
+
padding: {
|
|
438
|
+
type: PropType<FormPadding>;
|
|
439
|
+
default: undefined;
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* 排布:`horizontal`(label 在左,缺省)/ `vertical`(label 在控件上方)。
|
|
443
|
+
*
|
|
444
|
+
* 窄容器(抽屉 / 移动端)与「字段名很长」的场景请用纵向 —— 横向时 label 列宽会把控件压得很窄。
|
|
445
|
+
*/
|
|
446
|
+
layout: {
|
|
447
|
+
type: PropType<"horizontal" | "vertical">;
|
|
448
|
+
default: string;
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* 行距(px,字段行之间 / 与 `Form.Header` 之间);缺省沿用样式里的 8px 档。
|
|
452
|
+
*
|
|
453
|
+
* 筛选条这类「上行 + 一行字段」的紧凑排布要 16(设计稿口径);长表单也可以调松。
|
|
454
|
+
*/
|
|
455
|
+
gap: {
|
|
456
|
+
type: NumberConstructor;
|
|
457
|
+
default: undefined;
|
|
458
|
+
};
|
|
459
|
+
/** 受控表单值(字段名 → 值);不传即非受控(由 `defaultValue` 起) */
|
|
460
|
+
modelValue: {
|
|
461
|
+
type: PropType<FormValues>;
|
|
462
|
+
default: undefined;
|
|
463
|
+
};
|
|
464
|
+
/** 非受控初值;其中的键会一并成为快照的键(不必等字段挂载) */
|
|
465
|
+
defaultValue: {
|
|
466
|
+
type: PropType<FormValues>;
|
|
467
|
+
default: undefined;
|
|
468
|
+
};
|
|
469
|
+
/** 值变更(快照含**全部已登记字段**,未设值的字段为 `undefined`) */
|
|
470
|
+
onChange: {
|
|
471
|
+
type: PropType<(values: FormValues) => void>;
|
|
472
|
+
default: undefined;
|
|
473
|
+
};
|
|
474
|
+
}>> & Readonly<{
|
|
475
|
+
"onUpdate:modelValue"?: ((values: FormValues) => any) | undefined;
|
|
476
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
477
|
+
padding: Padding;
|
|
478
|
+
layout: "horizontal" | "vertical";
|
|
479
|
+
onChange: (values: FormValues) => void;
|
|
480
|
+
defaultValue: FormValues;
|
|
481
|
+
gap: number;
|
|
482
|
+
columns: 1 | 2;
|
|
483
|
+
modelValue: FormValues;
|
|
484
|
+
labelWidth: number;
|
|
485
|
+
labelAlign: FormLabelAlign;
|
|
486
|
+
controlWidth: number;
|
|
487
|
+
}>;
|
|
488
|
+
__isFragment?: never;
|
|
489
|
+
__isTeleport?: never;
|
|
490
|
+
__isSuspense?: never;
|
|
491
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
492
|
+
/** 表单级 label 列宽(px);`Form.Item` 的 `labelWidth` 优先级更高 */
|
|
493
|
+
labelWidth: {
|
|
494
|
+
type: NumberConstructor;
|
|
495
|
+
default: undefined;
|
|
496
|
+
};
|
|
497
|
+
/** 表单级 label 对齐;`Form.Item` 的 `labelAlign` 优先级更高 */
|
|
498
|
+
labelAlign: {
|
|
499
|
+
type: PropType<FormLabelAlign>;
|
|
500
|
+
default: undefined;
|
|
501
|
+
};
|
|
502
|
+
/** 表单级控件列宽上限(px);`Form.Item` 的 `controlWidth` 优先级更高 */
|
|
503
|
+
controlWidth: {
|
|
504
|
+
type: NumberConstructor;
|
|
505
|
+
default: undefined;
|
|
506
|
+
};
|
|
507
|
+
/** 列数:1(逐行,默认)/ 2(容器够宽才并排,窄了自动回落一列) */
|
|
508
|
+
columns: {
|
|
509
|
+
type: PropType<1 | 2>;
|
|
510
|
+
default: number;
|
|
511
|
+
};
|
|
512
|
+
/** 表单内距(px 数字,或 `{ y, x }`);缺省 0 = 贴容器边(弹窗 / 抽屉里常用它自带内距) */
|
|
513
|
+
padding: {
|
|
514
|
+
type: PropType<FormPadding>;
|
|
515
|
+
default: undefined;
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* 排布:`horizontal`(label 在左,缺省)/ `vertical`(label 在控件上方)。
|
|
519
|
+
*
|
|
520
|
+
* 窄容器(抽屉 / 移动端)与「字段名很长」的场景请用纵向 —— 横向时 label 列宽会把控件压得很窄。
|
|
521
|
+
*/
|
|
522
|
+
layout: {
|
|
523
|
+
type: PropType<"horizontal" | "vertical">;
|
|
524
|
+
default: string;
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* 行距(px,字段行之间 / 与 `Form.Header` 之间);缺省沿用样式里的 8px 档。
|
|
528
|
+
*
|
|
529
|
+
* 筛选条这类「上行 + 一行字段」的紧凑排布要 16(设计稿口径);长表单也可以调松。
|
|
530
|
+
*/
|
|
531
|
+
gap: {
|
|
532
|
+
type: NumberConstructor;
|
|
533
|
+
default: undefined;
|
|
534
|
+
};
|
|
535
|
+
/** 受控表单值(字段名 → 值);不传即非受控(由 `defaultValue` 起) */
|
|
536
|
+
modelValue: {
|
|
537
|
+
type: PropType<FormValues>;
|
|
538
|
+
default: undefined;
|
|
539
|
+
};
|
|
540
|
+
/** 非受控初值;其中的键会一并成为快照的键(不必等字段挂载) */
|
|
541
|
+
defaultValue: {
|
|
542
|
+
type: PropType<FormValues>;
|
|
543
|
+
default: undefined;
|
|
544
|
+
};
|
|
545
|
+
/** 值变更(快照含**全部已登记字段**,未设值的字段为 `undefined`) */
|
|
546
|
+
onChange: {
|
|
547
|
+
type: PropType<(values: FormValues) => void>;
|
|
548
|
+
default: undefined;
|
|
549
|
+
};
|
|
550
|
+
}>> & Readonly<{
|
|
551
|
+
"onUpdate:modelValue"?: ((values: FormValues) => any) | undefined;
|
|
552
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
553
|
+
'update:modelValue': (values: FormValues) => true;
|
|
554
|
+
}, string, {
|
|
555
|
+
padding: Padding;
|
|
556
|
+
layout: "horizontal" | "vertical";
|
|
557
|
+
onChange: (values: FormValues) => void;
|
|
558
|
+
defaultValue: FormValues;
|
|
559
|
+
gap: number;
|
|
560
|
+
columns: 1 | 2;
|
|
561
|
+
modelValue: FormValues;
|
|
562
|
+
labelWidth: number;
|
|
563
|
+
labelAlign: FormLabelAlign;
|
|
564
|
+
controlWidth: number;
|
|
565
|
+
}, {}, string, SlotsType<{
|
|
566
|
+
default?: () => VNodeChild;
|
|
567
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
568
|
+
Header: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
569
|
+
title: {
|
|
570
|
+
type: StringConstructor;
|
|
571
|
+
default: undefined;
|
|
572
|
+
};
|
|
573
|
+
description: {
|
|
574
|
+
type: StringConstructor;
|
|
575
|
+
default: undefined;
|
|
576
|
+
};
|
|
577
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
578
|
+
title: {
|
|
579
|
+
type: StringConstructor;
|
|
580
|
+
default: undefined;
|
|
581
|
+
};
|
|
582
|
+
description: {
|
|
583
|
+
type: StringConstructor;
|
|
584
|
+
default: undefined;
|
|
585
|
+
};
|
|
586
|
+
}>> & Readonly<{}>, {
|
|
587
|
+
title: string;
|
|
588
|
+
description: string;
|
|
589
|
+
}, SlotsType<{
|
|
590
|
+
extra?: () => VNodeChild;
|
|
591
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
592
|
+
Item: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
593
|
+
/** 字段名(绑定的键);不传即纯布局行(值由消费方自己在控件上绑定) */
|
|
594
|
+
name: {
|
|
595
|
+
type: StringConstructor;
|
|
596
|
+
default: undefined;
|
|
597
|
+
};
|
|
598
|
+
label: {
|
|
599
|
+
type: StringConstructor;
|
|
600
|
+
default: undefined;
|
|
601
|
+
};
|
|
602
|
+
required: {
|
|
603
|
+
type: BooleanConstructor;
|
|
604
|
+
default: boolean;
|
|
605
|
+
};
|
|
606
|
+
error: {
|
|
607
|
+
type: StringConstructor;
|
|
608
|
+
default: string;
|
|
609
|
+
};
|
|
610
|
+
hint: {
|
|
611
|
+
type: StringConstructor;
|
|
612
|
+
default: string;
|
|
613
|
+
};
|
|
614
|
+
labelWidth: {
|
|
615
|
+
type: NumberConstructor;
|
|
616
|
+
default: undefined;
|
|
617
|
+
};
|
|
618
|
+
labelAlign: {
|
|
619
|
+
type: PropType<FormLabelAlign>;
|
|
620
|
+
default: undefined;
|
|
621
|
+
};
|
|
622
|
+
controlWidth: {
|
|
623
|
+
type: NumberConstructor;
|
|
624
|
+
default: undefined;
|
|
625
|
+
};
|
|
626
|
+
fullWidth: {
|
|
627
|
+
type: BooleanConstructor;
|
|
628
|
+
default: boolean;
|
|
629
|
+
};
|
|
630
|
+
/** `undefined` 与「传了空串」必须区分:前者走插槽(控件形态),后者是「值为空的只读行」 */
|
|
631
|
+
text: {
|
|
632
|
+
type: StringConstructor;
|
|
633
|
+
default: undefined;
|
|
634
|
+
};
|
|
635
|
+
/** 只读展示行(label 弱化,内容走插槽):用于控件位是徽标 / 链接这类非文本的只读内容 */
|
|
636
|
+
readonly: {
|
|
637
|
+
type: BooleanConstructor;
|
|
638
|
+
default: boolean;
|
|
639
|
+
};
|
|
640
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
641
|
+
/** 字段名(绑定的键);不传即纯布局行(值由消费方自己在控件上绑定) */
|
|
642
|
+
name: {
|
|
643
|
+
type: StringConstructor;
|
|
644
|
+
default: undefined;
|
|
645
|
+
};
|
|
646
|
+
label: {
|
|
647
|
+
type: StringConstructor;
|
|
648
|
+
default: undefined;
|
|
649
|
+
};
|
|
650
|
+
required: {
|
|
651
|
+
type: BooleanConstructor;
|
|
652
|
+
default: boolean;
|
|
653
|
+
};
|
|
654
|
+
error: {
|
|
655
|
+
type: StringConstructor;
|
|
656
|
+
default: string;
|
|
657
|
+
};
|
|
658
|
+
hint: {
|
|
659
|
+
type: StringConstructor;
|
|
660
|
+
default: string;
|
|
661
|
+
};
|
|
662
|
+
labelWidth: {
|
|
663
|
+
type: NumberConstructor;
|
|
664
|
+
default: undefined;
|
|
665
|
+
};
|
|
666
|
+
labelAlign: {
|
|
667
|
+
type: PropType<FormLabelAlign>;
|
|
668
|
+
default: undefined;
|
|
669
|
+
};
|
|
670
|
+
controlWidth: {
|
|
671
|
+
type: NumberConstructor;
|
|
672
|
+
default: undefined;
|
|
673
|
+
};
|
|
674
|
+
fullWidth: {
|
|
675
|
+
type: BooleanConstructor;
|
|
676
|
+
default: boolean;
|
|
677
|
+
};
|
|
678
|
+
/** `undefined` 与「传了空串」必须区分:前者走插槽(控件形态),后者是「值为空的只读行」 */
|
|
679
|
+
text: {
|
|
680
|
+
type: StringConstructor;
|
|
681
|
+
default: undefined;
|
|
682
|
+
};
|
|
683
|
+
/** 只读展示行(label 弱化,内容走插槽):用于控件位是徽标 / 链接这类非文本的只读内容 */
|
|
684
|
+
readonly: {
|
|
685
|
+
type: BooleanConstructor;
|
|
686
|
+
default: boolean;
|
|
687
|
+
};
|
|
688
|
+
}>> & Readonly<{}>, {
|
|
689
|
+
text: string;
|
|
690
|
+
name: string;
|
|
691
|
+
label: string;
|
|
692
|
+
error: string;
|
|
693
|
+
required: boolean;
|
|
694
|
+
readonly: boolean;
|
|
695
|
+
hint: string;
|
|
696
|
+
labelWidth: number;
|
|
697
|
+
labelAlign: FormLabelAlign;
|
|
698
|
+
controlWidth: number;
|
|
699
|
+
fullWidth: boolean;
|
|
700
|
+
}, SlotsType<{
|
|
701
|
+
default?: (scope: FormItemSlotScope) => VNodeChild;
|
|
702
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
703
|
+
};
|
|
704
|
+
export type FormCompound = typeof Form;
|