@xdp/button
Version:
button el-button vue3
76 lines (72 loc) • 1.7 kB
text/typescript
export const propsScheme = {
needPop: {
type: Boolean,
intro: '是否需要二次确认',
default: true
},
popTitle: {
type: String,
intro: '确认框标题(类似 ElMessageBox.confirm 的 title)'
},
popMessage: {
type: String,
intro: '确认框正文(类似 ElMessageBox.confirm 的 message)'
},
popPlacement: {
type: String,
intro: '确认框位置',
default: 'top'
},
buttonComp: {
type: String,
intro: '内层按钮类型',
default: 'text',
options: ['text', 'button']
},
popProps: {
type: Object,
intro: 'ElPopconfirm 扩展属性'
},
popLegacyCancel: {
type: Boolean,
intro: '取消时是否不触发 onClick(兼容旧行为)',
default: true
}
}
export const eventsScheme = {
click: {
cbVar: 'e'
}
}
export const slotsScheme = {
default: {
intro: '默认:按钮文案;配合 #reference 时作为 scoped 插槽,接收 { title, message, confirm, cancel } 自定义确认框内容',
cbVar: 'text | { title, message, confirm, cancel }'
},
reference: {
intro: '触发按钮内容(与 scoped default 配合使用)',
cbVar: 'text'
},
button: {
intro: 'reference 的别名',
cbVar: 'text'
},
pop: {
intro: '自定义确认框内容',
cbVar: '{ title, message, confirm, cancel }'
},
'pop-title': {
intro: '确认框标题区域',
cbVar: 'title'
},
'pop-message': {
intro: '确认框正文区域',
cbVar: 'message'
}
}
export const componentScheme = {
propsScheme,
slotsScheme,
eventsScheme,
name: 'CipButtonPop'
}