@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
package/README.md
CHANGED
|
@@ -93,6 +93,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
93
93
|
__name: "DataTable",
|
|
94
94
|
props: {
|
|
95
95
|
hasIndex: { type: Boolean, default: true },
|
|
96
|
+
selectable: { type: Boolean, default: false },
|
|
96
97
|
height: { default: 0 },
|
|
97
98
|
columns: { default: () => [] },
|
|
98
99
|
isPagination: { type: Boolean, default: true },
|
|
@@ -187,14 +188,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
187
188
|
queryBoxRef.value?.resetFields();
|
|
188
189
|
handleResetClick();
|
|
189
190
|
};
|
|
191
|
+
const selectedRows = vue.ref([]);
|
|
192
|
+
const handleSelectionChange = (selection) => {
|
|
193
|
+
selectedRows.value = selection;
|
|
194
|
+
};
|
|
190
195
|
__expose({
|
|
191
196
|
loadData,
|
|
192
197
|
// 刷新当前页
|
|
193
198
|
tableData,
|
|
194
199
|
reload: handleResetClick,
|
|
195
200
|
// 不清空表单,回到第一页刷新
|
|
196
|
-
resetSearch
|
|
201
|
+
resetSearch,
|
|
197
202
|
// 清空表单,回到第一页刷新
|
|
203
|
+
selectedRows
|
|
198
204
|
});
|
|
199
205
|
return (_ctx, _cache) => {
|
|
200
206
|
const _component_FcProVerticalLayout = vue.resolveComponent("FcProVerticalLayout");
|
|
@@ -207,9 +213,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
207
213
|
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index.FcTable), vue.mergeProps(_ctx.$attrs, {
|
|
208
214
|
data: tableData.value,
|
|
209
215
|
border: "",
|
|
210
|
-
"max-height": bodyHeight
|
|
216
|
+
"max-height": bodyHeight,
|
|
217
|
+
onSelectionChange: handleSelectionChange
|
|
211
218
|
}), {
|
|
212
219
|
default: vue.withCtx(() => [
|
|
220
|
+
__props.selectable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.FcTableColumn), {
|
|
221
|
+
key: 0,
|
|
222
|
+
type: "selection",
|
|
223
|
+
width: "50",
|
|
224
|
+
align: "center",
|
|
225
|
+
fixed: "left"
|
|
226
|
+
})) : vue.createCommentVNode("", true),
|
|
213
227
|
__props.hasIndex ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.FcTableColumn), {
|
|
214
228
|
key: "index",
|
|
215
229
|
label: "序号",
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const vue = require('vue');
|
|
6
|
+
const Button_vue_vue_type_script_setup_true_lang = require('../../components/Button/Button.vue.js');
|
|
7
|
+
;/* empty css */
|
|
8
|
+
const Dialog_vue_vue_type_script_setup_true_lang = require('../../components/Dialog/Dialog.vue.js');
|
|
9
|
+
;/* empty css */
|
|
10
|
+
const DataTable_vue_vue_type_script_setup_true_lang = require('../DataTable/DataTable.vue.js');
|
|
11
|
+
;/* empty css */
|
|
12
|
+
const index = require('../../components/Notification/index.js');
|
|
13
|
+
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
+
...{
|
|
16
|
+
name: "FcProDataTableDialog",
|
|
17
|
+
inheritAttrs: false
|
|
18
|
+
},
|
|
19
|
+
__name: "DataTableDialog",
|
|
20
|
+
props: {
|
|
21
|
+
title: { default: "新增" },
|
|
22
|
+
width: { default: 860 },
|
|
23
|
+
height: { default: "50vh" },
|
|
24
|
+
cancelButtonText: { default: "取消" },
|
|
25
|
+
confirmButtonText: { default: "确定" },
|
|
26
|
+
showCancelButton: { type: Boolean, default: true },
|
|
27
|
+
showConfirmButton: { type: Boolean, default: true },
|
|
28
|
+
isPagination: { type: Boolean, default: false },
|
|
29
|
+
submitApi: { type: Function, default: void 0 },
|
|
30
|
+
successMessage: { default: "提交成功!" },
|
|
31
|
+
showSuccessMessage: { type: Boolean, default: true }
|
|
32
|
+
},
|
|
33
|
+
emits: ["submit", "cancel"],
|
|
34
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
35
|
+
const tableRef = vue.ref();
|
|
36
|
+
const props = __props;
|
|
37
|
+
const containerHeight = vue.computed(() => {
|
|
38
|
+
if (typeof props.height === "number") {
|
|
39
|
+
return `${props.height}px`;
|
|
40
|
+
}
|
|
41
|
+
return props.height;
|
|
42
|
+
});
|
|
43
|
+
const visible = vue.ref(false);
|
|
44
|
+
const emits = __emit;
|
|
45
|
+
const submitting = vue.ref(false);
|
|
46
|
+
const handleConfirmClick = async () => {
|
|
47
|
+
try {
|
|
48
|
+
const tableData = tableRef.value?.tableData;
|
|
49
|
+
const selectedRows = tableRef.value?.selectedRows;
|
|
50
|
+
if (!props.submitApi) {
|
|
51
|
+
emits("submit", tableData, selectedRows);
|
|
52
|
+
visible.value = false;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
submitting.value = true;
|
|
56
|
+
const res = await props.submitApi(tableData, selectedRows);
|
|
57
|
+
emits("submit", tableData, selectedRows, res);
|
|
58
|
+
if (props.showSuccessMessage) {
|
|
59
|
+
index.FcNotification.success({
|
|
60
|
+
message: props.successMessage
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
visible.value = false;
|
|
64
|
+
} catch (err) {
|
|
65
|
+
console.error("提交失败", err);
|
|
66
|
+
} finally {
|
|
67
|
+
submitting.value = false;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const open = () => {
|
|
71
|
+
tableRef.value?.resetSearch();
|
|
72
|
+
visible.value = true;
|
|
73
|
+
};
|
|
74
|
+
const handleCancelClick = () => {
|
|
75
|
+
visible.value = false;
|
|
76
|
+
emits("cancel");
|
|
77
|
+
};
|
|
78
|
+
const close = () => {
|
|
79
|
+
visible.value = false;
|
|
80
|
+
};
|
|
81
|
+
__expose({
|
|
82
|
+
open,
|
|
83
|
+
close
|
|
84
|
+
});
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return vue.openBlock(), vue.createBlock(Dialog_vue_vue_type_script_setup_true_lang.default, {
|
|
87
|
+
modelValue: visible.value,
|
|
88
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
89
|
+
title: __props.title,
|
|
90
|
+
width: __props.width
|
|
91
|
+
}, vue.createSlots({
|
|
92
|
+
default: vue.withCtx(() => [
|
|
93
|
+
vue.createElementVNode("div", {
|
|
94
|
+
style: vue.normalizeStyle({ height: containerHeight.value })
|
|
95
|
+
}, [
|
|
96
|
+
vue.createVNode(DataTable_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({
|
|
97
|
+
ref_key: "tableRef",
|
|
98
|
+
ref: tableRef
|
|
99
|
+
}, _ctx.$attrs, { "is-pagination": __props.isPagination }), null, 16, ["is-pagination"])
|
|
100
|
+
], 4)
|
|
101
|
+
]),
|
|
102
|
+
_: 2
|
|
103
|
+
}, [
|
|
104
|
+
__props.showCancelButton || __props.showConfirmButton ? {
|
|
105
|
+
name: "footer",
|
|
106
|
+
fn: vue.withCtx(() => [
|
|
107
|
+
__props.showCancelButton ? (vue.openBlock(), vue.createBlock(Button_vue_vue_type_script_setup_true_lang.default, {
|
|
108
|
+
key: 0,
|
|
109
|
+
onClick: handleCancelClick
|
|
110
|
+
}, {
|
|
111
|
+
default: vue.withCtx(() => [
|
|
112
|
+
vue.createTextVNode(vue.toDisplayString(__props.cancelButtonText), 1)
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
})) : vue.createCommentVNode("", true),
|
|
116
|
+
__props.showConfirmButton ? (vue.openBlock(), vue.createBlock(Button_vue_vue_type_script_setup_true_lang.default, {
|
|
117
|
+
key: 1,
|
|
118
|
+
type: "primary",
|
|
119
|
+
loading: submitting.value,
|
|
120
|
+
onClick: handleConfirmClick
|
|
121
|
+
}, {
|
|
122
|
+
default: vue.withCtx(() => [
|
|
123
|
+
vue.createTextVNode(vue.toDisplayString(__props.confirmButtonText), 1)
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}, 8, ["loading"])) : vue.createCommentVNode("", true)
|
|
127
|
+
]),
|
|
128
|
+
key: "0"
|
|
129
|
+
} : void 0
|
|
130
|
+
]), 1032, ["modelValue", "title", "width"]);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const DataTableDialog_vue_vue_type_script_setup_true_lang = require('./DataTableDialog.vue.js');
|
|
6
|
+
;/* empty css */
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.default = DataTableDialog_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const DataTableDialog_vue_vue_type_script_setup_true_lang = require('./DataTableDialog.vue.js');
|
|
6
|
+
;/* empty css */
|
|
7
|
+
const withInstall = require('../../_utils/with-install.js');
|
|
8
|
+
|
|
9
|
+
const FcProDataTableDialog = withInstall.withInstall(DataTableDialog_vue_vue_type_script_setup_true_lang.default);
|
|
10
|
+
|
|
11
|
+
exports.FcProDataTableDialog = FcProDataTableDialog;
|
|
12
|
+
exports.default = FcProDataTableDialog;
|
|
@@ -96,7 +96,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
96
96
|
data: { default: () => [] },
|
|
97
97
|
nodeKey: { default: "value" },
|
|
98
98
|
showCheckbox: { type: Boolean, default: true },
|
|
99
|
-
showSearch: { type: Boolean, default: true }
|
|
99
|
+
showSearch: { type: Boolean, default: true },
|
|
100
|
+
props: { default: () => ({
|
|
101
|
+
children: "children",
|
|
102
|
+
label: "label",
|
|
103
|
+
disabled: "disabled"
|
|
104
|
+
}) }
|
|
100
105
|
},
|
|
101
106
|
setup(__props, { expose: __expose }) {
|
|
102
107
|
const ns = useNamespace.useNamespace("pro-tree-check-filter");
|
|
@@ -104,9 +109,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
104
109
|
const { height: treeCheckFilterHeaderHeight } = core.useElementSize(treeCheckFilterHeader, void 0, {
|
|
105
110
|
box: "border-box"
|
|
106
111
|
});
|
|
107
|
-
const
|
|
112
|
+
const myProps = __props;
|
|
108
113
|
vue.watch(
|
|
109
|
-
() =>
|
|
114
|
+
() => myProps.data,
|
|
110
115
|
() => {
|
|
111
116
|
checkAll.value = false;
|
|
112
117
|
indeterminate.value = false;
|
|
@@ -122,7 +127,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
122
127
|
};
|
|
123
128
|
const filterNode = (value, data) => {
|
|
124
129
|
if (!value) return true;
|
|
125
|
-
|
|
130
|
+
const labelKey = typeof myProps.props?.label === "string" ? myProps.props.label : "label";
|
|
131
|
+
return String(data?.[labelKey] ?? "").toLocaleLowerCase().includes(value.toLocaleLowerCase());
|
|
126
132
|
};
|
|
127
133
|
const handleCheckAllChange = () => {
|
|
128
134
|
if (checkAll.value) {
|
|
@@ -135,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
135
141
|
const visibleKeys = [];
|
|
136
142
|
Object.values(nodesMap).forEach((node) => {
|
|
137
143
|
if (node.level > 0 && node.visible && node.isLeaf && !node.disabled) {
|
|
138
|
-
visibleKeys.push(node.data[
|
|
144
|
+
visibleKeys.push(node.data[myProps.nodeKey]);
|
|
139
145
|
}
|
|
140
146
|
});
|
|
141
147
|
const finalKeys = Array.from(/* @__PURE__ */ new Set([...currentCheckedKeys, ...visibleKeys]));
|
|
@@ -221,12 +227,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
221
227
|
vue.createVNode(vue.unref(index$3.FcTree), vue.mergeProps(_ctx.$attrs, {
|
|
222
228
|
ref_key: "treeRef",
|
|
223
229
|
ref: treeRef,
|
|
230
|
+
props: __props.props,
|
|
224
231
|
"show-checkbox": __props.showCheckbox,
|
|
225
232
|
data: __props.data,
|
|
226
233
|
"filter-node-method": filterNode,
|
|
227
234
|
"node-key": __props.nodeKey,
|
|
228
235
|
onCheck: handleTreeCheckChange
|
|
229
|
-
}), null, 16, ["show-checkbox", "data", "node-key"])
|
|
236
|
+
}), null, 16, ["props", "show-checkbox", "data", "node-key"])
|
|
230
237
|
]),
|
|
231
238
|
_: 1
|
|
232
239
|
})
|
|
@@ -146,7 +146,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
146
146
|
!__props.leftProps.hiddenBtn ? (vue.openBlock(), vue.createBlock(vue.unref(index.FcTooltip), {
|
|
147
147
|
key: 0,
|
|
148
148
|
content: __props.leftProps.tooltip || "新增",
|
|
149
|
-
placement: "
|
|
149
|
+
placement: "right",
|
|
150
150
|
"fallback-placements": ["top", "bottom", "left", "right"]
|
|
151
151
|
}, {
|
|
152
152
|
default: vue.withCtx(() => [
|
|
@@ -166,7 +166,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
166
166
|
!__props.rightProps.hiddenBtn ? (vue.openBlock(), vue.createBlock(vue.unref(index.FcTooltip), {
|
|
167
167
|
key: 1,
|
|
168
168
|
content: __props.rightProps.tooltip || "删除",
|
|
169
|
-
placement: "
|
|
169
|
+
placement: "left",
|
|
170
170
|
"fallback-placements": ["top", "bottom", "left", "right"]
|
|
171
171
|
}, {
|
|
172
172
|
default: vue.withCtx(() => [
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const vue = require('vue');
|
|
6
|
+
const Button_vue_vue_type_script_setup_true_lang = require('../../components/Button/Button.vue.js');
|
|
7
|
+
;/* empty css */
|
|
8
|
+
const Dialog_vue_vue_type_script_setup_true_lang = require('../../components/Dialog/Dialog.vue.js');
|
|
9
|
+
;/* empty css */
|
|
10
|
+
const TreeTransfer_vue_vue_type_script_setup_true_lang = require('../TreeTransfer/TreeTransfer.vue.js');
|
|
11
|
+
;/* empty css */
|
|
12
|
+
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
...{
|
|
15
|
+
name: "FcProTreeTransferDialog",
|
|
16
|
+
inheritAttrs: false
|
|
17
|
+
},
|
|
18
|
+
__name: "TreeTransferDialog",
|
|
19
|
+
props: {
|
|
20
|
+
title: { default: "新增" },
|
|
21
|
+
width: { default: 936 },
|
|
22
|
+
height: { default: "50vh" },
|
|
23
|
+
cancelButtonText: { default: "取消" },
|
|
24
|
+
loading: { type: Boolean, default: false },
|
|
25
|
+
confirmButtonText: { default: "确定" },
|
|
26
|
+
showCancelButton: { type: Boolean, default: false },
|
|
27
|
+
showConfirmButton: { type: Boolean, default: false }
|
|
28
|
+
},
|
|
29
|
+
emits: ["submit", "cancel", "add", "remove"],
|
|
30
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
31
|
+
const treeTransferRef = vue.ref();
|
|
32
|
+
const props = __props;
|
|
33
|
+
const containerHeight = vue.computed(() => {
|
|
34
|
+
if (typeof props.height === "number") {
|
|
35
|
+
return `${props.height}px`;
|
|
36
|
+
}
|
|
37
|
+
return props.height;
|
|
38
|
+
});
|
|
39
|
+
const visible = vue.ref(false);
|
|
40
|
+
const emits = __emit;
|
|
41
|
+
const handleAddClick = (instance, nodes, keys) => {
|
|
42
|
+
emits("add", instance, nodes, keys);
|
|
43
|
+
};
|
|
44
|
+
const handleRemoveClick = (instance, nodes, keys) => {
|
|
45
|
+
emits("remove", instance, nodes, keys);
|
|
46
|
+
};
|
|
47
|
+
const submitting = vue.ref(false);
|
|
48
|
+
const handleConfirmClick = async () => {
|
|
49
|
+
emits("submit", treeTransferRef.value?.leftTreeRef, treeTransferRef.value.rightTreeRef);
|
|
50
|
+
};
|
|
51
|
+
const open = () => {
|
|
52
|
+
visible.value = true;
|
|
53
|
+
};
|
|
54
|
+
const handleCancelClick = () => {
|
|
55
|
+
visible.value = false;
|
|
56
|
+
emits("cancel");
|
|
57
|
+
};
|
|
58
|
+
const close = () => {
|
|
59
|
+
visible.value = false;
|
|
60
|
+
};
|
|
61
|
+
__expose({
|
|
62
|
+
open,
|
|
63
|
+
close
|
|
64
|
+
});
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
const _directive_loading = vue.resolveDirective("loading");
|
|
67
|
+
return vue.openBlock(), vue.createBlock(Dialog_vue_vue_type_script_setup_true_lang.default, {
|
|
68
|
+
modelValue: visible.value,
|
|
69
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
70
|
+
title: __props.title,
|
|
71
|
+
width: __props.width
|
|
72
|
+
}, vue.createSlots({
|
|
73
|
+
default: vue.withCtx(() => [
|
|
74
|
+
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
75
|
+
style: vue.normalizeStyle({ height: containerHeight.value })
|
|
76
|
+
}, [
|
|
77
|
+
vue.createVNode(TreeTransfer_vue_vue_type_script_setup_true_lang.default, vue.mergeProps(_ctx.$attrs, {
|
|
78
|
+
ref_key: "treeTransferRef",
|
|
79
|
+
ref: treeTransferRef,
|
|
80
|
+
onAdd: handleAddClick,
|
|
81
|
+
onRemove: handleRemoveClick
|
|
82
|
+
}), null, 16)
|
|
83
|
+
], 4)), [
|
|
84
|
+
[_directive_loading, __props.loading]
|
|
85
|
+
])
|
|
86
|
+
]),
|
|
87
|
+
_: 2
|
|
88
|
+
}, [
|
|
89
|
+
__props.showCancelButton || __props.showConfirmButton ? {
|
|
90
|
+
name: "footer",
|
|
91
|
+
fn: vue.withCtx(() => [
|
|
92
|
+
__props.showCancelButton ? (vue.openBlock(), vue.createBlock(Button_vue_vue_type_script_setup_true_lang.default, {
|
|
93
|
+
key: 0,
|
|
94
|
+
onClick: handleCancelClick
|
|
95
|
+
}, {
|
|
96
|
+
default: vue.withCtx(() => [
|
|
97
|
+
vue.createTextVNode(vue.toDisplayString(__props.cancelButtonText), 1)
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})) : vue.createCommentVNode("", true),
|
|
101
|
+
__props.showConfirmButton ? (vue.openBlock(), vue.createBlock(Button_vue_vue_type_script_setup_true_lang.default, {
|
|
102
|
+
key: 1,
|
|
103
|
+
type: "primary",
|
|
104
|
+
loading: submitting.value,
|
|
105
|
+
disabled: __props.loading,
|
|
106
|
+
onClick: handleConfirmClick
|
|
107
|
+
}, {
|
|
108
|
+
default: vue.withCtx(() => [
|
|
109
|
+
vue.createTextVNode(vue.toDisplayString(__props.confirmButtonText), 1)
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["loading", "disabled"])) : vue.createCommentVNode("", true)
|
|
113
|
+
]),
|
|
114
|
+
key: "0"
|
|
115
|
+
} : void 0
|
|
116
|
+
]), 1032, ["modelValue", "title", "width"]);
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const TreeTransferDialog_vue_vue_type_script_setup_true_lang = require('./TreeTransferDialog.vue.js');
|
|
6
|
+
;/* empty css */
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.default = TreeTransferDialog_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const TreeTransferDialog_vue_vue_type_script_setup_true_lang = require('./TreeTransferDialog.vue.js');
|
|
6
|
+
;/* empty css */
|
|
7
|
+
const withInstall = require('../../_utils/with-install.js');
|
|
8
|
+
|
|
9
|
+
const FcProTreeTransferDialog = withInstall.withInstall(TreeTransferDialog_vue_vue_type_script_setup_true_lang.default);
|
|
10
|
+
|
|
11
|
+
exports.FcProTreeTransferDialog = FcProTreeTransferDialog;
|
|
12
|
+
exports.default = FcProTreeTransferDialog;
|
|
@@ -11,6 +11,8 @@ const index$5 = require('./EditFormCard/index.js');
|
|
|
11
11
|
const index$6 = require('./FormDialog/index.js');
|
|
12
12
|
const index$7 = require('./QueryForm/index.js');
|
|
13
13
|
const index$8 = require('./VerticalLayout/index.js');
|
|
14
|
+
const index$9 = require('./TreeTransferDialog/index.js');
|
|
15
|
+
const index$a = require('./DataTableDialog/index.js');
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
|
|
@@ -23,3 +25,5 @@ exports.FcProEditFormCard = index$5.FcProEditFormCard;
|
|
|
23
25
|
exports.FcProFormDialog = index$6.FcProFormDialog;
|
|
24
26
|
exports.FcProQueryForm = index$7.FcProQueryForm;
|
|
25
27
|
exports.FcProVerticalLayout = index$8.FcProVerticalLayout;
|
|
28
|
+
exports.FcProTreeTransferDialog = index$9.FcProTreeTransferDialog;
|
|
29
|
+
exports.FcProDataTableDialog = index$a.FcProDataTableDialog;
|
|
@@ -11,27 +11,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
11
11
|
name: "FcText"
|
|
12
12
|
},
|
|
13
13
|
__name: "Text",
|
|
14
|
-
setup(__props
|
|
15
|
-
const elRef = vue.ref();
|
|
16
|
-
__expose(
|
|
17
|
-
new Proxy(
|
|
18
|
-
{},
|
|
19
|
-
{
|
|
20
|
-
get(_, key) {
|
|
21
|
-
return elRef.value?.[key];
|
|
22
|
-
},
|
|
23
|
-
has(_, key) {
|
|
24
|
-
if (!elRef.value) return false;
|
|
25
|
-
return key in elRef.value;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
);
|
|
14
|
+
setup(__props) {
|
|
30
15
|
return (_ctx, _cache) => {
|
|
31
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index.ElText), vue.mergeProps(_ctx.$attrs, {
|
|
32
|
-
ref_key: "elRef",
|
|
33
|
-
ref: elRef
|
|
34
|
-
}), vue.createSlots({ _: 2 }, [
|
|
16
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.ElText), vue.mergeProps(_ctx.$attrs, { ref: "elRef" }), vue.createSlots({ _: 2 }, [
|
|
35
17
|
vue.renderList(_ctx.$slots, (_, name) => {
|
|
36
18
|
return {
|
|
37
19
|
name,
|
package/dist/cjs/index.js
CHANGED
|
@@ -7,8 +7,8 @@ const directive = require('./node_modules/.pnpm/element-plus@2.13.5_patch_hash_4
|
|
|
7
7
|
const dayjs_min = require('./_virtual/dayjs.min.js');
|
|
8
8
|
;/* empty css */
|
|
9
9
|
const lovIdRequestProvide = require('./config/lovId-request-provide.js');
|
|
10
|
-
const index$
|
|
11
|
-
const index$
|
|
10
|
+
const index$1s = require('./components/index.js');
|
|
11
|
+
const index$1t = require('./business/index.js');
|
|
12
12
|
const version = require('./version.js');
|
|
13
13
|
const index$1 = require('./components/Button/index.js');
|
|
14
14
|
const index$2 = require('./components/Dialog/index.js');
|
|
@@ -99,12 +99,14 @@ const index$1m = require('./business/EditFormCard/index.js');
|
|
|
99
99
|
const index$1n = require('./business/FormDialog/index.js');
|
|
100
100
|
const index$1o = require('./business/QueryForm/index.js');
|
|
101
101
|
const index$1p = require('./business/VerticalLayout/index.js');
|
|
102
|
+
const index$1q = require('./business/TreeTransferDialog/index.js');
|
|
103
|
+
const index$1r = require('./business/DataTableDialog/index.js');
|
|
102
104
|
|
|
103
|
-
const components = Object.keys(index$
|
|
104
|
-
return index$
|
|
105
|
+
const components = Object.keys(index$1s).map((key) => {
|
|
106
|
+
return index$1s[key];
|
|
105
107
|
});
|
|
106
|
-
const proComponents = Object.keys(index$
|
|
107
|
-
return index$
|
|
108
|
+
const proComponents = Object.keys(index$1t).map((key) => {
|
|
109
|
+
return index$1t[key];
|
|
108
110
|
});
|
|
109
111
|
const installComponents = [...components, ...proComponents].filter((comp) => {
|
|
110
112
|
return typeof comp === "object" && comp.name && typeof comp.install === "function";
|
|
@@ -240,5 +242,7 @@ exports.FcProEditFormCard = index$1m.FcProEditFormCard;
|
|
|
240
242
|
exports.FcProFormDialog = index$1n.FcProFormDialog;
|
|
241
243
|
exports.FcProQueryForm = index$1o.FcProQueryForm;
|
|
242
244
|
exports.FcProVerticalLayout = index$1p.FcProVerticalLayout;
|
|
245
|
+
exports.FcProTreeTransferDialog = index$1q.FcProTreeTransferDialog;
|
|
246
|
+
exports.FcProDataTableDialog = index$1r.FcProDataTableDialog;
|
|
243
247
|
exports.default = index;
|
|
244
248
|
exports.install = install;
|
|
@@ -89,6 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
89
|
__name: "DataTable",
|
|
90
90
|
props: {
|
|
91
91
|
hasIndex: { type: Boolean, default: true },
|
|
92
|
+
selectable: { type: Boolean, default: false },
|
|
92
93
|
height: { default: 0 },
|
|
93
94
|
columns: { default: () => [] },
|
|
94
95
|
isPagination: { type: Boolean, default: true },
|
|
@@ -183,14 +184,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
183
184
|
queryBoxRef.value?.resetFields();
|
|
184
185
|
handleResetClick();
|
|
185
186
|
};
|
|
187
|
+
const selectedRows = ref([]);
|
|
188
|
+
const handleSelectionChange = (selection) => {
|
|
189
|
+
selectedRows.value = selection;
|
|
190
|
+
};
|
|
186
191
|
__expose({
|
|
187
192
|
loadData,
|
|
188
193
|
// 刷新当前页
|
|
189
194
|
tableData,
|
|
190
195
|
reload: handleResetClick,
|
|
191
196
|
// 不清空表单,回到第一页刷新
|
|
192
|
-
resetSearch
|
|
197
|
+
resetSearch,
|
|
193
198
|
// 清空表单,回到第一页刷新
|
|
199
|
+
selectedRows
|
|
194
200
|
});
|
|
195
201
|
return (_ctx, _cache) => {
|
|
196
202
|
const _component_FcProVerticalLayout = resolveComponent("FcProVerticalLayout");
|
|
@@ -203,9 +209,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
203
209
|
withDirectives((openBlock(), createBlock(unref(FcTable), mergeProps(_ctx.$attrs, {
|
|
204
210
|
data: tableData.value,
|
|
205
211
|
border: "",
|
|
206
|
-
"max-height": bodyHeight
|
|
212
|
+
"max-height": bodyHeight,
|
|
213
|
+
onSelectionChange: handleSelectionChange
|
|
207
214
|
}), {
|
|
208
215
|
default: withCtx(() => [
|
|
216
|
+
__props.selectable ? (openBlock(), createBlock(unref(FcTableColumn), {
|
|
217
|
+
key: 0,
|
|
218
|
+
type: "selection",
|
|
219
|
+
width: "50",
|
|
220
|
+
align: "center",
|
|
221
|
+
fixed: "left"
|
|
222
|
+
})) : createCommentVNode("", true),
|
|
209
223
|
__props.hasIndex ? (openBlock(), createBlock(unref(FcTableColumn), {
|
|
210
224
|
key: "index",
|
|
211
225
|
label: "序号",
|