|
|
@@ -1,5 +1,6 @@
|
|
|
import type { Component } from "vue"
|
|
|
import type { FormItemRule } from "element-plus/es/components/form/src/types"
|
|
|
+import type { AlertProps } from "element-plus/es/components/alert/src/alert"
|
|
|
|
|
|
export interface VbFormItem {
|
|
|
id?: string | (() => string)
|
|
|
@@ -16,7 +17,7 @@ export interface VbFormItem {
|
|
|
type?: string
|
|
|
component?:
|
|
|
| "slot"
|
|
|
- | "Slot"
|
|
|
+ | "Slot" // name 为 {field} 如果在modal里 则为 {field}_form
|
|
|
| "innerText"
|
|
|
| "text" // innerText
|
|
|
| "VS" // VbSelect
|
|
|
@@ -39,6 +40,7 @@ export interface VbFormItem {
|
|
|
innerText?: string // component 为 innerText 时,优先显示的文本,否则会显示当前的字段值
|
|
|
span?: number
|
|
|
labelWidth?: number
|
|
|
+
|
|
|
size?: "large" | "default" | "small"
|
|
|
placeholder?: string
|
|
|
rules?: Array<string | FormItemRule[] | FormItemRule> // 全局规则的KEY 或 自定义的规则
|
|
|
@@ -61,6 +63,10 @@ export interface VbFormItem {
|
|
|
itemProps?: any // 注入到 el-form-item 的属性
|
|
|
props?: any // 当 component 为渲染组件时,注入到渲染组件当中的属性
|
|
|
listeners?: any // 当 component 为渲染组件时,注入到渲染组件当中的事件
|
|
|
+ tip?: string
|
|
|
+ labelStyle?: string // label样式 tip有值生效
|
|
|
+ tipIcon?: string // 默认值 bi bi-question-circle-fill
|
|
|
+ tipIconClass?: string // 默认值 text-muted
|
|
|
}
|
|
|
|
|
|
export interface VbFormRowItem {
|