@jxyszb/jxy-form-designer 0.2.0 → 0.3.1
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/CHANGELOG.md +15 -0
- package/README.md +15 -1
- package/dist/chunks/RuntimePreviewPanel-912e9f6c.js +2074 -0
- package/dist/chunks/{compositeField-98c1b192.js → compositeField-bfaf16e6.js} +182 -165
- package/dist/designer.js +1636 -1547
- package/dist/index.js +36 -28
- package/dist/runtime.js +2 -2
- package/dist/schema.js +179 -144
- package/dist/style.css +1 -1
- package/dist/testing.js +61 -38
- package/docs/JXY Form Designer /345/274/200/345/217/221/350/200/205/350/257/264/346/230/216.md" +279 -0
- package/package.json +2 -1
- package/types/index.d.ts +25 -2
- package/types/schema.d.ts +4 -0
- package/dist/chunks/RuntimePreviewPanel-3704c8f8.js +0 -1991
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.3.1 - 2026-10-19
|
|
6
|
+
|
|
7
|
+
- 普通上传、拖拽上传和图片上传的新建默认大小限制改为 20MB,已有配置保持不变。
|
|
8
|
+
- 字段增加伪必填开关,只显示标签星号;与真实必填互斥,不参与校验。
|
|
9
|
+
|
|
10
|
+
## 0.3.0 - 2026-10-16
|
|
11
|
+
|
|
12
|
+
- Schema 升级为 1.4.0,兼容迁移 1.0.0 至 1.3.0。
|
|
13
|
+
- 普通上传增加按需模板下载,支持独立模板数据源、实时参数和宿主下载适配。
|
|
14
|
+
- provider 增加可选 downloadTemplate,预览通过 mock 展示下载信息。
|
|
15
|
+
- 数据源和字段选择支持搜索;字段选项同时展示中文标题与 prop。
|
|
16
|
+
- 模板引用纳入类型校验、删除清理、导入 ID 重映射和 Undo/Redo。
|
|
17
|
+
|
|
3
18
|
## 0.2.0
|
|
4
19
|
|
|
5
20
|
- 保存草稿和发布按钮支持独立名称与显示配置。
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A schema-driven form designer and runtime for Vue 3, Pinia, and Element Plus.
|
|
|
6
6
|
|
|
7
7
|
- Drag-and-drop form design with fields, titles, and grid layouts.
|
|
8
8
|
- Runtime rendering from JSON Schema.
|
|
9
|
-
- Static, dictionary, and
|
|
9
|
+
- Static, dictionary, API, and on-demand template-download data sources.
|
|
10
10
|
- Validation, field reactions, import/export, and preview.
|
|
11
11
|
- Host adapters for request clients, file upload, rich-text editors, and custom fields.
|
|
12
12
|
|
|
@@ -46,6 +46,9 @@ Dynamic data sources, uploads, and rich-text fields can use host adapters:
|
|
|
46
46
|
```js
|
|
47
47
|
app.use(createJxyFormPlugin({
|
|
48
48
|
request: requestClient,
|
|
49
|
+
// JXY framework example: keep the method receiver so its internal this remains valid.
|
|
50
|
+
downloadFile: (url, params, fileName) =>
|
|
51
|
+
app.config.globalProperties.$custom.downFile(params, fileName, url),
|
|
49
52
|
components: {
|
|
50
53
|
fileUpload: FileUpload,
|
|
51
54
|
editor: RichTextEditor
|
|
@@ -103,7 +106,18 @@ Schema utilities are also available from `@jxyszb/jxy-form-designer/schema`. The
|
|
|
103
106
|
|
|
104
107
|
## Documentation
|
|
105
108
|
|
|
109
|
+
Normal upload fields (`file`) support a template download button:
|
|
110
|
+
|
|
111
|
+
1. Add a `templateDownload` data source with a relative `url`, `params`, and optional `fileName`.
|
|
112
|
+
2. Enable template download in the field properties and select that source.
|
|
113
|
+
3. Provide `downloadFile` through the plugin, or `downloadTemplate(url, params, fileName)` through a custom provider.
|
|
114
|
+
|
|
115
|
+
The button appears after the upload component and only requests on click. Required parameters use current form values. A configured file name overrides the backend name; leave it empty to use the host downloader's response-header handling. Global form disabled/view mode hides the button; individual field disabled states do not. Existing synchronous JXY download utilities are supported without download loading or duplicate-click protection.
|
|
116
|
+
|
|
117
|
+
An explicit Runtime provider overrides the plugin provider entirely. Preview providers must implement `downloadTemplate`; the included mock displays request details and never downloads a real file. Upgrade Runtime before publishing Schema `jxy-form-schema@1.4.0`.
|
|
118
|
+
|
|
106
119
|
- [Field suffix extension](<docs/JXY 表单字段右侧扩展位使用说明.md>)
|
|
120
|
+
- [Designer configuration and template downloads](<docs/JXY Form Designer 开发者说明.md>)
|
|
107
121
|
- [Designer developer guide](docs/designer-save-publish-events.md)
|
|
108
122
|
|
|
109
123
|
## License
|