import snippets from './snippets'; export default { snippets, componentName: 'Calendar', title: 'calendar', category: 'Data Display', props: [ { name: 'defaultValue', title: { label: 'default value', tip: 'Date displayed by default' }, propType: 'date', setter: 'DateSetter', }, // { // name: 'dateCellRender', // title: { // label: 'Custom date append rendering', // tip: 'Customize the rendering date cell, and the returned content will be appended to the cell', // }, // propType: 'func', // }, // { // name: 'dateFullCellRender', // title: { // label: 'Customize rendering date cells and return content overwritten cells', // tip: 'Customize rendering date cells and return content overwritten cells', // }, // propType: 'func', // }, { name: 'disabledDate', title: { label: 'Date not optional', tip: 'Non-selectable date' }, propType: 'func', }, { name: 'fullscreen', title: { label: 'full-screen display', tip: 'Whether to display in full screen' }, propType: 'bool', defaultValue: true, }, // { // name: 'locale', // title: { label: 'International configuration', tip: 'International configuration' }, // propType: 'object', // }, { name: 'mode', title: { label: 'Initial mode', tip: 'Initial mode' }, propType: { type: 'oneOf', value: ['month', 'year'] }, defaultValue: 'month', }, // { // name: 'monthCellRender', // title: { // label: 'Customize the rendering of the month cell, and the returned content will be appended to the cell', // tip: 'Customize the rendering of the month cell, and the returned content will be appended to the cell', // }, // propType: 'func', // }, // { // name: 'monthFullCellRender', // title: { // label: 'Customize rendering of month cells and return content covering cells', // tip: 'Customize rendering of month cells and return content covering cells', // }, // propType: 'func', // }, // { // name: 'validRange', // title: { label: 'Set the dates that can be displayed', tip: 'Set the dates that can be displayed' }, // propType: { type: 'arrayOf', value: 'object' }, // }, // { // name: 'value', // title: { label: 'The current value', tip: 'Display date' }, // propType: 'object', // }, { name: 'onPanelChange', title: { label: 'Date panel change callback', tip: 'Date panel change callback' }, propType: 'func', }, { name: 'onSelect', title: { label: 'Click to select date callback', tip: 'Click to select date callback' }, propType: 'func', }, { name: 'onChange', title: { label: 'date change callback', tip: 'date change callback' }, propType: 'func', }, // { // name: 'headerRender', // title: { label: 'Custom header content', tip: 'Custom header content' }, // propType: 'func', // }, ], configure: { supports: { style: true, events: [ { name: 'onPanelChange', template: "onPanelChange(date,mode,${extParams}){\n// 日期面板变化回调\nconsole.log('onPanelChange', date, mode);}", }, { name: 'onSelect', template: "onSelect(date,${extParams}){\n// 点击选择日期回调\nconsole.log('onSelect', date);}", }, { name: 'onChange', template: "onChange(date,${extParams}){\n// 日期变化回调\nconsole.log('onChange', date);}", }, ], }, }, };