@funcho/ui 1.1.31 → 1.1.33
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/README.md +2 -0
- package/dist/cjs/business/DataTable/DataTable.vue.js +16 -2
- package/dist/cjs/business/DataTableDialog/DataTableDialog.vue.js +135 -0
- package/dist/cjs/business/DataTableDialog/DataTableDialog.vue3.js +10 -0
- package/dist/cjs/business/DataTableDialog/index.js +12 -0
- package/dist/cjs/business/TreeCheckFilter/TreeCheckFilter.vue.js +13 -6
- package/dist/cjs/business/TreeTransfer/TreeTransfer.vue.js +2 -2
- package/dist/cjs/business/TreeTransferDialog/TreeTransferDialog.vue.js +121 -0
- package/dist/cjs/business/TreeTransferDialog/TreeTransferDialog.vue3.js +10 -0
- package/dist/cjs/business/TreeTransferDialog/index.js +12 -0
- package/dist/cjs/business/index.js +4 -0
- package/dist/cjs/components/Text/Text.vue.js +2 -20
- package/dist/cjs/index.js +10 -6
- package/dist/cjs/packages/ui/package.json.js +1 -1
- package/dist/esm/business/DataTable/DataTable.vue.mjs +16 -2
- package/dist/esm/business/DataTableDialog/DataTableDialog.vue.mjs +131 -0
- package/dist/esm/business/DataTableDialog/DataTableDialog.vue3.mjs +6 -0
- package/dist/esm/business/DataTableDialog/index.mjs +7 -0
- package/dist/esm/business/TreeCheckFilter/TreeCheckFilter.vue.mjs +13 -6
- package/dist/esm/business/TreeTransfer/TreeTransfer.vue.mjs +2 -2
- package/dist/esm/business/TreeTransferDialog/TreeTransferDialog.vue.mjs +117 -0
- package/dist/esm/business/TreeTransferDialog/TreeTransferDialog.vue3.mjs +6 -0
- package/dist/esm/business/TreeTransferDialog/index.mjs +7 -0
- package/dist/esm/business/index.mjs +2 -0
- package/dist/esm/components/Text/Text.vue.mjs +3 -21
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/packages/ui/package.json.mjs +1 -1
- package/dist/types/business/DataTable/DataTable.types.d.ts +33 -4
- package/dist/types/business/DataTable/DataTable.vue.d.ts +22 -52
- package/dist/types/business/DataTable/index.d.ts +15 -198
- package/dist/types/business/DataTableDialog/DataTableDialog.types.d.ts +1 -0
- package/dist/types/business/DataTableDialog/DataTableDialog.vue.d.ts +1605 -0
- package/dist/types/business/DataTableDialog/index.d.ts +1688 -0
- package/dist/types/business/TreeCheckFilter/TreeCheckFilter.vue.d.ts +22 -19
- package/dist/types/business/TreeCheckFilter/index.d.ts +6 -0
- package/dist/types/business/TreeTransfer/TreeTransfer.vue.d.ts +8 -0
- package/dist/types/business/TreeTransfer/index.d.ts +8 -0
- package/dist/types/business/TreeTransferDialog/TreeTransferDialog.types.d.ts +1 -0
- package/dist/types/business/TreeTransferDialog/TreeTransferDialog.vue.d.ts +10428 -0
- package/dist/types/business/TreeTransferDialog/index.d.ts +10496 -0
- package/dist/types/business/VerticalLayout/VerticalLayout.vue.d.ts +3 -3
- package/dist/types/business/VerticalLayout/index.d.ts +48 -0
- package/dist/types/business/index.d.ts +2 -0
- package/dist/types/components/Text/Text.vue.d.ts +1 -1
- package/dist/types/components/Text/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, createBlock, openBlock, createSlots, withCtx, createElementVNode, normalizeStyle, createVNode, mergeProps, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import _sfc_main$3 from '../../components/Button/Button.vue.mjs';
|
|
3
|
+
/* empty css */
|
|
4
|
+
import _sfc_main$1 from '../../components/Dialog/Dialog.vue.mjs';
|
|
5
|
+
/* empty css */
|
|
6
|
+
import _sfc_main$2 from '../DataTable/DataTable.vue.mjs';
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { FcNotification } from '../../components/Notification/index.mjs';
|
|
9
|
+
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
...{
|
|
12
|
+
name: "FcProDataTableDialog",
|
|
13
|
+
inheritAttrs: false
|
|
14
|
+
},
|
|
15
|
+
__name: "DataTableDialog",
|
|
16
|
+
props: {
|
|
17
|
+
title: { default: "新增" },
|
|
18
|
+
width: { default: 860 },
|
|
19
|
+
height: { default: "50vh" },
|
|
20
|
+
cancelButtonText: { default: "取消" },
|
|
21
|
+
confirmButtonText: { default: "确定" },
|
|
22
|
+
showCancelButton: { type: Boolean, default: true },
|
|
23
|
+
showConfirmButton: { type: Boolean, default: true },
|
|
24
|
+
isPagination: { type: Boolean, default: false },
|
|
25
|
+
submitApi: { type: Function, default: void 0 },
|
|
26
|
+
successMessage: { default: "提交成功!" },
|
|
27
|
+
showSuccessMessage: { type: Boolean, default: true }
|
|
28
|
+
},
|
|
29
|
+
emits: ["submit", "cancel"],
|
|
30
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
31
|
+
const tableRef = ref();
|
|
32
|
+
const props = __props;
|
|
33
|
+
const containerHeight = computed(() => {
|
|
34
|
+
if (typeof props.height === "number") {
|
|
35
|
+
return `${props.height}px`;
|
|
36
|
+
}
|
|
37
|
+
return props.height;
|
|
38
|
+
});
|
|
39
|
+
const visible = ref(false);
|
|
40
|
+
const emits = __emit;
|
|
41
|
+
const submitting = ref(false);
|
|
42
|
+
const handleConfirmClick = async () => {
|
|
43
|
+
try {
|
|
44
|
+
const tableData = tableRef.value?.tableData;
|
|
45
|
+
const selectedRows = tableRef.value?.selectedRows;
|
|
46
|
+
if (!props.submitApi) {
|
|
47
|
+
emits("submit", tableData, selectedRows);
|
|
48
|
+
visible.value = false;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
submitting.value = true;
|
|
52
|
+
const res = await props.submitApi(tableData, selectedRows);
|
|
53
|
+
emits("submit", tableData, selectedRows, res);
|
|
54
|
+
if (props.showSuccessMessage) {
|
|
55
|
+
FcNotification.success({
|
|
56
|
+
message: props.successMessage
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
visible.value = false;
|
|
60
|
+
} catch (err) {
|
|
61
|
+
console.error("提交失败", err);
|
|
62
|
+
} finally {
|
|
63
|
+
submitting.value = false;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const open = () => {
|
|
67
|
+
tableRef.value?.resetSearch();
|
|
68
|
+
visible.value = true;
|
|
69
|
+
};
|
|
70
|
+
const handleCancelClick = () => {
|
|
71
|
+
visible.value = false;
|
|
72
|
+
emits("cancel");
|
|
73
|
+
};
|
|
74
|
+
const close = () => {
|
|
75
|
+
visible.value = false;
|
|
76
|
+
};
|
|
77
|
+
__expose({
|
|
78
|
+
open,
|
|
79
|
+
close
|
|
80
|
+
});
|
|
81
|
+
return (_ctx, _cache) => {
|
|
82
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
83
|
+
modelValue: visible.value,
|
|
84
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
85
|
+
title: __props.title,
|
|
86
|
+
width: __props.width
|
|
87
|
+
}, createSlots({
|
|
88
|
+
default: withCtx(() => [
|
|
89
|
+
createElementVNode("div", {
|
|
90
|
+
style: normalizeStyle({ height: containerHeight.value })
|
|
91
|
+
}, [
|
|
92
|
+
createVNode(_sfc_main$2, mergeProps({
|
|
93
|
+
ref_key: "tableRef",
|
|
94
|
+
ref: tableRef
|
|
95
|
+
}, _ctx.$attrs, { "is-pagination": __props.isPagination }), null, 16, ["is-pagination"])
|
|
96
|
+
], 4)
|
|
97
|
+
]),
|
|
98
|
+
_: 2
|
|
99
|
+
}, [
|
|
100
|
+
__props.showCancelButton || __props.showConfirmButton ? {
|
|
101
|
+
name: "footer",
|
|
102
|
+
fn: withCtx(() => [
|
|
103
|
+
__props.showCancelButton ? (openBlock(), createBlock(_sfc_main$3, {
|
|
104
|
+
key: 0,
|
|
105
|
+
onClick: handleCancelClick
|
|
106
|
+
}, {
|
|
107
|
+
default: withCtx(() => [
|
|
108
|
+
createTextVNode(toDisplayString(__props.cancelButtonText), 1)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
})) : createCommentVNode("", true),
|
|
112
|
+
__props.showConfirmButton ? (openBlock(), createBlock(_sfc_main$3, {
|
|
113
|
+
key: 1,
|
|
114
|
+
type: "primary",
|
|
115
|
+
loading: submitting.value,
|
|
116
|
+
onClick: handleConfirmClick
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
createTextVNode(toDisplayString(__props.confirmButtonText), 1)
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["loading"])) : createCommentVNode("", true)
|
|
123
|
+
]),
|
|
124
|
+
key: "0"
|
|
125
|
+
} : void 0
|
|
126
|
+
]), 1032, ["modelValue", "title", "width"]);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
export { _sfc_main as default };
|
|
@@ -92,7 +92,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
92
|
data: { default: () => [] },
|
|
93
93
|
nodeKey: { default: "value" },
|
|
94
94
|
showCheckbox: { type: Boolean, default: true },
|
|
95
|
-
showSearch: { type: Boolean, default: true }
|
|
95
|
+
showSearch: { type: Boolean, default: true },
|
|
96
|
+
props: { default: () => ({
|
|
97
|
+
children: "children",
|
|
98
|
+
label: "label",
|
|
99
|
+
disabled: "disabled"
|
|
100
|
+
}) }
|
|
96
101
|
},
|
|
97
102
|
setup(__props, { expose: __expose }) {
|
|
98
103
|
const ns = useNamespace("pro-tree-check-filter");
|
|
@@ -100,9 +105,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
100
105
|
const { height: treeCheckFilterHeaderHeight } = useElementSize(treeCheckFilterHeader, void 0, {
|
|
101
106
|
box: "border-box"
|
|
102
107
|
});
|
|
103
|
-
const
|
|
108
|
+
const myProps = __props;
|
|
104
109
|
watch(
|
|
105
|
-
() =>
|
|
110
|
+
() => myProps.data,
|
|
106
111
|
() => {
|
|
107
112
|
checkAll.value = false;
|
|
108
113
|
indeterminate.value = false;
|
|
@@ -118,7 +123,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
123
|
};
|
|
119
124
|
const filterNode = (value, data) => {
|
|
120
125
|
if (!value) return true;
|
|
121
|
-
|
|
126
|
+
const labelKey = typeof myProps.props?.label === "string" ? myProps.props.label : "label";
|
|
127
|
+
return String(data?.[labelKey] ?? "").toLocaleLowerCase().includes(value.toLocaleLowerCase());
|
|
122
128
|
};
|
|
123
129
|
const handleCheckAllChange = () => {
|
|
124
130
|
if (checkAll.value) {
|
|
@@ -131,7 +137,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
137
|
const visibleKeys = [];
|
|
132
138
|
Object.values(nodesMap).forEach((node) => {
|
|
133
139
|
if (node.level > 0 && node.visible && node.isLeaf && !node.disabled) {
|
|
134
|
-
visibleKeys.push(node.data[
|
|
140
|
+
visibleKeys.push(node.data[myProps.nodeKey]);
|
|
135
141
|
}
|
|
136
142
|
});
|
|
137
143
|
const finalKeys = Array.from(/* @__PURE__ */ new Set([...currentCheckedKeys, ...visibleKeys]));
|
|
@@ -217,12 +223,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
217
223
|
createVNode(unref(FcTree), mergeProps(_ctx.$attrs, {
|
|
218
224
|
ref_key: "treeRef",
|
|
219
225
|
ref: treeRef,
|
|
226
|
+
props: __props.props,
|
|
220
227
|
"show-checkbox": __props.showCheckbox,
|
|
221
228
|
data: __props.data,
|
|
222
229
|
"filter-node-method": filterNode,
|
|
223
230
|
"node-key": __props.nodeKey,
|
|
224
231
|
onCheck: handleTreeCheckChange
|
|
225
|
-
}), null, 16, ["show-checkbox", "data", "node-key"])
|
|
232
|
+
}), null, 16, ["props", "show-checkbox", "data", "node-key"])
|
|
226
233
|
]),
|
|
227
234
|
_: 1
|
|
228
235
|
})
|
|
@@ -142,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
142
142
|
!__props.leftProps.hiddenBtn ? (openBlock(), createBlock(unref(FcTooltip), {
|
|
143
143
|
key: 0,
|
|
144
144
|
content: __props.leftProps.tooltip || "新增",
|
|
145
|
-
placement: "
|
|
145
|
+
placement: "right",
|
|
146
146
|
"fallback-placements": ["top", "bottom", "left", "right"]
|
|
147
147
|
}, {
|
|
148
148
|
default: withCtx(() => [
|
|
@@ -162,7 +162,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
162
162
|
!__props.rightProps.hiddenBtn ? (openBlock(), createBlock(unref(FcTooltip), {
|
|
163
163
|
key: 1,
|
|
164
164
|
content: __props.rightProps.tooltip || "删除",
|
|
165
|
-
placement: "
|
|
165
|
+
placement: "left",
|
|
166
166
|
"fallback-placements": ["top", "bottom", "left", "right"]
|
|
167
167
|
}, {
|
|
168
168
|
default: withCtx(() => [
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, resolveDirective, createBlock, openBlock, createSlots, withCtx, withDirectives, createElementBlock, normalizeStyle, createVNode, mergeProps, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import _sfc_main$3 from '../../components/Button/Button.vue.mjs';
|
|
3
|
+
/* empty css */
|
|
4
|
+
import _sfc_main$1 from '../../components/Dialog/Dialog.vue.mjs';
|
|
5
|
+
/* empty css */
|
|
6
|
+
import _sfc_main$2 from '../TreeTransfer/TreeTransfer.vue.mjs';
|
|
7
|
+
/* empty css */
|
|
8
|
+
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
...{
|
|
11
|
+
name: "FcProTreeTransferDialog",
|
|
12
|
+
inheritAttrs: false
|
|
13
|
+
},
|
|
14
|
+
__name: "TreeTransferDialog",
|
|
15
|
+
props: {
|
|
16
|
+
title: { default: "新增" },
|
|
17
|
+
width: { default: 936 },
|
|
18
|
+
height: { default: "50vh" },
|
|
19
|
+
cancelButtonText: { default: "取消" },
|
|
20
|
+
loading: { type: Boolean, default: false },
|
|
21
|
+
confirmButtonText: { default: "确定" },
|
|
22
|
+
showCancelButton: { type: Boolean, default: false },
|
|
23
|
+
showConfirmButton: { type: Boolean, default: false }
|
|
24
|
+
},
|
|
25
|
+
emits: ["submit", "cancel", "add", "remove"],
|
|
26
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
27
|
+
const treeTransferRef = ref();
|
|
28
|
+
const props = __props;
|
|
29
|
+
const containerHeight = computed(() => {
|
|
30
|
+
if (typeof props.height === "number") {
|
|
31
|
+
return `${props.height}px`;
|
|
32
|
+
}
|
|
33
|
+
return props.height;
|
|
34
|
+
});
|
|
35
|
+
const visible = ref(false);
|
|
36
|
+
const emits = __emit;
|
|
37
|
+
const handleAddClick = (instance, nodes, keys) => {
|
|
38
|
+
emits("add", instance, nodes, keys);
|
|
39
|
+
};
|
|
40
|
+
const handleRemoveClick = (instance, nodes, keys) => {
|
|
41
|
+
emits("remove", instance, nodes, keys);
|
|
42
|
+
};
|
|
43
|
+
const submitting = ref(false);
|
|
44
|
+
const handleConfirmClick = async () => {
|
|
45
|
+
emits("submit", treeTransferRef.value?.leftTreeRef, treeTransferRef.value.rightTreeRef);
|
|
46
|
+
};
|
|
47
|
+
const open = () => {
|
|
48
|
+
visible.value = true;
|
|
49
|
+
};
|
|
50
|
+
const handleCancelClick = () => {
|
|
51
|
+
visible.value = false;
|
|
52
|
+
emits("cancel");
|
|
53
|
+
};
|
|
54
|
+
const close = () => {
|
|
55
|
+
visible.value = false;
|
|
56
|
+
};
|
|
57
|
+
__expose({
|
|
58
|
+
open,
|
|
59
|
+
close
|
|
60
|
+
});
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
const _directive_loading = resolveDirective("loading");
|
|
63
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
64
|
+
modelValue: visible.value,
|
|
65
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
66
|
+
title: __props.title,
|
|
67
|
+
width: __props.width
|
|
68
|
+
}, createSlots({
|
|
69
|
+
default: withCtx(() => [
|
|
70
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
71
|
+
style: normalizeStyle({ height: containerHeight.value })
|
|
72
|
+
}, [
|
|
73
|
+
createVNode(_sfc_main$2, mergeProps(_ctx.$attrs, {
|
|
74
|
+
ref_key: "treeTransferRef",
|
|
75
|
+
ref: treeTransferRef,
|
|
76
|
+
onAdd: handleAddClick,
|
|
77
|
+
onRemove: handleRemoveClick
|
|
78
|
+
}), null, 16)
|
|
79
|
+
], 4)), [
|
|
80
|
+
[_directive_loading, __props.loading]
|
|
81
|
+
])
|
|
82
|
+
]),
|
|
83
|
+
_: 2
|
|
84
|
+
}, [
|
|
85
|
+
__props.showCancelButton || __props.showConfirmButton ? {
|
|
86
|
+
name: "footer",
|
|
87
|
+
fn: withCtx(() => [
|
|
88
|
+
__props.showCancelButton ? (openBlock(), createBlock(_sfc_main$3, {
|
|
89
|
+
key: 0,
|
|
90
|
+
onClick: handleCancelClick
|
|
91
|
+
}, {
|
|
92
|
+
default: withCtx(() => [
|
|
93
|
+
createTextVNode(toDisplayString(__props.cancelButtonText), 1)
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
})) : createCommentVNode("", true),
|
|
97
|
+
__props.showConfirmButton ? (openBlock(), createBlock(_sfc_main$3, {
|
|
98
|
+
key: 1,
|
|
99
|
+
type: "primary",
|
|
100
|
+
loading: submitting.value,
|
|
101
|
+
disabled: __props.loading,
|
|
102
|
+
onClick: handleConfirmClick
|
|
103
|
+
}, {
|
|
104
|
+
default: withCtx(() => [
|
|
105
|
+
createTextVNode(toDisplayString(__props.confirmButtonText), 1)
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["loading", "disabled"])) : createCommentVNode("", true)
|
|
109
|
+
]),
|
|
110
|
+
key: "0"
|
|
111
|
+
} : void 0
|
|
112
|
+
]), 1032, ["modelValue", "title", "width"]);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from './TreeTransferDialog.vue.mjs';
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { withInstall } from '../../_utils/with-install.mjs';
|
|
4
|
+
|
|
5
|
+
const FcProTreeTransferDialog = withInstall(_sfc_main);
|
|
6
|
+
|
|
7
|
+
export { FcProTreeTransferDialog, FcProTreeTransferDialog as default };
|
|
@@ -7,3 +7,5 @@ export { FcProEditFormCard } from './EditFormCard/index.mjs';
|
|
|
7
7
|
export { FcProFormDialog } from './FormDialog/index.mjs';
|
|
8
8
|
export { FcProQueryForm } from './QueryForm/index.mjs';
|
|
9
9
|
export { FcProVerticalLayout } from './VerticalLayout/index.mjs';
|
|
10
|
+
export { FcProTreeTransferDialog } from './TreeTransferDialog/index.mjs';
|
|
11
|
+
export { FcProDataTableDialog } from './DataTableDialog/index.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, createBlock, openBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
2
|
import { ElText } from '../../node_modules/.pnpm/element-plus@2.13.5_patch_hash_415fe9eaeb4c26121ef1304c7dfbfaa75441fcd0d7ca1a8beb1acd12_87ac520f28bb40f5a8b03aa48269c150/node_modules/element-plus/es/components/text/index.mjs';
|
|
3
3
|
import '../../_virtual/dayjs.min.mjs';
|
|
4
4
|
|
|
@@ -7,27 +7,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7
7
|
name: "FcText"
|
|
8
8
|
},
|
|
9
9
|
__name: "Text",
|
|
10
|
-
setup(__props
|
|
11
|
-
const elRef = ref();
|
|
12
|
-
__expose(
|
|
13
|
-
new Proxy(
|
|
14
|
-
{},
|
|
15
|
-
{
|
|
16
|
-
get(_, key) {
|
|
17
|
-
return elRef.value?.[key];
|
|
18
|
-
},
|
|
19
|
-
has(_, key) {
|
|
20
|
-
if (!elRef.value) return false;
|
|
21
|
-
return key in elRef.value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
)
|
|
25
|
-
);
|
|
10
|
+
setup(__props) {
|
|
26
11
|
return (_ctx, _cache) => {
|
|
27
|
-
return openBlock(), createBlock(unref(ElText), mergeProps(_ctx.$attrs, {
|
|
28
|
-
ref_key: "elRef",
|
|
29
|
-
ref: elRef
|
|
30
|
-
}), createSlots({ _: 2 }, [
|
|
12
|
+
return openBlock(), createBlock(unref(ElText), mergeProps(_ctx.$attrs, { ref: "elRef" }), createSlots({ _: 2 }, [
|
|
31
13
|
renderList(_ctx.$slots, (_, name) => {
|
|
32
14
|
return {
|
|
33
15
|
name,
|
package/dist/esm/index.mjs
CHANGED
|
@@ -95,6 +95,8 @@ export { FcProEditFormCard } from './business/EditFormCard/index.mjs';
|
|
|
95
95
|
export { FcProFormDialog } from './business/FormDialog/index.mjs';
|
|
96
96
|
export { FcProQueryForm } from './business/QueryForm/index.mjs';
|
|
97
97
|
export { FcProVerticalLayout } from './business/VerticalLayout/index.mjs';
|
|
98
|
+
export { FcProTreeTransferDialog } from './business/TreeTransferDialog/index.mjs';
|
|
99
|
+
export { FcProDataTableDialog } from './business/DataTableDialog/index.mjs';
|
|
98
100
|
|
|
99
101
|
const components = Object.keys(index$1).map((key) => {
|
|
100
102
|
return index$1[key];
|
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
searchSchema?: Array<any>;
|
|
4
|
-
};
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { TProFormField } from '../ProForm/ProForm.types';
|
|
5
3
|
export type RequestResult<T = any> = {
|
|
6
4
|
data: T[] | {
|
|
7
5
|
list: T[];
|
|
8
6
|
total: number;
|
|
9
7
|
};
|
|
10
8
|
};
|
|
9
|
+
export type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | '';
|
|
10
|
+
export type ButtonProps = {
|
|
11
|
+
label: string;
|
|
12
|
+
type?: ButtonType;
|
|
13
|
+
disabled?: boolean | ((row?: any) => boolean);
|
|
14
|
+
hidden?: boolean | ((row?: any) => boolean);
|
|
15
|
+
onClick: (row: any, index: number) => void;
|
|
16
|
+
directives?: Array<{
|
|
17
|
+
name: string;
|
|
18
|
+
value?: any;
|
|
19
|
+
arg?: any;
|
|
20
|
+
modifiers?: any;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
export type TFcProDataTableProps = {
|
|
24
|
+
hasIndex?: boolean;
|
|
25
|
+
selectable?: boolean;
|
|
26
|
+
height?: number;
|
|
27
|
+
columns?: Array<{
|
|
28
|
+
prop: string;
|
|
29
|
+
label: string;
|
|
30
|
+
showOverflowTooltip?: boolean;
|
|
31
|
+
render?: (row: any, index: number) => VNode;
|
|
32
|
+
}>;
|
|
33
|
+
isPagination?: boolean;
|
|
34
|
+
fields?: Array<TProFormField>;
|
|
35
|
+
request?: (params: any) => Promise<RequestResult<any>>;
|
|
36
|
+
actions?: Array<ButtonProps>;
|
|
37
|
+
actionsWidth?: number;
|
|
38
|
+
tools?: Array<ButtonProps>;
|
|
39
|
+
};
|
|
@@ -1,36 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RequestResult } from './DataTable.types';
|
|
3
|
-
import { TProFormField } from '../ProForm/ProForm.types';
|
|
4
|
-
type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | '';
|
|
5
|
-
type ButtonProps = {
|
|
6
|
-
label: string;
|
|
7
|
-
type?: ButtonType;
|
|
8
|
-
disabled?: boolean | ((row?: any) => boolean);
|
|
9
|
-
hidden?: boolean | ((row?: any) => boolean);
|
|
10
|
-
onClick: (row: any, index: number) => void;
|
|
11
|
-
directives?: Array<{
|
|
12
|
-
name: string;
|
|
13
|
-
value?: any;
|
|
14
|
-
arg?: any;
|
|
15
|
-
modifiers?: any;
|
|
16
|
-
}>;
|
|
17
|
-
};
|
|
18
|
-
type __VLS_Props = {
|
|
19
|
-
hasIndex?: boolean;
|
|
20
|
-
height?: number;
|
|
21
|
-
columns?: Array<{
|
|
22
|
-
prop: string;
|
|
23
|
-
label: string;
|
|
24
|
-
showOverflowTooltip?: boolean;
|
|
25
|
-
render?: (row: any, index: number) => VNode;
|
|
26
|
-
}>;
|
|
27
|
-
isPagination?: boolean;
|
|
28
|
-
fields?: Array<TProFormField>;
|
|
29
|
-
request?: (params: any) => Promise<RequestResult<any>>;
|
|
30
|
-
actions?: Array<ButtonProps>;
|
|
31
|
-
actionsWidth?: number;
|
|
32
|
-
tools?: Array<ButtonProps>;
|
|
33
|
-
};
|
|
1
|
+
import { ButtonProps, TFcProDataTableProps } from './DataTable.types';
|
|
34
2
|
declare function __VLS_template(): {
|
|
35
3
|
attrs: Partial<{}>;
|
|
36
4
|
slots: {
|
|
@@ -41,7 +9,7 @@ declare function __VLS_template(): {
|
|
|
41
9
|
$: import('vue').ComponentInternalInstance;
|
|
42
10
|
$data: {};
|
|
43
11
|
$props: {
|
|
44
|
-
readonly fields?: Array<TProFormField> | undefined;
|
|
12
|
+
readonly fields?: Array<import('..').TProFormField> | undefined;
|
|
45
13
|
readonly tools?: Array<{
|
|
46
14
|
label: string;
|
|
47
15
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -245,7 +213,7 @@ declare function __VLS_template(): {
|
|
|
245
213
|
labelPosition: "top" | "left" | "right";
|
|
246
214
|
labelWidth: string | number;
|
|
247
215
|
inline: boolean;
|
|
248
|
-
fields: Array<TProFormField>;
|
|
216
|
+
fields: Array<import('..').TProFormField>;
|
|
249
217
|
columns: number | "auto-fill" | "auto-fit";
|
|
250
218
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
251
219
|
formRef: ({
|
|
@@ -1034,7 +1002,7 @@ declare function __VLS_template(): {
|
|
|
1034
1002
|
labelPosition: "top" | "left" | "right";
|
|
1035
1003
|
labelWidth: string | number;
|
|
1036
1004
|
inline: boolean;
|
|
1037
|
-
fields: Array<TProFormField>;
|
|
1005
|
+
fields: Array<import('..').TProFormField>;
|
|
1038
1006
|
columns: number | "auto-fill" | "auto-fit";
|
|
1039
1007
|
}> | null;
|
|
1040
1008
|
};
|
|
@@ -1049,7 +1017,7 @@ declare function __VLS_template(): {
|
|
|
1049
1017
|
}) => void);
|
|
1050
1018
|
$el: any;
|
|
1051
1019
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
1052
|
-
fields?: Array<TProFormField>;
|
|
1020
|
+
fields?: Array<import('..').TProFormField>;
|
|
1053
1021
|
tools?: Array<{
|
|
1054
1022
|
label: string;
|
|
1055
1023
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -1248,7 +1216,7 @@ declare function __VLS_template(): {
|
|
|
1248
1216
|
height: number;
|
|
1249
1217
|
}) => any;
|
|
1250
1218
|
}, string, {
|
|
1251
|
-
fields: Array<TProFormField>;
|
|
1219
|
+
fields: Array<import('..').TProFormField>;
|
|
1252
1220
|
tools: Array<{
|
|
1253
1221
|
label: string;
|
|
1254
1222
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -1284,7 +1252,7 @@ declare function __VLS_template(): {
|
|
|
1284
1252
|
$nextTick: typeof import('vue').nextTick;
|
|
1285
1253
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
1286
1254
|
} & Readonly<{
|
|
1287
|
-
fields: Array<TProFormField>;
|
|
1255
|
+
fields: Array<import('..').TProFormField>;
|
|
1288
1256
|
tools: Array<{
|
|
1289
1257
|
label: string;
|
|
1290
1258
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -1300,7 +1268,7 @@ declare function __VLS_template(): {
|
|
|
1300
1268
|
}>;
|
|
1301
1269
|
btnDisabled: boolean;
|
|
1302
1270
|
}> & Omit<Readonly<{
|
|
1303
|
-
fields?: Array<TProFormField>;
|
|
1271
|
+
fields?: Array<import('..').TProFormField>;
|
|
1304
1272
|
tools?: Array<{
|
|
1305
1273
|
label: string;
|
|
1306
1274
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -1501,24 +1469,26 @@ declare function __VLS_template(): {
|
|
|
1501
1469
|
rootEl: any;
|
|
1502
1470
|
};
|
|
1503
1471
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
1504
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
1472
|
+
declare const __VLS_component: import('vue').DefineComponent<TFcProDataTableProps, {
|
|
1505
1473
|
loadData: () => Promise<void>;
|
|
1506
1474
|
tableData: import('vue').Ref<any[], any[]>;
|
|
1507
1475
|
reload: () => void;
|
|
1508
1476
|
resetSearch: () => void;
|
|
1509
|
-
|
|
1477
|
+
selectedRows: import('vue').Ref<any[], any[]>;
|
|
1478
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TFcProDataTableProps> & Readonly<{}>, {
|
|
1510
1479
|
height: number;
|
|
1511
|
-
fields: Array<TProFormField>;
|
|
1480
|
+
fields: Array<import('..').TProFormField>;
|
|
1512
1481
|
tools: Array<ButtonProps>;
|
|
1513
1482
|
columns: Array<{
|
|
1514
1483
|
prop: string;
|
|
1515
1484
|
label: string;
|
|
1516
1485
|
showOverflowTooltip?: boolean;
|
|
1517
|
-
render?: (row: any, index: number) => VNode;
|
|
1486
|
+
render?: (row: any, index: number) => import('vue').VNode;
|
|
1518
1487
|
}>;
|
|
1488
|
+
selectable: boolean;
|
|
1519
1489
|
hasIndex: boolean;
|
|
1520
1490
|
isPagination: boolean;
|
|
1521
|
-
request: (params: any) => Promise<RequestResult<any>>;
|
|
1491
|
+
request: (params: any) => Promise<import('./DataTable.types').RequestResult<any>>;
|
|
1522
1492
|
actions: Array<ButtonProps>;
|
|
1523
1493
|
actionsWidth: number;
|
|
1524
1494
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1526,7 +1496,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
1526
1496
|
$: import('vue').ComponentInternalInstance;
|
|
1527
1497
|
$data: {};
|
|
1528
1498
|
$props: {
|
|
1529
|
-
readonly fields?: Array<TProFormField> | undefined;
|
|
1499
|
+
readonly fields?: Array<import('..').TProFormField> | undefined;
|
|
1530
1500
|
readonly tools?: Array<{
|
|
1531
1501
|
label: string;
|
|
1532
1502
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -1730,7 +1700,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
1730
1700
|
labelPosition: "top" | "left" | "right";
|
|
1731
1701
|
labelWidth: string | number;
|
|
1732
1702
|
inline: boolean;
|
|
1733
|
-
fields: Array<TProFormField>;
|
|
1703
|
+
fields: Array<import('..').TProFormField>;
|
|
1734
1704
|
columns: number | "auto-fill" | "auto-fit";
|
|
1735
1705
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
1736
1706
|
formRef: ({
|
|
@@ -2519,7 +2489,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
2519
2489
|
labelPosition: "top" | "left" | "right";
|
|
2520
2490
|
labelWidth: string | number;
|
|
2521
2491
|
inline: boolean;
|
|
2522
|
-
fields: Array<TProFormField>;
|
|
2492
|
+
fields: Array<import('..').TProFormField>;
|
|
2523
2493
|
columns: number | "auto-fill" | "auto-fit";
|
|
2524
2494
|
}> | null;
|
|
2525
2495
|
};
|
|
@@ -2534,7 +2504,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
2534
2504
|
}) => void);
|
|
2535
2505
|
$el: any;
|
|
2536
2506
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
2537
|
-
fields?: Array<TProFormField>;
|
|
2507
|
+
fields?: Array<import('..').TProFormField>;
|
|
2538
2508
|
tools?: Array<{
|
|
2539
2509
|
label: string;
|
|
2540
2510
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -2733,7 +2703,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
2733
2703
|
height: number;
|
|
2734
2704
|
}) => any;
|
|
2735
2705
|
}, string, {
|
|
2736
|
-
fields: Array<TProFormField>;
|
|
2706
|
+
fields: Array<import('..').TProFormField>;
|
|
2737
2707
|
tools: Array<{
|
|
2738
2708
|
label: string;
|
|
2739
2709
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -2769,7 +2739,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
2769
2739
|
$nextTick: typeof import('vue').nextTick;
|
|
2770
2740
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
2771
2741
|
} & Readonly<{
|
|
2772
|
-
fields: Array<TProFormField>;
|
|
2742
|
+
fields: Array<import('..').TProFormField>;
|
|
2773
2743
|
tools: Array<{
|
|
2774
2744
|
label: string;
|
|
2775
2745
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
@@ -2785,7 +2755,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
2785
2755
|
}>;
|
|
2786
2756
|
btnDisabled: boolean;
|
|
2787
2757
|
}> & Omit<Readonly<{
|
|
2788
|
-
fields?: Array<TProFormField>;
|
|
2758
|
+
fields?: Array<import('..').TProFormField>;
|
|
2789
2759
|
tools?: Array<{
|
|
2790
2760
|
label: string;
|
|
2791
2761
|
type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|