动态多维表头

This commit is contained in:
demo
2026-02-11 20:15:26 +08:00
parent 59c51ca360
commit b40163b2e7
4 changed files with 373 additions and 71 deletions

View File

@@ -266,6 +266,32 @@ export const useRenderVxeColumn = (useType = 'table') => {
</el-popover>
)
}
},
LowButton: {
default: (renderOpts, { row, column }) => {
const { buttonText, disabled } = renderOpts
const isDisabled = typeof disabled === 'function' ? disabled(row) : disabled
if (isDisabled) return <span style="color: #c0c4cc;">-</span>
return <span style="color: #409eff; cursor: pointer;">{buttonText || '操作'}</span>
},
edit: (renderOpts, { row, column }) => {
const { buttonText, buttonType, buttonSize, disabled } = renderOpts
const isDisabled = typeof disabled === 'function' ? disabled(row) : disabled
return (
<el-button
type={buttonType || 'primary'}
size={buttonSize || 'small'}
disabled={isDisabled}
onClick={() => {
if (renderOpts.events && renderOpts.events.click) {
renderOpts.events.click(row)
}
}}
>
{buttonText || '操作'}
</el-button>
)
}
}
}
for (const key in lowControl) {