!24 增加Section组件

Merge pull request !24 from Sagi/feature/input-group
This commit is contained in:
Sagi 2022-09-29 14:57:22 +00:00 committed by Gitee
commit 3d88e6a442
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import { defineComponent, SetupContext } from "vue";
import { SectionProps, sectionProps } from "./section.props";
export default defineComponent({
name:'FSection',
props:sectionProps,
emits:[],
setup(props:SectionProps, context:SetupContext) {
return ()=>{
return (
)
}
},
})

View File

@ -0,0 +1,36 @@
import { ExtractPropTypes, PropType } from 'vue';
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>;