UNPKG

ideaz-element

Version:

<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>

1 lines 1.04 kB
{"version":3,"file":"getIsReturnToolBar.cjs","sources":["../../../../../../packages/element/table/src/utils/getIsReturnToolBar.ts"],"sourcesContent":["import { isArray, isDef, isObject } from '@ideaz/utils'\nimport type { TableCol } from '../../../types'\n\nexport function getIsReturnToolBar(tableCol: TableCol, toolBar: { [propName: string]: any } | boolean | undefined) {\n // const isHide = isFunction(tableCol.hide) ? tableCol.hide() : tableCol.hide\n const isFixed = isDef(tableCol.fixed)\n\n if (isDef(toolBar) && toolBar === false)\n return false\n\n if (isObject(toolBar)) {\n return isArray(toolBar.exclude)\n ? !toolBar.exclude.includes(tableCol.label) && !isFixed\n : !isFixed\n }\n return !isFixed\n}\n"],"names":["getIsReturnToolBar","tableCol","toolBar","isFixed","is"],"mappings":"mKAGgB,SAAAA,EAAAC,EAAAC,EAAA,CAEd,MAAAC,EAAAC,EAAA,MAAAH,EAAA,KAAA,EAEA,OAAAG,EAAA,MAAAF,CAAA,GAAAA,IAAA,GACE,GAEFE,EAAA,SAAAF,CAAA,GACEE,EAAA,QAAAF,EAAA,OAAA,EAAA,CAAAA,EAAA,QAAA,SAAAD,EAAA,KAAA,GAAA,CAAAE,EAIF,CAAAA,CACF"}