mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 14:31:41 +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);
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
import type { BasicColumn, ActionItem } from '/@/components/Table';
|
||||
|
||||
import { FileItem, PreviewFileItem, UploadResultStatus } from './types';
|
||||
import { checkImgType, isImgTypeByName } from './utils';
|
||||
import { Progress, Tag } from 'ant-design-vue';
|
||||
import { FileItem, PreviewFileItem, UploadResultStatus } from './types';
|
||||
import { BasicColumn, ActionItem, TableAction } from '/@/components/Table/index';
|
||||
|
||||
import TableAction from '/@/components/Table/src/components/TableAction';
|
||||
|
||||
// 文件上传列表
|
||||
export function createTableColumns(): BasicColumn[] {
|
||||
|
Reference in New Issue
Block a user