xuziqiang
5 months ago
7 changed files with 146 additions and 40 deletions
@ -0,0 +1,45 @@ |
|||||
|
import { PropType } from 'vue'; |
||||
|
import { PropTypes } from '/nerv-lib/util/type'; |
||||
|
import { AxiosRequestConfig } from 'axios'; |
||||
|
import { treeProps as TreeProps } from 'ant-design-vue/es/tree/Tree'; |
||||
|
import { formProps } from '/nerv-lib/component/form/form/props'; |
||||
|
export const treeFormProps = { |
||||
|
formLayout: 'vertical', |
||||
|
labelCol: { span: 0 }, |
||||
|
wrapperCol: { span: 24 }, |
||||
|
}; |
||||
|
export const treeProps = { |
||||
|
...TreeProps(), |
||||
|
api: { |
||||
|
type: [String, Object, Function] as PropType<string | Function | AxiosRequestConfig>, |
||||
|
default: undefined, |
||||
|
}, |
||||
|
params: PropTypes.object.def(() => ({})), |
||||
|
dynamicParams: PropTypes.oneOfType([ |
||||
|
PropTypes.string, |
||||
|
PropTypes.array, |
||||
|
PropTypes.object, |
||||
|
PropTypes.func, |
||||
|
]), |
||||
|
requiredParams: PropTypes.oneOfType([ |
||||
|
PropTypes.string, |
||||
|
PropTypes.array, |
||||
|
PropTypes.object, |
||||
|
PropTypes.bool, |
||||
|
]), |
||||
|
|
||||
|
formConfig: PropTypes.object, //查询表单
|
||||
|
defaultParams: PropTypes.object, //查询表单
|
||||
|
value: PropTypes.array.def(() => []), |
||||
|
refreshTime: PropTypes.number.def(0), |
||||
|
enableTableSession: PropTypes.bool.def(false), |
||||
|
expand: PropTypes.bool.def(true), |
||||
|
showExpand: PropTypes.bool.def(true), |
||||
|
blockNode: PropTypes.bool.def(true), |
||||
|
defaultExpandAll: PropTypes.bool.def(true), |
||||
|
resultField: PropTypes.string.def('data'), |
||||
|
transform: { |
||||
|
type: Function, |
||||
|
default: (data: any) => data, |
||||
|
}, |
||||
|
}; |
Loading…
Reference in new issue