维度隐藏列
This commit is contained in:
@@ -183,6 +183,43 @@ export const useRenderVxeColumn = (useType = 'table') => {
|
||||
)
|
||||
}
|
||||
},
|
||||
LowSelectMultiple: {
|
||||
default: (renderOpts, { row, column }, isStop = false) => {
|
||||
const { dicData } = renderOpts
|
||||
const value = row[column.field]
|
||||
const valStr=dicData.filter(item=>value.includes(item.value)).map(item=>item.label).join(',')
|
||||
return <span>{valStr}</span>
|
||||
},
|
||||
edit: (renderOpts, { row, rowIndex, column }) => {
|
||||
const { multiple, filterable, allowCreate, typeKey ,dicData} = renderOpts
|
||||
interface DictItem {
|
||||
label: string;
|
||||
value: string | number;
|
||||
[key: string]: any; // 兼容其他可能的字段
|
||||
}
|
||||
return (
|
||||
<el-select
|
||||
popper-class="vxe-table--ignore-clear"
|
||||
v-model={row[column.field]}
|
||||
placeholder={'请选择 ' + column.title}
|
||||
multiple={multiple}
|
||||
filterable={filterable}
|
||||
collapseTags={true}
|
||||
collapseTagsTooltip={true}
|
||||
allowCreate={allowCreate}
|
||||
clearable={true}
|
||||
>
|
||||
{dicData.map((item: DictItem, index: number) => (
|
||||
<el-option
|
||||
key={index} // 建议用 item.value 作为 key,更稳定
|
||||
label={item.label}
|
||||
value={item.value}
|
||||
/>
|
||||
))}
|
||||
</el-select>
|
||||
)
|
||||
}
|
||||
},
|
||||
LowSummaryBottomSql: {
|
||||
default: (renderOpts, { row, column }, isStop = false) => {
|
||||
const { dicObj } = renderOpts
|
||||
|
||||
Reference in New Issue
Block a user