@dinert/element-plus 1.1.9 → 1.1.11
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.
- package/dist/element-plus.umd.js +1 -1
- package/dist/element-plus.umd.js.map +1 -1
- package/es/packages/components/table/src/recuve-table-column.mjs +24 -24
- package/es/packages/components/table/src/recuve-table-column.mjs.map +1 -1
- package/es/src/components/form/types/index.d.ts +2 -2
- package/es/src/components/table/types/index.d.ts +1 -0
- package/es/style.css +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/src/components/form/types/index.d.ts +2 -2
- package/lib/src/components/table/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as _, ref as $, watch as
|
|
2
|
-
import { getPropByPath as
|
|
3
|
-
import { treeNode as
|
|
4
|
-
import { Setting as
|
|
1
|
+
import { defineComponent as _, ref as $, watch as A, nextTick as F, createVNode as n, Fragment as w, resolveComponent as a, mergeProps as x, withDirectives as P, resolveDirective as E, createTextVNode as R, computed as T, isVNode as K } from "vue";
|
|
2
|
+
import { getPropByPath as S, dataTransformRod as W } from "../../../utils/tools.mjs";
|
|
3
|
+
import { treeNode as B, allShow as I, treeProps as q, allowDrop as z, checkTree as G, nodeDragEnd as H } from "../hooks/index.mjs";
|
|
4
|
+
import { Setting as J, ArrowDown as M } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
5
5
|
function D(i) {
|
|
6
|
-
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !
|
|
6
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !K(i);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const Q = (i) => {
|
|
9
9
|
const f = {};
|
|
10
10
|
for (const r in i)
|
|
11
11
|
r !== "children" && (f[r] = i[r]);
|
|
12
12
|
return f;
|
|
13
|
-
},
|
|
13
|
+
}, U = {
|
|
14
14
|
index: 60,
|
|
15
15
|
selection: 40,
|
|
16
16
|
expand: 40
|
|
@@ -42,13 +42,13 @@ const M = (i) => {
|
|
|
42
42
|
emit: f
|
|
43
43
|
}) {
|
|
44
44
|
const r = $();
|
|
45
|
-
return
|
|
45
|
+
return A(() => {
|
|
46
46
|
var t;
|
|
47
47
|
return (t = i.table) == null ? void 0 : t.key;
|
|
48
48
|
}, () => {
|
|
49
49
|
F(() => {
|
|
50
50
|
var t;
|
|
51
|
-
r.value &&
|
|
51
|
+
r.value && B(r.value, (t = i.table) == null ? void 0 : t.tableColumns);
|
|
52
52
|
});
|
|
53
53
|
}, {
|
|
54
54
|
immediate: !0
|
|
@@ -66,7 +66,7 @@ const M = (i) => {
|
|
|
66
66
|
type: "primary",
|
|
67
67
|
onClick: async () => {
|
|
68
68
|
var s;
|
|
69
|
-
return
|
|
69
|
+
return I(r.value, ((s = t.table) == null ? void 0 : s.tableColumns) || []);
|
|
70
70
|
}
|
|
71
71
|
}, {
|
|
72
72
|
default: () => [R("全选")]
|
|
@@ -78,12 +78,12 @@ const M = (i) => {
|
|
|
78
78
|
defaultCheckedKeys: t.defaultCheckedKeys,
|
|
79
79
|
"show-checkbox": !0,
|
|
80
80
|
"node-key": "prop",
|
|
81
|
-
props:
|
|
82
|
-
allowDrop:
|
|
81
|
+
props: q,
|
|
82
|
+
allowDrop: z,
|
|
83
83
|
onCheckChange: async (s, p, k) => {
|
|
84
|
-
await
|
|
84
|
+
await G(s, p, k), f("CheckedChange", s, p, k);
|
|
85
85
|
},
|
|
86
|
-
onNodeDragEnd: (s, p) =>
|
|
86
|
+
onNodeDragEnd: (s, p) => H(s, p, r.value)
|
|
87
87
|
}, {
|
|
88
88
|
default: ({
|
|
89
89
|
data: s
|
|
@@ -101,7 +101,7 @@ const M = (i) => {
|
|
|
101
101
|
reference: () => n(a("el-icon"), {
|
|
102
102
|
class: "setting-icon"
|
|
103
103
|
}, {
|
|
104
|
-
default: () => [n(
|
|
104
|
+
default: () => [n(J, null, null)]
|
|
105
105
|
})
|
|
106
106
|
}),
|
|
107
107
|
moreRender: (t, C, {
|
|
@@ -127,8 +127,8 @@ const M = (i) => {
|
|
|
127
127
|
const O = T(() => g.value.slice(0, b)), u = T(() => g.value.slice(b, g.value.length));
|
|
128
128
|
return g.value && g.value.length ? n(w, null, [O.value.map((l) => {
|
|
129
129
|
const o = typeof l.message == "function" ? l.message(p, t, l) : l.message;
|
|
130
|
-
return l.key === "delete" ? n(a("el-popconfirm"), x({
|
|
131
|
-
title: "
|
|
130
|
+
return l.key === "delete" || l.second ? n(a("el-popconfirm"), x({
|
|
131
|
+
title: l.key === "delete" ? "是否删除该数据?" : "二次确认"
|
|
132
132
|
}, {
|
|
133
133
|
...l.confirm
|
|
134
134
|
}, {
|
|
@@ -136,7 +136,7 @@ const M = (i) => {
|
|
|
136
136
|
}), {
|
|
137
137
|
reference: () => n(a("el-button"), x({
|
|
138
138
|
...l,
|
|
139
|
-
type: l.type || "primary",
|
|
139
|
+
type: l.type || l.key === "delete" ? "danger" : "primary",
|
|
140
140
|
link: l.link === void 0 ? !0 : l.link
|
|
141
141
|
}, {
|
|
142
142
|
key: l.key
|
|
@@ -163,7 +163,7 @@ const M = (i) => {
|
|
|
163
163
|
text: !0
|
|
164
164
|
}, {
|
|
165
165
|
default: () => [R("更多"), n(a("el-icon"), null, {
|
|
166
|
-
default: () => [n(
|
|
166
|
+
default: () => [n(M, null, null)]
|
|
167
167
|
})]
|
|
168
168
|
}),
|
|
169
169
|
dropdown: () => {
|
|
@@ -195,7 +195,7 @@ const M = (i) => {
|
|
|
195
195
|
v = v === void 0 || v === !0;
|
|
196
196
|
const t = e.checked === void 0 || e.checked === !0, C = !["index", "selection", "expand"].includes(e.type), s = e.prop === "operations" && e.fixed === void 0 ? "right" : e.fixed, p = e.showOverflowTooltip === void 0 && e.prop !== "operations" ? !0 : e.showOverflowTooltip, k = `${e.prop || ""} ${e.className || ""} ${e.setting ? "setting" : ""}`;
|
|
197
197
|
let V = e.prop === "operations" && e.align === void 0 ? "center" : e.align, h = e.prop === "operations" && e.width === void 0 ? 200 : e.width;
|
|
198
|
-
const g = e.formatter && typeof e.formatter == "function", b =
|
|
198
|
+
const g = e.formatter && typeof e.formatter == "function", b = Q(e), y = (O = e.prop) == null ? void 0 : O.toLocaleLowerCase();
|
|
199
199
|
if (y != null && y.includes("time") ? h = h || 170 : (y != null && y.includes("status") || y != null && y.includes("state")) && (h = h || 80, V = e.align || "center"), v && t && C)
|
|
200
200
|
return n(a("el-table-column"), x(b, {
|
|
201
201
|
key: e.prop,
|
|
@@ -208,7 +208,7 @@ const M = (i) => {
|
|
|
208
208
|
}), {
|
|
209
209
|
default: (u) => {
|
|
210
210
|
var N;
|
|
211
|
-
const l =
|
|
211
|
+
const l = S(u.row, e.prop || ""), o = W(l, (N = this.table) == null ? void 0 : N.errData), d = f == null ? void 0 : f({
|
|
212
212
|
...u,
|
|
213
213
|
prop: e.prop
|
|
214
214
|
}), c = d && d[0] && d[0].children;
|
|
@@ -219,9 +219,9 @@ const M = (i) => {
|
|
|
219
219
|
}, [f == null ? void 0 : f({
|
|
220
220
|
...u,
|
|
221
221
|
prop: e.prop
|
|
222
|
-
})]) :
|
|
222
|
+
})]) : P(n("div", {
|
|
223
223
|
class: "cell-item"
|
|
224
|
-
}, null), [[
|
|
224
|
+
}, null), [[E("dompurify-html"), j]]), n(a("dinert-recuve-table-column"), {
|
|
225
225
|
table: this.table,
|
|
226
226
|
key: e.prop,
|
|
227
227
|
tableColumns: e.children,
|
|
@@ -259,7 +259,7 @@ const M = (i) => {
|
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
261
|
if (v && t) {
|
|
262
|
-
const u = e.align === void 0 ? "center" : "left", l = e.width === void 0 ?
|
|
262
|
+
const u = e.align === void 0 ? "center" : "left", l = e.width === void 0 ? U[e.type || ""] || 60 : e.width;
|
|
263
263
|
return n(a("el-table-column"), x(e, {
|
|
264
264
|
key: e.prop,
|
|
265
265
|
fixed: s,
|
|
@@ -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 type {TableColumnCtx} from 'element-plus'\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\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 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(() => {\n let index = 0\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 sort: typeof tempObj.sort === 'undefined' ? index : tempObj.sort,\n })\n }\n\n index += 10\n })\n\n result.sort((a: any, b: any) => {\n return a.sort - b.sort\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: OperationsProps) => {\n const message = typeof item2.message === 'function' ? item2.message(scope, column, item2) : item2.message\n\n\n if ((item2 as any).key === 'delete') {\n\n return (\n <el-popconfirm title=\"是否删除该数据\" {...{...item2.confirm}} onConfirm={() => item2.click && item2.click(scope, column, item2)}>\n {{\n reference: () => {\n return (<el-button {...{\n ...item2,\n type: 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 (<el-button {...{\n ...item2,\n type: item2.type || 'primary',\n link: item2.link === undefined ? true : item2.link\n }}\n onClick={() => item2.click && item2.click(scope, column, item2)}\n key={(item2 as any).key}>\n {message}\n </el-button>)\n\n })}\n\n {(seniorFunctions.value.length && operations.value.length > maxOperations\n && <el-dropdown teleported={true}\n onCommand={(item: any) => (item.click && item.click(scope, column, item))}\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: any) => {\n const message = typeof item.message === 'function' ? item.message(scope, column, item) : item.message\n\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')) {\n width = width ? width : 170\n } else if (propLowerCase?.includes('status') || propLowerCase?.includes('state')) {\n width = width ? width : 80\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 const htmlValue = item.formatter && item.formatter(scope, (item as TableColumnCtx<any>), deepValue, scope.$index)\n\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","defineComponent","name","props","onlyClass","type","String","default","popoverValue","Boolean","table","tableColumns","Array","defaultCheckedKeys","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","maxOperations","defaultFunctions","slice","seniorFunctions","_Fragment","map","item2","message","_mergeProps","confirm","onConfirm","click","link","onClick","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","_withDirectives","_resolveDirective","_b","reserveSelection"],"mappings":";;;;AAI0D,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAiB1D,MAAMM,IAAgBC,CAAAA,MAAgB;AAClC,QAAMC,IAAW,CAAA;AACjB,aAAWC,KAAQF;AACf,IAAIE,MAAS,eACTD,EAAIC,CAAI,IAAIF,EAAOE,CAAI;AAG/B,SAAOD;AACX,GAEME,IAAgC;AAAA,EAClCC,OAAO;AAAA,EACPC,WAAW;AAAA,EACXC,QAAQ;AACZ,GAGeC,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,WAAW;AAAA,MACPC,MAAMC;AAAAA,MACNC,SAAS;AAAA,IACZ;AAAA,IACDC,cAAc;AAAA,MACVH,MAAMI;AAAAA,MACNF,SAAS;AAAA,IACZ;AAAA,IACDG,OAAO;AAAA,MACHL,MAAMjB;AAAAA,IACT;AAAA,IACDuB,cAAc;AAAA,MACVN,MAAMO;AAAAA,MACNL,SAASA,MAAO,CAAA;AAAA,IACnB;AAAA,IACDM,oBAAoB;AAAA,MAChBR,MAAMO;AAAAA,MACNL,SAASA,MAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDO,OAAO,CAAC,eAAe;AAAA,EACvBC,MAAMZ,GAAO;AAAA,IAACa,MAAAA;AAAAA,EAAI,GAAG;AACjB,UAAMC,IAAcC;AAEpBC,WAAAA,EAAM,MAAMhB;;AAAAA,cAAAA,IAAAA,EAAMO,UAANP,gBAAAA,EAAaiB;AAAAA,OAAK,MAAM;AAChCC,MAAAA,EAAS,MAAM;;AACXJ,QAAAA,EAAYK,SAASC,EAASN,EAAYK,QAAOnB,IAAAA,EAAMO,UAANP,gBAAAA,EAAaQ,YAAY;AAAA,MAC9E,CAAC;AAAA,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gBAAAA,EAAa;AAAA,gBAAC,GAAGvC;AAAAA,gBAAOd,MAAM6C;AAAAA,gBAAMjF,MAAMiF,EAAKjF;AAAAA,mBAASkD,EAAMpD,OAAO8C,KAAK,CAAA,GAC/FqC,EAAKc,aAAWY,IAAA,KAAK7F,UAAL,gBAAA6F,EAAYZ,aAAY,MAAS,KAAKlE,cAAe,IAA+B,CAAC,CAAA,IAI9GC,EAAAyC,GAAA,MAAA,CAAAzC,EAAA,QAAA,MAAA,CAEeoB,EAAMpD,OAAO8C,KAAK,CAAA,GACxBqC,EAAKc,aAAWmB,IAAA,KAAKpG,UAAL,gBAAAoG,EAAYnB,aAAY,MAAS,KAAKlE,cAAc,IAA8B,CAAC,CAAA;AAAA,YAIpH;AAAA,WACH;AAMN,YAAI+B,KAAQvB,GAAS;AACxB,gBAAM2D,IAAQf,EAAKe,UAAUnC,SAAY,WAAW,QAC9CoC,IAAQhB,EAAKgB,UAAUpC,SAAY5D,EAASgF,EAAKxE,QAAQ,EAAE,KAAK,KAAKwE,EAAKgB;AAEhF,iBAAAnE,EAAAC,EAAA4C,iBAAAA,GAAAA,EACQM,GAAI;AAAA,YAAA,KACHA,EAAKjF;AAAAA,YAAI,OACP4F;AAAAA,YAAK,OACLI;AAAAA,YAAK,qBACOf,EAAKkC;AAAAA,YAAgB,OACjClB;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 type {TableColumnCtx} from 'element-plus'\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\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 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(() => {\n let index = 0\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 sort: typeof tempObj.sort === 'undefined' ? index : tempObj.sort,\n })\n }\n\n index += 10\n })\n\n result.sort((a: any, b: any) => {\n return a.sort - b.sort\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: OperationsProps) => {\n const message = typeof item2.message === 'function' ? item2.message(scope, column, item2) : item2.message\n\n\n if (item2.key === 'delete' || item2.second) {\n return (\n <el-popconfirm title={item2.key === 'delete' ? '是否删除该数据?' : '二次确认'} {...{...item2.confirm}} onConfirm={() => item2.click && item2.click(scope, column, item2)}>\n {{\n reference: () => {\n return (<el-button {...{\n ...item2,\n type: item2.type || item2.key === 'delete' ? 'danger' : '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 (<el-button {...{\n ...item2,\n type: item2.type || 'primary',\n link: item2.link === undefined ? true : item2.link\n }}\n onClick={() => item2.click && item2.click(scope, column, item2)}\n key={(item2 as any).key}>\n {message}\n </el-button>)\n\n })}\n\n {(seniorFunctions.value.length && operations.value.length > maxOperations\n && <el-dropdown teleported={true}\n onCommand={(item: any) => (item.click && item.click(scope, column, item))}\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: any) => {\n const message = typeof item.message === 'function' ? item.message(scope, column, item) : item.message\n\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')) {\n width = width ? width : 170\n } else if (propLowerCase?.includes('status') || propLowerCase?.includes('state')) {\n width = width ? width : 80\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 const htmlValue = item.formatter && item.formatter(scope, (item as TableColumnCtx<any>), deepValue, scope.$index)\n\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","defineComponent","name","props","onlyClass","type","String","default","popoverValue","Boolean","table","tableColumns","Array","defaultCheckedKeys","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","maxOperations","defaultFunctions","slice","seniorFunctions","_Fragment","map","item2","message","second","_mergeProps","confirm","onConfirm","click","link","onClick","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","_withDirectives","_resolveDirective","_b","reserveSelection"],"mappings":";;;;AAI0D,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAiB1D,MAAMM,IAAgBC,CAAAA,MAAgB;AAClC,QAAMC,IAAW,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AYZ,aAAY,MAAS,KAAKnE,cAAe,IAA+B,CAAC,CAAA,IAI9GC,EAAAyC,GAAA,MAAA,CAAAzC,EAAA,QAAA,MAAA,CAEeoB,EAAMpD,OAAO8C,KAAK,CAAA,GACxBsC,EAAKc,aAAWmB,IAAA,KAAKrG,UAAL,gBAAAqG,EAAYnB,aAAY,MAAS,KAAKnE,cAAc,IAA8B,CAAC,CAAA;AAAA,YAIpH;AAAA,WACH;AAMN,YAAI+B,KAAQvB,GAAS;AACxB,gBAAM4D,IAAQf,EAAKe,UAAUpC,SAAY,WAAW,QAC9CqC,IAAQhB,EAAKgB,UAAUrC,SAAY5D,EAASiF,EAAKzE,QAAQ,EAAE,KAAK,KAAKyE,EAAKgB;AAEhF,iBAAApE,EAAAC,EAAA6C,iBAAAA,GAAAA,EACQM,GAAI;AAAA,YAAA,KACHA,EAAKlF;AAAAA,YAAI,OACP6F;AAAAA,YAAK,OACLI;AAAAA,YAAK,qBACOf,EAAKkC;AAAAA,YAAgB,OACjClB;AAAAA,WACE,GAAA,KAAKV,MAAM;AAAA,QAG5B;AAAA,MAEH,CAAA;AAAA,IAAC,CAAA;AAAA,EAKlB;AACJ,CAAC;"}
|
|
@@ -30,12 +30,12 @@ export interface RewriteFormItemPropsMap<O = any[]> {
|
|
|
30
30
|
'radio-button': RewriteRadioGroupProps<O>;
|
|
31
31
|
'rate': RewriteRewriteRateProps<O>;
|
|
32
32
|
}
|
|
33
|
-
export interface CustomFormItemProps<D = any, O = any[], N extends keyof RewriteFormItemPropsMap = any> extends Partial<FormItemProps
|
|
33
|
+
export interface CustomFormItemProps<D = any, O = any[], N extends keyof RewriteFormItemPropsMap = any> extends Partial<Omit<FormItemProps, 'label'>> {
|
|
34
34
|
key?: any;
|
|
35
35
|
type: N extends keyof RewriteFormItemPropsMap ? N : keyof RewriteFormItemPropsMap;
|
|
36
36
|
show?: boolean | ((model: D) => boolean);
|
|
37
37
|
vif?: boolean | ((model: D) => boolean);
|
|
38
|
-
label: string;
|
|
38
|
+
label: string | ((model: D) => string);
|
|
39
39
|
sort?: number;
|
|
40
40
|
options?: RewriteFormItemPropsMap<O>[N];
|
|
41
41
|
showLabel?: boolean;
|
|
@@ -17,6 +17,7 @@ export interface OperationsProps<T = any> extends Partial<ButtonProps> {
|
|
|
17
17
|
sort?: number;
|
|
18
18
|
confirm?: Partial<PopconfirmProps>;
|
|
19
19
|
key?: string;
|
|
20
|
+
second?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export interface RewriteTableColumnCtx<T = any> extends Omit<Partial<TableColumnCtx<T>>, 'children'> {
|
|
22
23
|
type?: 'default' | 'selection' | 'index' | 'expand';
|
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-
|
|
1
|
+
.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-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 .el-form-left{flex:unset}.dinert-table-page.near .el-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}.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-form.el-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}.dinert-form.el-form.packUp{max-height:50px}.dinert-form.el-form.near .el-form-left .el-col{display:flex;align-items:center;margin-right:10px;width:auto;max-width:unset;flex:unset}.dinert-form.el-form.near .el-form-right.isArrow{width:230px;flex:0 0 230px}.dinert-form.el-form.dialog .el-form-left{flex:1}.dinert-form.el-form.dialog .el-form-left .el-col .label-text>div{width:100%}.dinert-form.el-form .el-form-left .el-col .label-text .el-radio.is-bordered,.dinert-form.el-form .el-form-left .el-col .label-text .el-checkbox.is-bordered{margin-right:16px}.dinert-form.el-form .el-form-left .el-col .label-text .el-date-editor{width:210px}.dinert-form.el-form .el-form-left .el-col .label-text .el-date-editor--daterange{width:260px}.dinert-form.el-form .el-form-left .el-col .label-text>.el-input{width:210px}.dinert-form.el-form .el-form-left .el-col .label-text>.el-select{width:210px}.dinert-form.el-form .el-form-left .el-col .label-text .el-date-editor--datetimerange{width:400px}.dinert-form.el-form .el-form-right{display:flex;margin-left:24px}.dinert-form.el-form .el-form-right .el-form-right-operation{padding:0}.dinert-form.el-form .el-form-right .el-form-right-operation.el-button.is-text{padding-right:0;background-color:unset}.dinert-form.el-form div.el-form-item{position:relative;display:flex;margin-right:0;margin-bottom:18px;width:100%}.dinert-form.el-form div.el-form-item.show-label .label-text{overflow:unset;text-overflow:unset;white-space:unset}.dinert-form.el-form div.el-form-item.label-wrap .el-form-item__label{height:auto}.dinert-form.el-form div.el-form-item.label-wrap .el-form-item__label .label-text{display:inline;text-align:left;white-space:normal}.dinert-form.el-form .el-form-item__content{flex:1;margin-left:0}.dinert-form.el-form .el-form-item__content .el-tooltip__trigger,.dinert-form.el-form .el-form-item__content .el-input-number{width:100%}.dinert-form.el-form .el-form-item__content .el-input-number .el-input__inner{text-align:center}.dinert-form.el-form .el-form-item__content .el-textarea .el-textarea__inner{height:80px}.dinert-form.el-form .el-form-item__content .el-date-editor,.dinert-form.el-form .el-form-item__content .el-date-editor .el-input__wrapper{width:100%;box-sizing:border-box}.dinert-form.el-form .el-form-item__content .el-input__inner{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.dinert-form.el-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}.dinert-form.el-form .el-form-item__content .el-form-item__label .el-tooltip,.dinert-form.el-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}
|