orion-design 0.1.29 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- 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/LovPagetable.vue.d.ts +28 -0
- package/dist/components/LovTable/index.d.ts +14 -0
- package/dist/components/LovTable/index.js +179 -105
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/Modal.d.ts +2 -0
- package/dist/components/Modal/ModalLocator.vue.d.ts +20 -0
- package/dist/components/Modal/index.d.ts +4 -1
- package/dist/components/Modal/index.js +127 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/types.d.ts +18 -0
- package/dist/components/Modal/types.js +7 -0
- package/dist/components/Modal/types.js.map +1 -0
- package/dist/components/Modal/useModal.d.ts +1 -3
- package/dist/components/Modal/useModal.js +5 -4
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/Pagetable.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
- package/dist/components/Pagetable/hooks/useColumns.js +88 -74
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.d.ts +9 -0
- package/dist/components/Pagetable/index.js +697 -491
- 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-8oZ2kpUC.js +27 -0
- package/dist/components-8oZ2kpUC.js.map +1 -0
- 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
- package/dist/components-J6-qau6Y.js +0 -73
- package/dist/components-J6-qau6Y.js.map +0 -1
@@ -1,580 +1,690 @@
|
|
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, ElTableColumn, ElButton } from "element-plus";
|
5
|
+
import classNames from "../_util/classNames.js";
|
6
|
+
import { arrayType, 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
|
-
showRowNumber:
|
19
|
-
selectionMode:
|
20
|
-
currentRowMode:
|
21
|
-
size:
|
22
|
-
})
|
16
|
+
const querytableProps = () => ({
|
17
|
+
data: arrayType(),
|
18
|
+
showRowNumber: booleanType(true),
|
19
|
+
selectionMode: booleanType(false),
|
20
|
+
currentRowMode: booleanType(false),
|
21
|
+
size: stringType()
|
22
|
+
});
|
23
|
+
const Querytable$1 = /* @__PURE__ */ defineComponent({
|
23
24
|
name: "OQuerytable",
|
24
|
-
inheritAttrs:
|
25
|
-
props:
|
25
|
+
inheritAttrs: false,
|
26
|
+
props: querytableProps(),
|
26
27
|
emits: ["selectionChange", "currentRowChange", "rowClick", "rowDblclick", "cellClick", "cellDblclick"],
|
27
|
-
setup(
|
28
|
-
slots
|
29
|
-
attrs
|
30
|
-
emit
|
31
|
-
expose
|
28
|
+
setup(props, {
|
29
|
+
slots,
|
30
|
+
attrs,
|
31
|
+
emit,
|
32
|
+
expose
|
32
33
|
}) {
|
33
|
-
const
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
const elTableRef = ref();
|
35
|
+
const style = computed(() => {
|
36
|
+
const rowStyle = {};
|
37
|
+
return rowStyle;
|
38
|
+
});
|
39
|
+
const columns = useColumns(slots);
|
40
|
+
const clearSelection = () => {
|
41
|
+
elTableRef.value.clearSelection();
|
42
|
+
};
|
43
|
+
const getSelectionRows = () => {
|
44
|
+
return elTableRef.value.getSelectionRows();
|
45
|
+
};
|
46
|
+
const toggleRowSelection = (...args) => {
|
47
|
+
return elTableRef.value.toggleRowSelection(...args);
|
48
|
+
};
|
49
|
+
const toggleAllSelection = () => {
|
50
|
+
return elTableRef.value.toggleAllSelection();
|
51
|
+
};
|
52
|
+
const setCurrentRow = (...args) => {
|
53
|
+
return elTableRef.value.setCurrentRow(...args);
|
54
|
+
};
|
55
|
+
const scrollTo = (...args) => {
|
56
|
+
return elTableRef.value.scrollTo(...args);
|
57
|
+
};
|
58
|
+
expose({
|
59
|
+
clearSelection,
|
60
|
+
getSelectionRows,
|
61
|
+
toggleRowSelection,
|
62
|
+
toggleAllSelection,
|
63
|
+
setCurrentRow,
|
64
|
+
scrollTo
|
65
|
+
});
|
66
|
+
return () => {
|
67
|
+
const {
|
68
|
+
data
|
69
|
+
} = props;
|
70
|
+
const {
|
71
|
+
selectionMode = false
|
72
|
+
} = props;
|
73
|
+
const {
|
74
|
+
showRowNumber = true
|
75
|
+
} = props;
|
44
76
|
const {
|
45
|
-
|
46
|
-
} =
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
77
|
+
currentRowMode = false
|
78
|
+
} = props;
|
79
|
+
const {
|
80
|
+
size = "default"
|
81
|
+
} = props;
|
82
|
+
const cn = classNames("orion-querytable");
|
83
|
+
const renderIndexColumn = () => {
|
84
|
+
return createVNode(ElTableColumn, {
|
85
|
+
"type": "index",
|
86
|
+
"label": "No",
|
87
|
+
"width": 56,
|
88
|
+
"fixed": "left",
|
89
|
+
"showOverflowTooltip": true,
|
90
|
+
"index": (index) => {
|
91
|
+
return index + 1;
|
92
|
+
}
|
93
|
+
}, null);
|
94
|
+
};
|
95
|
+
const renderSelectionColumn = () => {
|
96
|
+
return createVNode(ElTableColumn, {
|
97
|
+
"type": "selection",
|
98
|
+
"width": 40,
|
99
|
+
"fixed": "left"
|
100
|
+
}, null);
|
101
|
+
};
|
102
|
+
const renderStringColumn = (column) => {
|
66
103
|
const {
|
67
|
-
name
|
68
|
-
head
|
69
|
-
headAlign
|
70
|
-
width
|
71
|
-
fixed
|
72
|
-
} =
|
73
|
-
return
|
74
|
-
label:
|
75
|
-
headerAlign:
|
76
|
-
prop:
|
77
|
-
width:
|
78
|
-
fixed:
|
79
|
-
showOverflowTooltip:
|
104
|
+
name,
|
105
|
+
head,
|
106
|
+
headAlign,
|
107
|
+
width,
|
108
|
+
fixed
|
109
|
+
} = column;
|
110
|
+
return createVNode(ElTableColumn, {
|
111
|
+
"label": head,
|
112
|
+
"headerAlign": headAlign,
|
113
|
+
"prop": name,
|
114
|
+
"width": width,
|
115
|
+
"fixed": fixed,
|
116
|
+
"showOverflowTooltip": true
|
80
117
|
}, null);
|
81
|
-
}
|
118
|
+
};
|
119
|
+
const renderLinkColumn = (column) => {
|
82
120
|
const {
|
83
|
-
name
|
84
|
-
head
|
85
|
-
headAlign
|
86
|
-
width
|
87
|
-
fixed
|
88
|
-
} =
|
89
|
-
return
|
90
|
-
label:
|
91
|
-
headerAlign:
|
92
|
-
prop:
|
93
|
-
width:
|
94
|
-
fixed:
|
95
|
-
showOverflowTooltip:
|
121
|
+
name,
|
122
|
+
head,
|
123
|
+
headAlign,
|
124
|
+
width,
|
125
|
+
fixed
|
126
|
+
} = column;
|
127
|
+
return createVNode(ElTableColumn, {
|
128
|
+
"label": head,
|
129
|
+
"headerAlign": headAlign,
|
130
|
+
"prop": name,
|
131
|
+
"width": width,
|
132
|
+
"fixed": fixed,
|
133
|
+
"showOverflowTooltip": true
|
96
134
|
}, {
|
97
|
-
default: (
|
135
|
+
default: (scope) => {
|
98
136
|
const {
|
99
|
-
row
|
100
|
-
column:
|
101
|
-
} =
|
102
|
-
return
|
103
|
-
class: "cell-linkcolumn"
|
104
|
-
}, [
|
137
|
+
row,
|
138
|
+
column: column2
|
139
|
+
} = scope;
|
140
|
+
return createVNode("span", {
|
141
|
+
"class": "cell-linkcolumn"
|
142
|
+
}, [row[column2.property]]);
|
105
143
|
}
|
106
144
|
});
|
107
|
-
}
|
145
|
+
};
|
146
|
+
const renderNumberColumn = (column) => {
|
147
|
+
const {
|
148
|
+
name,
|
149
|
+
head,
|
150
|
+
headAlign,
|
151
|
+
width,
|
152
|
+
fixed
|
153
|
+
} = column;
|
108
154
|
const {
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
headerAlign: s,
|
122
|
-
align: "right",
|
123
|
-
prop: e,
|
124
|
-
width: p,
|
125
|
-
fixed: h,
|
126
|
-
showOverflowTooltip: !0
|
155
|
+
thousandsSeparator = true,
|
156
|
+
precision = -1,
|
157
|
+
percentage = false
|
158
|
+
} = column;
|
159
|
+
return createVNode(ElTableColumn, {
|
160
|
+
"label": head,
|
161
|
+
"headerAlign": headAlign,
|
162
|
+
"align": "right",
|
163
|
+
"prop": name,
|
164
|
+
"width": width,
|
165
|
+
"fixed": fixed,
|
166
|
+
"showOverflowTooltip": true
|
127
167
|
}, {
|
128
|
-
default: (
|
168
|
+
default: (scope) => {
|
129
169
|
const {
|
130
|
-
row
|
131
|
-
column:
|
132
|
-
} =
|
133
|
-
return
|
134
|
-
class: "cell-numbercolumn"
|
135
|
-
}, [
|
170
|
+
row,
|
171
|
+
column: column2
|
172
|
+
} = scope;
|
173
|
+
return createVNode("span", {
|
174
|
+
"class": "cell-numbercolumn"
|
175
|
+
}, [number2string(row[column2.property], thousandsSeparator, precision, percentage === true || percentage === "")]);
|
136
176
|
}
|
137
177
|
});
|
138
|
-
}
|
178
|
+
};
|
179
|
+
const renderDateColumn = (column) => {
|
139
180
|
const {
|
140
|
-
name
|
141
|
-
head
|
142
|
-
headAlign
|
143
|
-
width
|
144
|
-
fixed
|
145
|
-
sourceFormat
|
146
|
-
format
|
147
|
-
} =
|
148
|
-
return
|
149
|
-
label:
|
150
|
-
headerAlign:
|
151
|
-
prop:
|
152
|
-
width:
|
153
|
-
fixed:
|
154
|
-
showOverflowTooltip:
|
181
|
+
name,
|
182
|
+
head,
|
183
|
+
headAlign,
|
184
|
+
width,
|
185
|
+
fixed,
|
186
|
+
sourceFormat,
|
187
|
+
format = "YYYYMMDDHHmmss"
|
188
|
+
} = column;
|
189
|
+
return createVNode(ElTableColumn, {
|
190
|
+
"label": head,
|
191
|
+
"headerAlign": headAlign,
|
192
|
+
"prop": name,
|
193
|
+
"width": width,
|
194
|
+
"fixed": fixed,
|
195
|
+
"showOverflowTooltip": true
|
155
196
|
}, {
|
156
|
-
default: (
|
197
|
+
default: (scope) => {
|
157
198
|
const {
|
158
|
-
row
|
159
|
-
column:
|
160
|
-
} =
|
161
|
-
|
199
|
+
row,
|
200
|
+
column: column2
|
201
|
+
} = scope;
|
202
|
+
const cellValue = row[column2.property];
|
203
|
+
if (cellValue instanceof Date || dayjs.isDayjs(cellValue)) {
|
204
|
+
return createVNode("div", null, [formatDate(cellValue, format)]);
|
205
|
+
} else {
|
206
|
+
if (sourceFormat && format) {
|
207
|
+
return createVNode("div", null, [formatDate(cellValue, sourceFormat, format)]);
|
208
|
+
} else {
|
209
|
+
return createVNode("div", null, [cellValue]);
|
210
|
+
}
|
211
|
+
}
|
162
212
|
}
|
163
213
|
});
|
164
|
-
}
|
214
|
+
};
|
215
|
+
const renderSingleSelectColumn = (column) => {
|
216
|
+
const {
|
217
|
+
name,
|
218
|
+
head,
|
219
|
+
headAlign,
|
220
|
+
width,
|
221
|
+
fixed
|
222
|
+
} = column;
|
165
223
|
const {
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
label: n,
|
176
|
-
headerAlign: s,
|
177
|
-
prop: e,
|
178
|
-
width: p,
|
179
|
-
fixed: h,
|
180
|
-
showOverflowTooltip: !0
|
224
|
+
code
|
225
|
+
} = column;
|
226
|
+
return createVNode(ElTableColumn, {
|
227
|
+
"label": head,
|
228
|
+
"headerAlign": headAlign,
|
229
|
+
"prop": name,
|
230
|
+
"width": width,
|
231
|
+
"fixed": fixed,
|
232
|
+
"showOverflowTooltip": true
|
181
233
|
}, {
|
182
|
-
default: (
|
234
|
+
default: (scope) => {
|
183
235
|
const {
|
184
|
-
row
|
185
|
-
column:
|
186
|
-
} =
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
236
|
+
row,
|
237
|
+
column: column2
|
238
|
+
} = scope;
|
239
|
+
const cellValue = row[column2.property];
|
240
|
+
let codeName, codeData, codeContent;
|
241
|
+
if (!code) {
|
242
|
+
codeContent = null;
|
243
|
+
} else if (typeof code === "string") {
|
244
|
+
codeName = code;
|
245
|
+
codeData = Throne.getCode(codeName);
|
246
|
+
codeContent = getSingleCodeContent(codeData.value, cellValue);
|
247
|
+
} else {
|
248
|
+
codeData = code;
|
249
|
+
codeContent = getSingleCodeContent(codeData, cellValue);
|
250
|
+
}
|
251
|
+
return createVNode("span", {
|
252
|
+
"class": "cell-singleselect"
|
253
|
+
}, [codeContent]);
|
191
254
|
}
|
192
255
|
});
|
193
|
-
}
|
256
|
+
};
|
257
|
+
const renderMultiSelectColumn = (column) => {
|
194
258
|
const {
|
195
|
-
name
|
196
|
-
head
|
197
|
-
headAlign
|
198
|
-
width
|
199
|
-
fixed
|
200
|
-
} =
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
259
|
+
name,
|
260
|
+
head,
|
261
|
+
headAlign,
|
262
|
+
width,
|
263
|
+
fixed
|
264
|
+
} = column;
|
265
|
+
const {
|
266
|
+
code
|
267
|
+
} = column;
|
268
|
+
return createVNode(ElTableColumn, {
|
269
|
+
"label": head,
|
270
|
+
"headerAlign": headAlign,
|
271
|
+
"prop": name,
|
272
|
+
"width": width,
|
273
|
+
"fixed": fixed,
|
274
|
+
"showOverflowTooltip": true
|
210
275
|
}, {
|
211
|
-
default: (
|
276
|
+
default: (scope) => {
|
212
277
|
const {
|
213
|
-
row
|
214
|
-
column:
|
215
|
-
} =
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
278
|
+
row,
|
279
|
+
column: column2
|
280
|
+
} = scope;
|
281
|
+
const cellValue = row[column2.property];
|
282
|
+
let codeName, codeData, codeContent;
|
283
|
+
if (!code) {
|
284
|
+
codeContent = null;
|
285
|
+
} else if (typeof code === "string") {
|
286
|
+
codeName = code;
|
287
|
+
codeData = Throne.getCode(codeName);
|
288
|
+
codeContent = getMultiCodeContent(codeData.value, cellValue);
|
289
|
+
} else {
|
290
|
+
codeData = code;
|
291
|
+
codeContent = getMultiCodeContent(codeData, cellValue);
|
292
|
+
}
|
293
|
+
return createVNode("span", {
|
294
|
+
"class": "cell-multiselect"
|
295
|
+
}, [codeContent]);
|
220
296
|
}
|
221
297
|
});
|
222
|
-
}
|
298
|
+
};
|
299
|
+
const renderButtongroupColumn = (column) => {
|
223
300
|
const {
|
224
|
-
name
|
225
|
-
head
|
226
|
-
headAlign
|
227
|
-
width
|
228
|
-
fixed
|
229
|
-
} =
|
230
|
-
return
|
231
|
-
label:
|
232
|
-
headerAlign:
|
233
|
-
prop:
|
234
|
-
width:
|
235
|
-
fixed:
|
301
|
+
name,
|
302
|
+
head,
|
303
|
+
headAlign,
|
304
|
+
width,
|
305
|
+
fixed
|
306
|
+
} = column;
|
307
|
+
return createVNode(ElTableColumn, {
|
308
|
+
"label": head,
|
309
|
+
"headerAlign": headAlign,
|
310
|
+
"prop": name,
|
311
|
+
"width": width,
|
312
|
+
"fixed": fixed
|
236
313
|
}, {
|
237
|
-
default: (
|
238
|
-
var
|
239
|
-
const
|
240
|
-
rowData:
|
241
|
-
column
|
242
|
-
rowIndex:
|
314
|
+
default: (scope) => {
|
315
|
+
var _a, _b;
|
316
|
+
const children = (_b = (_a = column.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a, {
|
317
|
+
rowData: scope.row,
|
318
|
+
column,
|
319
|
+
rowIndex: scope.$index
|
243
320
|
});
|
244
|
-
return
|
245
|
-
class: "cell-buttongroup"
|
246
|
-
}, [
|
247
|
-
default: () => [
|
321
|
+
return createVNode("div", {
|
322
|
+
"class": "cell-buttongroup"
|
323
|
+
}, [createVNode(Space, null, _isSlot$1(children) ? children : {
|
324
|
+
default: () => [children]
|
248
325
|
})]);
|
249
326
|
}
|
250
327
|
});
|
251
|
-
}
|
328
|
+
};
|
329
|
+
const renderColumngroupColumn = (column) => {
|
330
|
+
const {
|
331
|
+
head,
|
332
|
+
headAlign
|
333
|
+
} = column;
|
252
334
|
const {
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
return o(w, {
|
259
|
-
label: e,
|
260
|
-
headerAlign: n
|
335
|
+
children
|
336
|
+
} = column;
|
337
|
+
return createVNode(ElTableColumn, {
|
338
|
+
"label": head,
|
339
|
+
"headerAlign": headAlign
|
261
340
|
}, {
|
262
|
-
default: (
|
341
|
+
default: (scope) => {
|
342
|
+
return renderColumns(children);
|
343
|
+
}
|
263
344
|
});
|
264
|
-
}
|
345
|
+
};
|
346
|
+
const renderDiyColumn = (column) => {
|
265
347
|
const {
|
266
|
-
name
|
267
|
-
head
|
268
|
-
headAlign
|
269
|
-
width
|
270
|
-
fixed
|
271
|
-
} =
|
272
|
-
return
|
273
|
-
label:
|
274
|
-
headerAlign:
|
275
|
-
prop:
|
276
|
-
width:
|
277
|
-
fixed:
|
348
|
+
name,
|
349
|
+
head,
|
350
|
+
headAlign,
|
351
|
+
width,
|
352
|
+
fixed
|
353
|
+
} = column;
|
354
|
+
return createVNode(ElTableColumn, {
|
355
|
+
"label": head,
|
356
|
+
"headerAlign": headAlign,
|
357
|
+
"prop": name,
|
358
|
+
"width": width,
|
359
|
+
"fixed": fixed
|
278
360
|
}, {
|
279
|
-
default: (
|
280
|
-
var
|
281
|
-
const
|
282
|
-
rowData:
|
283
|
-
column
|
284
|
-
rowIndex:
|
361
|
+
default: (scope) => {
|
362
|
+
var _a, _b;
|
363
|
+
const children = (_b = (_a = column.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a, {
|
364
|
+
rowData: scope.row,
|
365
|
+
column,
|
366
|
+
rowIndex: scope.$index
|
285
367
|
});
|
286
|
-
return
|
287
|
-
class: "cell-diy"
|
288
|
-
}, [
|
368
|
+
return createVNode("div", {
|
369
|
+
"class": "cell-diy"
|
370
|
+
}, [children, createTextVNode(" ")]);
|
289
371
|
}
|
290
372
|
});
|
291
|
-
}
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
373
|
+
};
|
374
|
+
const renderColumns = (columns2) => {
|
375
|
+
return columns2 == null ? void 0 : columns2.map((c) => {
|
376
|
+
if (c.type === "OQuerytableColumnString") {
|
377
|
+
return renderStringColumn(c);
|
378
|
+
} else if (c.type === "OQuerytableColumnLink") {
|
379
|
+
return renderLinkColumn(c);
|
380
|
+
} else if (c.type === "OQuerytableColumnNumber") {
|
381
|
+
return renderNumberColumn(c);
|
382
|
+
} else if (c.type === "OQuerytableColumnDate") {
|
383
|
+
return renderDateColumn(c);
|
384
|
+
} else if (c.type === "OQuerytableColumnSingleselect") {
|
385
|
+
return renderSingleSelectColumn(c);
|
386
|
+
} else if (c.type === "OQuerytableColumnMultiselect") {
|
387
|
+
return renderMultiSelectColumn(c);
|
388
|
+
} else if (c.type === "OQuerytableColumnButtongroup") {
|
389
|
+
return renderButtongroupColumn(c);
|
390
|
+
} else if (c.type === "OQuerytableColumngroup") {
|
391
|
+
return renderColumngroupColumn(c);
|
392
|
+
} else if (c.type === "OQuerytableColumnDiy") {
|
393
|
+
return renderDiyColumn(c);
|
394
|
+
} else {
|
395
|
+
throw new OrionError(`OQuerytable不能正确渲染'${c.type}'子组件。`);
|
396
|
+
}
|
397
|
+
});
|
398
|
+
};
|
399
|
+
return createVNode("div", {
|
400
|
+
"class": [cn, attrs.class],
|
401
|
+
"style": [style.value, attrs.style]
|
402
|
+
}, [createVNode(ElTable, {
|
403
|
+
"ref": elTableRef,
|
404
|
+
"border": true,
|
405
|
+
"data": data,
|
406
|
+
"height": "100%",
|
407
|
+
"style": {
|
321
408
|
width: "100%"
|
322
409
|
},
|
323
|
-
"onSelection-change": (
|
324
|
-
"highlight-current-row":
|
325
|
-
"onCurrent-change": (
|
326
|
-
"onRow-click": (
|
327
|
-
name:
|
328
|
-
head:
|
329
|
-
},
|
330
|
-
"onRow-dblclick": (
|
331
|
-
name:
|
332
|
-
head:
|
333
|
-
},
|
334
|
-
"onCell-click": (
|
335
|
-
name:
|
336
|
-
head:
|
337
|
-
},
|
338
|
-
"onCell-dblclick": (
|
339
|
-
name:
|
340
|
-
head:
|
341
|
-
},
|
342
|
-
size:
|
410
|
+
"onSelection-change": (rows) => emit("selectionChange", rows),
|
411
|
+
"highlight-current-row": currentRowMode,
|
412
|
+
"onCurrent-change": (currentRow, oldCurrentRow) => emit("currentRowChange", currentRow, oldCurrentRow),
|
413
|
+
"onRow-click": (row, column, event) => emit("rowClick", row, {
|
414
|
+
name: column.property,
|
415
|
+
head: column.label
|
416
|
+
}, event),
|
417
|
+
"onRow-dblclick": (row, column, event) => emit("rowDblclick", row, {
|
418
|
+
name: column.property,
|
419
|
+
head: column.label
|
420
|
+
}, event),
|
421
|
+
"onCell-click": (row, column, cell, event) => emit("cellClick", row, {
|
422
|
+
name: column.property,
|
423
|
+
head: column.label
|
424
|
+
}, cell, event),
|
425
|
+
"onCell-dblclick": (row, column, cell, event) => emit("cellDblclick", row, {
|
426
|
+
name: column.property,
|
427
|
+
head: column.label
|
428
|
+
}, cell, event),
|
429
|
+
"size": size
|
343
430
|
}, {
|
344
|
-
default: () => [
|
431
|
+
default: () => [showRowNumber && renderIndexColumn(), selectionMode && renderSelectionColumn(), renderColumns(columns.value)]
|
345
432
|
})]);
|
346
433
|
};
|
347
434
|
}
|
348
|
-
})
|
435
|
+
});
|
436
|
+
const querytableColumnIndexProps = () => ({});
|
437
|
+
const QuerytableColumnIndex = /* @__PURE__ */ defineComponent({
|
349
438
|
name: "OQuerytableColumnIndex",
|
350
|
-
inheritAttrs:
|
351
|
-
props:
|
352
|
-
setup(
|
353
|
-
slots
|
354
|
-
attrs
|
355
|
-
emit
|
356
|
-
expose
|
439
|
+
inheritAttrs: false,
|
440
|
+
props: querytableColumnIndexProps(),
|
441
|
+
setup(props, {
|
442
|
+
slots,
|
443
|
+
attrs,
|
444
|
+
emit,
|
445
|
+
expose
|
357
446
|
}) {
|
358
447
|
return () => null;
|
359
448
|
}
|
360
|
-
})
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
449
|
+
});
|
450
|
+
const querytableColumnStringProps = () => ({
|
451
|
+
head: stringType(),
|
452
|
+
headAlign: stringType(),
|
453
|
+
name: stringType(),
|
454
|
+
width: someType([Boolean, String]),
|
455
|
+
fixed: someType([Boolean, String])
|
456
|
+
});
|
457
|
+
const QuerytableColumnString = /* @__PURE__ */ defineComponent({
|
367
458
|
name: "OQuerytableColumnString",
|
368
|
-
inheritAttrs:
|
369
|
-
props:
|
370
|
-
setup(
|
371
|
-
slots
|
372
|
-
attrs
|
373
|
-
emit
|
374
|
-
expose
|
459
|
+
inheritAttrs: false,
|
460
|
+
props: querytableColumnStringProps(),
|
461
|
+
setup(props, {
|
462
|
+
slots,
|
463
|
+
attrs,
|
464
|
+
emit,
|
465
|
+
expose
|
375
466
|
}) {
|
376
467
|
return () => null;
|
377
468
|
}
|
378
|
-
})
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
469
|
+
});
|
470
|
+
const querytableColumnLinkProps = () => ({
|
471
|
+
head: stringType(),
|
472
|
+
headAlign: stringType(),
|
473
|
+
name: stringType(),
|
474
|
+
width: someType([Boolean, String]),
|
475
|
+
fixed: someType([Boolean, String])
|
476
|
+
});
|
477
|
+
const QuerytableColumnLink = /* @__PURE__ */ defineComponent({
|
385
478
|
name: "OQuerytableColumnLink",
|
386
|
-
inheritAttrs:
|
387
|
-
props:
|
388
|
-
setup(
|
389
|
-
slots
|
390
|
-
attrs
|
391
|
-
emit
|
392
|
-
expose
|
479
|
+
inheritAttrs: false,
|
480
|
+
props: querytableColumnLinkProps(),
|
481
|
+
setup(props, {
|
482
|
+
slots,
|
483
|
+
attrs,
|
484
|
+
emit,
|
485
|
+
expose
|
393
486
|
}) {
|
394
487
|
return () => null;
|
395
488
|
}
|
396
|
-
})
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
489
|
+
});
|
490
|
+
const querytableColumnNumberProps = () => ({
|
491
|
+
head: stringType(),
|
492
|
+
headAlign: stringType(),
|
493
|
+
name: stringType(),
|
494
|
+
width: someType([Boolean, String]),
|
495
|
+
fixed: someType([Boolean, String]),
|
496
|
+
thousandsSeparator: booleanType(true),
|
497
|
+
precision: numberType(-1),
|
498
|
+
percentage: booleanType(false)
|
499
|
+
});
|
500
|
+
const QuerytableColumnNumber = /* @__PURE__ */ defineComponent({
|
406
501
|
name: "OQuerytableColumnNumber",
|
407
|
-
inheritAttrs:
|
408
|
-
props:
|
409
|
-
setup(
|
410
|
-
slots
|
411
|
-
attrs
|
412
|
-
emit
|
413
|
-
expose
|
502
|
+
inheritAttrs: false,
|
503
|
+
props: querytableColumnNumberProps(),
|
504
|
+
setup(props, {
|
505
|
+
slots,
|
506
|
+
attrs,
|
507
|
+
emit,
|
508
|
+
expose
|
414
509
|
}) {
|
415
510
|
return () => null;
|
416
511
|
}
|
417
|
-
})
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
512
|
+
});
|
513
|
+
const querytableColumnDateProps = () => ({
|
514
|
+
head: stringType(),
|
515
|
+
headAlign: stringType(),
|
516
|
+
name: stringType(),
|
517
|
+
width: someType([Boolean, String]),
|
518
|
+
fixed: someType([Boolean, String]),
|
423
519
|
// Date
|
424
|
-
format:
|
425
|
-
sourceFormat:
|
426
|
-
})
|
520
|
+
format: stringType(),
|
521
|
+
sourceFormat: stringType()
|
522
|
+
});
|
523
|
+
const QuerytableColumnDate = /* @__PURE__ */ defineComponent({
|
427
524
|
name: "OQuerytableColumnDate",
|
428
|
-
inheritAttrs:
|
429
|
-
props:
|
430
|
-
setup(
|
431
|
-
slots
|
432
|
-
attrs
|
433
|
-
emit
|
434
|
-
expose
|
525
|
+
inheritAttrs: false,
|
526
|
+
props: querytableColumnDateProps(),
|
527
|
+
setup(props, {
|
528
|
+
slots,
|
529
|
+
attrs,
|
530
|
+
emit,
|
531
|
+
expose
|
435
532
|
}) {
|
436
533
|
return () => null;
|
437
534
|
}
|
438
|
-
})
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
535
|
+
});
|
536
|
+
const querytableColumnSingleselectProps = () => ({
|
537
|
+
head: stringType(),
|
538
|
+
headAlign: stringType(),
|
539
|
+
name: stringType(),
|
540
|
+
width: someType([Boolean, String]),
|
541
|
+
fixed: someType([Boolean, String]),
|
542
|
+
code: someType([String, Array])
|
543
|
+
});
|
544
|
+
const QuerytableColumnSingleselect = /* @__PURE__ */ defineComponent({
|
446
545
|
name: "OQuerytableColumnSingleselect",
|
447
|
-
inheritAttrs:
|
448
|
-
props:
|
449
|
-
setup(
|
450
|
-
slots
|
451
|
-
attrs
|
452
|
-
emit
|
453
|
-
expose
|
546
|
+
inheritAttrs: false,
|
547
|
+
props: querytableColumnSingleselectProps(),
|
548
|
+
setup(props, {
|
549
|
+
slots,
|
550
|
+
attrs,
|
551
|
+
emit,
|
552
|
+
expose
|
454
553
|
}) {
|
455
554
|
return () => null;
|
456
555
|
}
|
457
|
-
})
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
556
|
+
});
|
557
|
+
const querytableColumnMultiselectProps = () => ({
|
558
|
+
head: stringType(),
|
559
|
+
headAlign: stringType(),
|
560
|
+
name: stringType(),
|
561
|
+
width: someType([Boolean, String]),
|
562
|
+
fixed: someType([Boolean, String]),
|
563
|
+
code: someType([String, Array])
|
564
|
+
});
|
565
|
+
const QuerytableColumnMultiselect = /* @__PURE__ */ defineComponent({
|
465
566
|
name: "OQuerytableColumnMultiselect",
|
466
|
-
inheritAttrs:
|
467
|
-
props:
|
468
|
-
setup(
|
469
|
-
slots
|
470
|
-
attrs
|
471
|
-
emit
|
472
|
-
expose
|
567
|
+
inheritAttrs: false,
|
568
|
+
props: querytableColumnMultiselectProps(),
|
569
|
+
setup(props, {
|
570
|
+
slots,
|
571
|
+
attrs,
|
572
|
+
emit,
|
573
|
+
expose
|
473
574
|
}) {
|
474
575
|
return () => null;
|
475
576
|
}
|
476
|
-
})
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
577
|
+
});
|
578
|
+
const querytableColumnButtongroupProps = () => ({
|
579
|
+
head: stringType(),
|
580
|
+
headAlign: stringType(),
|
581
|
+
name: stringType(),
|
582
|
+
width: someType([Boolean, String]),
|
583
|
+
fixed: someType([Boolean, String])
|
584
|
+
});
|
585
|
+
const QuerytableColumnButtongroup = /* @__PURE__ */ defineComponent({
|
483
586
|
name: "OQuerytableColumnButtongroup",
|
484
|
-
inheritAttrs:
|
485
|
-
props:
|
587
|
+
inheritAttrs: false,
|
588
|
+
props: querytableColumnButtongroupProps(),
|
486
589
|
slots: Object,
|
487
|
-
setup(
|
488
|
-
slots
|
489
|
-
attrs
|
490
|
-
emit
|
491
|
-
expose
|
590
|
+
setup(props, {
|
591
|
+
slots,
|
592
|
+
attrs,
|
593
|
+
emit,
|
594
|
+
expose
|
492
595
|
}) {
|
493
596
|
return () => null;
|
494
597
|
}
|
495
598
|
});
|
496
|
-
function
|
497
|
-
return typeof
|
599
|
+
function _isSlot(s) {
|
600
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
498
601
|
}
|
499
|
-
const
|
500
|
-
type:
|
501
|
-
})
|
602
|
+
const querytableCellButtonProps = () => ({
|
603
|
+
type: stringType()
|
604
|
+
});
|
605
|
+
const QuerytableCellButton = /* @__PURE__ */ defineComponent({
|
502
606
|
name: "OQuerytableCellButton",
|
503
|
-
inheritAttrs:
|
504
|
-
props:
|
607
|
+
inheritAttrs: false,
|
608
|
+
props: querytableCellButtonProps(),
|
505
609
|
emits: ["click"],
|
506
|
-
setup(
|
507
|
-
slots
|
508
|
-
attrs
|
509
|
-
emit
|
510
|
-
expose
|
610
|
+
setup(props, {
|
611
|
+
slots,
|
612
|
+
attrs,
|
613
|
+
emit,
|
614
|
+
expose
|
511
615
|
}) {
|
512
|
-
const
|
513
|
-
|
616
|
+
const handleClick = (event) => {
|
617
|
+
emit("click", event);
|
514
618
|
};
|
515
619
|
return () => {
|
516
|
-
var
|
620
|
+
var _a;
|
517
621
|
const {
|
518
|
-
type
|
519
|
-
} =
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
622
|
+
type
|
623
|
+
} = props;
|
624
|
+
const children = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
625
|
+
return createVNode(ElButton, {
|
626
|
+
"link": true,
|
627
|
+
"type": type,
|
628
|
+
"size": "small",
|
629
|
+
"onClick": handleClick
|
630
|
+
}, _isSlot(children) ? children : {
|
631
|
+
default: () => [children]
|
527
632
|
});
|
528
633
|
};
|
529
634
|
}
|
530
|
-
})
|
531
|
-
|
532
|
-
|
533
|
-
|
635
|
+
});
|
636
|
+
const querytableColumngroupProps = () => ({
|
637
|
+
head: stringType(),
|
638
|
+
headAlign: stringType()
|
639
|
+
});
|
640
|
+
const QuerytableColumngroup = /* @__PURE__ */ defineComponent({
|
534
641
|
name: "OQuerytableColumngroup",
|
535
|
-
inheritAttrs:
|
536
|
-
props:
|
537
|
-
setup(
|
538
|
-
slots
|
539
|
-
attrs
|
540
|
-
emit
|
541
|
-
expose
|
642
|
+
inheritAttrs: false,
|
643
|
+
props: querytableColumngroupProps(),
|
644
|
+
setup(props, {
|
645
|
+
slots,
|
646
|
+
attrs,
|
647
|
+
emit,
|
648
|
+
expose
|
542
649
|
}) {
|
543
650
|
return () => null;
|
544
651
|
}
|
545
|
-
})
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
652
|
+
});
|
653
|
+
const querytableColumnDiyProps = () => ({
|
654
|
+
head: stringType(),
|
655
|
+
headAlign: stringType(),
|
656
|
+
name: stringType(),
|
657
|
+
width: someType([Boolean, String]),
|
658
|
+
fixed: someType([Boolean, String])
|
659
|
+
});
|
660
|
+
const QuerytableColumnDiy = /* @__PURE__ */ defineComponent({
|
552
661
|
name: "OQuerytableColumnDiy",
|
553
|
-
inheritAttrs:
|
554
|
-
props:
|
662
|
+
inheritAttrs: false,
|
663
|
+
props: querytableColumnDiyProps(),
|
555
664
|
slots: Object,
|
556
|
-
setup(
|
557
|
-
slots
|
558
|
-
attrs
|
559
|
-
emit
|
560
|
-
expose
|
665
|
+
setup(props, {
|
666
|
+
slots,
|
667
|
+
attrs,
|
668
|
+
emit,
|
669
|
+
expose
|
561
670
|
}) {
|
562
671
|
return () => null;
|
563
672
|
}
|
564
|
-
})
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
673
|
+
});
|
674
|
+
const Querytable = withInstall(Querytable$1, {
|
675
|
+
QuerytableColumnIndex,
|
676
|
+
QuerytableColumnString,
|
677
|
+
QuerytableColumnLink,
|
678
|
+
QuerytableColumnNumber,
|
679
|
+
QuerytableColumnDate,
|
680
|
+
QuerytableColumnSingleselect,
|
681
|
+
QuerytableColumnMultiselect,
|
682
|
+
QuerytableColumnButtongroup,
|
683
|
+
QuerytableCellButton,
|
684
|
+
QuerytableColumngroup,
|
685
|
+
QuerytableColumnDiy
|
576
686
|
});
|
577
687
|
export {
|
578
|
-
|
688
|
+
Querytable as default
|
579
689
|
};
|
580
690
|
//# sourceMappingURL=index.js.map
|