import snippets from './snippets'; export default { snippets, componentName: 'BackTop', title: 'back to the top', category: 'Layout', props: [ { name: 'target', title: { label: 'Listen element', tip: 'Set the element whose scroll event needs to be monitored, the value is a function that returns the corresponding DOM element', }, propType: 'func', }, { name: 'visibilityHeight', title: { label: 'visible height', tip: 'BackTop will appear only when the scroll height reaches this parameter value', }, propType: 'number', }, { name: 'onClick', title: { label: 'Callback function for click button', tip: 'Callback function for click button' }, propType: 'func', }, { name: 'duration', title: { label: 'Scroll time', tip: 'Time required to return to top (ms)' }, propType: 'number', }, ], configure: { supports: { style: true, events: [ { name: 'onClick', template: "onClick(${extParams}){\n// 点击按钮的回调函数\nconsole.log('onClick');}", }, ], }, }, };