import snippets from './snippets'; export default { snippets, componentName: 'Alert', title: 'Warning prompt', category: 'Feedback', props: [ { name: 'afterClose', title: { label: 'Close the callback function triggered after the animation ends', tip: 'Close the callback function triggered after the animation ends', }, propType: 'func', }, { name: 'banner', title: { label: 'Top Announcement', tip: 'Whether to be used as top announcement' }, propType: 'bool', defaultValue: false, }, { name: 'closable', title: { label: 'Can be closed', tip: 'Close button is not shown by default' }, propType: 'bool', }, { name: 'closeText', title: { label: 'Customize close button', tip: 'Customize close button' }, propType: { type: 'oneOfType', value: ['string', 'node'] }, }, { name: 'description', title: { label: 'Description', tip: 'Supporting text introduction to warning prompts', }, propType: { type: 'oneOfType', value: ['string', 'node'] }, }, { name: 'icon', title: { label: 'icon', tip: 'Custom icon, `showIcon` Valid when true', }, propType: 'node', }, { name: 'message', title: { label: 'Warning content', tip: 'Warning content' }, propType: { type: 'oneOfType', value: ['string', 'node'] }, }, { name: 'showIcon', title: { label: 'Show icon', tip: 'Whether to display auxiliary icons' }, propType: 'bool', }, { name: 'type', title: { label: 'type', tip: 'type' }, propType: { type: 'oneOf', value: ['success', 'info', 'warning', 'error'], }, }, { name: 'onClose', title: { label: 'Callback function triggered when closing', tip: 'Callback function triggered when closing' }, propType: 'func', }, ], configure: { supports: { style: true, events: [ { name: 'onClose', template: "onChange(event,${extParams}){\n// 关闭时触发的回调函数\nconsole.log('onChange');}", }, ], }, }, };