devject-design 0.2.6 → 0.3.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 +8 -0
- package/dist/devject/devject-design/src/core/builtin/utils.d.ts +4 -0
- package/dist/index.es.js +3079 -2991
- package/dist/index.umd.js +19 -19
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ Devject Design 是一个基于 Vue 3 和 Element Plus 的可视化表单设计
|
|
|
10
10
|
- 🎨 **Element Plus 风格**:与 Element Plus UI 完美融合。
|
|
11
11
|
- 🧩 **可视化设计器**:支持拖拽、属性配置、实时预览。
|
|
12
12
|
- 📝 **表单渲染器**:根据 JSON 结构自动渲染表单,支持数据双向绑定与校验。
|
|
13
|
+
- 👁️ **节点可见/只读**:所有内置组件支持“可见”控制,输入类组件支持“只读”控制。
|
|
13
14
|
- 📤 **导入/导出**:支持 JSON 格式的布局与数据导入导出。
|
|
14
15
|
- 📊 **高级组件**:
|
|
15
16
|
- **静态表格 (StaticTable)**:支持 Excel 导入(自动识别表头、清空旧数据)与导出。
|
|
@@ -501,6 +502,13 @@ registerComponent({
|
|
|
501
502
|
- **手动触发**:通过 `FormRenderer` 的 `validate()` 方法。
|
|
502
503
|
- **导出时触发**:调用 `exportData()` 时默认会自动校验,校验失败则抛出异常。
|
|
503
504
|
|
|
505
|
+
### 4. 可见与只读
|
|
506
|
+
|
|
507
|
+
- 所有内置组件都支持 `visible` 属性;当值为 `false` 时,节点会在 `FormRenderer` 预览态中隐藏。
|
|
508
|
+
- 设计器画布不会因为 `visible=false` 而隐藏节点,方便继续选中和编辑。
|
|
509
|
+
- 输入类组件额外支持 `readonly` 属性,用于将单个组件设为只读。
|
|
510
|
+
- `FormRenderer` 顶层 `readonly` 仍然保留,适合整张表单统一只读;节点级 `readonly` 适合精细控制单个组件。
|
|
511
|
+
|
|
504
512
|
|
|
505
513
|
## 📄 许可证
|
|
506
514
|
|
|
@@ -2,8 +2,12 @@ import { Ref } from 'vue';
|
|
|
2
2
|
import { FormItemRule } from 'element-plus';
|
|
3
3
|
import { PropConfigItem } from '../../../../../devject-design/devject-design/src/core/registry';
|
|
4
4
|
import { SchemaNode, FormDataModel } from '../../../../../devject-design/devject-design/src/ui/state/types';
|
|
5
|
+
export declare function commonVisibilityConfig(): PropConfigItem[];
|
|
6
|
+
export declare function commonContainerTitleConfig(): PropConfigItem[];
|
|
5
7
|
export declare function commonFieldConfig(includePlaceholder?: boolean): PropConfigItem[];
|
|
6
8
|
export declare const commonDefault: (label: string, fieldPrefix: string) => {
|
|
9
|
+
visible: boolean;
|
|
10
|
+
readonly: boolean;
|
|
7
11
|
label: string;
|
|
8
12
|
field: string;
|
|
9
13
|
placeholder: string;
|