| | |
| | | import type { PropType } from 'vue'; |
| | | import { FileBasicColumn } from './typing'; |
| | | |
| | | import type { Options } from 'sortablejs'; |
| | | |
| | | import { Merge } from '/@/utils/types'; |
| | | |
| | | type SortableOptions = Merge< |
| | | Omit<Options, 'onEnd'>, |
| | | { |
| | | onAfterEnd?: <T = any, R = any>(params: T) => R; |
| | | // ...可扩展 |
| | | } |
| | | >; |
| | | |
| | | export const basicProps = { |
| | | helpText: { |
| | | type: String as PropType<string>, |
| | |
| | | type: String as PropType<string>, |
| | | default: null, |
| | | }, |
| | | fileListOpenDrag: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | |
| | | fileListDragOptions: { |
| | | type: Object as PropType<SortableOptions>, |
| | | default: () => ({}), |
| | | }, |
| | | }; |
| | | |
| | | export const uploadContainerProps = { |
| | |
| | | type: Array as PropType<any[]>, |
| | | default: null, |
| | | }, |
| | | openDrag: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | dragOptions: { |
| | | type: Object as PropType<SortableOptions>, |
| | | default: () => ({}), |
| | | }, |
| | | }; |