mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-28 05:39:34 +08:00
feat: integrate upload components into form by default
This commit is contained in:
@@ -158,7 +158,7 @@ export default defineComponent({
|
||||
) {
|
||||
rule.type = 'object';
|
||||
}
|
||||
if (component.includes('RangePicker')) {
|
||||
if (component.includes('RangePicker') || component.includes('Upload')) {
|
||||
rule.type = 'array';
|
||||
}
|
||||
if (component.includes('InputNumber')) {
|
||||
|
@@ -18,6 +18,7 @@ import {
|
||||
TreeSelect,
|
||||
} from 'ant-design-vue';
|
||||
import RadioButtonGroup from './components/RadioButtonGroup.vue';
|
||||
import { BasicUpload } from '/@/components/Upload';
|
||||
|
||||
const componentMap = new Map<ComponentType, any>();
|
||||
|
||||
@@ -48,6 +49,8 @@ componentMap.set('RangePicker', DatePicker.RangePicker);
|
||||
componentMap.set('WeekPicker', DatePicker.WeekPicker);
|
||||
componentMap.set('TimePicker', TimePicker);
|
||||
|
||||
componentMap.set('Upload', BasicUpload);
|
||||
|
||||
export function add(compName: ComponentType, component: Component) {
|
||||
componentMap.set(compName, component);
|
||||
}
|
||||
|
Reference in New Issue
Block a user