feat: JsonEditor

This commit is contained in:
kailong321200875
2023-08-26 10:10:49 +08:00
parent 2c99cd20f0
commit c0f4517b87
13 changed files with 219 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ import {
} from 'element-plus'
import { InputPassword } from '@/components/InputPassword'
import { Editor } from '@/components/Editor'
import { JsonEditor } from '@/components/JsonEditor'
import { ComponentName } from '../types'
const componentMap: Recordable<Component, ComponentName> = {
@@ -47,7 +48,8 @@ const componentMap: Recordable<Component, ComponentName> = {
InputPassword: InputPassword,
Editor: Editor,
TreeSelect: ElTreeSelect,
Upload: ElUpload
Upload: ElUpload,
JsonEditor: JsonEditor
}
export { componentMap }

View File

@@ -21,6 +21,7 @@ import {
UploadProps
} from 'element-plus'
import { IEditorConfig } from '@wangeditor/editor'
import { JsonEditorProps } from '@/components/JsonEditor'
import { CSSProperties } from 'vue'
export interface PlaceholderModel {
@@ -53,7 +54,8 @@ export enum ComponentNameEnum {
INPUT_PASSWORD = 'InputPassword',
EDITOR = 'Editor',
TREE_SELECT = 'TreeSelect',
UPLOAD = 'Upload'
UPLOAD = 'Upload',
JSON_EDITOR = 'JsonEditor'
}
type CamelCaseComponentName = keyof typeof ComponentNameEnum extends infer K
@@ -620,6 +622,7 @@ export interface FormSchema {
| InputPasswordComponentProps
| TreeSelectComponentProps
| UploadComponentProps
| JsonEditorProps
| any
/**