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
package/README.md
CHANGED
|
@@ -1,10 +1,38 @@
|
|
|
1
1
|
# urit-qf-ui
|
|
2
2
|
|
|
3
|
-
基于 ElementPlus 的业务组件库(UMenu /
|
|
3
|
+
基于 ElementPlus 的业务组件库(UForm / UTable / UTablePage / USearch / UCascader / UMenu / UBaseInfo / UResults / UGrid)
|
|
4
4
|
|
|
5
5
|
> **读者**:接手这个前端底座的使用方开发者 / AI 编码助手。
|
|
6
6
|
> 本文只讲**「怎么把它装进你的工程、样式从哪来、踩了什么坑怎么修」**。
|
|
7
|
-
> 各组件的字段级用法见:`doc
|
|
7
|
+
> 各组件的字段级用法见:`doc/UForm使用手册.md`、`doc/UTable使用手册.md`、`doc/UMenu使用手册.md`(USearch / UCascader / UBaseInfo / UResults 见源码注释与调试站示例)。
|
|
8
|
+
|
|
9
|
+
### 组件清单(2026-09-29 起)
|
|
10
|
+
|
|
11
|
+
| 组件 | 位置 | 一句话 |
|
|
12
|
+
|------|------|--------|
|
|
13
|
+
| `UForm` | `src/components/UForm.vue` | 基于 el-form 的动态表单;不发请求、控件用 EP 原生组件、属性事件方法与 ElForm 一致 |
|
|
14
|
+
| `UTable` | `src/components/UTable.vue` | 基于 el-table 的动态列表格;数据透传,交互全 emit |
|
|
15
|
+
| `UTablePage` | `src/components/UTablePage.vue` | 列表页 = 搜索条件 + 表格 + 分页栏 + 按钮栏 + 查询/重置/编辑/删除内建;吃一份 `TablePageConfig`,或直接 `table-id="user"` 自己取;`height` / `fill` 定高时表格区内滚(表头吸顶) |
|
|
16
|
+
| `USearch` | `src/components/USearch.vue` | 动态搜索栏;items 配置驱动,级联项复用 `UCascader` |
|
|
17
|
+
| `UCascader` | `src/components/UCascader.vue` | 多级级联选择(多个 el-select 组合,可独立使用) |
|
|
18
|
+
| `UMenu` | `src/components/UMenu.vue` | 菜单;纯展示组件(不发请求、不跳转),默认全部展开、分组标题加粗 |
|
|
19
|
+
| `UDialog` | `src/components/UDialog.vue` | 通用弹窗容器(基于 el-dialog):只做容器,内置「取消 / 确定」,内容 / 底部插槽可换,`:show-footer="false"` 纯展示 |
|
|
20
|
+
| `UBaseInfo` | `src/components/UBaseInfo.vue` | 患者基本信息栏;分几栏 / label 左右两端对齐 / label 在左(带冒号)或在上(无冒号、统一左对齐),纯展示零交互 |
|
|
21
|
+
| `UResults` | `src/components/UResults.vue` | 检验结果表;只显示文本(CSS Grid 自绘,不用 el-table),自定义列 / 斑马纹 / 分割线 / 表头与数据行背景色 / 宽高(配了高度表头吸顶),纯展示零交互 |
|
|
22
|
+
| `UGrid` | `src/layout/UGrid.vue` | 卡片容器 |
|
|
23
|
+
|
|
24
|
+
配套的四个目录(**职责一刀切,别混**):
|
|
25
|
+
|
|
26
|
+
| 目录 | 装什么 | 规矩 |
|
|
27
|
+
|------|--------|------|
|
|
28
|
+
| `model/*` | **只有数据结构**(类型 / interface) | 每个组件一个文件;**零逻辑** |
|
|
29
|
+
| `utils/*` | **渲染期纯函数** | 按组件分文件;`utils/form.ts` 是全库公用的底座小工具 |
|
|
30
|
+
| `parser/*` | **解析层**(class 风格):取 yaml + 转成组件配置 | 只做逻辑,不定义数据结构;对外统一入口 `YamlParser` |
|
|
31
|
+
| `qf/*` | `Http` / 事件总线 / 对外配置接口(`GetFormConfig` / `GetTablePageConfig` / `GetMenuConfig`) | 唯一请求出口 |
|
|
32
|
+
|
|
33
|
+
> 旧版的 `UInput` / `UInputNumber` / `UDict` / `UToggle` / `UDate` / `UFieldView` 与
|
|
34
|
+
> `FormRender` / `TableRender` 两套渲染器(连同 `src/uform/`、`src/show/`、`src/ts/`)**已于 2026-09-29 删除**,
|
|
35
|
+
> 对应能力由上面的新组件 + `parser` 承接。
|
|
8
36
|
|
|
9
37
|
---
|
|
10
38
|
|
|
@@ -67,9 +95,10 @@ const base = resolveAppBase() // 独立运行 = http://host/qfcms;被无界
|
|
|
67
95
|
|
|
68
96
|
## 0.6 请求出口:全库只有一条 —— `Qf.WebApi`
|
|
69
97
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
98
|
+
**组件基本不发请求**;真正会发请求的只有三类地方:`parser/*` 的配置取数(经 `Qf.GetFormConfig` / `GetTablePageConfig` / `GetMenuConfig`,或自己 `new YamlParser(Qf.WebApi)`)、
|
|
99
|
+
**`UTablePage` 的内建链路**(列表 / 删除 / 回显 / 提交 —— 接口约定与后端固定、地址写在 yaml 里,yaml 没配对应 api 字段就不发,见 `doc/UTable使用手册.md` §9)、
|
|
100
|
+
以及使用方自己的业务接口,
|
|
101
|
+
它们**都走同一个 Http 实例**,统一用 `getQf()` 取:
|
|
73
102
|
|
|
74
103
|
```ts
|
|
75
104
|
import {GetQf, getQf} from 'urit-qf-ui'
|
|
@@ -92,7 +121,7 @@ if (res.status === 200) {
|
|
|
92
121
|
|
|
93
122
|
**`getQf()` 和 `GetQf(options)` 的区别**:前者不传参、**且在使用方还没初始化时不会抛错** ——
|
|
94
123
|
它会用一个「免配实例」惰性兜底(后端 = 前端同源),因为 Qf 一般在 `App.vue` 里**异步**初始化
|
|
95
|
-
(要先 `fetch` config.json
|
|
124
|
+
(要先 `fetch` config.json),而使用方可能在同一帧就已经发请求了(字典取数、配置解析)。
|
|
96
125
|
兜底实例之后会被真正的 `GetQf(options)` 替换,所以最终配置不受影响。
|
|
97
126
|
|
|
98
127
|
**响应包约定**(拦截器统一处理,调用方不用自己判空):
|
|
@@ -109,6 +138,45 @@ if (res.status === 200) {
|
|
|
109
138
|
|
|
110
139
|
---
|
|
111
140
|
|
|
141
|
+
## 0.7 配置从哪来:只有 3 个接口,返回值统一是「组件配置 + 页面级配置」的包装
|
|
142
|
+
|
|
143
|
+
`Qf` 对外暴露的取配置方法**只有 3 个**。返回值是**包装对象**:组件直接吃的配置 + 组件不消费的
|
|
144
|
+
页面级字段(提交地址、弹窗开法等,给 `UTablePage` 这类编排方 / 使用方自己用):
|
|
145
|
+
|
|
146
|
+
| 接口 | 返回 | 定义在 | 组件吃哪一半 |
|
|
147
|
+
|------|------|--------|-----------|
|
|
148
|
+
| `Qf.GetFormConfig(id)` | `FormConfig` = `{formOptions, api?, layout?, meta?}` | `model/form.ts` | `UForm` 吃 `formOptions`;`api`(get/add/edit)/`layout` 给编排方 |
|
|
149
|
+
| `Qf.GetTablePageConfig(id)` | `TablePageConfig` = `{tableOptions, searchOptions, key?, form?, api?, pagination?, meta?}` | `model/table-page.ts` | `UTablePage` 拆开喂 `UTable` / `USearch`,页面级字段自己用 |
|
|
150
|
+
| `Qf.GetMenuConfig(id)` | `MenuConfig` = `{menuOptions, menuId?, meta?}` | `model/menu.ts` | `UMenu` 吃 `menuOptions` |
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
import {GetQf} from 'urit-qf-ui'
|
|
154
|
+
|
|
155
|
+
const Qf = GetQf(qfOptions)
|
|
156
|
+
|
|
157
|
+
// 表单页:组件吃 formOptions,提交地址在 api
|
|
158
|
+
const {formOptions, api} = await Qf.GetFormConfig('user')
|
|
159
|
+
|
|
160
|
+
// 列表页:UTablePage table-id="user" 一行搞定;自己编排时才手动拆
|
|
161
|
+
const {tableOptions, searchOptions, api: pageApi} = await Qf.GetTablePageConfig('user')
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
背后是一条链,每层只干一件事:`Qf`(接口)→ `YamlParser`(`parser/yaml-parser.ts`,3 个 public 方法
|
|
165
|
+
`parseForm` / `parseTablePage` / `parseMenu`,**取数也在这里** —— 它持有 `qf/http` 的 `Http`,
|
|
166
|
+
按 ID 发 `GET /api/form?type=<forms|tables|menus>&id=<id>`)→ 各自的 parser(`parser/form.ts`、
|
|
167
|
+
`parser/table-page.ts`(+`cascader.ts`)、`parser/menu.ts`,**只做从 yaml 到组件配置的纯转换**)
|
|
168
|
+
→ 用 `model/*` 的数据结构拼出配置。Qf 初始化时把请求出口传进去(`new YamlParser(this.WebApi)`),
|
|
169
|
+
用的就是同一个 Http,所以**不需要也没法**自己 new 一个 axios。
|
|
170
|
+
|
|
171
|
+
> 解析层的返回值**只有组件配置**,不带 yaml 原始结构 —— yaml 是使用方手写维护的,
|
|
172
|
+
> 解析层按需读键,不为它声明数据结构(`model/*` 里也全是组件配置)。
|
|
173
|
+
|
|
174
|
+
> 级联选择器比较特殊:`parser/cascader.ts` 是 `parser/table-page.ts` 的一部分,只是代码量大单独拎出来。
|
|
175
|
+
> yaml 里出现级联 select 时由它单独处理再组合进 `TablePageConfig.searchOptions`。
|
|
176
|
+
> 它**只做结构转换**(字典树要使用方自己取),写法与两种 yaml 形态见 `doc/UTable使用手册.md`。
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
112
180
|
## 1. 安装
|
|
113
181
|
|
|
114
182
|
```bash
|
|
@@ -131,7 +199,7 @@ import 'urit-qf-ui/style.css' // ← 必须!少这行 = 只有 DOM 没
|
|
|
131
199
|
```vue
|
|
132
200
|
<!-- 页面里 -->
|
|
133
201
|
<script setup lang="ts">
|
|
134
|
-
import {
|
|
202
|
+
import {UForm, UTable, USearch, UMenu} from 'urit-qf-ui'
|
|
135
203
|
import type {MenuClickPayload} from 'urit-qf-ui'
|
|
136
204
|
</script>
|
|
137
205
|
```
|
|
@@ -162,7 +230,7 @@ resolve: {
|
|
|
162
230
|
| 文件 | 内容 |
|
|
163
231
|
|------|------|
|
|
164
232
|
| `dist/index.js` | **纯 JS**。各 SFC 的 `<style scoped>` 已被抽取走,文件里没有任何 CSS 注入代码(`style.css` / `appendChild` / `document.head` 出现次数均为 **0**),只保留了对外部依赖 `element-plus/dist/index.css` 的 import |
|
|
165
|
-
| `dist/style.css` | 全部组件样式(约
|
|
233
|
+
| `dist/style.css` | 全部组件样式(约 4.7 KB,7 个 `data-v-*` scopeId —— 与组件数一致) |
|
|
166
234
|
| `package.json` | 未配 `style` 字段、未声明 CSS 副作用 → 没有任何工具会自动帮你引 |
|
|
167
235
|
|
|
168
236
|
所以 `import {UMenu} from 'urit-qf-ui'` 拿到的是"无壳组件"。这与 Element Plus 需要 `import 'element-plus/dist/index.css'` 是完全同一回事。
|
|
@@ -181,16 +249,12 @@ resolve: {
|
|
|
181
249
|
| `<el-select>` 下拉选项一个都不显示,**且无任何报错** | 出现两个 Vue / element-plus 实例(alias 引源码时,`qfui/src` 里的 `import 'vue'` 解析到了 `qfui/node_modules` 的另一份) | `resolve.dedupe` 加上 `vue`、`vue-router`、`element-plus`、`@element-plus/icons-vue`、`mitt`、`axios`、`dayjs` |
|
|
182
250
|
| 弹层(下拉 / 日期 / 消息框)被挡住不显示 | 页面引了 Quasar 的 `quasar.css`,`.fullscreen` 带 `position:fixed; z-index:6000` | 自己项目的 css 里覆盖 `.fullscreen{z-index:auto !important}`;根容器别加 `.fullscreen` 类 |
|
|
183
251
|
| 改完库源码,页面没变化 | 工程引的是 **npm 包**(`node_modules` 里的旧 dist),不是源码 | 要么改成 alias 引源码(方式 B),要么重新 `npm run build` + 覆盖 dist + 删 `node_modules/.vite` |
|
|
184
|
-
| **每页条数一多(≥20)表格就一路撑长,分页条被顶出容器、点不到**;机构详情里的子表也把面板撑长 | 0.2.3 的 `.table-grid`(`TableGrid.vue` 根节点)没参与 `.table-container` 的 flex 分配,而 EP 的 `.el-table` 默认 `height: fit-content` | 升级到 **0.2.4+**(该规则已内置到 `TableRender.vue`)。仍在旧版就在项目全局样式里补:`.table-render .table-container .table-grid{flex:1;min-height:0;max-height:var(--table-grid-max-height,none)}` + `.table-render .table-container .table-grid>.el-table{height:100%}`;详见《表格渲染器使用手册》第 8 节 |
|
|
185
252
|
| **被无界嵌入后,接口全打到主应用去**(浏览器 Network 里请求域名/端口 = 主应用,改 `config.json` 的 `baseUrl` 又能通) | ≤0.2.4 的 `Http` 用 `window.location.origin` 兜底,而无界沙箱 iframe 是 `blob:`(与主应用同源)→ 拿到的是主应用 origin | 升级到 **0.2.5+**(改用 `document.baseURI`),见 §0.5;临时可在页面里自己拼地址并显式传 `baseUrl` |
|
|
186
|
-
| 详情面板给了 `#detail-extra` 插槽后,YAML 里配的字段列表不见了 | 0.2.5 起 `detail-extra` 改为**接管**语义(默认 `replace`) | 想「字段列表 + 插槽共存」就加 `detail-extra-mode="append"`;详见《表格渲染器使用手册》5.4 |
|
|
187
|
-
| 点表单弹窗「取消」,对话框**高度先塌一截再淡出** | 内容被 `v-if="visible"` 立刻卸载,而 `el-dialog` 是「先播退场动画、播完才移除 DOM」 | 升级到 **0.2.5+**(库内已改为内容常驻、清状态放 `@closed`);详见《表单渲染器使用手册》附录 A #9 |
|
|
188
|
-
| 点「预览」(`action: preview`)/ 关详情抽屉,浮层**唰一下就没、完全没有滑出动画** | 预览抽屉写成了 `<el-drawer v-if="previewVisible" :model-value="true">` —— `v-if` 挂在**可见性**上:关的时候组件当场被卸载,`el-drawer` 的退场过渡根本没机会播(实测:`leave-active` 那一帧抽屉已不在,内容项数 4 → 0) | 升级到 **0.2.5+**(库内已改为「挂载开关 `previewMounted`」与「显隐开关 `previewVisible`」分离,内容清理放 `@closed`)。自己项目里若也有这类 `v-if="visible"` 的浮层,按同样思路拆开 |
|
|
189
253
|
|
|
190
254
|
### 验证样式真的进来了(10 秒)
|
|
191
255
|
|
|
192
256
|
```bash
|
|
193
|
-
# 1) 确认产物里 JS 与 CSS 是配套的:输出应为 "
|
|
257
|
+
# 1) 确认产物里 JS 与 CSS 是配套的:输出应为 "7 []" —— 全部 scopeId 都能在 index.js 里找到
|
|
194
258
|
node -e "const fs=require('fs');const c=fs.readFileSync('node_modules/urit-qf-ui/dist/style.css','utf8'),j=fs.readFileSync('node_modules/urit-qf-ui/dist/index.js','utf8');const h=[...new Set([...c.matchAll(/data-v-([0-9a-f]{8})/g)].map(m=>m[1]))];console.log(h.length, h.filter(x=>!j.includes('data-v-'+x)))"
|
|
195
259
|
|
|
196
260
|
# 2) 跑起页面后,F12 → Elements 里搜 data-v- ,能看到 .u-menu[data-v-xxxx] 这类规则就说明样式进来了
|
|
@@ -202,24 +266,26 @@ node -e "const fs=require('fs');const c=fs.readFileSync('node_modules/urit-qf-ui
|
|
|
202
266
|
|
|
203
267
|
### 预览组件效果
|
|
204
268
|
|
|
205
|
-
组件源码在 `src/components
|
|
269
|
+
组件源码在 `src/components/`(布局在 `src/layout/`),**组件调试站是独立工程 `../qfui-demo/`**
|
|
270
|
+
(vite alias `urit-qf-ui` → `../qfui/src` 直引源码,改组件即时热更新)。
|
|
206
271
|
|
|
207
272
|
```bash
|
|
208
|
-
cd qfui
|
|
273
|
+
cd ../qfui-demo
|
|
209
274
|
npm install
|
|
210
|
-
npm run
|
|
275
|
+
npm run dev # http://localhost:8000
|
|
211
276
|
```
|
|
212
277
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
278
|
+
调试站的**组件注册表只有一处**:`qfui-demo/src/views/example/registry.ts`。
|
|
279
|
+
新增调试页的流程:在 `qfui-demo/src/views/example/` 建 `<组件名>Demo.vue` → 在 registry 里加一条
|
|
280
|
+
→ 侧栏菜单与预览区自动跟着变。示例页格式 = **一个示例 + 底部配置项/事件/插槽清单表**。
|
|
216
281
|
|
|
217
282
|
### 添加新组件
|
|
218
283
|
|
|
219
284
|
1. 在 `src/components/` 创建组件文件
|
|
220
|
-
2.
|
|
221
|
-
3. 在 `
|
|
222
|
-
4.
|
|
285
|
+
2. 配置定义放 `src/model/<组件小写>.ts`(与组件同名、小写,**只放数据结构**),逻辑放 `src/parser/`,渲染期纯函数放 `src/utils/`
|
|
286
|
+
3. 在 `src/index.ts` 中导出组件与配置类型
|
|
287
|
+
4. 在调试站 `qfui-demo/src/views/example/` 加一个 Demo 页并登记进 `registry.ts`
|
|
288
|
+
5. 有对应手册(`doc/<组件>使用手册.md`)就同步更新
|
|
223
289
|
|
|
224
290
|
### 构建发布
|
|
225
291
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseInfoItem, BaseInfoOptions } from '../model/base-info';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** 信息栏配置:items / columns / labelAlign / layout / labelWidth / colon … 见 model/base-info.ts */
|
|
4
|
+
options?: BaseInfoOptions | null;
|
|
5
|
+
/** 数据对象。传了就以它为准,不传才退回 options.data */
|
|
6
|
+
data?: Record<string, any> | null;
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): any;
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
11
|
+
setOptions: (options: BaseInfoOptions | null) => void;
|
|
12
|
+
getOptions: () => BaseInfoOptions | null;
|
|
13
|
+
getItems: () => BaseInfoItem[];
|
|
14
|
+
getValue: (field?: string) => any;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,40 +1,25 @@
|
|
|
1
|
+
import { CascaderChangePayload, CascaderLevel, CascaderOptions } from '../model/cascader';
|
|
1
2
|
interface Props {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
required?: boolean;
|
|
7
|
-
modelValue?: any;
|
|
8
|
-
options?: any[];
|
|
9
|
-
depth?: number;
|
|
10
|
-
[key: string]: any;
|
|
3
|
+
/** 级联模型对象(每个层级一个 key),v-model */
|
|
4
|
+
modelValue?: Record<string, any>;
|
|
5
|
+
/** 级联配置:field / fieldLabel / options(树) + 外观 */
|
|
6
|
+
options?: CascaderOptions | null;
|
|
11
7
|
}
|
|
12
|
-
declare const _default: import('vue').DefineComponent<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
9
|
+
setOptions: (options: CascaderOptions | null) => void;
|
|
10
|
+
getOptions: () => CascaderOptions | null;
|
|
11
|
+
getValue: () => Record<string, any>;
|
|
12
|
+
getLevels: () => CascaderLevel[];
|
|
13
|
+
setValue: (field: string, value: any) => void;
|
|
14
|
+
setModel: (model: Record<string, any>) => void;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
change: (payload: CascaderChangePayload) => any;
|
|
18
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
20
|
+
onChange?: ((payload: CascaderChangePayload) => any) | undefined;
|
|
21
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
modelValue: Record<string, any>;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
25
|
export default _default;
|
|
24
|
-
type __VLS_WithDefaults<P, D> = {
|
|
25
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
26
|
-
default: D[K];
|
|
27
|
-
}> : P[K];
|
|
28
|
-
};
|
|
29
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
-
type __VLS_TypePropsToOption<T> = {
|
|
31
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
-
} : {
|
|
34
|
-
type: import('vue').PropType<T[K]>;
|
|
35
|
-
required: true;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
type __VLS_PrettifyLocal<T> = {
|
|
39
|
-
[K in keyof T]: T[K];
|
|
40
|
-
} & {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** 是否显示(v-model) */
|
|
3
|
+
modelValue?: boolean;
|
|
4
|
+
/** 标题(也可以走 #header 插槽自己画) */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** 宽度:数字按 px,默认 520 */
|
|
7
|
+
width?: number | string;
|
|
8
|
+
/** 是否显示顶部标题栏,默认 true。false 时整条 header 隐藏(el-dialog 没这个开关,靠类名盖掉) */
|
|
9
|
+
showHeader?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 内容是否加载中:true 时只显示 loadingText,不渲染默认插槽。
|
|
12
|
+
* 典型场景:弹窗先开、表单配置还在异步取。
|
|
13
|
+
*/
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
/** 加载中的占位文案,默认 '加载中…' */
|
|
16
|
+
loadingText?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 是否显示底部按钮区。**默认 true**(用内置的取消 / 确定)。
|
|
19
|
+
* 给了 `#footer` 插槽就用插槽内容;纯展示弹窗传 `:show-footer="false"` 整块不渲染。
|
|
20
|
+
*/
|
|
21
|
+
showFooter?: boolean;
|
|
22
|
+
/** 确定按钮文字,默认 '确定' */
|
|
23
|
+
confirmText?: string;
|
|
24
|
+
/** 取消按钮文字,默认 '取消' */
|
|
25
|
+
cancelText?: string;
|
|
26
|
+
/** 确定按钮是否 loading(提交中) */
|
|
27
|
+
confirmLoading?: boolean;
|
|
28
|
+
/** 确定按钮类型,默认 'primary' */
|
|
29
|
+
confirmType?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
30
|
+
/** 是否显示右上角关闭按钮,默认 true */
|
|
31
|
+
showClose?: boolean;
|
|
32
|
+
/** 点遮罩是否关闭,默认 **false**(表单填一半误点遮罩关掉会很烦) */
|
|
33
|
+
closeOnClickModal?: boolean;
|
|
34
|
+
/** 按 Esc 是否关闭,默认 true */
|
|
35
|
+
closeOnPressEscape?: boolean;
|
|
36
|
+
/** 关闭时销毁内容,默认 true */
|
|
37
|
+
destroyOnClose?: boolean;
|
|
38
|
+
/** 传送到 body(避免被父容器的 overflow 裁掉),默认 true */
|
|
39
|
+
appendToBody?: boolean;
|
|
40
|
+
/** 关闭前的拦截:done() 才真的关(如「有未保存内容,确定关闭?」) */
|
|
41
|
+
beforeClose?: (done: () => void) => void;
|
|
42
|
+
/** 透传给 el-dialog 的其它属性(EP 有什么就写什么) */
|
|
43
|
+
dialogProps?: Record<string, any>;
|
|
44
|
+
}
|
|
45
|
+
declare function __VLS_template(): {
|
|
46
|
+
attrs: Partial<{}>;
|
|
47
|
+
slots: {
|
|
48
|
+
header?(_: {}): any;
|
|
49
|
+
default?(_: {}): any;
|
|
50
|
+
footer?(_: {}): any;
|
|
51
|
+
};
|
|
52
|
+
refs: {};
|
|
53
|
+
rootEl: any;
|
|
54
|
+
};
|
|
55
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
56
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
57
|
+
open: () => void;
|
|
58
|
+
close: () => void;
|
|
59
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
60
|
+
open: () => any;
|
|
61
|
+
"update:modelValue": (visible: boolean) => any;
|
|
62
|
+
close: () => any;
|
|
63
|
+
opened: () => any;
|
|
64
|
+
closed: () => any;
|
|
65
|
+
confirm: () => any;
|
|
66
|
+
cancel: () => any;
|
|
67
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
68
|
+
onOpen?: (() => any) | undefined;
|
|
69
|
+
"onUpdate:modelValue"?: ((visible: boolean) => any) | undefined;
|
|
70
|
+
onClose?: (() => any) | undefined;
|
|
71
|
+
onOpened?: (() => any) | undefined;
|
|
72
|
+
onClosed?: (() => any) | undefined;
|
|
73
|
+
onConfirm?: (() => any) | undefined;
|
|
74
|
+
onCancel?: (() => any) | undefined;
|
|
75
|
+
}>, {
|
|
76
|
+
loadingText: string;
|
|
77
|
+
showFooter: boolean;
|
|
78
|
+
showHeader: boolean;
|
|
79
|
+
closeOnPressEscape: boolean;
|
|
80
|
+
confirmText: string;
|
|
81
|
+
cancelText: string;
|
|
82
|
+
confirmType: "primary" | "success" | "warning" | "danger" | "info";
|
|
83
|
+
showClose: boolean;
|
|
84
|
+
closeOnClickModal: boolean;
|
|
85
|
+
destroyOnClose: boolean;
|
|
86
|
+
appendToBody: boolean;
|
|
87
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
88
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
89
|
+
export default _default;
|
|
90
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
91
|
+
new (): {
|
|
92
|
+
$slots: S;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { FormOptions } from '../model/form';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** 表单数据(v-model)。支持 'info.remark' 这样的点路径字段 */
|
|
4
|
+
modelValue?: Record<string, any>;
|
|
5
|
+
/** 表单配置。异步场景改用组件的 setOptions() */
|
|
6
|
+
options?: FormOptions;
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): any;
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
11
|
+
setOptions: (options: FormOptions | null) => void;
|
|
12
|
+
getOptions: () => FormOptions | null;
|
|
13
|
+
validate: (callback?: (valid: boolean, fields?: any) => void) => Promise<boolean> | undefined;
|
|
14
|
+
validateField: (...args: any[]) => any;
|
|
15
|
+
resetFields: (...args: any[]) => any;
|
|
16
|
+
clearValidate: (...args: any[]) => any;
|
|
17
|
+
scrollToField: (...args: any[]) => any;
|
|
18
|
+
submit: () => Promise<boolean>;
|
|
19
|
+
getFieldItem: (field: string) => any;
|
|
20
|
+
/** 原始 el-form 实例,兜底用 */
|
|
21
|
+
formRef: globalThis.Ref<({
|
|
22
|
+
$: import('vue').ComponentInternalInstance;
|
|
23
|
+
$data: {};
|
|
24
|
+
$props: {
|
|
25
|
+
readonly model?: Record<string, any> | undefined;
|
|
26
|
+
readonly rules?: import('element-plus').FormRules | undefined;
|
|
27
|
+
readonly labelPosition?: "left" | "right" | "top" | undefined;
|
|
28
|
+
readonly requireAsteriskPosition?: "left" | "right" | undefined;
|
|
29
|
+
readonly labelWidth?: string | number | undefined;
|
|
30
|
+
readonly labelSuffix?: string | undefined;
|
|
31
|
+
readonly inline?: boolean | undefined;
|
|
32
|
+
readonly inlineMessage?: boolean | undefined;
|
|
33
|
+
readonly statusIcon?: boolean | undefined;
|
|
34
|
+
readonly showMessage?: boolean | undefined;
|
|
35
|
+
readonly validateOnRuleChange?: boolean | undefined;
|
|
36
|
+
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
37
|
+
readonly scrollToError?: boolean | undefined;
|
|
38
|
+
readonly scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
|
|
39
|
+
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
40
|
+
readonly disabled?: boolean | undefined;
|
|
41
|
+
readonly onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
42
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
43
|
+
$attrs: import('vue').Attrs;
|
|
44
|
+
$refs: {
|
|
45
|
+
[x: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
$slots: Readonly<{
|
|
48
|
+
[name: string]: globalThis.Slot | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
$root: ComponentPublicInstance | null;
|
|
51
|
+
$parent: ComponentPublicInstance | null;
|
|
52
|
+
$host: Element | null;
|
|
53
|
+
$emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
54
|
+
$el: any;
|
|
55
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
56
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
59
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
60
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
61
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
62
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
63
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
64
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
65
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
66
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
67
|
+
validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
68
|
+
}, string, {
|
|
69
|
+
labelWidth: string | number;
|
|
70
|
+
labelPosition: "left" | "right" | "top";
|
|
71
|
+
requireAsteriskPosition: "left" | "right";
|
|
72
|
+
labelSuffix: string;
|
|
73
|
+
showMessage: boolean;
|
|
74
|
+
validateOnRuleChange: boolean;
|
|
75
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
76
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
77
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
78
|
+
created?: (() => void) | (() => void)[];
|
|
79
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
80
|
+
mounted?: (() => void) | (() => void)[];
|
|
81
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
82
|
+
updated?: (() => void) | (() => void)[];
|
|
83
|
+
activated?: (() => void) | (() => void)[];
|
|
84
|
+
deactivated?: (() => void) | (() => void)[];
|
|
85
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
86
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
87
|
+
destroyed?: (() => void) | (() => void)[];
|
|
88
|
+
unmounted?: (() => void) | (() => void)[];
|
|
89
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
90
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
91
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
92
|
+
};
|
|
93
|
+
$forceUpdate: () => void;
|
|
94
|
+
$nextTick: typeof import('vue').nextTick;
|
|
95
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
96
|
+
} & Readonly<{
|
|
97
|
+
labelWidth: string | number;
|
|
98
|
+
labelPosition: "left" | "right" | "top";
|
|
99
|
+
requireAsteriskPosition: "left" | "right";
|
|
100
|
+
labelSuffix: string;
|
|
101
|
+
showMessage: boolean;
|
|
102
|
+
validateOnRuleChange: boolean;
|
|
103
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
104
|
+
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
105
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
106
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & {
|
|
107
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
108
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
109
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
110
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
111
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
112
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
113
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
114
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
115
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
116
|
+
$slots: {
|
|
117
|
+
default?: (props: {}) => any;
|
|
118
|
+
};
|
|
119
|
+
}) | null, ({
|
|
120
|
+
$: import('vue').ComponentInternalInstance;
|
|
121
|
+
$data: {};
|
|
122
|
+
$props: {
|
|
123
|
+
readonly model?: Record<string, any> | undefined;
|
|
124
|
+
readonly rules?: import('element-plus').FormRules | undefined;
|
|
125
|
+
readonly labelPosition?: "left" | "right" | "top" | undefined;
|
|
126
|
+
readonly requireAsteriskPosition?: "left" | "right" | undefined;
|
|
127
|
+
readonly labelWidth?: string | number | undefined;
|
|
128
|
+
readonly labelSuffix?: string | undefined;
|
|
129
|
+
readonly inline?: boolean | undefined;
|
|
130
|
+
readonly inlineMessage?: boolean | undefined;
|
|
131
|
+
readonly statusIcon?: boolean | undefined;
|
|
132
|
+
readonly showMessage?: boolean | undefined;
|
|
133
|
+
readonly validateOnRuleChange?: boolean | undefined;
|
|
134
|
+
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
135
|
+
readonly scrollToError?: boolean | undefined;
|
|
136
|
+
readonly scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
|
|
137
|
+
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
138
|
+
readonly disabled?: boolean | undefined;
|
|
139
|
+
readonly onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
140
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
141
|
+
$attrs: import('vue').Attrs;
|
|
142
|
+
$refs: {
|
|
143
|
+
[x: string]: unknown;
|
|
144
|
+
};
|
|
145
|
+
$slots: Readonly<{
|
|
146
|
+
[name: string]: globalThis.Slot | undefined;
|
|
147
|
+
}>;
|
|
148
|
+
$root: ComponentPublicInstance | null;
|
|
149
|
+
$parent: ComponentPublicInstance | null;
|
|
150
|
+
$host: Element | null;
|
|
151
|
+
$emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
152
|
+
$el: any;
|
|
153
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
154
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
155
|
+
}>, {
|
|
156
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
157
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
158
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
159
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
160
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
161
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
162
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
163
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
164
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
165
|
+
validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
166
|
+
}, string, {
|
|
167
|
+
labelWidth: string | number;
|
|
168
|
+
labelPosition: "left" | "right" | "top";
|
|
169
|
+
requireAsteriskPosition: "left" | "right";
|
|
170
|
+
labelSuffix: string;
|
|
171
|
+
showMessage: boolean;
|
|
172
|
+
validateOnRuleChange: boolean;
|
|
173
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
174
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
175
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
176
|
+
created?: (() => void) | (() => void)[];
|
|
177
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
178
|
+
mounted?: (() => void) | (() => void)[];
|
|
179
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
180
|
+
updated?: (() => void) | (() => void)[];
|
|
181
|
+
activated?: (() => void) | (() => void)[];
|
|
182
|
+
deactivated?: (() => void) | (() => void)[];
|
|
183
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
184
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
185
|
+
destroyed?: (() => void) | (() => void)[];
|
|
186
|
+
unmounted?: (() => void) | (() => void)[];
|
|
187
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
188
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
189
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
190
|
+
};
|
|
191
|
+
$forceUpdate: () => void;
|
|
192
|
+
$nextTick: typeof import('vue').nextTick;
|
|
193
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
194
|
+
} & Readonly<{
|
|
195
|
+
labelWidth: string | number;
|
|
196
|
+
labelPosition: "left" | "right" | "top";
|
|
197
|
+
requireAsteriskPosition: "left" | "right";
|
|
198
|
+
labelSuffix: string;
|
|
199
|
+
showMessage: boolean;
|
|
200
|
+
validateOnRuleChange: boolean;
|
|
201
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
202
|
+
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
203
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
204
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & {
|
|
205
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
206
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
207
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
208
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
209
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
210
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
211
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
212
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
213
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
214
|
+
$slots: {
|
|
215
|
+
default?: (props: {}) => any;
|
|
216
|
+
};
|
|
217
|
+
}) | null>;
|
|
218
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
219
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
220
|
+
submit: (value: Record<string, any>) => any;
|
|
221
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
222
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
223
|
+
onSubmit?: ((value: Record<string, any>) => any) | undefined;
|
|
224
|
+
}>, {
|
|
225
|
+
modelValue: Record<string, any>;
|
|
226
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, any, any>;
|
|
227
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
228
|
+
export default _default;
|
|
229
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
230
|
+
new (): {
|
|
231
|
+
$slots: S;
|
|
232
|
+
};
|
|
233
|
+
};
|