@schemx/vant 0.1.11-alpha.20260617161450.c64fa7f → 0.1.11
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 +25 -23
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +21 -41
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@ Vant renderers for schemx.
|
|
|
7
7
|
## 特性
|
|
8
8
|
|
|
9
9
|
- 开箱即用的 Vue 3 + Vant 表单渲染。
|
|
10
|
-
- 内置
|
|
10
|
+
- 内置 18 种常用 renderer,覆盖输入、脱敏输入、选择、日期、评分、上传等场景。
|
|
11
11
|
- 支持 `v-model`、`initialValues`、校验、表单实例方法和字段联动。
|
|
12
12
|
- 支持同步或异步 dictionary,可用于远程选项加载。
|
|
13
|
-
-
|
|
13
|
+
- 复用 `@schemx/vue` 和 `@schemx/core` 的表单能力,并重新导出常用 API。
|
|
14
14
|
|
|
15
15
|
## 安装
|
|
16
16
|
|
|
@@ -26,7 +26,6 @@ pnpm add @schemx/vant vant vue
|
|
|
26
26
|
import "vant/lib/index.css"
|
|
27
27
|
|
|
28
28
|
import Schemx from "@schemx/vant"
|
|
29
|
-
import "@schemx/vant/style.css"
|
|
30
29
|
|
|
31
30
|
import type { SchemxField, SchemxInstance } from "@schemx/vant"
|
|
32
31
|
|
|
@@ -84,31 +83,34 @@ pnpm add @schemx/vant vant vue
|
|
|
84
83
|
@finish="handleFinish"
|
|
85
84
|
/>
|
|
86
85
|
|
|
87
|
-
<button @click="formRef?.submit()">提交</
|
|
86
|
+
<button type="button" @click="formRef?.submit()">提交</button>
|
|
88
87
|
</template>
|
|
89
88
|
```
|
|
90
89
|
|
|
90
|
+
`@schemx/vant` 会自动加载自身样式和 `@schemx/vue` 基础样式。上面的 `vant/lib/index.css` 是 Vant 组件库样式;如果业务项目已经通过 Vant 插件或自动按需方案处理样式,可以省略这一行。
|
|
91
|
+
|
|
91
92
|
## 内置 Renderer
|
|
92
93
|
|
|
93
|
-
| `componentType`
|
|
94
|
-
|
|
|
95
|
-
| `text`
|
|
96
|
-
| `input`
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
94
|
+
| `componentType` | 说明 |
|
|
95
|
+
| ----------------- | ------------- |
|
|
96
|
+
| `text` | 文本展示 |
|
|
97
|
+
| `input` | 单行文本输入 |
|
|
98
|
+
| `sensitiveInput` | 脱敏输入 |
|
|
99
|
+
| `textarea` | 多行文本输入 |
|
|
100
|
+
| `number` | 数字输入 |
|
|
101
|
+
| `switch` | 开关 |
|
|
102
|
+
| `radio` | 单选 |
|
|
103
|
+
| `checkbox` | 多选 |
|
|
104
|
+
| `date` | 日期选择 |
|
|
105
|
+
| `calendar` | 日历选择 |
|
|
106
|
+
| `picker` | Picker 选择 |
|
|
107
|
+
| `selectPicker` | 弹窗单选/多选 |
|
|
108
|
+
| `selector` | 选项选择 |
|
|
109
|
+
| `rate` | 评分 |
|
|
110
|
+
| `slider` | 滑块 |
|
|
111
|
+
| `stepper` | 步进器 |
|
|
112
|
+
| `upload` | 文件上传 |
|
|
113
|
+
| `cascader` | 级联选择 |
|
|
112
114
|
|
|
113
115
|
## 字段联动
|
|
114
116
|
|