feature: update section props

This commit is contained in:
Sagi 2022-09-29 16:36:35 +08:00
parent 636e8e7dcb
commit 5643983f87
2 changed files with 35 additions and 3 deletions

View File

@ -13,4 +13,4 @@ export default defineComponent({
)
}
},
})ß
})

View File

@ -1,4 +1,36 @@
import { ExtractPropTypes } from 'vue';
import { ExtractPropTypes, PropType } from 'vue';
export const sectionProps = {};
export interface ButtonConfig {
id: string;
disable: boolean;
title: string;
click: any;
appearance: object;
visible?: boolean;
}
export interface ToolbarConfig {
position: string;
contents: ButtonConfig[];
}
export const sectionProps = {
contentClass: { type: String, default: '' },
maxStatus: { type: Boolean, default: false },
enableAccording: { type: Boolean, default: false },
enableCollapse: { type: Boolean, default: true },
mainTitle: { type: String, default: '' },
subTitle: { type: String, default: '' },
showHeader: { type: Boolean, default: true },
enableMaximize: { type: Boolean, default: false },
fill: { type: Boolean, default: false },
expandStatus: { type: Boolean, default: true },
cotext: { type: Object },
index: { type: Number },
toolbarPosition: { type: String, default: '' },
toolbarButtons: { type: Array<object>, default: [] },
toolbar: { type: Object as PropType<ToolbarConfig>, default: {} },
showToolbarMoreButton: { type: Boolean, default: true },
clickThrottleTime: { type: Number, default: 350 },
};
export type SectionProps = ExtractPropTypes<typeof sectionProps>;