mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-19 03:26:32 +08:00
commit:升级到vue3,更新最近工作流技术栈,支持sa-token
This commit is contained in:
72
OrangeFormsOpen-VUE3/src/online/config/deptSelect.ts
Normal file
72
OrangeFormsOpen-VUE3/src/online/config/deptSelect.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import {
|
||||
SysCustomWidgetType,
|
||||
SysOnlineFormType,
|
||||
OnlineFormEventType,
|
||||
} from '@/common/staticDict/index';
|
||||
import { ANY_OBJECT } from '@/types/generic';
|
||||
|
||||
const deptSelect = {
|
||||
span: {
|
||||
name: '组件宽度',
|
||||
widgetType: SysCustomWidgetType.Slider,
|
||||
value: 12,
|
||||
visible: function (formConfig: ANY_OBJECT) {
|
||||
return formConfig && formConfig.form.formType !== SysOnlineFormType.QUERY;
|
||||
},
|
||||
min: 1,
|
||||
max: 24,
|
||||
},
|
||||
placeholder: {
|
||||
name: '占位文本',
|
||||
widgetType: SysCustomWidgetType.Input,
|
||||
value: '',
|
||||
},
|
||||
required: {
|
||||
name: '是否必填',
|
||||
value: false,
|
||||
widgetType: SysCustomWidgetType.Switch,
|
||||
dropdownList: [
|
||||
{
|
||||
id: true,
|
||||
name: '必填',
|
||||
},
|
||||
{
|
||||
id: false,
|
||||
name: '非必填',
|
||||
},
|
||||
],
|
||||
},
|
||||
disabled: {
|
||||
name: '是否禁用',
|
||||
value: false,
|
||||
visible: function (formConfig: ANY_OBJECT) {
|
||||
return formConfig && formConfig.form.formType !== SysOnlineFormType.QUERY;
|
||||
},
|
||||
widgetType: SysCustomWidgetType.Switch,
|
||||
dropdownList: [
|
||||
{
|
||||
id: false,
|
||||
name: '启用',
|
||||
},
|
||||
{
|
||||
id: true,
|
||||
name: '禁用',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
const deptSelectConfig = {
|
||||
widgetType: SysCustomWidgetType.DeptSelect,
|
||||
icon: 'online-icon icon-dept',
|
||||
attribute: deptSelect,
|
||||
allowEventList: [
|
||||
OnlineFormEventType.CHANGE,
|
||||
OnlineFormEventType.DISABLE,
|
||||
OnlineFormEventType.VISIBLE,
|
||||
],
|
||||
supportBindTable: true,
|
||||
supportBindColumn: true,
|
||||
};
|
||||
|
||||
export default deptSelectConfig;
|
||||
Reference in New Issue
Block a user