mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
feat(baInput):单复选框支持按钮模式
This commit is contained in:
parent
efa1d7f514
commit
eab132609a
@ -164,6 +164,8 @@ export interface InputAttr {
|
||||
valueTitle?: string
|
||||
// 返回数据类型
|
||||
dataType?: string
|
||||
// 是否渲染为 button(radio 和 checkbox)
|
||||
button?: boolean
|
||||
// 事件
|
||||
onPreview?: Function
|
||||
onRemove?: Function
|
||||
|
@ -62,10 +62,11 @@ export default defineComponent({
|
||||
console.warn('请传递 ' + props.type + '的 content')
|
||||
}
|
||||
let vNode: VNode[] = []
|
||||
const type = props.attr.button ? props.type + '-button' : props.type
|
||||
for (const key in props.data.content) {
|
||||
vNode.push(
|
||||
createVNode(
|
||||
resolveComponent('el-' + props.type),
|
||||
resolveComponent('el-' + type),
|
||||
{
|
||||
label: key,
|
||||
...childrenAttr,
|
||||
|
Loading…
Reference in New Issue
Block a user