-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
3,574 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/**/node_modules/* | ||
/**/dist/* | ||
/**/*.css |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Created by Liu.Jun on 2020/4/20 9:55 下午. | ||
*/ | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import ObjectField from './fields/ObjectField'; | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import StringField from './fields/StringField'; | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import NumberField from './fields/NumberField'; | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import IntegerField from './fields/IntegerField'; | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import BooleanField from './fields/BooleanField'; | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import ArrayField from './fields/ArrayField'; | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import AnyOfField from './fields/combiningSchemas/AnyOfField'; | ||
|
||
// eslint-disable-next-line import/no-cycle | ||
import OneOfField from './fields/combiningSchemas/OneOfField'; | ||
|
||
// 默认类型使用field映射关系 | ||
const FIELDS_MAPS = { | ||
array: ArrayField, | ||
boolean: BooleanField, | ||
integer: IntegerField, | ||
number: NumberField, | ||
object: ObjectField, | ||
string: StringField, | ||
null: { | ||
render() { | ||
return null; | ||
} | ||
}, | ||
anyOf: AnyOfField, | ||
oneOf: OneOfField | ||
}; | ||
|
||
export default FIELDS_MAPS; |
45 changes: 45 additions & 0 deletions
45
packages/lib/vue3-core/JsonSchemaForm/components/FieldGroupWrap.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<template> | ||
<div class="fieldGroupWrap"> | ||
<template> | ||
<h3 | ||
v-if="showTitle && title" | ||
class="fieldGroupWrap_title" | ||
> | ||
{{ title }} | ||
</h3> | ||
<p | ||
v-if="showDescription && description" | ||
class="fieldGroupWrap_des" | ||
v-html="description" | ||
> | ||
</p> | ||
</template> | ||
<div class="fieldGroupWrap_box"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'FieldGroupWrap', | ||
props: { | ||
showTitle: { | ||
type: Boolean, | ||
default: true | ||
}, | ||
showDescription: { | ||
type: Boolean, | ||
default: true | ||
}, | ||
title: { | ||
type: String, | ||
default: '' | ||
}, | ||
description: { | ||
type: String, | ||
default: '' | ||
} | ||
} | ||
}; | ||
</script> |
50 changes: 50 additions & 0 deletions
50
packages/lib/vue3-core/JsonSchemaForm/components/FormFooter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* Created by Liu.Jun on 2020/12/27 9:53 下午. | ||
*/ | ||
|
||
export default { | ||
name: 'FormFooter', | ||
props: { | ||
okBtn: { | ||
type: String, | ||
default: '保存' | ||
}, | ||
cancelBtn: { | ||
type: String, | ||
default: '取消' | ||
}, | ||
globalOptions: null | ||
}, | ||
render(h) { | ||
const self = this; | ||
const { okBtn, cancelBtn, globalOptions: { COMPONENT_MAP } } = this.$props; | ||
|
||
return h(COMPONENT_MAP.formItem, { | ||
class: { | ||
formFooter_item: true | ||
} | ||
}, [ | ||
h(COMPONENT_MAP.button, { | ||
on: { | ||
click() { | ||
self.$emit('onCancel'); | ||
} | ||
} | ||
}, cancelBtn), | ||
h(COMPONENT_MAP.button, { | ||
style: { | ||
marginLeft: '10px' | ||
}, | ||
props: { | ||
type: 'primary' | ||
}, | ||
on: { | ||
click() { | ||
self.$emit('onSubmit'); | ||
} | ||
} | ||
}, okBtn) | ||
]); | ||
|
||
} | ||
}; |
Oops, something went wrong.