import snippets from './snippets'; export default { snippets, componentName: 'Popover', title: 'Bubble Card', category: 'Data Display', props: [ { title: 'content', display: 'block', type: 'group', items: [ { name: 'title', title: { label: 'card title', tip: 'card title', }, propType: { type: 'oneOfType', value: ['string', 'node', 'func'], }, setter: ['StringSetter', 'SlotSetter', 'FunctionSetter', 'VariableSetter'], }, { name: 'content', title: { label: 'card content', tip: 'card content', }, propType: { type: 'oneOfType', value: ['string', 'node', 'func'], }, setter: ['StringSetter', 'SlotSetter', 'FunctionSetter', 'VariableSetter'], }, ], }, { title: 'control', display: 'block', type: 'group', items: [ { name: 'defaultOpen', title: { label: 'default open', tip: 'defaultOpen | Whether to show or hide by default', }, propType: 'bool', setter: 'BoolSetter', defaultValue: false, }, { name: 'open', title: { label: 'manually show and hide', tip: 'open | Manually control the display and concealment of floating layers', }, propType: 'bool', setter: 'BoolSetter', }, ], }, { title: 'exterior', display: 'block', type: 'group', items: [ { name: 'placement', title: { label: 'bubble position', tip: 'placement | Bubble position', }, propType: { type: 'oneOf', value: [ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ], }, defaultValue: 'top', setter: { componentName: 'SelectSetter', props: { options: [ { title: 'top', value: 'top', }, { title: 'left', value: 'left', }, { title: 'right', value: 'right', }, { title: 'bottom', value: 'bottom', }, { title: 'top left', value: 'topLeft', }, { title: 'top right', value: 'topRight', }, { title: 'bottom left', value: 'bottomLeft', }, { title: 'bottom right', value: 'bottomRight', }, { title: 'left top', value: 'leftTop', }, { title: 'left bottom', value: 'leftBottom', }, { title: 'right top', value: 'rightTop', }, { title: 'right bottom', value: 'rightBottom', }, ], }, }, }, { name: 'autoAdjustOverflow', title: { label: 'auto-adjust', tip: 'autoAdjustOverflow | Automatically adjust the position of the bubble when it is blocked', }, propType: 'bool', setter: 'BoolSetter', defaultValue: true, }, { name: 'arrowPointAtCenter', title: { label: 'point to center', tip: 'arrowPointAtCenter | Whether the arrow points to the center of the target element', }, propType: 'bool', setter: 'BoolSetter', defaultValue: false, }, { name: 'color', title: { label: 'background color', tip: 'background color', }, propType: 'string', setter: 'ColorSetter', }, { name: 'zIndex', title: { label: 'zIndex', tip: 'zIndex | Set the z-index value of Tooltip', }, propType: 'number', setter: 'NumberSetter', }, ], }, { name: 'overlayStyle', title: 'card style', type: 'group', extraProps: { display: 'entry', }, items: [ { name: 'overlayStyle', title: { label: 'overlay style', tip: 'overlayStyle | card style', }, setter: 'StyleSetter', extraProps: { display: 'block', }, }, ], }, { name: 'overlayInnerStyle', title: 'card content style', type: 'group', extraProps: { display: 'entry', }, items: [ { name: 'overlayInnerStyle', title: { label: 'style settings', tip: 'overlayStyle | The style of the card content area', }, setter: 'StyleSetter', extraProps: { display: 'block', }, }, ], }, { title: 'behavior', display: 'block', type: 'group', items: [ { name: 'trigger', title: { label: 'Trigger behavior', tip: 'trigger | Trigger behavior', }, propType: { type: 'oneOf', value: ['hover', 'focus', 'click', 'contextMenu'], }, defaultValue: 'hover', setter: { componentName: 'SelectSetter', props: { options: [ { title: 'mouseover', value: 'hover', }, { title: 'get focus', value: 'focus', }, { title: 'mouse click', value: 'click', }, { title: 'right click menu', value: 'contextMenu', }, ], }, }, }, { name: 'mouseEnterDelay', title: { label: 'display delay', tip: 'mouseEnterDelay | How long is the delay before the Tooltip is displayed after the mouse is moved in, unit: seconds', }, propType: 'number', defaultValue: 0.1, setter: { componentName: 'NumberSetter', props: { step: 0.1, }, }, }, { name: 'mouseLeaveDelay', title: { label: 'hide delay', tip: 'mouseLeaveDelay | The delay after the mouse is moved out before hiding the Tooltip, unit: seconds', }, propType: 'number', defaultValue: 0.1, setter: { componentName: 'NumberSetter', props: { step: 0.1, }, }, }, ], }, ], configure: { component: { isContainer: true, }, supports: { style: true, events: [ { name: 'onOpenChange', template: "onOpenChange(open,${extParams}){\n// 显示隐藏的回调\nconsole.log('onOpenChange',open);}", }, ], }, }, };