Skip to content

Commit

Permalink
[feature]{GenerateForm}: props规范写法 加上属性相应注释
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Mar 31, 2019
1 parent d62a50d commit 863b32f
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions src/components/FormDesigner/GenerateForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,45 @@ export default {
components: {
GenerateFormItem,
},
props: ['data', 'value', 'setReadOnly', 'clear', 'remote', 'setHidden', 'entity'],
// data 初始化表单
// value 表单赋值
// clear 清空表单
props: {
// 表单配置Json
data: {
type: Object,
default: () => ({}),
},
// 表单初始值
value: {
type: Object,
default: () => ({}),
},
// 表单当前实时对象
entity: {
type: Object,
default: () => ({}),
},
/**
* 设置只读,默认Null为全部不只读,传{}为全部只读
* 以下是分别设置黑白名单
* {
* whiteList:[], //设置需要只读的
* blackList:[] //设置不需要只读的
* }
*/
setReadOnly: {
type: Object,
default: null,
},
// 设置隐藏区域
setHidden: {
type: Array,
default: () => ([]),
},
// 远端数据
remote: {
type: Object,
default: () => ({}),
},
},
data() {
return {
models: {},
Expand Down

0 comments on commit 863b32f

Please sign in to comment.