@dinert/element-plus 1.1.32 → 1.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"recuve-table-column.mjs","sources":["../../../../../packages/components/table/src/recuve-table-column.tsx"],"sourcesContent":["import {defineComponent, watch, ref, nextTick, computed} from 'vue'\n\nimport {getPropByPath, dataTransformRod} from '@packages/utils/tools'\nimport {treeNode, allowDrop, checkTree, nodeDragEnd, allShow, treeProps} from '@packages/components/table/hooks'\nimport {Setting, ArrowDown} from '@element-plus/icons-vue'\nimport {ElMessageBox, type TableColumnCtx} from 'element-plus'\nimport {buildVueDompurifyHTMLDirective} from 'vue-dompurify-html'\n\n\nimport type Node from 'element-plus/es/components/tree/src/model/node'\nimport type {\n RecuveTableColumnProps,\n RewriteTableProps,\n RewriteTableColumnCtx,\n OperationsProps\n} from '@packages/components/table/types/index'\n\nimport type {PropType} from 'vue'\n\nimport type {ElSelect} from 'element-plus'\n\n\nconst filterColumn = (column: any) => {\n const obj: any = {}\n for (const prop in column) {\n if (prop !== 'children') {\n obj[prop] = column[prop]\n }\n }\n return obj\n}\n\nconst mapWidth: Record<string, any> = {\n index: 60,\n selection: 40,\n expand: 40\n}\n\nconst DompurifyHtml = buildVueDompurifyHTMLDirective({})\n\n\nexport default defineComponent({\n name: 'dinert-recuve-table-column',\n props: {\n onlyClass: {\n type: String,\n default: ''\n },\n popoverValue: {\n type: Boolean,\n default: false\n },\n table: {\n type: Object as PropType<RewriteTableProps>,\n },\n tableColumns: {\n type: Array as PropType<RewriteTableColumnCtx[]>,\n default: () => ([])\n },\n defaultCheckedKeys: {\n type: Array,\n default: () => ([])\n }\n },\n directives: {\n DompurifyHtml: DompurifyHtml\n },\n emits: ['CheckedChange'],\n setup(props, {emit}) {\n const selectTable = ref<InstanceType<typeof ElSelect>>()\n\n watch(() => props.table?.key, () => {\n nextTick(() => {\n selectTable.value && treeNode(selectTable.value, props.table?.tableColumns)\n })\n }, {\n immediate: true\n })\n const settingRender = (props: RecuveTableColumnProps) => {\n return (\n <el-popover\n value={props.popoverValue}\n v-slots={\n {\n default: () => (\n <ul class=\"el-popover-classify\">\n <li>\n <el-button class=\"allSelect\" link\n type={'primary'} onClick={async () => allShow(selectTable.value, props.table?.tableColumns || [])}\n >全选</el-button>\n </li>\n <el-tree\n ref={selectTable}\n draggable\n data={props.table?.tableColumns}\n default-expand-all\n defaultCheckedKeys={props.defaultCheckedKeys}\n show-checkbox\n node-key={'prop'}\n props={treeProps}\n allowDrop={allowDrop}\n onCheckChange={async (data: Node, checked: boolean, childChecked: boolean) => {\n // eslint-disable-next-line @typescript-eslint/await-thenable\n await checkTree(data, checked, childChecked)\n emit('CheckedChange', data, checked, childChecked)\n }}\n onNodeDragEnd={(currentNode: Node, targetNode: Node) => nodeDragEnd(currentNode, targetNode, (selectTable.value as any))}\n v-slots={\n {\n default: ({data}: {data: Node}) => (\n <div class=\"text-dot tree-item\">\n <el-tooltip content={data.label}\n placement={'top'}\n disabled={data.label && data.label.length < 8}\n v-slots={\n {\n default: () => (<span>{ data.label }</span>)\n }\n }\n >\n </el-tooltip>\n </div>\n )\n }\n }\n >\n\n </el-tree>\n </ul>\n ),\n reference: () => (\n <el-icon class=\"setting-icon\">\n <Setting/>\n </el-icon>\n )\n\n }\n }\n >\n </el-popover>)\n }\n\n const moreRender = (column: RewriteTableColumnCtx, _this: any, {\n value,\n scope,\n isSlotValue,\n slotValue\n }: any) => {\n const itemOperations = column.operations || {}\n const operations = computed<OperationsProps[]>(() => {\n const result: any = []\n Object.keys((itemOperations)).forEach(key => {\n const tempObj = itemOperations[key]\n if ((typeof tempObj.show !== 'function' && [true, undefined].includes(tempObj.show))\n || (typeof tempObj.show === 'function' && [true, undefined].includes(tempObj.show(scope, column, tempObj)))\n ) {\n result.push({\n key: key,\n ...tempObj,\n })\n }\n })\n\n result.sort((a: any, b: any) => {\n return (a.sort || Infinity) - (b.sort || Infinity)\n })\n return result\n })\n let maxOperations = column.maxOperations || 3\n const operationsLen = operations.value.length\n maxOperations = operationsLen > maxOperations ? maxOperations - 1 : maxOperations\n\n const defaultFunctions = computed(() => {\n const list = operations.value.slice(0, maxOperations)\n return list\n })\n\n const seniorFunctions = computed(() => {\n const list = operations.value.slice(maxOperations, operations.value.length)\n return list\n })\n\n\n if (operations.value && operations.value.length) {\n return (\n <>\n {defaultFunctions.value.map(item2 => {\n const message = typeof item2.message === 'function' ? item2.message(scope, column, item2) : item2.message\n\n const buttonCom = (<el-button {...{\n ...item2,\n type: item2.key === 'delete' ? 'danger' : item2.type || 'primary',\n link: item2.link === undefined ? true : item2.link\n }}\n\n onClick={() => {\n if (item2.second === 'messageBox' || item2.key === 'delete') {\n return ElMessageBox({\n title: '警告',\n message: `是否${message}该条数据?`,\n type: 'warning',\n showCancelButton: true,\n cancelButtonText: '取消',\n beforeClose(action, instance, done) {\n done()\n },\n ...item2.messageBox\n }).then(() => {\n return item2.click && item2.click(scope, column, item2)\n }).catch(() => null)\n }\n return item2.click && item2.click(scope, column, item2)\n }}\n key={(item2 as any).key}>\n {message}\n </el-button>)\n\n if (item2.second === 'messageBox') {\n return buttonCom\n }\n\n if (item2.key === 'delete' || item2.second) {\n return (\n <el-popconfirm title={`是否${message}该数据?`} {...{...item2.confirm}}\n onConfirm={() => item2.click && item2.click(scope, column, item2)}>\n {{\n reference: () => {\n return (<el-button {...{\n ...item2,\n type: item2.key === 'delete' ? 'danger' : item2.type || 'primary',\n link: item2.link === undefined ? true : item2.link\n }}\n key={(item2 as any).key}>\n {message}\n </el-button>)\n }\n }}\n </el-popconfirm>\n\n )\n }\n return buttonCom\n\n })}\n\n {(seniorFunctions.value.length && operations.value.length > maxOperations\n && <el-dropdown teleported={true}\n onCommand={item => {\n if (item.key === 'delete' || item.second) {\n return ElMessageBox({\n title: '警告',\n message: `是否${item.message}该条数据?`,\n type: 'warning',\n showCancelButton: true,\n cancelButtonText: '取消',\n beforeClose(action, instance, done) {\n done()\n },\n ...item.messageBox\n }).then(() => {\n return item.click && item.click(scope, column, item)\n }).catch(() => null)\n }\n return item.click && item.click(scope, column, item)\n }}\n v-slots= {{\n default: () => {\n return (\n <el-button type=\"primary\" link text>\n 更多<el-icon><ArrowDown /></el-icon>\n </el-button>\n )\n },\n dropdown: () => {\n\n return (\n <el-dropdown-menu>\n {\n seniorFunctions.value.map(item => {\n const message = typeof item.message === 'function' ? item.message(scope, column, item) : item.message\n return (\n <el-dropdown-item command={item}>{message}</el-dropdown-item>\n )\n })\n }\n </el-dropdown-menu>\n )\n }\n }}>\n\n </el-dropdown>) || null\n\n }\n </>\n )\n }\n return <div class=\"cell-item-text\">{ (isSlotValue && slotValue) || value}</div>\n }\n\n return {\n settingRender,\n moreRender\n }\n },\n render() {\n const solts = this.$slots\n const defaultSlot = solts.default\n const headerSlot = solts.header\n return (\n <>\n {\n // eslint-disable-next-line array-callback-return, consistent-return\n this.tableColumns && this.tableColumns.map(item => {\n let show = typeof item.show === 'function' ? item.show(item) : item.show\n show = show === undefined || show === true\n const checked = item.checked === undefined || item.checked === true\n const custom = !['index', 'selection', 'expand'].includes((item.type as string))\n const fixed = item.prop === 'operations' && item.fixed === undefined ? 'right' : item.fixed\n const showOverflowTooltip = item.showOverflowTooltip === undefined && item.prop !== 'operations' ? true : item.showOverflowTooltip\n const className = `${item.prop || ''} ${item.className || ''} ${item.setting ? 'setting' : ''}`\n let align = item.prop === 'operations' && item.align === undefined ? 'center' : item.align\n let width = item.prop === 'operations' && item.width === undefined ? 200 : item.width\n const formatter = item.formatter && typeof item.formatter === 'function'\n const noChildItem = filterColumn(item)\n const propLowerCase = item.prop?.toLocaleLowerCase()\n if (propLowerCase?.includes('time') || propLowerCase?.includes('date')) {\n width = width ? width : 170\n } else if (propLowerCase?.includes('status') || propLowerCase?.includes('state')) {\n width = width ? width : 100\n align = item.align || 'center'\n }\n\n if (show && checked && custom) {\n return (\n <el-table-column\n {...noChildItem}\n key={item.prop}\n fixed={fixed}\n show-overflow-tooltip={showOverflowTooltip}\n className={className}\n width={width}\n minWidth={item.minWidth}\n align={align}\n v-slots= {{\n default: (scope: any) => {\n const deepValue = getPropByPath(scope.row, item.prop || '')\n const value = dataTransformRod(deepValue, this.table?.errData)\n\n const slotValue = defaultSlot?.({...scope, prop: item.prop})\n const isSlotValue = slotValue && slotValue[0] && slotValue[0].children\n\n if (formatter) {\n let htmlValue = item.formatter && item.formatter(scope, (item as TableColumnCtx<any>), deepValue, scope.$index, this.table?.errData)\n htmlValue = dataTransformRod(htmlValue, this.table?.errData)\n return (\n <>\n {isSlotValue\n ? <div class=\"cell-item\">{ defaultSlot?.({...scope, prop: item.prop})}</div>\n : <div class=\"cell-item\" v-dompurify-html={htmlValue}></div>}\n\n <dinert-recuve-table-column table={this.table}\n key={item.prop}\n tableColumns={item.children}\n popover-value={this.popoverValue}\n only-class={this.onlyClass}\n v-slots={solts}\n >\n </dinert-recuve-table-column>\n </>\n )\n } else {\n\n return (\n <>\n <div class=\"cell-item\">\n {this.moreRender(item, this, {\n value,\n scope,\n isSlotValue,\n slotValue\n })}\n </div>\n <dinert-recuve-table-column table={this.table}\n key={item.prop}\n tableColumns={item.children}\n popover-value={this.popoverValue}\n only-class={this.onlyClass}\n v-slots={solts}\n >\n </dinert-recuve-table-column>\n </>\n )\n }\n },\n header: (scope: any) => {\n const slotValue = headerSlot?.({...scope, data: item, prop: item.prop})\n const isSlotValue = slotValue && slotValue[0] && slotValue[0].children\n if (headerSlot) {\n return (\n <> {<span>{isSlotValue ? headerSlot?.({...scope, data: item, prop: item.prop}) : scope.column.label}</span>}\n {item.setting && this.table?.setting !== false && this.settingRender((this as RecuveTableColumnProps))}\n </>\n )\n } else {\n return (\n <>\n <span>{scope.column.label}</span>\n {item.setting && this.table?.setting !== false && this.settingRender(this as RecuveTableColumnProps)}\n </>\n )\n }\n }\n }}\n >\n\n\n </el-table-column>\n )\n } else if (show && checked) {\n const align = item.align === undefined ? 'center' : 'left'\n const width = item.width === undefined ? mapWidth[item.type || ''] || 60 : item.width\n\n return (<el-table-column\n {...item}\n key={item.prop}\n fixed={fixed}\n align={align}\n reserve-selection={item.reserveSelection}\n width={width}\n v-slots={this.$slots}\n >\n </el-table-column>)\n }\n\n })\n }\n\n </>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","filterColumn","column","obj","prop","mapWidth","index","selection","expand","DompurifyHtml","buildVueDompurifyHTMLDirective","defineComponent","name","props","onlyClass","type","String","default","popoverValue","Boolean","table","tableColumns","Array","defaultCheckedKeys","directives","emits","setup","emit","selectTable","ref","watch","key","nextTick","value","treeNode","immediate","settingRender","_createVNode","_resolveComponent","allShow","_createTextVNode","treeProps","allowDrop","data","checked","childChecked","checkTree","onNodeDragEnd","currentNode","targetNode","nodeDragEnd","label","length","reference","Setting","moreRender","_this","scope","isSlotValue","slotValue","itemOperations","operations","computed","result","keys","forEach","tempObj","show","undefined","includes","push","sort","a","b","Infinity","maxOperations","defaultFunctions","slice","seniorFunctions","_Fragment","map","item2","message","buttonCom","_mergeProps","link","onClick","second","ElMessageBox","title","showCancelButton","cancelButtonText","beforeClose","action","instance","done","messageBox","then","click","catch","confirm","onConfirm","item","ArrowDown","dropdown","_slot","render","solts","$slots","defaultSlot","headerSlot","header","custom","fixed","showOverflowTooltip","className","setting","align","width","formatter","noChildItem","propLowerCase","toLocaleLowerCase","minWidth","deepValue","getPropByPath","row","dataTransformRod","_a","errData","children","htmlValue","$index","_b","_c","_withDirectives","_resolveDirective","reserveSelection"],"mappings":";;;;;;AAMiE,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAgBjE,MAAMM,IAAgBC,CAAAA,MAAgB;AAClC,QAAMC,IAAW,CAAA;AACjB,aAAWC,KAAQF;AACf,IAAIE,MAAS,eACTD,EAAIC,CAAI,IAAIF,EAAOE,CAAI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yE,IAAQf,EAAKe,UAAUjD,SAAY,WAAW,QAC9CkD,IAAQhB,EAAKgB,UAAUlD,SAAY/D,EAASiG,EAAKvF,QAAQ,EAAE,KAAK,KAAKuF,EAAKgB;AAEhF,iBAAAjF,EAAAC,EAAA8C,iBAAAA,GAAAA,EACQkB,GAAI;AAAA,YAAA,KACHA,EAAKlG;AAAAA,YAAI,OACP6G;AAAAA,YAAK,OACLI;AAAAA,YAAK,qBACOf,EAAKmC;AAAAA,YAAgB,OACjCnB;AAAAA,WACE,GAAA,KAAKV,MAAM;AAAA,QAG5B;AAAA,MAEH,CAAA;AAAA,IAAC,CAAA;AAAA,EAKlB;AACJ,CAAC;"}
1
+ {"version":3,"file":"recuve-table-column.mjs","sources":["../../../../../packages/components/table/src/recuve-table-column.tsx"],"sourcesContent":["import {defineComponent, watch, ref, nextTick, computed} from 'vue'\n\nimport {getPropByPath, dataTransformRod} from '@packages/utils/tools'\nimport {treeNode, allowDrop, checkTree, nodeDragEnd, allShow, treeProps} from '@packages/components/table/hooks'\nimport {Setting, ArrowDown} from '@element-plus/icons-vue'\nimport {ElMessageBox, type TableColumnCtx} from 'element-plus'\nimport {buildVueDompurifyHTMLDirective} from 'vue-dompurify-html'\n\n\nimport type Node from 'element-plus/es/components/tree/src/model/node'\nimport type {\n RecuveTableColumnProps,\n RewriteTableProps,\n RewriteTableColumnCtx,\n OperationsProps\n} from '@packages/components/table/types/index'\n\nimport type {PropType} from 'vue'\n\nimport type {ElSelect} from 'element-plus'\n\n\nconst filterColumn = (column: any) => {\n const obj: any = {}\n for (const prop in column) {\n if (prop !== 'children') {\n obj[prop] = column[prop]\n }\n }\n return obj\n}\n\nconst mapWidth: Record<string, any> = {\n index: 60,\n selection: 40,\n expand: 40\n}\n\nconst DompurifyHtml = buildVueDompurifyHTMLDirective({})\n\n\nexport default defineComponent({\n name: 'dinert-recuve-table-column',\n props: {\n onlyClass: {\n type: String,\n default: ''\n },\n popoverValue: {\n type: Boolean,\n default: false\n },\n table: {\n type: Object as PropType<RewriteTableProps>,\n },\n tableColumns: {\n type: Array as PropType<RewriteTableColumnCtx[]>,\n default: () => ([])\n },\n defaultCheckedKeys: {\n type: Array,\n default: () => ([])\n }\n },\n directives: {\n DompurifyHtml: DompurifyHtml\n },\n emits: ['CheckedChange'],\n setup(props, {emit}) {\n const selectTable = ref<InstanceType<typeof ElSelect>>()\n\n watch(() => props.table?.key, () => {\n nextTick(() => {\n selectTable.value && treeNode(selectTable.value, props.table?.tableColumns)\n })\n }, {\n immediate: true\n })\n const settingRender = (props: RecuveTableColumnProps) => {\n return (\n <el-popover\n value={props.popoverValue}\n v-slots={\n {\n default: () => (\n <ul class=\"dinert-popover-classify\">\n <li>\n <el-button class=\"allSelect\" link\n type={'primary'} onClick={async () => allShow(selectTable.value, props.table?.tableColumns || [])}\n >全选</el-button>\n </li>\n <el-tree\n ref={selectTable}\n draggable\n data={props.table?.tableColumns}\n default-expand-all\n defaultCheckedKeys={props.defaultCheckedKeys}\n show-checkbox\n node-key={'prop'}\n props={treeProps}\n allowDrop={allowDrop}\n onCheckChange={async (data: Node, checked: boolean, childChecked: boolean) => {\n // eslint-disable-next-line @typescript-eslint/await-thenable\n await checkTree(data, checked, childChecked)\n emit('CheckedChange', data, checked, childChecked)\n }}\n onNodeDragEnd={(currentNode: Node, targetNode: Node) => nodeDragEnd(currentNode, targetNode, (selectTable.value as any))}\n v-slots={\n {\n default: ({data}: {data: Node}) => (\n <div class=\"text-dot tree-item\">\n <el-tooltip content={data.label}\n placement={'top'}\n disabled={data.label && data.label.length < 8}\n v-slots={\n {\n default: () => (<span>{ data.label }</span>)\n }\n }\n >\n </el-tooltip>\n </div>\n )\n }\n }\n >\n\n </el-tree>\n </ul>\n ),\n reference: () => (\n <el-icon class=\"setting-icon\">\n <Setting/>\n </el-icon>\n )\n\n }\n }\n >\n </el-popover>)\n }\n\n const moreRender = (column: RewriteTableColumnCtx, _this: any, {\n value,\n scope,\n isSlotValue,\n slotValue\n }: any) => {\n const itemOperations = column.operations || {}\n const operations = computed<OperationsProps[]>(() => {\n const result: any = []\n Object.keys((itemOperations)).forEach(key => {\n const tempObj = itemOperations[key]\n if ((typeof tempObj.show !== 'function' && [true, undefined].includes(tempObj.show))\n || (typeof tempObj.show === 'function' && [true, undefined].includes(tempObj.show(scope, column, tempObj)))\n ) {\n result.push({\n key: key,\n ...tempObj,\n })\n }\n })\n\n result.sort((a: any, b: any) => {\n return (a.sort || Infinity) - (b.sort || Infinity)\n })\n return result\n })\n let maxOperations = column.maxOperations || 3\n const operationsLen = operations.value.length\n maxOperations = operationsLen > maxOperations ? maxOperations - 1 : maxOperations\n\n const defaultFunctions = computed(() => {\n const list = operations.value.slice(0, maxOperations)\n return list\n })\n\n const seniorFunctions = computed(() => {\n const list = operations.value.slice(maxOperations, operations.value.length)\n return list\n })\n\n\n if (operations.value && operations.value.length) {\n return (\n <>\n {defaultFunctions.value.map(item2 => {\n const message = typeof item2.message === 'function' ? item2.message(scope, column, item2) : item2.message\n\n const buttonCom = (<el-button {...{\n ...item2,\n type: item2.key === 'delete' ? 'danger' : item2.type || 'primary',\n link: item2.link === undefined ? true : item2.link\n }}\n\n onClick={() => {\n if (item2.second === 'messageBox' || item2.key === 'delete') {\n return ElMessageBox({\n title: '警告',\n message: `是否${message}该条数据?`,\n type: 'warning',\n showCancelButton: true,\n cancelButtonText: '取消',\n beforeClose(action, instance, done) {\n done()\n },\n ...item2.messageBox\n }).then(() => {\n return item2.click && item2.click(scope, column, item2)\n }).catch(() => null)\n }\n return item2.click && item2.click(scope, column, item2)\n }}\n key={(item2 as any).key}>\n {message}\n </el-button>)\n\n if (item2.second === 'messageBox') {\n return buttonCom\n }\n\n if (item2.key === 'delete' || item2.second) {\n return (\n <el-popconfirm title={`是否${message}该数据?`} {...{...item2.confirm}}\n onConfirm={() => item2.click && item2.click(scope, column, item2)}>\n {{\n reference: () => {\n return (<el-button {...{\n ...item2,\n type: item2.key === 'delete' ? 'danger' : item2.type || 'primary',\n link: item2.link === undefined ? true : item2.link\n }}\n key={(item2 as any).key}>\n {message}\n </el-button>)\n }\n }}\n </el-popconfirm>\n\n )\n }\n return buttonCom\n\n })}\n\n {(seniorFunctions.value.length && operations.value.length > maxOperations\n && <el-dropdown teleported={true}\n onCommand={item => {\n if (item.key === 'delete' || item.second) {\n return ElMessageBox({\n title: '警告',\n message: `是否${item.message}该条数据?`,\n type: 'warning',\n showCancelButton: true,\n cancelButtonText: '取消',\n beforeClose(action, instance, done) {\n done()\n },\n ...item.messageBox\n }).then(() => {\n return item.click && item.click(scope, column, item)\n }).catch(() => null)\n }\n return item.click && item.click(scope, column, item)\n }}\n v-slots= {{\n default: () => {\n return (\n <el-button type=\"primary\" link text>\n 更多<el-icon><ArrowDown /></el-icon>\n </el-button>\n )\n },\n dropdown: () => {\n\n return (\n <el-dropdown-menu>\n {\n seniorFunctions.value.map(item => {\n const message = typeof item.message === 'function' ? item.message(scope, column, item) : item.message\n return (\n <el-dropdown-item command={item}>{message}</el-dropdown-item>\n )\n })\n }\n </el-dropdown-menu>\n )\n }\n }}>\n\n </el-dropdown>) || null\n\n }\n </>\n )\n }\n return <div class=\"cell-item-text\">{ (isSlotValue && slotValue) || value}</div>\n }\n\n return {\n settingRender,\n moreRender\n }\n },\n render() {\n const solts = this.$slots\n const defaultSlot = solts.default\n const headerSlot = solts.header\n return (\n <>\n {\n // eslint-disable-next-line array-callback-return, consistent-return\n this.tableColumns && this.tableColumns.map(item => {\n let show = typeof item.show === 'function' ? item.show(item) : item.show\n show = show === undefined || show === true\n const checked = item.checked === undefined || item.checked === true\n const custom = !['index', 'selection', 'expand'].includes((item.type as string))\n const fixed = item.prop === 'operations' && item.fixed === undefined ? 'right' : item.fixed\n const showOverflowTooltip = item.showOverflowTooltip === undefined && item.prop !== 'operations' ? true : item.showOverflowTooltip\n const className = `${item.prop || ''} ${item.className || ''} ${item.setting ? 'setting' : ''}`\n let align = item.prop === 'operations' && item.align === undefined ? 'center' : item.align\n let width = item.prop === 'operations' && item.width === undefined ? 200 : item.width\n const formatter = item.formatter && typeof item.formatter === 'function'\n const noChildItem = filterColumn(item)\n const propLowerCase = item.prop?.toLocaleLowerCase()\n if (propLowerCase?.includes('time') || propLowerCase?.includes('date')) {\n width = width ? width : 170\n } else if (propLowerCase?.includes('status') || propLowerCase?.includes('state')) {\n width = width ? width : 100\n align = item.align || 'center'\n }\n\n if (show && checked && custom) {\n return (\n <el-table-column\n {...noChildItem}\n key={item.prop}\n fixed={fixed}\n show-overflow-tooltip={showOverflowTooltip}\n className={className}\n width={width}\n minWidth={item.minWidth}\n align={align}\n v-slots= {{\n default: (scope: any) => {\n const deepValue = getPropByPath(scope.row, item.prop || '')\n const value = dataTransformRod(deepValue, this.table?.errData)\n\n const slotValue = defaultSlot?.({...scope, prop: item.prop})\n const isSlotValue = slotValue && slotValue[0] && slotValue[0].children\n\n if (formatter) {\n let htmlValue = item.formatter && item.formatter(scope, (item as TableColumnCtx<any>), deepValue, scope.$index, this.table?.errData)\n htmlValue = dataTransformRod(htmlValue, this.table?.errData)\n return (\n <>\n {isSlotValue\n ? <div class=\"cell-item\">{ defaultSlot?.({...scope, prop: item.prop})}</div>\n : <div class=\"cell-item\" v-dompurify-html={htmlValue}></div>}\n\n <dinert-recuve-table-column table={this.table}\n key={item.prop}\n tableColumns={item.children}\n popover-value={this.popoverValue}\n only-class={this.onlyClass}\n v-slots={solts}\n >\n </dinert-recuve-table-column>\n </>\n )\n } else {\n\n return (\n <>\n <div class=\"cell-item\">\n {this.moreRender(item, this, {\n value,\n scope,\n isSlotValue,\n slotValue\n })}\n </div>\n <dinert-recuve-table-column table={this.table}\n key={item.prop}\n tableColumns={item.children}\n popover-value={this.popoverValue}\n only-class={this.onlyClass}\n v-slots={solts}\n >\n </dinert-recuve-table-column>\n </>\n )\n }\n },\n header: (scope: any) => {\n const slotValue = headerSlot?.({...scope, data: item, prop: item.prop})\n const isSlotValue = slotValue && slotValue[0] && slotValue[0].children\n if (headerSlot) {\n return (\n <> {<span>{isSlotValue ? headerSlot?.({...scope, data: item, prop: item.prop}) : scope.column.label}</span>}\n {item.setting && this.table?.setting !== false && this.settingRender((this as RecuveTableColumnProps))}\n </>\n )\n } else {\n return (\n <>\n <span>{scope.column.label}</span>\n {item.setting && this.table?.setting !== false && this.settingRender(this as RecuveTableColumnProps)}\n </>\n )\n }\n }\n }}\n >\n\n\n </el-table-column>\n )\n } else if (show && checked) {\n const align = item.align === undefined ? 'center' : 'left'\n const width = item.width === undefined ? mapWidth[item.type || ''] || 60 : item.width\n\n return (<el-table-column\n {...item}\n key={item.prop}\n fixed={fixed}\n align={align}\n reserve-selection={item.reserveSelection}\n width={width}\n v-slots={this.$slots}\n >\n </el-table-column>)\n }\n\n })\n }\n\n </>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","filterColumn","column","obj","prop","mapWidth","index","selection","expand","DompurifyHtml","buildVueDompurifyHTMLDirective","defineComponent","name","props","onlyClass","type","String","default","popoverValue","Boolean","table","tableColumns","Array","defaultCheckedKeys","directives","emits","setup","emit","selectTable","ref","watch","key","nextTick","value","treeNode","immediate","settingRender","_createVNode","_resolveComponent","allShow","_createTextVNode","treeProps","allowDrop","data","checked","childChecked","checkTree","onNodeDragEnd","currentNode","targetNode","nodeDragEnd","label","length","reference","Setting","moreRender","_this","scope","isSlotValue","slotValue","itemOperations","operations","computed","result","keys","forEach","tempObj","show","undefined","includes","push","sort","a","b","Infinity","maxOperations","defaultFunctions","slice","seniorFunctions","_Fragment","map","item2","message","buttonCom","_mergeProps","link","onClick","second","ElMessageBox","title","showCancelButton","cancelButtonText","beforeClose","action","instance","done","messageBox","then","click","catch","confirm","onConfirm","item","ArrowDown","dropdown","_slot","render","solts","$slots","defaultSlot","headerSlot","header","custom","fixed","showOverflowTooltip","className","setting","align","width","formatter","noChildItem","propLowerCase","toLocaleLowerCase","minWidth","deepValue","getPropByPath","row","dataTransformRod","_a","errData","children","htmlValue","$index","_b","_c","_withDirectives","_resolveDirective","reser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KAAKhF,cAAe,IAA+B,CAAC,CAAA,IAI9GC,EAAA0C,GAAA,MAAA,CAAA1C,EAAA,QAAA,MAAA,CAEeoB,EAAMvD,OAAOiD,KAAK,CAAA,GACxBmD,EAAKc,aAAWiB,IAAA,KAAKjH,UAAL,gBAAAiH,EAAYjB,aAAY,MAAS,KAAKhF,cAAc,IAA8B,CAAC,CAAA;AAAA,YAIpH;AAAA,WACH;AAMN,YAAI+B,KAAQvB,GAAS;AACxB,gBAAMyE,IAAQf,EAAKe,UAAUjD,SAAY,WAAW,QAC9CkD,IAAQhB,EAAKgB,UAAUlD,SAAY/D,EAASiG,EAAKvF,QAAQ,EAAE,KAAK,KAAKuF,EAAKgB;AAEhF,iBAAAjF,EAAAC,EAAA8C,iBAAAA,GAAAA,EACQkB,GAAI;AAAA,YAAA,KACHA,EAAKlG;AAAAA,YAAI,OACP6G;AAAAA,YAAK,OACLI;AAAAA,YAAK,qBACOf,EAAKmC;AAAAA,YAAgB,OACjCnB;AAAAA,WACE,GAAA,KAAKV,MAAM;AAAA,QAG5B;AAAA,MAEH,CAAA;AAAA,IAAC,CAAA;AAAA,EAKlB;AACJ,CAAC;"}
@@ -53,12 +53,13 @@ export interface RewriteTableProps<T = any> extends TableProps<T>, TableFnProps
53
53
  type PaginationPropsFn = Partial<Pick<InstanceType<typeof ElPagination>, 'onChange' | 'onUpdate:current-page' | 'onUpdate:page-size' | 'onSize-change' | 'onCurrent-change' | 'onPrev-click' | 'onNext-click'>>;
54
54
  export interface RewritePaginationProps extends PaginationPropsFn, Partial<Mutable<PaginationProps>> {
55
55
  }
56
- export interface HeaderListProps extends Partial<ButtonProps> {
56
+ export interface HeaderListProps extends Omit<Partial<ButtonProps>, 'disabled'> {
57
57
  message?: string;
58
58
  click?: (item: HeaderListProps) => void;
59
59
  sort?: number;
60
60
  show?: boolean | ((item: HeaderListProps) => boolean);
61
61
  key?: string;
62
+ disabled?: boolean | ((item: HeaderListProps) => boolean);
62
63
  }
63
64
  export interface TablePageProps<T = any> {
64
65
  header?: boolean | {
package/es/style.css CHANGED
@@ -1 +1 @@
1
- .tree-item{width:100%}.tree-item .el-tooltip__trigger{display:block;overflow:hidden;width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-popover-classify{overflow-y:auto;margin:0;padding:0;list-style:none}.el-popover-classify li{margin:0;padding:0;list-style:none}.el-popover-classify li:first-child{border-bottom:1px solid var(--el-fill-color);line-height:32px}.el-popover-classify>.el-tree>.el-tree-node>.el-tree-node__content>.el-tree-node__expand-icon.is-leaf{display:none}.el-popover-classify .el-tree-node__children{overflow:unset}.dinert-table{display:flex;padding:20px;height:100%;border-radius:var(--el-bg-radius);background-color:var(--el-bg-color);flex-direction:column;box-sizing:border-box}.dinert-table .dinert-table-header{display:flex;justify-content:space-between;margin-bottom:12px;text-align:right}.dinert-table .dinert-table-header .el-popover-classify li .el-checkbox{width:100%;line-height:24px;height:24px}.dinert-table .dinert-table-header .dinert-table-header-left{text-align:left}.dinert-table .dinert-table-body{flex:1;height:0}.dinert-table .dinert-table-body .el-table .el-popper{max-width:50%}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell.setting .setting-icon{display:inline-block}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell .setting-icon{vertical-align:-1px;margin-left:4px;cursor:pointer}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item .cell-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .el-dropdown{vertical-align:-2px}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell{display:flex;justify-content:center;align-items:center}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button{margin-right:8px;margin-left:0}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button:focus-visible{outline:none}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon{font-size:14px;color:var(--el-color-primary);cursor:pointer;flex:1}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon.delete{color:var(--el-color-danger)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon{width:16px;height:16px;vertical-align:-2px;flex:1;color:var(--el-color-primary);cursor:pointer;fill:var(--el-color-primary)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon.f-14{width:14px;height:14px}.dinert-table .dinert-table-footer{display:flex;margin-top:16px}.dinert-table .dinert-table-footer .el-pagination{display:flex;flex-wrap:wrap}.dinert-table-page{display:flex;flex-direction:column;box-sizing:border-box}.dinert-table-page.text-wrap .el-table__header .cell{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell,.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell>.cell-item,.dinert-table-page.text-wrap .el-table__body .el-table__row td .cell.el-tooltip>.cell-item{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row .el-button>span{text-align:left}.dinert-table-page.text-wrap .el-table__body .el-table__row span{white-space:pre-wrap;line-height:23px}.dinert-table-page.header-center .el-table__header .el-table__cell{text-align:center}.dinert-table-page.near .dinert-form-left{flex:unset}.dinert-table-page.near .dinert-form-left .el-col{margin-right:16px;width:auto;max-width:unset;flex:unset}.dinert-table-page.near .dinert-table-footer .el-pagination{margin-left:auto}.dinert-table-page.maxWidthAuto .el-form .el-form-item .el-form-item__label{max-width:unset}.dinert-table-page .el-form.dinert-form{padding:20px 20px 0;max-height:300px}.dinert-table-page .dinert-table{padding-top:0;height:0;flex:1}.el-form.dinert-form{display:flex;overflow:hidden;padding:0;min-height:50px;border-radius:4px;background-color:var(--el-bg-color);transition:all .3s cubic-bezier(.645,.045,.355,1);box-sizing:content-box}.el-form.dinert-form.near.packUp{max-height:50px}.el-form.dinert-form.near .dinert-form-left .el-col{display:flex;align-items:center;margin-right:10px;width:auto;max-width:unset;flex:unset}.el-form.dinert-form.near .el-form-right.isArrow{width:230px;flex:0 0 230px}.el-form.dinert-form.dialog .dinert-form-left{flex:1}.el-form.dinert-form.dialog .dinert-form-left .el-col .label-text>div{width:100%}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text{overflow:unset}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider{padding-left:12px}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider .el-input-number{width:auto}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-radio.is-bordered,.el-form.dinert-form .dinert-form-left .el-col .label-text .el-checkbox.is-bordered{margin-right:16px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--daterange{width:260px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-input{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-select{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--datetimerange{width:400px}.el-form.dinert-form .el-form-right{display:flex;margin-left:24px}.el-form.dinert-form .el-form-right .el-form-right-operation{padding:0}.el-form.dinert-form .el-form-right .el-form-right-operation.el-button.is-text{padding-right:0;background-color:unset}.el-form.dinert-form div.el-form-item{position:relative;display:flex;margin-right:0;margin-bottom:18px;width:100%}.el-form.dinert-form div.el-form-item.show-label .label-text{overflow:unset;text-overflow:unset;white-space:unset}.el-form.dinert-form div.el-form-item.label-wrap .el-form-item__label{height:auto}.el-form.dinert-form div.el-form-item.label-wrap .el-form-item__label .label-text{display:inline;text-align:left;white-space:normal}.el-form.dinert-form .el-form-item__content{flex:1;margin-left:0}.el-form.dinert-form .el-form-item__content .el-tooltip__trigger:not(.el-slider__button){width:100%}.el-form.dinert-form .el-form-item__content .el-input-number{width:100%}.el-form.dinert-form .el-form-item__content .el-input-number .el-input__inner{text-align:center}.el-form.dinert-form .el-form-item__content .el-textarea .el-textarea__inner{height:80px}.el-form.dinert-form .el-form-item__content .el-date-editor,.el-form.dinert-form .el-form-item__content .el-date-editor .el-input__wrapper{width:100%;box-sizing:border-box}.el-form.dinert-form .el-form-item__content .el-input__inner{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label{overflow:hidden;width:80px;max-width:80px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip,.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip .label-text{display:inline}.el-overlay.autoHeight .el-dialog{height:80%}.el-overlay.notPadding .el-dialog__body{padding:0}.el-overlay .el-dialog{top:10%;display:flex;min-width:310px;max-height:80%;border-radius:4px;flex-direction:column;--el-dialog-margin-top: 0;--el-dialog-padding-primary: 0}.el-overlay .el-dialog.is-fullscreen{top:unset;max-height:unset}.el-overlay .el-dialog__headerbtn{right:0;width:40px;height:100%;color:var(--el-color-info)}.el-overlay .el-dialog .full{position:absolute;top:-1.5px;right:34px;display:flex;justify-content:center;align-items:center;width:40px;height:100%;font-size:var(--el-message-close-size, 16px);border:none;color:var(--el-color-info);background:transparent;outline:none;cursor:pointer}.el-overlay .el-dialog .full:hover .icon{fill:var(--el-color-primary);color:var(--el-color-primary)}.el-overlay .el-dialog .full .icon{overflow:hidden;width:14px;height:14px;vertical-align:-.15em;fill:var(--el-color-info)}.el-overlay .el-dialog__header{position:relative;margin-right:0;padding:16px 24px;height:54px;box-sizing:border-box}.el-overlay .el-dialog__body{display:flex;overflow-y:auto;padding:24px;flex-direction:column;flex:1;word-wrap:break-word}.el-overlay .el-dialog__body>.el-form{overflow:unset}.el-overlay .el-dialog__footer{display:flex;justify-content:center;align-items:center;clear:both;padding:12px 24px 16px}.el-overlay .el-dialog__footer .el-button{margin:0}.el-overlay .el-dialog__footer .el-button+.el-button{margin-left:12px}.dinert-tooltip.el-tooltip__trigger{display:block;height:100%}.dinert-tooltip.el-tooltip__trigger .text-tooltip{position:absolute;left:-999999999999px}.dinert-tooltip.el-tooltip__trigger .label-text{display:block;overflow:hidden;width:100%;height:100%;text-overflow:ellipsis;white-space:nowrap}
1
+ .tree-item{width:100%}.tree-item .el-tooltip__trigger{display:block;overflow:hidden;width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap}.dinert-popover-classify{overflow-y:auto;margin:0;padding:0;list-style:none}.dinert-popover-classify li{margin:0;padding:0;list-style:none}.dinert-popover-classify li:first-child{border-bottom:1px solid var(--el-fill-color);line-height:32px}.dinert-popover-classify>.el-tree>.el-tree-node>.el-tree-node__content>.el-tree-node__expand-icon.is-leaf{display:none}.dinert-popover-classify .el-tree-node__children{overflow:unset}.dinert-table{display:flex;padding:20px;height:100%;border-radius:var(--el-bg-radius);background-color:var(--el-bg-color);flex-direction:column;box-sizing:border-box}.dinert-table .dinert-table-header{display:flex;justify-content:space-between;margin-bottom:12px;text-align:right}.dinert-table .dinert-table-header .dinert-popover-classify li .el-checkbox{width:100%;line-height:24px;height:24px}.dinert-table .dinert-table-header .dinert-table-header-left{text-align:left}.dinert-table .dinert-table-body{flex:1;height:0}.dinert-table .dinert-table-body .el-table .el-popper{max-width:50%}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell.setting .setting-icon{display:inline-block}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell .setting-icon{vertical-align:-1px;margin-left:4px;cursor:pointer}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item .cell-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .el-dropdown{vertical-align:-2px}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell{display:flex;justify-content:center;align-items:center}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button{margin-right:8px;margin-left:0}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button:focus-visible{outline:none}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon{font-size:14px;color:var(--el-color-primary);cursor:pointer;flex:1}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon.delete{color:var(--el-color-danger)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon{width:16px;height:16px;vertical-align:-2px;flex:1;color:var(--el-color-primary);cursor:pointer;fill:var(--el-color-primary)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon.f-14{width:14px;height:14px}.dinert-table .dinert-table-footer{display:flex;margin-top:16px}.dinert-table .dinert-table-footer .el-pagination{display:flex;flex-wrap:wrap}.dinert-table-page{display:flex;flex-direction:column;box-sizing:border-box}.dinert-table-page.text-wrap .el-table__header .cell{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell,.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell>.cell-item,.dinert-table-page.text-wrap .el-table__body .el-table__row td .cell.el-tooltip>.cell-item{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row .el-button>span{text-align:left}.dinert-table-page.text-wrap .el-table__body .el-table__row span{white-space:pre-wrap;line-height:23px}.dinert-table-page.header-center .el-table__header .el-table__cell{text-align:center}.dinert-table-page.near .dinert-form-left{flex:unset}.dinert-table-page.near .dinert-form-left .el-col{margin-right:16px;width:auto;max-width:unset;flex:unset}.dinert-table-page.near .dinert-table-footer .el-pagination{margin-left:auto}.dinert-table-page.maxWidthAuto .el-form .el-form-item .el-form-item__label{max-width:unset}.dinert-table-page .el-form.dinert-form{padding:20px 20px 0;max-height:300px}.dinert-table-page .dinert-table{padding-top:0;height:0;flex:1}.el-form.dinert-form{display:flex;overflow:hidden;padding:0;min-height:50px;border-radius:4px;background-color:var(--el-bg-color);transition:all .3s cubic-bezier(.645,.045,.355,1);box-sizing:content-box}.el-form.dinert-form.near.packUp{max-height:50px}.el-form.dinert-form.near .dinert-form-left .el-col{display:flex;align-items:center;margin-right:10px;width:auto;max-width:unset;flex:unset}.el-form.dinert-form.near .dinert-form-right.isArrow{width:230px;flex:0 0 230px}.el-form.dinert-form.dialog .dinert-form-left{flex:1}.el-form.dinert-form.dialog .dinert-form-left .el-col .label-text>div{width:100%}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text{overflow:unset}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider{padding-left:12px}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider .el-input-number{width:auto}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-radio.is-bordered,.el-form.dinert-form .dinert-form-left .el-col .label-text .el-checkbox.is-bordered{margin-right:16px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--daterange{width:260px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-input{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-select,.el-form.dinert-form .dinert-form-left .el-col .label-text>div>.el-cascader{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--datetimerange{width:400px}.el-form.dinert-form .dinert-form-right{display:flex;margin-left:24px}.el-form.dinert-form .dinert-form-right .dinert-form-right-operation{padding:0}.el-form.dinert-form .dinert-form-right .dinert-form-right-operation.el-button.is-text{padding-right:0;background-color:unset}.el-form.dinert-form div.el-form-item{position:relative;display:flex;margin-right:0;margin-bottom:18px;width:100%}.el-form.dinert-form div.el-form-item.show-label .label-text{overflow:unset;text-overflow:unset;white-space:unset}.el-form.dinert-form div.el-form-item.label-wrap .el-form-item__label{height:auto}.el-form.dinert-form div.el-form-item.label-wrap .el-form-item__label .label-text{display:inline;text-align:left;white-space:normal}.el-form.dinert-form .el-form-item__content{flex:1;margin-left:0}.el-form.dinert-form .el-form-item__content .el-tooltip__trigger:not(.el-slider__button){width:100%}.el-form.dinert-form .el-form-item__content .el-input-number{width:100%}.el-form.dinert-form .el-form-item__content .el-input-number .el-input__inner{text-align:center}.el-form.dinert-form .el-form-item__content .el-textarea .el-textarea__inner{height:80px}.el-form.dinert-form .el-form-item__content .el-date-editor,.el-form.dinert-form .el-form-item__content .el-date-editor .el-input__wrapper{width:100%;box-sizing:border-box}.el-form.dinert-form .el-form-item__content .el-input__inner{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label{overflow:hidden;width:80px;max-width:80px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip,.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip .label-text{display:inline}.dinert-tooltip.el-tooltip__trigger{display:block;height:100%}.dinert-tooltip.el-tooltip__trigger .text-tooltip{position:absolute;left:-999999999999px}.dinert-tooltip.el-tooltip__trigger .label-text{display:block;overflow:hidden;width:100%;height:100%;text-overflow:ellipsis;white-space:nowrap}.dinert-overlay.el-overlay.autoHeight .el-dialog{height:80%}.dinert-overlay.el-overlay.notPadding .el-dialog__body{padding:0}.dinert-overlay.el-overlay .el-dialog{top:10%;display:flex;min-width:310px;max-height:80%;border-radius:4px;flex-direction:column;--el-dialog-margin-top: 0;--el-dialog-padding-primary: 0}.dinert-overlay.el-overlay .el-dialog.is-fullscreen{top:unset;max-height:unset}.dinert-overlay.el-overlay .el-dialog__headerbtn{right:0;width:40px;height:100%;color:var(--el-color-info)}.dinert-overlay.el-overlay .el-dialog .full{position:absolute;top:-1.5px;right:34px;display:flex;justify-content:center;align-items:center;width:40px;height:100%;font-size:var(--el-message-close-size, 16px);border:none;color:var(--el-color-info);background:transparent;outline:none;cursor:pointer}.dinert-overlay.el-overlay .el-dialog .full:hover .icon{fill:var(--el-color-primary);color:var(--el-color-primary)}.dinert-overlay.el-overlay .el-dialog .full .icon{overflow:hidden;width:14px;height:14px;vertical-align:-.15em;fill:var(--el-color-info)}.dinert-overlay.el-overlay .el-dialog__header{position:relative;margin-right:0;padding:16px 24px;height:54px;box-sizing:border-box}.dinert-overlay.el-overlay .el-dialog__body{display:flex;overflow-y:auto;padding:24px;flex-direction:column;flex:1;word-wrap:break-word}.dinert-overlay.el-overlay .el-dialog__body>.el-form{overflow:unset}.dinert-overlay.el-overlay .el-dialog__footer{display:flex;justify-content:center;align-items:center;clear:both;padding:12px 24px 16px}.dinert-overlay.el-overlay .el-dialog__footer .el-button{margin:0}.dinert-overlay.el-overlay .el-dialog__footer .el-button+.el-button{margin-left:12px}