orion-design 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/Throne/index.js +30 -14
- package/dist/Throne/index.js.map +1 -1
- package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
- package/dist/components/Button/index.js +40 -33
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Flex/index.js +122 -89
- package/dist/components/Flex/index.js.map +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/LovInput/LovInput.js +2 -2
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
- package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
- package/dist/components/Form/LovInput/index.js +4 -4
- package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
- package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
- package/dist/components/Form/hooks/index.js +128 -66
- package/dist/components/Form/hooks/index.js.map +1 -1
- package/dist/components/Form/index.js +836 -656
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/utils/index.js +30 -18
- package/dist/components/Form/utils/index.js.map +1 -1
- package/dist/components/LovTable/index.js +179 -105
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/index.js +111 -56
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/types.js +4 -3
- package/dist/components/Modal/types.js.map +1 -1
- package/dist/components/Modal/useModal.js +5 -5
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/hooks/useColumns.js +88 -80
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.js +687 -542
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +92 -54
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/hooks/useColumns.js +82 -74
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.js +579 -469
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Querytable/utils/index.js +92 -54
- package/dist/components/Querytable/utils/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.js +100 -74
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Tabs/constants.js +2 -2
- package/dist/components/Tabs/constants.js.map +1 -1
- package/dist/components/Tabs/index.js +603 -358
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/tab-bar.js +6 -6
- package/dist/components/Tabs/tab-bar.js.map +1 -1
- package/dist/components/Tabs/tab-pane.js +3 -3
- package/dist/components/Tabs/tab-pane.js.map +1 -1
- package/dist/components/_constants/aria.js +2 -2
- package/dist/components/_constants/aria.js.map +1 -1
- package/dist/components/_constants/event.js +6 -4
- package/dist/components/_constants/event.js.map +1 -1
- package/dist/components/_constants/index.js +6 -6
- package/dist/components/_hooks/index.js +7 -7
- package/dist/components/_hooks/use-namespace/index.js +74 -39
- package/dist/components/_hooks/use-namespace/index.js.map +1 -1
- package/dist/components/_hooks/use-ordered-children/index.js +29 -19
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
- package/dist/components/_util/arrays.js +9 -5
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js +6 -6
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/classNames.js +22 -17
- package/dist/components/_util/classNames.js.map +1 -1
- package/dist/components/_util/dom/aria.js +74 -39
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +9 -8
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js +14 -7
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/index.js +36 -36
- package/dist/components/_util/dom/position.js +49 -25
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +103 -61
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +65 -50
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js +8 -4
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js +12 -11
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/functions.js +3 -3
- package/dist/components/_util/i18n.js +2 -2
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/index.js +137 -137
- package/dist/components/_util/isValid.js +4 -2
- package/dist/components/_util/isValid.js.map +1 -1
- package/dist/components/_util/objects.js +18 -14
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/props-util/index.js +46 -20
- package/dist/components/_util/props-util/index.js.map +1 -1
- package/dist/components/_util/props-util/initDefaultProps.js +18 -10
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
- package/dist/components/_util/raf.js +5 -4
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js +4 -3
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js +9 -8
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js +16 -10
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/type.js +41 -38
- package/dist/components/_util/type.js.map +1 -1
- package/dist/components/_util/types.js +41 -22
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js +2 -2
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/util.js +85 -43
- package/dist/components/_util/util.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +27 -15
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +29 -25
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/index.js +41 -41
- package/dist/components/_util/vue/install.js +35 -18
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/index.js +6 -6
- package/dist/components/_util/vue/props/runtime.js +46 -30
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js +12 -6
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js +5 -3
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js +5 -4
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js +100 -54
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/_util/vue-types/index.js +231 -220
- package/dist/components/_util/vue-types/index.js.map +1 -1
- package/dist/components/components.js +20 -20
- package/dist/components/index.js +38 -35
- package/dist/components/index.js.map +1 -1
- package/dist/components-B3d9m_tn.js +27 -0
- package/dist/components-B3d9m_tn.js.map +1 -0
- package/dist/error/OrionError.js +8 -4
- package/dist/error/OrionError.js.map +1 -1
- package/dist/functions-BeMkokbY.js +63 -0
- package/dist/functions-BeMkokbY.js.map +1 -0
- package/dist/index-BOKLZnqH.js +54 -0
- package/dist/index-BOKLZnqH.js.map +1 -0
- package/dist/index-D1m0KTpK.js +69 -0
- package/dist/index-D1m0KTpK.js.map +1 -0
- package/dist/index-DR5ZP7mD.js +160 -0
- package/dist/index-DR5ZP7mD.js.map +1 -0
- package/dist/index-DkwIULcN.js +200 -0
- package/dist/index-DkwIULcN.js.map +1 -0
- package/dist/index.css +797 -1
- package/dist/index.js +36 -36
- package/dist/print/LodopFuncs.js +101 -43
- package/dist/print/LodopFuncs.js.map +1 -1
- package/dist/print/index.js +200 -108
- package/dist/print/index.js.map +1 -1
- package/dist/request/ErrorHandlerChain.js +17 -14
- package/dist/request/ErrorHandlerChain.js.map +1 -1
- package/dist/request/RequestFilterChain.js +16 -13
- package/dist/request/RequestFilterChain.js.map +1 -1
- package/dist/request/ResponseParserChain.js +17 -14
- package/dist/request/ResponseParserChain.js.map +1 -1
- package/dist/request/disivion/DateSerializer.js +47 -22
- package/dist/request/disivion/DateSerializer.js.map +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +40 -25
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
- package/dist/request/disivion/DivisionResponseParser.js +16 -10
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
- package/dist/request/disivion/index.js +305 -201
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/error/BizExceptionResponseError.js +11 -5
- package/dist/request/error/BizExceptionResponseError.js.map +1 -1
- package/dist/request/error/ExceptionResponseError.js +11 -5
- package/dist/request/error/ExceptionResponseError.js.map +1 -1
- package/dist/request/error/ResponseError.js +9 -4
- package/dist/request/error/ResponseError.js.map +1 -1
- package/dist/request/error/SessionExceptionResponseError.js +11 -5
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
- package/dist/request/index.js +11 -11
- package/dist/utils/DateUtil.js +48 -33
- package/dist/utils/DateUtil.js.map +1 -1
- package/dist/utils/NumberUtil.js +6 -6
- package/dist/utils/NumberUtil.js.map +1 -1
- package/dist/utils/cloneDeep.js +2 -2
- package/dist/utils/delay.js +3 -3
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/functions.js +3 -3
- package/dist/utils/index.js +12 -12
- package/dist/utils/md5.js +191 -93
- package/dist/utils/md5.js.map +1 -1
- package/dist/utils/uuid.js +35 -25
- package/dist/utils/uuid.js.map +1 -1
- package/dist/version/index.js +2 -2
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +2 -2
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
@@ -1,667 +1,812 @@
|
|
1
1
|
import "lodash-es";
|
2
|
-
import { defineComponent
|
3
|
-
import { withInstall
|
4
|
-
import { ElTable
|
5
|
-
import
|
6
|
-
import { arrayType
|
7
|
-
import { number2string
|
8
|
-
import
|
9
|
-
import { S as
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
function
|
14
|
-
return typeof
|
2
|
+
import { defineComponent, ref, computed, createVNode, createTextVNode, isVNode } from "vue";
|
3
|
+
import { withInstall } from "../_util/vue/install.js";
|
4
|
+
import { ElTable, ElPagination, ElTableColumn, ElButton } from "element-plus";
|
5
|
+
import classNames from "../_util/classNames.js";
|
6
|
+
import { arrayType, objectType, booleanType, stringType, someType, numberType } from "../_util/type.js";
|
7
|
+
import { number2string, formatDate, getSingleCodeContent, getMultiCodeContent } from "./utils/index.js";
|
8
|
+
import dayjs from "dayjs";
|
9
|
+
import { S as Space } from "../../index-BOKLZnqH.js";
|
10
|
+
import OrionError from "../../error/OrionError.js";
|
11
|
+
import useColumns from "./hooks/useColumns.js";
|
12
|
+
import Throne from "../../Throne/index.js";
|
13
|
+
function _isSlot$1(s) {
|
14
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
15
15
|
}
|
16
|
-
const
|
17
|
-
data:
|
18
|
-
tailData:
|
19
|
-
pagination:
|
20
|
-
showRowNumber:
|
21
|
-
selectionMode:
|
22
|
-
currentRowMode:
|
23
|
-
size:
|
24
|
-
})
|
16
|
+
const pagetableProps = () => ({
|
17
|
+
data: arrayType(),
|
18
|
+
tailData: objectType(),
|
19
|
+
pagination: objectType(),
|
20
|
+
showRowNumber: booleanType(true),
|
21
|
+
selectionMode: booleanType(false),
|
22
|
+
currentRowMode: booleanType(false),
|
23
|
+
size: stringType()
|
24
|
+
});
|
25
|
+
const Pagetable$1 = /* @__PURE__ */ defineComponent({
|
25
26
|
name: "OPagetable",
|
26
|
-
inheritAttrs:
|
27
|
-
props:
|
27
|
+
inheritAttrs: false,
|
28
|
+
props: pagetableProps(),
|
28
29
|
emits: ["selectionChange", "currentRowChange", "update:pagination", "rowClick", "rowDblclick", "cellClick", "cellDblclick"],
|
29
|
-
setup(
|
30
|
-
slots
|
31
|
-
attrs
|
32
|
-
emit
|
33
|
-
expose
|
30
|
+
setup(props, {
|
31
|
+
slots,
|
32
|
+
attrs,
|
33
|
+
emit,
|
34
|
+
expose
|
34
35
|
}) {
|
35
|
-
const
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
36
|
+
const elTableRef = ref();
|
37
|
+
const style = computed(() => {
|
38
|
+
const rowStyle = {};
|
39
|
+
return rowStyle;
|
40
|
+
});
|
41
|
+
const columns = useColumns(slots);
|
42
|
+
const leafColumns4ShowSummary = computed(() => {
|
43
|
+
let r = [];
|
44
|
+
if (props.showRowNumber) {
|
45
|
+
r.push({
|
46
|
+
type: "__showRowNumber__"
|
47
|
+
});
|
48
|
+
}
|
49
|
+
if (props.selectionMode) {
|
50
|
+
r.push({
|
51
|
+
type: "__selectionMode__"
|
52
|
+
});
|
53
|
+
}
|
54
|
+
function flat(columns2) {
|
55
|
+
if (!columns2) {
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
for (let i = 0; i < columns2.length; i++) {
|
59
|
+
const c = columns2[i];
|
60
|
+
if (c.type === "OPagetableColumngroup") {
|
61
|
+
flat(c.children);
|
62
|
+
} else {
|
63
|
+
r.push({
|
64
|
+
...c
|
48
65
|
});
|
49
66
|
}
|
67
|
+
}
|
50
68
|
}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
if (P.type === "OPagetableColumngroup") {
|
59
|
-
if (g(P.children))
|
60
|
-
return !0;
|
61
|
-
} else if (P.tail === "" || P.tail === !0 || P.tail)
|
62
|
-
return !0;
|
69
|
+
flat(columns.value);
|
70
|
+
return r;
|
71
|
+
});
|
72
|
+
const showSummary = computed(() => {
|
73
|
+
function existTail(columns2) {
|
74
|
+
if (!columns2) {
|
75
|
+
return false;
|
63
76
|
}
|
64
|
-
|
77
|
+
for (let i = 0; i < columns2.length; i++) {
|
78
|
+
const c = columns2[i];
|
79
|
+
if (c.type === "OPagetableColumngroup") {
|
80
|
+
if (existTail(c.children)) {
|
81
|
+
return true;
|
82
|
+
}
|
83
|
+
} else {
|
84
|
+
if (c.tail === "" || c.tail === true || c.tail) {
|
85
|
+
return true;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
return false;
|
65
90
|
}
|
66
|
-
return
|
91
|
+
return existTail(columns.value);
|
92
|
+
});
|
93
|
+
const clearSelection = () => {
|
94
|
+
elTableRef.value.clearSelection();
|
95
|
+
};
|
96
|
+
const getSelectionRows = () => {
|
97
|
+
return elTableRef.value.getSelectionRows();
|
98
|
+
};
|
99
|
+
const toggleRowSelection = (...args) => {
|
100
|
+
return elTableRef.value.toggleRowSelection(...args);
|
101
|
+
};
|
102
|
+
const toggleAllSelection = () => {
|
103
|
+
return elTableRef.value.toggleAllSelection();
|
104
|
+
};
|
105
|
+
const setCurrentRow = (...args) => {
|
106
|
+
return elTableRef.value.setCurrentRow(...args);
|
107
|
+
};
|
108
|
+
const scrollTo = (...args) => {
|
109
|
+
return elTableRef.value.scrollTo(...args);
|
110
|
+
};
|
111
|
+
expose({
|
112
|
+
clearSelection,
|
113
|
+
getSelectionRows,
|
114
|
+
toggleRowSelection,
|
115
|
+
toggleAllSelection,
|
116
|
+
setCurrentRow,
|
117
|
+
scrollTo
|
67
118
|
});
|
68
|
-
return
|
69
|
-
|
70
|
-
|
71
|
-
}
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
setCurrentRow: (...g) => A.value.setCurrentRow(...g),
|
76
|
-
scrollTo: (...g) => A.value.scrollTo(...g)
|
77
|
-
}), () => {
|
119
|
+
return () => {
|
120
|
+
const {
|
121
|
+
data
|
122
|
+
} = props;
|
123
|
+
const {
|
124
|
+
selectionMode = false
|
125
|
+
} = props;
|
78
126
|
const {
|
79
|
-
|
80
|
-
} =
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
} =
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
const
|
92
|
-
return
|
93
|
-
if (
|
127
|
+
pagination
|
128
|
+
} = props;
|
129
|
+
const {
|
130
|
+
showRowNumber = true
|
131
|
+
} = props;
|
132
|
+
const {
|
133
|
+
currentRowMode = false
|
134
|
+
} = props;
|
135
|
+
const {
|
136
|
+
size = "default"
|
137
|
+
} = props;
|
138
|
+
const getSummaries = (param) => {
|
139
|
+
const tailData = computed(() => props.tailData);
|
140
|
+
return leafColumns4ShowSummary.value.map((c) => {
|
141
|
+
if (c.type === "__showRowNumber__") {
|
94
142
|
return "Σ";
|
95
|
-
|
143
|
+
}
|
144
|
+
if (c.type === "__selectionMode__") {
|
96
145
|
return;
|
97
|
-
|
98
|
-
if (
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
146
|
+
}
|
147
|
+
if (!tailData.value) {
|
148
|
+
return;
|
149
|
+
}
|
150
|
+
const columnName = c.name;
|
151
|
+
const columnTail = c.tail;
|
152
|
+
if (columnTail == null) {
|
153
|
+
return;
|
154
|
+
}
|
155
|
+
if (columnTail === false) {
|
156
|
+
return;
|
157
|
+
}
|
158
|
+
if (columnTail === "" || columnTail === true) {
|
159
|
+
if (tailData.value[columnName] != null) {
|
160
|
+
return tailData.value[columnName];
|
106
161
|
}
|
162
|
+
} else if (typeof columnTail === "string") {
|
163
|
+
return columnTail.replace("{}", tailData.value[columnName]);
|
164
|
+
} else {
|
165
|
+
throw new OrionError(`列[${columnName}]的tail属性配置错误,只能是 Boolean、String 类型,当前是[${typeof columnTail}]类型。`);
|
166
|
+
}
|
167
|
+
return;
|
107
168
|
});
|
108
|
-
}
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
169
|
+
};
|
170
|
+
const cn = classNames("orion-pagetbale");
|
171
|
+
const renderIndexColumn = () => {
|
172
|
+
return createVNode(ElTableColumn, {
|
173
|
+
"type": "index",
|
174
|
+
"label": "No",
|
175
|
+
"width": 56,
|
176
|
+
"fixed": "left",
|
177
|
+
"showOverflowTooltip": true,
|
178
|
+
"index": (index) => {
|
179
|
+
return (pagination.currentPage - 1) * pagination.pageSize + index + 1;
|
180
|
+
}
|
181
|
+
}, null);
|
182
|
+
};
|
183
|
+
const renderSelectionColumn = () => {
|
184
|
+
return createVNode(ElTableColumn, {
|
185
|
+
"type": "selection",
|
186
|
+
"width": 40,
|
187
|
+
"fixed": "left"
|
188
|
+
}, null);
|
189
|
+
};
|
190
|
+
const renderStringColumn = (column) => {
|
120
191
|
const {
|
121
|
-
name
|
122
|
-
head
|
123
|
-
headAlign
|
124
|
-
width
|
125
|
-
fixed
|
126
|
-
} =
|
127
|
-
return
|
128
|
-
label:
|
129
|
-
headerAlign:
|
130
|
-
prop:
|
131
|
-
width:
|
132
|
-
fixed:
|
133
|
-
showOverflowTooltip:
|
192
|
+
name,
|
193
|
+
head,
|
194
|
+
headAlign,
|
195
|
+
width,
|
196
|
+
fixed
|
197
|
+
} = column;
|
198
|
+
return createVNode(ElTableColumn, {
|
199
|
+
"label": head,
|
200
|
+
"headerAlign": headAlign,
|
201
|
+
"prop": name,
|
202
|
+
"width": width,
|
203
|
+
"fixed": fixed,
|
204
|
+
"showOverflowTooltip": true
|
134
205
|
}, null);
|
135
|
-
}
|
206
|
+
};
|
207
|
+
const renderLinkColumn = (column) => {
|
136
208
|
const {
|
137
|
-
name
|
138
|
-
head
|
139
|
-
headAlign
|
140
|
-
width
|
141
|
-
fixed
|
142
|
-
} =
|
143
|
-
return
|
144
|
-
label:
|
145
|
-
headerAlign:
|
146
|
-
prop:
|
147
|
-
width:
|
148
|
-
fixed:
|
149
|
-
showOverflowTooltip:
|
209
|
+
name,
|
210
|
+
head,
|
211
|
+
headAlign,
|
212
|
+
width,
|
213
|
+
fixed
|
214
|
+
} = column;
|
215
|
+
return createVNode(ElTableColumn, {
|
216
|
+
"label": head,
|
217
|
+
"headerAlign": headAlign,
|
218
|
+
"prop": name,
|
219
|
+
"width": width,
|
220
|
+
"fixed": fixed,
|
221
|
+
"showOverflowTooltip": true
|
150
222
|
}, {
|
151
|
-
default: (
|
223
|
+
default: (scope) => {
|
152
224
|
const {
|
153
|
-
row
|
154
|
-
column:
|
155
|
-
} =
|
156
|
-
return
|
157
|
-
class: "cell-linkcolumn"
|
158
|
-
}, [
|
225
|
+
row,
|
226
|
+
column: column2
|
227
|
+
} = scope;
|
228
|
+
return createVNode("span", {
|
229
|
+
"class": "cell-linkcolumn"
|
230
|
+
}, [row[column2.property]]);
|
159
231
|
}
|
160
232
|
});
|
161
|
-
}
|
233
|
+
};
|
234
|
+
const renderNumberColumn = (column) => {
|
235
|
+
const {
|
236
|
+
name,
|
237
|
+
head,
|
238
|
+
headAlign,
|
239
|
+
width,
|
240
|
+
fixed
|
241
|
+
} = column;
|
162
242
|
const {
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
headerAlign: a,
|
176
|
-
align: "right",
|
177
|
-
prop: e,
|
178
|
-
width: s,
|
179
|
-
fixed: h,
|
180
|
-
showOverflowTooltip: !0
|
243
|
+
thousandsSeparator = true,
|
244
|
+
precision = -1,
|
245
|
+
percentage = false
|
246
|
+
} = column;
|
247
|
+
return createVNode(ElTableColumn, {
|
248
|
+
"label": head,
|
249
|
+
"headerAlign": headAlign,
|
250
|
+
"align": "right",
|
251
|
+
"prop": name,
|
252
|
+
"width": width,
|
253
|
+
"fixed": fixed,
|
254
|
+
"showOverflowTooltip": true
|
181
255
|
}, {
|
182
|
-
default: (
|
256
|
+
default: (scope) => {
|
183
257
|
const {
|
184
|
-
row
|
185
|
-
column:
|
186
|
-
} =
|
187
|
-
return
|
188
|
-
class: "cell-numbercolumn"
|
189
|
-
}, [
|
258
|
+
row,
|
259
|
+
column: column2
|
260
|
+
} = scope;
|
261
|
+
return createVNode("span", {
|
262
|
+
"class": "cell-numbercolumn"
|
263
|
+
}, [number2string(row[column2.property], thousandsSeparator, precision, percentage === true || percentage === "")]);
|
190
264
|
}
|
191
265
|
});
|
192
|
-
}
|
266
|
+
};
|
267
|
+
const renderDateColumn = (column) => {
|
193
268
|
const {
|
194
|
-
name
|
195
|
-
head
|
196
|
-
headAlign
|
197
|
-
width
|
198
|
-
fixed
|
199
|
-
sourceFormat
|
200
|
-
format
|
201
|
-
} =
|
202
|
-
return
|
203
|
-
label:
|
204
|
-
headerAlign:
|
205
|
-
prop:
|
206
|
-
width:
|
207
|
-
fixed:
|
208
|
-
showOverflowTooltip:
|
269
|
+
name,
|
270
|
+
head,
|
271
|
+
headAlign,
|
272
|
+
width,
|
273
|
+
fixed,
|
274
|
+
sourceFormat,
|
275
|
+
format = "YYYYMMDDHHmmss"
|
276
|
+
} = column;
|
277
|
+
return createVNode(ElTableColumn, {
|
278
|
+
"label": head,
|
279
|
+
"headerAlign": headAlign,
|
280
|
+
"prop": name,
|
281
|
+
"width": width,
|
282
|
+
"fixed": fixed,
|
283
|
+
"showOverflowTooltip": true
|
209
284
|
}, {
|
210
|
-
default: (
|
285
|
+
default: (scope) => {
|
211
286
|
const {
|
212
|
-
row
|
213
|
-
column:
|
214
|
-
} =
|
215
|
-
|
287
|
+
row,
|
288
|
+
column: column2
|
289
|
+
} = scope;
|
290
|
+
const cellValue = row[column2.property];
|
291
|
+
if (cellValue instanceof Date || dayjs.isDayjs(cellValue)) {
|
292
|
+
return createVNode("div", null, [formatDate(cellValue, format)]);
|
293
|
+
} else {
|
294
|
+
if (sourceFormat && format) {
|
295
|
+
return createVNode("div", null, [formatDate(cellValue, sourceFormat, format)]);
|
296
|
+
} else {
|
297
|
+
return createVNode("div", null, [cellValue]);
|
298
|
+
}
|
299
|
+
}
|
216
300
|
}
|
217
301
|
});
|
218
|
-
}
|
302
|
+
};
|
303
|
+
const renderSingleSelectColumn = (column) => {
|
219
304
|
const {
|
220
|
-
name
|
221
|
-
head
|
222
|
-
headAlign
|
223
|
-
width
|
224
|
-
fixed
|
225
|
-
} =
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
305
|
+
name,
|
306
|
+
head,
|
307
|
+
headAlign,
|
308
|
+
width,
|
309
|
+
fixed
|
310
|
+
} = column;
|
311
|
+
const {
|
312
|
+
code
|
313
|
+
} = column;
|
314
|
+
return createVNode(ElTableColumn, {
|
315
|
+
"label": head,
|
316
|
+
"headerAlign": headAlign,
|
317
|
+
"prop": name,
|
318
|
+
"width": width,
|
319
|
+
"fixed": fixed,
|
320
|
+
"showOverflowTooltip": true
|
235
321
|
}, {
|
236
|
-
default: (
|
322
|
+
default: (scope) => {
|
237
323
|
const {
|
238
|
-
row
|
239
|
-
column:
|
240
|
-
} =
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
324
|
+
row,
|
325
|
+
column: column2
|
326
|
+
} = scope;
|
327
|
+
const cellValue = row[column2.property];
|
328
|
+
let codeName, codeData, codeContent;
|
329
|
+
if (!code) {
|
330
|
+
codeContent = null;
|
331
|
+
} else if (typeof code === "string") {
|
332
|
+
codeName = code;
|
333
|
+
codeData = Throne.getCode(codeName);
|
334
|
+
codeContent = getSingleCodeContent(codeData.value, cellValue);
|
335
|
+
} else {
|
336
|
+
codeData = code;
|
337
|
+
codeContent = getSingleCodeContent(codeData, cellValue);
|
338
|
+
}
|
339
|
+
return createVNode("span", {
|
340
|
+
"class": "cell-singleselect"
|
341
|
+
}, [codeContent]);
|
245
342
|
}
|
246
343
|
});
|
247
|
-
}
|
344
|
+
};
|
345
|
+
const renderMultiSelectColumn = (column) => {
|
248
346
|
const {
|
249
|
-
name
|
250
|
-
head
|
251
|
-
headAlign
|
252
|
-
width
|
253
|
-
fixed
|
254
|
-
} =
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
347
|
+
name,
|
348
|
+
head,
|
349
|
+
headAlign,
|
350
|
+
width,
|
351
|
+
fixed
|
352
|
+
} = column;
|
353
|
+
const {
|
354
|
+
code
|
355
|
+
} = column;
|
356
|
+
return createVNode(ElTableColumn, {
|
357
|
+
"label": head,
|
358
|
+
"headerAlign": headAlign,
|
359
|
+
"prop": name,
|
360
|
+
"width": width,
|
361
|
+
"fixed": fixed,
|
362
|
+
"showOverflowTooltip": true
|
264
363
|
}, {
|
265
|
-
default: (
|
364
|
+
default: (scope) => {
|
266
365
|
const {
|
267
|
-
row
|
268
|
-
column:
|
269
|
-
} =
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
366
|
+
row,
|
367
|
+
column: column2
|
368
|
+
} = scope;
|
369
|
+
const cellValue = row[column2.property];
|
370
|
+
let codeName, codeData, codeContent;
|
371
|
+
if (!code) {
|
372
|
+
codeContent = null;
|
373
|
+
} else if (typeof code === "string") {
|
374
|
+
codeName = code;
|
375
|
+
codeData = Throne.getCode(codeName);
|
376
|
+
codeContent = getMultiCodeContent(codeData.value, cellValue);
|
377
|
+
} else {
|
378
|
+
codeData = code;
|
379
|
+
codeContent = getMultiCodeContent(codeData, cellValue);
|
380
|
+
}
|
381
|
+
return createVNode("span", {
|
382
|
+
"class": "cell-multiselect"
|
383
|
+
}, [codeContent]);
|
274
384
|
}
|
275
385
|
});
|
276
|
-
}
|
386
|
+
};
|
387
|
+
const renderButtongroupColumn = (column) => {
|
277
388
|
const {
|
278
|
-
name
|
279
|
-
head
|
280
|
-
headAlign
|
281
|
-
width
|
282
|
-
fixed
|
283
|
-
} =
|
284
|
-
return
|
285
|
-
label:
|
286
|
-
headerAlign:
|
287
|
-
prop:
|
288
|
-
width:
|
289
|
-
fixed:
|
389
|
+
name,
|
390
|
+
head,
|
391
|
+
headAlign,
|
392
|
+
width,
|
393
|
+
fixed
|
394
|
+
} = column;
|
395
|
+
return createVNode(ElTableColumn, {
|
396
|
+
"label": head,
|
397
|
+
"headerAlign": headAlign,
|
398
|
+
"prop": name,
|
399
|
+
"width": width,
|
400
|
+
"fixed": fixed
|
290
401
|
}, {
|
291
|
-
default: (
|
292
|
-
var
|
293
|
-
const
|
294
|
-
rowData:
|
295
|
-
column
|
296
|
-
rowIndex:
|
402
|
+
default: (scope) => {
|
403
|
+
var _a, _b;
|
404
|
+
const children = (_b = (_a = column.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a, {
|
405
|
+
rowData: scope.row,
|
406
|
+
column,
|
407
|
+
rowIndex: scope.$index
|
297
408
|
});
|
298
|
-
return
|
299
|
-
class: "cell-buttongroup"
|
300
|
-
}, [
|
301
|
-
default: () => [
|
409
|
+
return createVNode("div", {
|
410
|
+
"class": "cell-buttongroup"
|
411
|
+
}, [createVNode(Space, null, _isSlot$1(children) ? children : {
|
412
|
+
default: () => [children]
|
302
413
|
})]);
|
303
414
|
}
|
304
415
|
});
|
305
|
-
}
|
416
|
+
};
|
417
|
+
const renderColumngroupColumn = (column) => {
|
418
|
+
const {
|
419
|
+
head,
|
420
|
+
headAlign
|
421
|
+
} = column;
|
306
422
|
const {
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
return r(x, {
|
313
|
-
label: e,
|
314
|
-
headerAlign: n
|
423
|
+
children
|
424
|
+
} = column;
|
425
|
+
return createVNode(ElTableColumn, {
|
426
|
+
"label": head,
|
427
|
+
"headerAlign": headAlign
|
315
428
|
}, {
|
316
|
-
default: (
|
429
|
+
default: (scope) => {
|
430
|
+
return renderColumns(children);
|
431
|
+
}
|
317
432
|
});
|
318
|
-
}
|
433
|
+
};
|
434
|
+
const renderDiyColumn = (column) => {
|
319
435
|
const {
|
320
|
-
name
|
321
|
-
head
|
322
|
-
headAlign
|
323
|
-
width
|
324
|
-
fixed
|
325
|
-
} =
|
326
|
-
return
|
327
|
-
label:
|
328
|
-
headerAlign:
|
329
|
-
prop:
|
330
|
-
width:
|
331
|
-
fixed:
|
436
|
+
name,
|
437
|
+
head,
|
438
|
+
headAlign,
|
439
|
+
width,
|
440
|
+
fixed
|
441
|
+
} = column;
|
442
|
+
return createVNode(ElTableColumn, {
|
443
|
+
"label": head,
|
444
|
+
"headerAlign": headAlign,
|
445
|
+
"prop": name,
|
446
|
+
"width": width,
|
447
|
+
"fixed": fixed
|
332
448
|
}, {
|
333
|
-
default: (
|
334
|
-
var
|
335
|
-
const
|
336
|
-
rowData:
|
337
|
-
column
|
338
|
-
rowIndex:
|
449
|
+
default: (scope) => {
|
450
|
+
var _a, _b;
|
451
|
+
const children = (_b = (_a = column.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a, {
|
452
|
+
rowData: scope.row,
|
453
|
+
column,
|
454
|
+
rowIndex: scope.$index
|
339
455
|
});
|
340
|
-
return
|
341
|
-
class: "cell-diy"
|
342
|
-
}, [
|
456
|
+
return createVNode("div", {
|
457
|
+
"class": "cell-diy"
|
458
|
+
}, [children, createTextVNode(" ")]);
|
343
459
|
}
|
344
460
|
});
|
345
|
-
}
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
461
|
+
};
|
462
|
+
const renderColumns = (columns2) => {
|
463
|
+
return columns2 == null ? void 0 : columns2.map((c) => {
|
464
|
+
if (c.type === "OPagetableColumnString") {
|
465
|
+
return renderStringColumn(c);
|
466
|
+
} else if (c.type === "OPagetableColumnLink") {
|
467
|
+
return renderLinkColumn(c);
|
468
|
+
} else if (c.type === "OPagetableColumnNumber") {
|
469
|
+
return renderNumberColumn(c);
|
470
|
+
} else if (c.type === "OPagetableColumnDate") {
|
471
|
+
return renderDateColumn(c);
|
472
|
+
} else if (c.type === "OPagetableColumnSingleselect") {
|
473
|
+
return renderSingleSelectColumn(c);
|
474
|
+
} else if (c.type === "OPagetableColumnMultiselect") {
|
475
|
+
return renderMultiSelectColumn(c);
|
476
|
+
} else if (c.type === "OPagetableColumnButtongroup") {
|
477
|
+
return renderButtongroupColumn(c);
|
478
|
+
} else if (c.type === "OPagetableColumngroup") {
|
479
|
+
return renderColumngroupColumn(c);
|
480
|
+
} else if (c.type === "OPagetableColumnDiy") {
|
481
|
+
return renderDiyColumn(c);
|
482
|
+
} else {
|
483
|
+
throw new OrionError(`OPagetable不能正确渲染'${c.type.name}'子组件。`);
|
484
|
+
}
|
485
|
+
});
|
486
|
+
};
|
487
|
+
return createVNode("div", {
|
488
|
+
"class": [cn, attrs.class],
|
489
|
+
"style": [style.value, attrs.style]
|
490
|
+
}, [createVNode("div", {
|
491
|
+
"class": "pagetable-wrapper"
|
492
|
+
}, [createVNode(ElTable, {
|
493
|
+
"showSummary": showSummary.value,
|
494
|
+
"summaryMethod": getSummaries,
|
495
|
+
"border": true,
|
496
|
+
"ref": elTableRef,
|
497
|
+
"data": data,
|
498
|
+
"height": "100%",
|
499
|
+
"style": {
|
379
500
|
width: "100%"
|
380
501
|
},
|
381
|
-
"onSelection-change": (
|
382
|
-
"highlight-current-row":
|
383
|
-
"onCurrent-change": (
|
384
|
-
"onRow-click": (
|
385
|
-
name:
|
386
|
-
head:
|
387
|
-
},
|
388
|
-
"onRow-dblclick": (
|
389
|
-
name:
|
390
|
-
head:
|
391
|
-
},
|
392
|
-
"onCell-click": (
|
393
|
-
name:
|
394
|
-
head:
|
395
|
-
},
|
396
|
-
"onCell-dblclick": (
|
397
|
-
name:
|
398
|
-
head:
|
399
|
-
},
|
400
|
-
size:
|
502
|
+
"onSelection-change": (rows) => emit("selectionChange", rows),
|
503
|
+
"highlight-current-row": currentRowMode,
|
504
|
+
"onCurrent-change": (currentRow, oldCurrentRow) => emit("currentRowChange", currentRow, oldCurrentRow),
|
505
|
+
"onRow-click": (row, column, event) => emit("rowClick", row, {
|
506
|
+
name: column.property,
|
507
|
+
head: column.label
|
508
|
+
}, event),
|
509
|
+
"onRow-dblclick": (row, column, event) => emit("rowDblclick", row, {
|
510
|
+
name: column.property,
|
511
|
+
head: column.label
|
512
|
+
}, event),
|
513
|
+
"onCell-click": (row, column, cell, event) => emit("cellClick", row, {
|
514
|
+
name: column.property,
|
515
|
+
head: column.label
|
516
|
+
}, cell, event),
|
517
|
+
"onCell-dblclick": (row, column, cell, event) => emit("cellDblclick", row, {
|
518
|
+
name: column.property,
|
519
|
+
head: column.label
|
520
|
+
}, cell, event),
|
521
|
+
"size": size
|
401
522
|
}, {
|
402
|
-
default: () => [
|
403
|
-
})]),
|
404
|
-
class: "pagination-wrapper"
|
405
|
-
}, [
|
406
|
-
currentPage:
|
407
|
-
"onUpdate:current-page": (
|
408
|
-
|
409
|
-
...
|
410
|
-
currentPage:
|
523
|
+
default: () => [showRowNumber && renderIndexColumn(), selectionMode && renderSelectionColumn(), renderColumns(columns.value)]
|
524
|
+
})]), createVNode("div", {
|
525
|
+
"class": "pagination-wrapper"
|
526
|
+
}, [createVNode(ElPagination, {
|
527
|
+
"currentPage": pagination.currentPage,
|
528
|
+
"onUpdate:current-page": (e) => {
|
529
|
+
emit("update:pagination", {
|
530
|
+
...pagination,
|
531
|
+
currentPage: e
|
411
532
|
});
|
412
533
|
},
|
413
|
-
pageSize:
|
414
|
-
pageSizes:
|
415
|
-
"onUpdate:page-size": (
|
416
|
-
|
417
|
-
...
|
418
|
-
pageSize:
|
534
|
+
"pageSize": pagination.pageSize,
|
535
|
+
"pageSizes": pagination.pageSizes,
|
536
|
+
"onUpdate:page-size": (e) => {
|
537
|
+
emit("update:pagination", {
|
538
|
+
...pagination,
|
539
|
+
pageSize: e
|
419
540
|
});
|
420
541
|
},
|
421
|
-
total:
|
422
|
-
layout: "total, ->, sizes, prev, pager, next, jumper",
|
423
|
-
size:
|
542
|
+
"total": pagination.total,
|
543
|
+
"layout": "total, ->, sizes, prev, pager, next, jumper",
|
544
|
+
"size": size,
|
545
|
+
"teleported": false
|
424
546
|
}, null)])]);
|
425
547
|
};
|
426
548
|
}
|
427
|
-
})
|
549
|
+
});
|
550
|
+
const pagetableColumnIndexProps = () => ({});
|
551
|
+
const PagetableColumnIndex = /* @__PURE__ */ defineComponent({
|
428
552
|
name: "OPagetableColumnIndex",
|
429
|
-
inheritAttrs:
|
430
|
-
props:
|
431
|
-
setup(
|
432
|
-
slots
|
433
|
-
attrs
|
434
|
-
emit
|
435
|
-
expose
|
553
|
+
inheritAttrs: false,
|
554
|
+
props: pagetableColumnIndexProps(),
|
555
|
+
setup(props, {
|
556
|
+
slots,
|
557
|
+
attrs,
|
558
|
+
emit,
|
559
|
+
expose
|
436
560
|
}) {
|
437
561
|
return () => null;
|
438
562
|
}
|
439
|
-
})
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
563
|
+
});
|
564
|
+
const pagetableColumnStringProps = () => ({
|
565
|
+
head: stringType(),
|
566
|
+
headAlign: stringType(),
|
567
|
+
name: stringType(),
|
568
|
+
width: someType([Boolean, String]),
|
569
|
+
fixed: someType([Boolean, String]),
|
570
|
+
tail: someType([Boolean, String])
|
571
|
+
});
|
572
|
+
const PagetableColumnString = /* @__PURE__ */ defineComponent({
|
447
573
|
name: "OPagetableColumnString",
|
448
|
-
inheritAttrs:
|
449
|
-
props:
|
450
|
-
setup(
|
451
|
-
slots
|
452
|
-
attrs
|
453
|
-
emit
|
454
|
-
expose
|
574
|
+
inheritAttrs: false,
|
575
|
+
props: pagetableColumnStringProps(),
|
576
|
+
setup(props, {
|
577
|
+
slots,
|
578
|
+
attrs,
|
579
|
+
emit,
|
580
|
+
expose
|
455
581
|
}) {
|
456
582
|
return () => null;
|
457
583
|
}
|
458
|
-
})
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
584
|
+
});
|
585
|
+
const pagetableColumnLinkProps = () => ({
|
586
|
+
head: stringType(),
|
587
|
+
headAlign: stringType(),
|
588
|
+
name: stringType(),
|
589
|
+
width: someType([Boolean, String]),
|
590
|
+
fixed: someType([Boolean, String]),
|
591
|
+
tail: someType([Boolean, String])
|
592
|
+
});
|
593
|
+
const PagetableColumnLink = /* @__PURE__ */ defineComponent({
|
466
594
|
name: "OPagetableColumnLink",
|
467
|
-
inheritAttrs:
|
468
|
-
props:
|
469
|
-
setup(
|
470
|
-
slots
|
471
|
-
attrs
|
472
|
-
emit
|
473
|
-
expose
|
595
|
+
inheritAttrs: false,
|
596
|
+
props: pagetableColumnLinkProps(),
|
597
|
+
setup(props, {
|
598
|
+
slots,
|
599
|
+
attrs,
|
600
|
+
emit,
|
601
|
+
expose
|
474
602
|
}) {
|
475
603
|
return () => null;
|
476
604
|
}
|
477
|
-
})
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
605
|
+
});
|
606
|
+
const pagetableColumnNumberProps = () => ({
|
607
|
+
head: stringType(),
|
608
|
+
headAlign: stringType(),
|
609
|
+
name: stringType(),
|
610
|
+
width: someType([Boolean, String]),
|
611
|
+
fixed: someType([Boolean, String]),
|
612
|
+
tail: someType([Boolean, String]),
|
613
|
+
thousandsSeparator: booleanType(true),
|
614
|
+
precision: numberType(-1),
|
615
|
+
percentage: booleanType(false)
|
616
|
+
});
|
617
|
+
const PagetableColumnNumber = /* @__PURE__ */ defineComponent({
|
488
618
|
name: "OPagetableColumnNumber",
|
489
|
-
inheritAttrs:
|
490
|
-
props:
|
491
|
-
setup(
|
492
|
-
slots
|
493
|
-
attrs
|
494
|
-
emit
|
495
|
-
expose
|
619
|
+
inheritAttrs: false,
|
620
|
+
props: pagetableColumnNumberProps(),
|
621
|
+
setup(props, {
|
622
|
+
slots,
|
623
|
+
attrs,
|
624
|
+
emit,
|
625
|
+
expose
|
496
626
|
}) {
|
497
627
|
return () => null;
|
498
628
|
}
|
499
|
-
})
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
629
|
+
});
|
630
|
+
const pagetableColumnDateProps = () => ({
|
631
|
+
head: stringType(),
|
632
|
+
headAlign: stringType(),
|
633
|
+
name: stringType(),
|
634
|
+
width: someType([Boolean, String]),
|
635
|
+
fixed: someType([Boolean, String]),
|
636
|
+
tail: someType([Boolean, String]),
|
506
637
|
// Date
|
507
|
-
format:
|
508
|
-
sourceFormat:
|
509
|
-
})
|
638
|
+
format: stringType(),
|
639
|
+
sourceFormat: stringType()
|
640
|
+
});
|
641
|
+
const PagetableColumnDate = /* @__PURE__ */ defineComponent({
|
510
642
|
name: "OPagetableColumnDate",
|
511
|
-
inheritAttrs:
|
512
|
-
props:
|
513
|
-
setup(
|
514
|
-
slots
|
515
|
-
attrs
|
516
|
-
emit
|
517
|
-
expose
|
643
|
+
inheritAttrs: false,
|
644
|
+
props: pagetableColumnDateProps(),
|
645
|
+
setup(props, {
|
646
|
+
slots,
|
647
|
+
attrs,
|
648
|
+
emit,
|
649
|
+
expose
|
518
650
|
}) {
|
519
651
|
return () => null;
|
520
652
|
}
|
521
|
-
})
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
653
|
+
});
|
654
|
+
const pagetableColumnSingleselectProps = () => ({
|
655
|
+
head: stringType(),
|
656
|
+
headAlign: stringType(),
|
657
|
+
name: stringType(),
|
658
|
+
width: someType([Boolean, String]),
|
659
|
+
fixed: someType([Boolean, String]),
|
660
|
+
tail: someType([Boolean, String]),
|
661
|
+
code: someType([String, Array])
|
662
|
+
});
|
663
|
+
const PagetableColumnSingleselect = /* @__PURE__ */ defineComponent({
|
530
664
|
name: "OPagetableColumnSingleselect",
|
531
|
-
inheritAttrs:
|
532
|
-
props:
|
533
|
-
setup(
|
534
|
-
slots
|
535
|
-
attrs
|
536
|
-
emit
|
537
|
-
expose
|
665
|
+
inheritAttrs: false,
|
666
|
+
props: pagetableColumnSingleselectProps(),
|
667
|
+
setup(props, {
|
668
|
+
slots,
|
669
|
+
attrs,
|
670
|
+
emit,
|
671
|
+
expose
|
538
672
|
}) {
|
539
673
|
return () => null;
|
540
674
|
}
|
541
|
-
})
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
675
|
+
});
|
676
|
+
const pagetableColumnMultiselectProps = () => ({
|
677
|
+
head: stringType(),
|
678
|
+
headAlign: stringType(),
|
679
|
+
name: stringType(),
|
680
|
+
width: someType([Boolean, String]),
|
681
|
+
fixed: someType([Boolean, String]),
|
682
|
+
tail: someType([Boolean, String]),
|
683
|
+
code: someType([String, Array])
|
684
|
+
});
|
685
|
+
const PagetableColumnMultiselect = /* @__PURE__ */ defineComponent({
|
550
686
|
name: "OPagetableColumnMultiselect",
|
551
|
-
inheritAttrs:
|
552
|
-
props:
|
553
|
-
setup(
|
554
|
-
slots
|
555
|
-
attrs
|
556
|
-
emit
|
557
|
-
expose
|
687
|
+
inheritAttrs: false,
|
688
|
+
props: pagetableColumnMultiselectProps(),
|
689
|
+
setup(props, {
|
690
|
+
slots,
|
691
|
+
attrs,
|
692
|
+
emit,
|
693
|
+
expose
|
558
694
|
}) {
|
559
695
|
return () => null;
|
560
696
|
}
|
561
|
-
})
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
697
|
+
});
|
698
|
+
const pagetableColumnButtongroupProps = () => ({
|
699
|
+
head: stringType(),
|
700
|
+
headAlign: stringType(),
|
701
|
+
name: stringType(),
|
702
|
+
width: someType([Boolean, String]),
|
703
|
+
fixed: someType([Boolean, String]),
|
704
|
+
tail: someType([Boolean, String])
|
705
|
+
});
|
706
|
+
const PagetableColumnButtongroup = /* @__PURE__ */ defineComponent({
|
569
707
|
name: "OPagetableColumnButtongroup",
|
570
|
-
inheritAttrs:
|
571
|
-
props:
|
708
|
+
inheritAttrs: false,
|
709
|
+
props: pagetableColumnButtongroupProps(),
|
572
710
|
slots: Object,
|
573
|
-
setup(
|
574
|
-
slots
|
575
|
-
attrs
|
576
|
-
emit
|
577
|
-
expose
|
711
|
+
setup(props, {
|
712
|
+
slots,
|
713
|
+
attrs,
|
714
|
+
emit,
|
715
|
+
expose
|
578
716
|
}) {
|
579
717
|
return () => null;
|
580
718
|
}
|
581
719
|
});
|
582
|
-
function
|
583
|
-
return typeof
|
720
|
+
function _isSlot(s) {
|
721
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
584
722
|
}
|
585
|
-
const
|
586
|
-
type:
|
587
|
-
})
|
723
|
+
const pagetableCellButtonProps = () => ({
|
724
|
+
type: stringType()
|
725
|
+
});
|
726
|
+
const PagetableCellButton = /* @__PURE__ */ defineComponent({
|
588
727
|
name: "OPagetableCellButton",
|
589
|
-
inheritAttrs:
|
590
|
-
props:
|
728
|
+
inheritAttrs: false,
|
729
|
+
props: pagetableCellButtonProps(),
|
591
730
|
emits: ["click"],
|
592
|
-
setup(
|
593
|
-
slots
|
594
|
-
attrs
|
595
|
-
emit
|
596
|
-
expose
|
731
|
+
setup(props, {
|
732
|
+
slots,
|
733
|
+
attrs,
|
734
|
+
emit,
|
735
|
+
expose
|
597
736
|
}) {
|
598
|
-
const
|
599
|
-
|
737
|
+
const handleClick = (event) => {
|
738
|
+
emit("click", event);
|
600
739
|
};
|
601
740
|
return () => {
|
602
|
-
var
|
741
|
+
var _a;
|
603
742
|
const {
|
604
|
-
type
|
605
|
-
} =
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
743
|
+
type
|
744
|
+
} = props;
|
745
|
+
const children = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
746
|
+
return createVNode(ElButton, {
|
747
|
+
"link": true,
|
748
|
+
"type": type,
|
749
|
+
"size": "small",
|
750
|
+
"onClick": handleClick
|
751
|
+
}, _isSlot(children) ? children : {
|
752
|
+
default: () => [children]
|
613
753
|
});
|
614
754
|
};
|
615
755
|
}
|
616
|
-
})
|
617
|
-
|
618
|
-
|
619
|
-
|
756
|
+
});
|
757
|
+
const pagetableColumngroupProps = () => ({
|
758
|
+
head: stringType(),
|
759
|
+
headAlign: stringType()
|
760
|
+
});
|
761
|
+
const PagetableColumngroup = /* @__PURE__ */ defineComponent({
|
620
762
|
name: "OPagetableColumngroup",
|
621
|
-
inheritAttrs:
|
622
|
-
props:
|
623
|
-
setup(
|
624
|
-
slots
|
625
|
-
attrs
|
626
|
-
emit
|
627
|
-
expose
|
763
|
+
inheritAttrs: false,
|
764
|
+
props: pagetableColumngroupProps(),
|
765
|
+
setup(props, {
|
766
|
+
slots,
|
767
|
+
attrs,
|
768
|
+
emit,
|
769
|
+
expose
|
628
770
|
}) {
|
629
771
|
return () => null;
|
630
772
|
}
|
631
|
-
})
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
773
|
+
});
|
774
|
+
const pagetableColumnDiyProps = () => ({
|
775
|
+
head: stringType(),
|
776
|
+
headAlign: stringType(),
|
777
|
+
name: stringType(),
|
778
|
+
width: someType([Boolean, String]),
|
779
|
+
fixed: someType([Boolean, String]),
|
780
|
+
tail: someType([Boolean, String])
|
781
|
+
});
|
782
|
+
const PagetableColumnDiy = /* @__PURE__ */ defineComponent({
|
639
783
|
name: "OPagetableColumnDiy",
|
640
|
-
inheritAttrs:
|
641
|
-
props:
|
784
|
+
inheritAttrs: false,
|
785
|
+
props: pagetableColumnDiyProps(),
|
642
786
|
slots: Object,
|
643
|
-
setup(
|
644
|
-
slots
|
645
|
-
attrs
|
646
|
-
emit
|
647
|
-
expose
|
787
|
+
setup(props, {
|
788
|
+
slots,
|
789
|
+
attrs,
|
790
|
+
emit,
|
791
|
+
expose
|
648
792
|
}) {
|
649
793
|
return () => null;
|
650
794
|
}
|
651
|
-
})
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
795
|
+
});
|
796
|
+
const Pagetable = withInstall(Pagetable$1, {
|
797
|
+
PagetableColumnIndex,
|
798
|
+
PagetableColumnString,
|
799
|
+
PagetableColumnLink,
|
800
|
+
PagetableColumnNumber,
|
801
|
+
PagetableColumnDate,
|
802
|
+
PagetableColumnSingleselect,
|
803
|
+
PagetableColumnMultiselect,
|
804
|
+
PagetableColumnButtongroup,
|
805
|
+
PagetableCellButton,
|
806
|
+
PagetableColumngroup,
|
807
|
+
PagetableColumnDiy
|
663
808
|
});
|
664
809
|
export {
|
665
|
-
|
810
|
+
Pagetable as default
|
666
811
|
};
|
667
812
|
//# sourceMappingURL=index.js.map
|