import snippets from './snippets'; export default { snippets, componentName: 'Popconfirm', title: 'Bubble confirmation box', category: 'Feedback', props: [ { name: 'title', title: { label: 'confirmation box content', tip: 'confirmatioon box content' }, propType: { type: 'oneOfType', value: ['string', 'node', 'func'] }, }, { name: 'okText', title: { label: 'confirm buttoon text', tip: 'confirm button text' }, propType: 'string', setter: 'StringSetter', supportVariable: true }, { name: 'cancelText', title: { label: 'cancel button text', tip: 'cancel button text' }, propType: 'string', setter: 'StringSetter', supportVariable: true }, { name: 'onConfirm', title: { label: 'click confirm on', tip: 'click confirm on' }, propType: 'func', }, // { // name: 'okType', // title: { label: 'confirm type', tip: 'confirm type' }, // propType: { // type: 'oneOf', // value: ['primary', 'ghost', 'dashed', 'danger', 'link', 'text'], // }, // setter: { // componentName: 'SelectSetter', // props: { // options: [ // { // title: 'main button', // value: 'primary', // }, // { // title: 'dashed box', // value: 'dashed', // }, // { // title: 'danger', // value: 'danger', // }, // { // title: 'link', // value: 'link', // }, // { // title: 'text-like button', // value: 'text', // }, // ], // }, // }, // }, // { // name: 'okButtonProps', // title: { label: 'ok按钮props', tip: 'ok按钮props' }, // propType: 'object', // }, // { // name: 'cancelButtonProps', // title: { label: 'cancel按钮props', tip: 'cancel按钮props' }, // propType: 'object', // }, // { // name: 'onCancel', // title: { label: 'click cancel on', tip: 'click cancel on' }, // propType: 'func', // }, // { // name: 'icon', // title: { label: 'custom icon', tip: 'Customize the pop-up bubble icon' }, // propType: 'node', // }, // { // name: 'disabled', // title: { // label: 'disable', // tip: 'disable', // }, // propType: 'bool', // defaultValue: false, // }, ], configure: { component: { isContainer: true }, supports: { style: true, events: [ { name: 'onConfirm', template: "onConfirm(${extParams}){\n// 点击确认的回调\nconsole.log('onConfirm');}", }, ], }, }, };