@veltra/desktop 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/action/action-group.js +3 -110
- package/dist/components/action/action-group.js.map +1 -1
- package/dist/components/action/action-group.vue.d.ts +4 -13
- package/dist/components/action/action-group.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/components/action/action-group.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/action/action.js +5 -1
- package/dist/components/action/action.js.map +1 -1
- package/dist/components/action/action.vue.d.ts +2 -2
- package/dist/components/action/di.js.map +1 -1
- package/dist/components/action/style2.css +17 -14
- package/dist/components/auto-complete/auto-complete.js +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/batch-edit/batch-edit-form.js +105 -100
- package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
- package/dist/components/batch-edit/batch-edit-list.js +52 -68
- package/dist/components/batch-edit/batch-edit-list.js.map +1 -1
- package/dist/components/batch-edit/batch-edit.js +0 -1
- package/dist/components/batch-edit/batch-edit.js.map +1 -1
- package/dist/components/batch-edit/style.js +1 -0
- package/dist/components/batch-edit/style2.css +13 -89
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/cascade/cascade-panel-item.js +4 -4
- package/dist/components/cascade/cascade.js +2 -2
- package/dist/components/cascade/cascade.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-button.js +1 -1
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
- package/dist/components/code-editor/code-editor.js +1 -1
- package/dist/components/collapse/collapse.js +1 -1
- package/dist/components/condition-editor/components/condition-group.js +152 -0
- package/dist/components/condition-editor/components/condition-group.js.map +1 -0
- package/dist/components/condition-editor/components/condition-row.js +217 -0
- package/dist/components/condition-editor/components/condition-row.js.map +1 -0
- package/dist/components/condition-editor/condition-editor.js +134 -5
- package/dist/components/condition-editor/condition-editor.js.map +1 -1
- package/dist/components/condition-editor/condition-editor.vue.d.ts +10 -2
- package/dist/components/condition-editor/core/evaluator.js +75 -0
- package/dist/components/condition-editor/core/evaluator.js.map +1 -0
- package/dist/components/condition-editor/core/operators.js +123 -0
- package/dist/components/condition-editor/core/operators.js.map +1 -0
- package/dist/components/condition-editor/style.js +7 -0
- package/dist/components/condition-editor/style2.css +186 -0
- package/dist/components/context-menu/context-menu.js +1 -1
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.js +2 -2
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +2 -2
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/dialog/dialog.js +7 -7
- package/dist/components/dialog/style2.css +8 -0
- package/dist/components/dialog/use-maximum.js +1 -1
- package/dist/components/drawer/style2.css +8 -0
- package/dist/components/dropdown/dropdown.js +1 -1
- package/dist/components/expression-editor/components/variable-picker.js +8 -8
- package/dist/components/expression-editor/expression-editor.js +1 -1
- package/dist/components/file-viewer/file-viewer.js +13 -13
- package/dist/components/form-item/form-item.js.map +1 -1
- package/dist/components/form-item/form-item.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/components/form-item/form-item.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/grid-input/grid-input.js +1 -1
- package/dist/components/group-input/group-input.js +1 -1
- package/dist/components/index.d.ts +9 -8
- package/dist/components/index.js +130 -128
- package/dist/components/index.js.map +1 -1
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/kbd.js +17 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/kbd/kbd.vue.d.ts +18 -0
- package/dist/components/kbd/style.d.ts +1 -0
- package/dist/components/kbd/style.js +1 -0
- package/dist/components/kbd/style2.css +43 -0
- package/dist/components/layout/layout-resizer.js +1 -1
- package/dist/components/layout/layout.js +1 -1
- package/dist/components/list/list.js +1 -1
- package/dist/components/loading/loading.js +1 -1
- package/dist/components/menu/menu-sub-collapsed.js +4 -4
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/message/message.js +1 -1
- package/dist/components/message-confirm/message-confirm.js +1 -1
- package/dist/components/multi-select/multi-select.js +15 -15
- package/dist/components/multi-select/multi-select.vue.d.ts +3 -3
- package/dist/components/multi-tree-select/multi-tree-select.js +8 -8
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +3 -3
- package/dist/components/notification/notification.js +1 -1
- package/dist/components/number/number.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.js +2 -2
- package/dist/components/number-range-input/number-range-input.js +1 -1
- package/dist/components/paginator/paginator.js +6 -6
- package/dist/components/paginator/style.js +1 -1
- package/dist/components/palette/palette.js +1 -1
- package/dist/components/password-input/password-input.js +2 -2
- package/dist/components/pop-confirm/pop-confirm.js +1 -1
- package/dist/components/progress-nodes/progress-nodes.js +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/components/scroll/scroll-bar.js +1 -1
- package/dist/components/scroll/scroll.js +1 -1
- package/dist/components/select/select.js +10 -10
- package/dist/components/select/select.vue.d.ts +2 -2
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/steps/steps.js +2 -2
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/table/style2.css +4 -1
- package/dist/components/table/table.js +2 -3
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/use-columns.js +1 -1
- package/dist/components/table/use-fixed-columns.js +8 -31
- package/dist/components/table/use-fixed-columns.js.map +1 -1
- package/dist/components/table-editor/table-editor.js +1 -2
- package/dist/components/table-editor/table-editor.js.map +1 -1
- package/dist/components/tabs/tabs-horizontal.js +1 -1
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +1 -1
- package/dist/components/tabs/tabs-vertical.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/tabs/tabs.vue.d.ts +1 -1
- package/dist/components/tag/tag.js +1 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/theme/style.js +1 -1
- package/dist/components/theme/theme.js +11 -11
- package/dist/components/tip/tip.js +1 -1
- package/dist/components/tree/tree-node.js +1 -1
- package/dist/components/tree/tree.js +5 -5
- package/dist/components/tree-select/tree-select.js +6 -6
- package/dist/components/tree-select/tree-select.vue.d.ts +3 -3
- package/dist/index.d.ts +48 -47
- package/dist/index.js +46 -45
- package/dist/style.js +3 -2
- package/dist/types/action.d.ts +5 -11
- package/dist/types/condition-editor.d.ts +41 -8
- package/dist/types/index.d.ts +4 -4
- package/dist/types/table.d.ts +0 -2
- package/package.json +11 -11
- package/src/components/action/action-group.vue +68 -82
- package/src/components/action/action.vue +9 -1
- package/src/components/action/di.ts +2 -1
- package/src/components/action/style.scss +22 -27
- package/src/components/batch-edit/batch-edit-form.vue +73 -70
- package/src/components/batch-edit/batch-edit-list.vue +35 -41
- package/src/components/batch-edit/style.scss +19 -118
- package/src/components/batch-edit/style.ts +1 -0
- package/src/components/condition-editor/components/condition-group.vue +131 -0
- package/src/components/condition-editor/components/condition-row.vue +208 -0
- package/src/components/condition-editor/condition-editor.vue +145 -6
- package/src/components/condition-editor/core/evaluator.ts +93 -0
- package/src/components/condition-editor/core/operators.ts +57 -0
- package/src/components/condition-editor/style.scss +239 -1
- package/src/components/condition-editor/style.ts +7 -0
- package/src/components/dialog/style.scss +13 -0
- package/src/components/drawer/style.scss +13 -0
- package/src/components/form-item/form-item.vue +1 -1
- package/src/components/index.ts +2 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/kbd.vue +13 -0
- package/src/components/kbd/style.scss +37 -0
- package/src/components/kbd/style.ts +1 -0
- package/src/components/table/style.scss +9 -1
- package/src/components/table/table.vue +1 -3
- package/src/components/table/use-fixed-columns.ts +5 -49
- package/src/style.ts +1 -0
- package/src/types/action.ts +6 -11
- package/src/types/condition-editor.ts +39 -7
- package/src/types/table.ts +0 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import _sfc_main$1 from "../
|
|
2
|
-
import _sfc_main$2 from "../
|
|
1
|
+
import _sfc_main$1 from "../icon/icon.js";
|
|
2
|
+
import _sfc_main$2 from "../scroll/scroll.js";
|
|
3
3
|
import form_default from "../form/form.js";
|
|
4
4
|
import _sfc_main$3 from "../button/button.js";
|
|
5
|
+
import _sfc_main$4 from "../kbd/kbd.js";
|
|
5
6
|
import { BatchEditDIKey } from "./di.js";
|
|
6
|
-
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx
|
|
7
|
+
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
7
8
|
import { bem } from "@veltra/utils";
|
|
8
9
|
import { AddChild, Close, EditPen, Plus, View } from "@veltra/icons/normal";
|
|
9
10
|
//#region src/components/batch-edit/batch-edit-form.vue
|
|
@@ -34,7 +35,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
35
|
if (state.type === "create") return {
|
|
35
36
|
icon: Plus,
|
|
36
37
|
title: "新增",
|
|
37
|
-
chip: insertIndexes.value.length ? `插入到第 ${insertIndexes.value[insertIndexes.value.length - 1] + 1} 位` : void 0,
|
|
38
38
|
tone: "create"
|
|
39
39
|
};
|
|
40
40
|
return {
|
|
@@ -48,112 +48,117 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
const bodyKey = computed(() => {
|
|
49
49
|
return `${state.type}-${state.row?.uid ?? "create"}-${state.parentRow?.uid ?? "root"}`;
|
|
50
50
|
});
|
|
51
|
+
function handleFormKeydown(e) {
|
|
52
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
handleSave();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
51
57
|
return (_ctx, _cache) => {
|
|
52
|
-
return openBlock(),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
58
|
+
return unref(state).visible && !!unref(props).model ? (openBlock(), createElementBlock("aside", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: normalizeClass(unref(cls).e("form"))
|
|
61
|
+
}, [
|
|
62
|
+
createElementVNode("header", { class: normalizeClass(unref(cls).e("form-header")) }, [
|
|
63
|
+
createElementVNode("span", { class: normalizeClass([unref(cls).e("form-icon"), unref(bem).is(headerInfo.value.tone)]) }, [createVNode(unref(_sfc_main$1), null, {
|
|
64
|
+
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(headerInfo.value.icon)))]),
|
|
65
|
+
_: 1
|
|
66
|
+
})], 2),
|
|
67
|
+
createElementVNode("div", { class: normalizeClass(unref(cls).e("form-title")) }, [createElementVNode("h3", { class: normalizeClass(unref(cls).e("form-title-text")) }, toDisplayString(headerInfo.value.title), 3), headerInfo.value.chip ? (openBlock(), createElementBlock("span", {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: normalizeClass(unref(cls).e("form-chip"))
|
|
70
|
+
}, toDisplayString(headerInfo.value.chip), 3)) : createCommentVNode("v-if", true)], 2),
|
|
71
|
+
createVNode(unref(_sfc_main$3), {
|
|
72
|
+
class: normalizeClass(unref(cls).e("form-close")),
|
|
73
|
+
icon: unref(Close),
|
|
74
|
+
text: "",
|
|
75
|
+
circle: "",
|
|
76
|
+
size: "small",
|
|
77
|
+
title: "关闭",
|
|
78
|
+
onClick: unref(handleClose)
|
|
79
|
+
}, null, 8, [
|
|
80
|
+
"class",
|
|
81
|
+
"icon",
|
|
82
|
+
"onClick"
|
|
83
|
+
])
|
|
84
|
+
], 2),
|
|
85
|
+
(openBlock(), createBlock(unref(_sfc_main$2), {
|
|
86
|
+
always: "",
|
|
87
|
+
class: normalizeClass(unref(cls).e("form-body")),
|
|
88
|
+
key: bodyKey.value
|
|
89
|
+
}, {
|
|
90
|
+
default: withCtx(() => [createVNode(Transition, {
|
|
84
91
|
name: "fade",
|
|
85
92
|
appear: "",
|
|
86
93
|
mode: "out-in"
|
|
87
94
|
}, {
|
|
88
|
-
default: withCtx(() => [(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
default: withCtx(() => [createVNode(unref(form_default), {
|
|
96
|
+
model: unref(props).model,
|
|
97
|
+
readonly: unref(props).readonly,
|
|
98
|
+
onKeydown: handleFormKeydown,
|
|
99
|
+
"label-width": unref(props).labelWidth
|
|
92
100
|
}, {
|
|
93
|
-
default: withCtx(() => [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
model,
|
|
102
|
-
row: unref(state).row,
|
|
103
|
-
depth: unref(state).depth,
|
|
104
|
-
indexes: unref(insertIndexes),
|
|
105
|
-
index: unref(state).row?.index
|
|
106
|
-
})))]),
|
|
107
|
-
_: 3
|
|
108
|
-
}, 8, [
|
|
109
|
-
"model",
|
|
110
|
-
"readonly",
|
|
111
|
-
"onKeyup",
|
|
112
|
-
"label-width"
|
|
113
|
-
])]),
|
|
101
|
+
default: withCtx(({ data, model }) => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
|
|
102
|
+
data,
|
|
103
|
+
model,
|
|
104
|
+
row: unref(state).row,
|
|
105
|
+
depth: unref(state).depth,
|
|
106
|
+
indexes: unref(insertIndexes),
|
|
107
|
+
index: unref(state).row?.index
|
|
108
|
+
})))]),
|
|
114
109
|
_: 3
|
|
115
|
-
}, 8, [
|
|
110
|
+
}, 8, [
|
|
111
|
+
"model",
|
|
112
|
+
"readonly",
|
|
113
|
+
"label-width"
|
|
114
|
+
])]),
|
|
116
115
|
_: 3
|
|
117
|
-
}),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
createTextVNode("
|
|
129
|
-
])], 2)) : (openBlock(), createElementBlock("span", {
|
|
130
|
-
key: 2,
|
|
131
|
-
class: normalizeClass(unref(cls).e("form-hint"))
|
|
132
|
-
}, "只读模式", 2)), createElementVNode("div", { class: normalizeClass(unref(cls).e("form-actions")) }, [createVNode(unref(_sfc_main$3), {
|
|
133
|
-
text: "",
|
|
134
|
-
loading: unref(state).loading,
|
|
135
|
-
onClick: unref(handleClose)
|
|
136
|
-
}, {
|
|
137
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" 取消 ", -1)])]),
|
|
116
|
+
})]),
|
|
117
|
+
_: 3
|
|
118
|
+
}, 8, ["class"])),
|
|
119
|
+
createElementVNode("footer", { class: normalizeClass(unref(cls).e("form-footer")) }, [!unref(props).readonly && unref(state).dataUpdated ? (openBlock(), createElementBlock("span", {
|
|
120
|
+
key: 0,
|
|
121
|
+
class: normalizeClass(unref(cls).e("form-hint"))
|
|
122
|
+
}, " 有未保存改动 ", 2)) : !unref(props).readonly ? (openBlock(), createElementBlock("span", {
|
|
123
|
+
key: 1,
|
|
124
|
+
class: normalizeClass(unref(cls).e("form-hint"))
|
|
125
|
+
}, [
|
|
126
|
+
createVNode(unref(_sfc_main$4), null, {
|
|
127
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Ctrl + Enter", -1)])]),
|
|
138
128
|
_: 1
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
disabled: !unref(state).dataUpdated,
|
|
144
|
-
onClick: unref(handleSave)
|
|
145
|
-
}, {
|
|
146
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(state).type === "create" ? "保存新增" : "保存修改"), 1)]),
|
|
129
|
+
}),
|
|
130
|
+
_cache[2] || (_cache[2] = createTextVNode(" 保存 · ", -1)),
|
|
131
|
+
createVNode(unref(_sfc_main$4), null, {
|
|
132
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Esc", -1)])]),
|
|
147
133
|
_: 1
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
134
|
+
}),
|
|
135
|
+
_cache[3] || (_cache[3] = createTextVNode(" 关闭 ", -1))
|
|
136
|
+
], 2)) : (openBlock(), createElementBlock("span", {
|
|
137
|
+
key: 2,
|
|
138
|
+
class: normalizeClass(unref(cls).e("form-hint"))
|
|
139
|
+
}, "只读模式", 2)), createElementVNode("div", { class: normalizeClass(unref(cls).e("form-actions")) }, [createVNode(unref(_sfc_main$3), {
|
|
140
|
+
text: "",
|
|
141
|
+
loading: unref(state).loading,
|
|
142
|
+
onClick: unref(handleClose)
|
|
143
|
+
}, {
|
|
144
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" 取消 ", -1)])]),
|
|
145
|
+
_: 1
|
|
146
|
+
}, 8, ["loading", "onClick"]), !unref(props).readonly && (creatable.value || updatable.value) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
147
|
+
key: 0,
|
|
148
|
+
type: unref(state).type === "create" ? "success" : "primary",
|
|
149
|
+
loading: unref(state).loading,
|
|
150
|
+
disabled: !unref(state).dataUpdated,
|
|
151
|
+
onClick: unref(handleSave)
|
|
152
|
+
}, {
|
|
153
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" 保存 ", -1)])]),
|
|
154
|
+
_: 1
|
|
155
|
+
}, 8, [
|
|
156
|
+
"type",
|
|
157
|
+
"loading",
|
|
158
|
+
"disabled",
|
|
159
|
+
"onClick"
|
|
160
|
+
])) : createCommentVNode("v-if", true)], 2)], 2)
|
|
161
|
+
], 2)) : createCommentVNode("v-if", true);
|
|
157
162
|
};
|
|
158
163
|
}
|
|
159
164
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-edit-form.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit-form.vue"],"sourcesContent":["<template>\n <
|
|
1
|
+
{"version":3,"file":"batch-edit-form.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit-form.vue"],"sourcesContent":["<template>\n <aside :class=\"cls.e('form')\" v-if=\"state.visible && !!props.model\">\n <header :class=\"cls.e('form-header')\">\n <span :class=\"[cls.e('form-icon'), bem.is(headerInfo.tone)]\">\n <u-icon>\n <component :is=\"headerInfo.icon\" />\n </u-icon>\n </span>\n <div :class=\"cls.e('form-title')\">\n <h3 :class=\"cls.e('form-title-text')\">{{ headerInfo.title }}</h3>\n <span v-if=\"headerInfo.chip\" :class=\"cls.e('form-chip')\">\n {{ headerInfo.chip }}\n </span>\n </div>\n <u-button\n :class=\"cls.e('form-close')\"\n :icon=\"Close\"\n text\n circle\n size=\"small\"\n title=\"关闭\"\n @click=\"handleClose\"\n />\n </header>\n\n <u-scroll always :class=\"cls.e('form-body')\" :key=\"bodyKey\">\n <transition name=\"fade\" appear mode=\"out-in\">\n <u-form\n :model=\"props.model\"\n :readonly=\"props.readonly\"\n @keydown=\"handleFormKeydown\"\n :label-width=\"props.labelWidth\"\n >\n <template #default=\"{ data, model }\">\n <slot\n v-bind=\"{\n data,\n model,\n row: state.row,\n depth: state.depth,\n indexes: insertIndexes,\n index: state.row?.index\n }\"\n />\n </template>\n </u-form>\n </transition>\n </u-scroll>\n\n <footer :class=\"cls.e('form-footer')\">\n <span :class=\"cls.e('form-hint')\" v-if=\"!props.readonly && state.dataUpdated\">\n 有未保存改动\n </span>\n <span :class=\"cls.e('form-hint')\" v-else-if=\"!props.readonly\">\n <u-kbd>Ctrl + Enter</u-kbd> 保存 · <u-kbd>Esc</u-kbd> 关闭\n </span>\n <span :class=\"cls.e('form-hint')\" v-else>只读模式</span>\n\n <div :class=\"cls.e('form-actions')\">\n <u-button text :loading=\"state.loading\" @click=\"handleClose\"> 取消 </u-button>\n <u-button\n v-if=\"!props.readonly && (creatable || updatable)\"\n :type=\"state.type === 'create' ? 'success' : 'primary'\"\n :loading=\"state.loading\"\n :disabled=\"!state.dataUpdated\"\n @click=\"handleSave\"\n >\n 保存\n </u-button>\n </div>\n </footer>\n </aside>\n</template>\n\n<script lang=\"ts\" setup>\nimport { AddChild, Close, EditPen, Plus, View } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, inject, type Component } from 'vue'\n\nimport { UButton } from '../button'\nimport { UForm } from '../form'\nimport { UIcon } from '../icon'\nimport { UKbd } from '../kbd'\nimport { UScroll } from '../scroll'\nimport { BatchEditDIKey } from './di'\n\ndefineOptions({ name: 'BatchEditForm' })\n\nconst {\n cls,\n props,\n state,\n insertIndexes,\n handleSave,\n handleClose,\n staticFeatures,\n dynamicFeatures\n} = inject(BatchEditDIKey)!\n\nconst creatable = computed(() => {\n return (\n state.type === 'create' &&\n (staticFeatures.value.has('create') || dynamicFeatures.value.create?.(state.row))\n )\n})\n\nconst updatable = computed(() => {\n return (\n state.type === 'update' &&\n (staticFeatures.value.has('update') || dynamicFeatures.value.update?.(state.row))\n )\n})\n\ninterface HeaderInfo {\n icon: Component\n title: string\n chip?: string\n tone: 'create' | 'update' | 'view' | 'child'\n}\n\nconst headerInfo = computed<HeaderInfo>(() => {\n if (props.readonly) {\n return {\n icon: View,\n title: '查看详情',\n chip: state.row ? `第 ${state.row.index + 1} 行` : undefined,\n tone: 'view'\n }\n }\n if (state.parentRow) {\n return {\n icon: AddChild,\n title: '新增子级',\n chip: `归属于第 ${state.parentRow.index + 1} 行`,\n tone: 'child'\n }\n }\n if (state.type === 'create') {\n return {\n icon: Plus,\n title: '新增',\n tone: 'create'\n }\n }\n return {\n icon: EditPen,\n title: '编辑',\n chip: state.row ? `第 ${state.row.index + 1} 行` : undefined,\n tone: 'update'\n }\n})\n\n/** 通过 row 切换 / 类型切换驱动表单内容淡出淡入 */\nconst bodyKey = computed(() => {\n return `${state.type}-${state.row?.uid ?? 'create'}-${state.parentRow?.uid ?? 'root'}`\n})\n\nfunction handleFormKeydown(e: KeyboardEvent) {\n if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n e.preventDefault()\n handleSave()\n }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;EAwFA,MAAM,EACJ,KACA,OACA,OACA,eACA,YACA,aACA,gBACA,oBACE,OAAO,eAAe;EAE1B,MAAM,YAAY,eAAe;AAC/B,UACE,MAAM,SAAS,aACd,eAAe,MAAM,IAAI,SAAS,IAAI,gBAAgB,MAAM,SAAS,MAAM,IAAI;IAEnF;EAED,MAAM,YAAY,eAAe;AAC/B,UACE,MAAM,SAAS,aACd,eAAe,MAAM,IAAI,SAAS,IAAI,gBAAgB,MAAM,SAAS,MAAM,IAAI;IAEnF;EASD,MAAM,aAAa,eAA2B;AAC5C,OAAI,MAAM,SACR,QAAO;IACL,MAAM;IACN,OAAO;IACP,MAAM,MAAM,MAAM,KAAK,MAAM,IAAI,QAAQ,EAAE,MAA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
import { BatchEditDIKey } from "./di.js";
|
|
4
4
|
import _sfc_main$3 from "../action/action.js";
|
|
5
|
-
import
|
|
5
|
+
import action_group_default from "../action/action-group.js";
|
|
6
6
|
import { computed, createBlock, createCommentVNode, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeProps, normalizeClass, openBlock, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
7
7
|
import { bem } from "@veltra/utils";
|
|
8
|
+
import { AddChild, Copy, Delete, InsertToNext, InsertToPrev, Plus } from "@veltra/icons/normal";
|
|
8
9
|
import { o } from "@cat-kit/core";
|
|
9
|
-
import { Delete, EditPen, Plus, View } from "@veltra/icons/normal";
|
|
10
10
|
//#region src/components/batch-edit/batch-edit-list.vue
|
|
11
|
-
const _hoisted_1 = ["disabled"];
|
|
12
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
12
|
name: "BatchEditList",
|
|
14
13
|
__name: "batch-edit-list",
|
|
15
14
|
props: { slots: {} },
|
|
16
15
|
setup(__props) {
|
|
17
|
-
const { cls, state, tableRef, props, emit, staticFeatures, dynamicFeatures, handleCreate,
|
|
16
|
+
const { cls, state, tableRef, props, emit, staticFeatures, dynamicFeatures, handleCreate, handleCopy, handleDelete, handleInsertToNext, handleInsertToPrev, handleInsertChild } = inject(BatchEditDIKey);
|
|
18
17
|
const tableProps = computed(() => {
|
|
19
18
|
return o(props).omit([
|
|
20
19
|
"model",
|
|
@@ -42,7 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
41
|
name: "操作",
|
|
43
42
|
key: "__action__",
|
|
44
43
|
align: "center",
|
|
45
|
-
width:
|
|
44
|
+
width: 180,
|
|
46
45
|
fixed: "right",
|
|
47
46
|
resizable: false
|
|
48
47
|
});
|
|
@@ -53,9 +52,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
52
|
state.depth = row?.depth;
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
|
-
function canEdit(row) {
|
|
57
|
-
return !props.readonly ? allowed("update", row) : true;
|
|
58
|
-
}
|
|
59
55
|
function canDelete(row) {
|
|
60
56
|
return !props.readonly && allowed("delete", row);
|
|
61
57
|
}
|
|
@@ -65,95 +61,83 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
61
|
class: [unref(cls).e("table"), unref(bem).is("editing", unref(state).visible)],
|
|
66
62
|
columns: columns.value,
|
|
67
63
|
"highlight-current": "",
|
|
68
|
-
|
|
64
|
+
current: unref(state).row,
|
|
69
65
|
"onUpdate:current": handleUpdateCurrentRow,
|
|
70
|
-
"onUpdate:checked": _cache[
|
|
71
|
-
"onUpdate:selected": _cache[
|
|
66
|
+
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => unref(emit)("update:checked", $event)),
|
|
67
|
+
"onUpdate:selected": _cache[2] || (_cache[2] = ($event) => unref(emit)("update:selected", $event)),
|
|
72
68
|
ref_key: "tableRef",
|
|
73
69
|
ref: tableRef
|
|
74
70
|
}), createSlots({
|
|
75
|
-
"column:__action__": withCtx(({ row }) => [createVNode(unref(
|
|
71
|
+
"column:__action__": withCtx(({ row }) => [createVNode(unref(action_group_default), {
|
|
76
72
|
class: normalizeClass(unref(cls).e("row-actions")),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
73
|
+
max: 5,
|
|
74
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
|
|
75
|
+
circle: ""
|
|
81
76
|
}, {
|
|
82
77
|
default: withCtx(() => [
|
|
83
|
-
canEdit(row) ? (openBlock(), createBlock(unref(_sfc_main$3), mergeProps({
|
|
84
|
-
key: 0,
|
|
85
|
-
icon: unref(props).readonly ? unref(View) : unref(EditPen),
|
|
86
|
-
title: unref(props).readonly ? "查看" : "编辑",
|
|
87
|
-
onRun: ($event) => unref(handleEdit)(row)
|
|
88
|
-
}, unref(props).actionsProps?.update), null, 16, [
|
|
89
|
-
"icon",
|
|
90
|
-
"title",
|
|
91
|
-
"onRun"
|
|
92
|
-
])) : createCommentVNode("v-if", true),
|
|
93
|
-
canDelete(row) ? (openBlock(), createBlock(unref(_sfc_main$3), mergeProps({
|
|
94
|
-
key: 1,
|
|
95
|
-
icon: unref(Delete),
|
|
96
|
-
type: "danger",
|
|
97
|
-
title: "删除",
|
|
98
|
-
onRun: ($event) => unref(handleDelete)(row)
|
|
99
|
-
}, unref(props).actionsProps?.delete), null, 16, ["icon", "onRun"])) : createCommentVNode("v-if", true),
|
|
100
78
|
allowed("create", row) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
101
|
-
key:
|
|
102
|
-
|
|
79
|
+
key: 0,
|
|
80
|
+
icon: unref(InsertToPrev),
|
|
81
|
+
title: "在上方插入",
|
|
103
82
|
onRun: ($event) => unref(handleInsertToPrev)(row)
|
|
104
|
-
},
|
|
105
|
-
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" 在上方插入 ", -1)])]),
|
|
106
|
-
_: 1
|
|
107
|
-
}, 8, ["onRun"])) : createCommentVNode("v-if", true),
|
|
83
|
+
}, null, 8, ["icon", "onRun"])) : createCommentVNode("v-if", true),
|
|
108
84
|
allowed("create", row) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
109
|
-
key:
|
|
110
|
-
|
|
85
|
+
key: 1,
|
|
86
|
+
icon: unref(InsertToNext),
|
|
87
|
+
title: "在下方插入",
|
|
111
88
|
onRun: ($event) => unref(handleInsertToNext)(row)
|
|
112
|
-
},
|
|
113
|
-
default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" 在下方插入 ", -1)])]),
|
|
114
|
-
_: 1
|
|
115
|
-
}, 8, ["onRun"])) : createCommentVNode("v-if", true),
|
|
89
|
+
}, null, 8, ["icon", "onRun"])) : createCommentVNode("v-if", true),
|
|
116
90
|
!!unref(props).tree && allowed("createChild", row) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
117
|
-
key:
|
|
118
|
-
|
|
91
|
+
key: 2,
|
|
92
|
+
icon: unref(AddChild),
|
|
93
|
+
title: "添加子级",
|
|
119
94
|
onRun: ($event) => unref(handleInsertChild)(row)
|
|
120
|
-
},
|
|
121
|
-
default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" 添加子级 ", -1)])]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["onRun"])) : createCommentVNode("v-if", true),
|
|
95
|
+
}, null, 8, ["icon", "onRun"])) : createCommentVNode("v-if", true),
|
|
124
96
|
allowed("copy", row) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
125
|
-
key:
|
|
126
|
-
|
|
97
|
+
key: 3,
|
|
98
|
+
icon: unref(Copy),
|
|
99
|
+
title: "复制此行",
|
|
127
100
|
onRun: ($event) => unref(handleCopy)(row)
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
101
|
+
}, null, 8, ["icon", "onRun"])) : createCommentVNode("v-if", true),
|
|
102
|
+
canDelete(row) ? (openBlock(), createBlock(unref(_sfc_main$3), mergeProps({
|
|
103
|
+
key: 4,
|
|
104
|
+
icon: unref(Delete),
|
|
105
|
+
type: "danger",
|
|
106
|
+
title: "删除",
|
|
107
|
+
onRun: ($event) => unref(handleDelete)(row)
|
|
108
|
+
}, unref(props).actionsProps?.delete), null, 16, ["icon", "onRun"])) : createCommentVNode("v-if", true)
|
|
132
109
|
]),
|
|
133
110
|
_: 2
|
|
134
111
|
}, 1032, ["class"])]),
|
|
135
112
|
_: 2
|
|
136
113
|
}, [!unref(props).readonly ? {
|
|
137
114
|
name: "empty",
|
|
138
|
-
fn: withCtx(() => [_cache[
|
|
115
|
+
fn: withCtx(() => [_cache[3] || (_cache[3] = createTextVNode(toDisplayString(null), -1))]),
|
|
139
116
|
key: "0"
|
|
140
117
|
} : void 0, !unref(props).readonly && (unref(staticFeatures).has("create") || unref(dynamicFeatures).create?.()) && (unref(state).type === "create" && !unref(state).visible || unref(state).type === "update") ? {
|
|
141
118
|
name: "append",
|
|
142
|
-
fn: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cls).e("add")) }, [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
119
|
+
fn: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cls).e("add")) }, [createVNode(unref(_sfc_main$1), {
|
|
120
|
+
class: normalizeClass(unref(cls).e("add-btn")),
|
|
121
|
+
icon: unref(Plus),
|
|
122
|
+
loading: unref(state).loading,
|
|
123
|
+
type: "primary",
|
|
124
|
+
plain: "",
|
|
125
|
+
onClick: withModifiers(unref(handleCreate), ["stop"])
|
|
126
|
+
}, {
|
|
127
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" 新增一行 ", -1)])]),
|
|
149
128
|
_: 1
|
|
150
|
-
}, 8, [
|
|
129
|
+
}, 8, [
|
|
130
|
+
"class",
|
|
131
|
+
"icon",
|
|
132
|
+
"loading",
|
|
133
|
+
"onClick"
|
|
134
|
+
])], 2)]),
|
|
151
135
|
key: "1"
|
|
152
136
|
} : void 0]), 1040, [
|
|
153
137
|
"slots",
|
|
154
138
|
"class",
|
|
155
139
|
"columns",
|
|
156
|
-
"current
|
|
140
|
+
"current"
|
|
157
141
|
]);
|
|
158
142
|
};
|
|
159
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-edit-list.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit-list.vue"],"sourcesContent":["<template>\n <u-table\n v-bind=\"tableProps\"\n :slots=\"slots\"\n :class=\"[cls.e('table'), bem.is('editing', state.visible)]\"\n :columns=\"columns\"\n highlight-current\n :current
|
|
1
|
+
{"version":3,"file":"batch-edit-list.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit-list.vue"],"sourcesContent":["<template>\n <u-table\n v-bind=\"tableProps\"\n :slots=\"slots\"\n :class=\"[cls.e('table'), bem.is('editing', state.visible)]\"\n :columns=\"columns\"\n highlight-current\n :current=\"state.row\"\n @update:current=\"handleUpdateCurrentRow\"\n @update:checked=\"emit('update:checked', $event)\"\n @update:selected=\"emit('update:selected', $event)\"\n ref=\"tableRef\"\n >\n <template #column:__action__=\"{ row }\">\n <u-action-group :class=\"cls.e('row-actions')\" :max=\"5\" @click.stop circle>\n <u-action\n v-if=\"allowed('create', row)\"\n :icon=\"InsertToPrev\"\n title=\"在上方插入\"\n @run=\"handleInsertToPrev(row)\"\n />\n <u-action\n v-if=\"allowed('create', row)\"\n :icon=\"InsertToNext\"\n title=\"在下方插入\"\n @run=\"handleInsertToNext(row)\"\n />\n <u-action\n v-if=\"!!props.tree && allowed('createChild', row)\"\n :icon=\"AddChild\"\n title=\"添加子级\"\n @run=\"handleInsertChild(row)\"\n />\n <u-action\n v-if=\"allowed('copy', row)\"\n :icon=\"Copy\"\n title=\"复制此行\"\n @run=\"handleCopy(row)\"\n />\n\n <u-action\n v-if=\"canDelete(row)\"\n :icon=\"Delete\"\n type=\"danger\"\n title=\"删除\"\n @run=\"handleDelete(row)\"\n v-bind=\"props.actionsProps?.delete\"\n />\n </u-action-group>\n </template>\n\n <template #empty v-if=\"!props.readonly\"> {{ null }} </template>\n\n <template\n #append\n v-if=\"\n !props.readonly &&\n (staticFeatures.has('create') || dynamicFeatures.create?.()) &&\n ((state.type === 'create' && !state.visible) || state.type === 'update')\n \"\n >\n <div :class=\"cls.e('add')\">\n <u-button\n :class=\"cls.e('add-btn')\"\n :icon=\"Plus\"\n :loading=\"state.loading\"\n type=\"primary\"\n plain\n @click.stop=\"handleCreate\"\n >\n 新增一行\n </u-button>\n </div>\n </template>\n </u-table>\n</template>\n\n<script setup lang=\"ts\">\nimport { o } from '@cat-kit/core'\nimport { AddChild, Copy, Delete, InsertToNext, InsertToPrev, Plus } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, inject, type Slots } from 'vue'\n\nimport type { BatchEditFeature, TableRow } from '../../types'\nimport { UAction, UActionGroup } from '../action'\nimport { UButton } from '../button'\nimport { UTable } from '../table'\nimport { BatchEditDIKey } from './di'\n\ndefineOptions({\n name: 'BatchEditList'\n})\n\ndefineProps<{\n slots: Slots\n}>()\n\nconst {\n cls,\n state,\n tableRef,\n props,\n emit,\n staticFeatures,\n dynamicFeatures,\n handleCreate,\n handleCopy,\n handleDelete,\n handleInsertToNext,\n handleInsertToPrev,\n handleInsertChild\n} = inject(BatchEditDIKey)!\n\nconst tableProps = computed(() => {\n return o(props as Record<string, any>).omit([\n 'model',\n 'columns',\n 'cols',\n 'readonly',\n 'deleteMethod',\n 'saveMethod',\n 'features'\n ])\n})\n\nconst hasNot = (value: BatchEditFeature[]) => value.every((v) => !staticFeatures.value.has(v))\n\nconst allowed = (feature: BatchEditFeature, row?: TableRow) => {\n return staticFeatures.value.has(feature) || !!dynamicFeatures.value[feature]?.(row)\n}\n\nconst columns = computed(() => {\n if (props.readonly || hasNot(['create', 'delete', 'createChild', 'update', 'copy']))\n return props.columns\n\n return (props.columns ?? []).concat({\n name: '操作',\n key: '__action__',\n align: 'center',\n width: 180,\n fixed: 'right',\n resizable: false\n })\n})\n\nfunction handleUpdateCurrentRow(row?: TableRow) {\n if (allowed('update', row)) {\n state.row = row\n state.depth = row?.depth\n }\n}\n\nfunction canDelete(row: TableRow) {\n return !props.readonly && allowed('delete', row)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;EAiGA,MAAM,EACJ,KACA,OACA,UACA,OACA,MACA,gBACA,iBACA,cACA,YACA,cACA,oBACA,oBACA,sBACE,OAAO,eAAe;EAE1B,MAAM,aAAa,eAAe;AAChC,UAAO,EAAE,MAA6B,CAAC,KAAK;IAC1C;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAA;IACF;EAED,MAAM,UAAU,UAA8B,MAAM,OAAO,MAAM,CAAC,eAAe,MAAM,IAAI,EAAE,CAAA;EAE7F,MAAM,WAAW,SAA2B,QAAmB;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AAA,EAAA,CAChB,YASW,MAAA,YAAA,EAAA;KARR,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,UAAA,CAAA;KACZ,MAAM,MAAA,KAAI;KACV,SAAS,MAAA,MAAK,CAAC;KAChB,MAAK;KACL,OAAA;KACC,SAAK,cAAO,MAAA,aAAY,EAAA,CAAA,OAAA,CAAA;;4BAG3B,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFC,UAED,GAAA,CAAA,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-edit.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit.vue"],"sourcesContent":["<template>\n <u-layout\n :class=\"cls.b\"\n :cols=\"cols\"\n rows=\"100%\"\n gap=\"8px\"\n resizable\n @keydown=\"handleKeydown\"\n tabindex=\"-1\"\n >\n <!-- 编辑列表 -->\n <BatchEditList :slots=\"slots\" />\n\n <!-- 编辑表单 -->\n <BatchEditForm v-slot=\"scoped\">\n <!-- @vue-ignore -->\n <slot name=\"form\" v-bind=\"scoped\" />\n </BatchEditForm>\n </u-layout>\n</template>\n\n<script lang=\"ts\" setup generic=\"Model extends FormModel\">\nimport { bem } from '@veltra/utils'\nimport { computed, inject, provide, shallowRef, watch } from 'vue'\n\nimport type {\n BatchEditEmits,\n BatchEditFeature,\n BatchEditProps,\n TableColumnSlotsScope,\n TableExposed,\n TableRow\n} from '../../types'\nimport { DialogDIKey } from '../dialog/di'\nimport type { FormModel } from '../form'\nimport { ULayout } from '../layout'\nimport BatchEditForm from './batch-edit-form.vue'\nimport BatchEditList from './batch-edit-list.vue'\nimport { BatchEditDIKey } from './di'\nimport { useEdit } from './use-edit'\n\ndefineOptions({ name: 'BatchEdit' })\n\nconst props = withDefaults(defineProps<BatchEditProps<Model>>(), {\n cols: () => ['1fr', '420px'],\n mode: 'normal'\n})\n\nconst emit = defineEmits<BatchEditEmits>()\n\nconst staticFeatures = computed(() => {\n const { features } = props\n\n if (Array.isArray(features)) {\n return new Set(features)\n }\n\n const defaultFeatures = new Set<BatchEditFeature>(['create', 'delete', 'update', 'createChild'])\n\n if (!features) {\n return defaultFeatures\n }\n\n // 函数与 false 的特性视为关闭;显式 true 视为开启(即便不在默认集合内)\n Object.entries(features).forEach(([key, value]) => {\n const k = key as BatchEditFeature\n if (typeof value === 'function' || value === false) {\n defaultFeatures.delete(k)\n } else if (value === true) {\n defaultFeatures.add(k)\n }\n })\n return defaultFeatures\n})\n\nconst dynamicFeatures = computed<\n Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n>(() => {\n const { features } = props\n if (!Array.isArray(features) && typeof features === 'object') {\n const ret = Object.entries(features)\n .filter(([_, value]) => {\n return typeof value === 'function'\n })\n .reduce(\n (acc, [key, value]) => {\n acc[key] = value\n return acc\n },\n {} as Record<BatchEditFeature, (row?: TableRow) => boolean>\n )\n return ret\n }\n\n return {} as Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n})\n\nconst slots = defineSlots<\n {\n form?: (props: {\n /** 表单数据 */\n data: Model['data']\n /** 表单模型 */\n model: Model\n /** 当前编辑的层级 */\n depth?: number\n /** 当前编辑的行 */\n row?: TableRow\n /** 当前编辑的行索引 */\n index?: number\n /** 操作的目标行索引路径 */\n indexes?: number[]\n }) => any\n\n header?: () => any\n } & Partial<{\n [key: `column:${string}`]: (props: TableColumnSlotsScope) => any\n }>\n>()\n\nconst cls = bem('batch-edit')\n\nconst tableRef = shallowRef<TableExposed>()\n\nconst editCtx = useEdit({ props, emit, tableRef })\n\nconst { state, handleClose, handleSave, handleDelete, handleCreate } = editCtx\n\nprovide(BatchEditDIKey, {\n cls,\n props,\n emit,\n tableRef,\n staticFeatures,\n dynamicFeatures,\n ...editCtx\n})\n\nconst dialogCtx = inject(DialogDIKey, undefined)\n\ndialogCtx &&\n watch(dialogCtx.visible, (visible) => {\n !visible && editCtx.handleClose()\n })\n\nconst cols = computed(() => {\n return !!state.row || state.visible ? props.cols : undefined\n})\n\n/**\n * 键盘快捷键:\n * - Esc 关闭表单\n * - ⌘/Ctrl + S 保存\n * - ⌘/Ctrl + Backspace 删除当前编辑行\n * - ⌘/Ctrl + N 新增(仅在不在表单中时)\n */\nfunction handleKeydown(e: KeyboardEvent) {\n if (props.readonly && e.key !== 'Escape') return\n\n if (e.key === 'Escape') {\n if (state.visible) {\n e.preventDefault()\n handleClose()\n }\n return\n }\n\n const meta = e.metaKey || e.ctrlKey\n if (!meta) return\n\n const key = e.key.toLowerCase()\n\n if (key === 's' && state.visible) {\n e.preventDefault()\n handleSave()\n return\n }\n\n if (e.key === 'Backspace' && state.row && state.type === 'update') {\n e.preventDefault()\n handleDelete(state.row)\n return\n }\n\n if (key === 'n' && !state.visible) {\n e.preventDefault()\n handleCreate()\n }\n}\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"batch-edit.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit.vue"],"sourcesContent":["<template>\n <u-layout\n :class=\"cls.b\"\n :cols=\"cols\"\n rows=\"100%\"\n gap=\"8px\"\n resizable\n @keydown=\"handleKeydown\"\n tabindex=\"-1\"\n >\n <!-- 编辑列表 -->\n <BatchEditList :slots=\"slots\" />\n\n <!-- 编辑表单 -->\n <BatchEditForm v-slot=\"scoped\">\n <!-- @vue-ignore -->\n <slot name=\"form\" v-bind=\"scoped\" />\n </BatchEditForm>\n </u-layout>\n</template>\n\n<script lang=\"ts\" setup generic=\"Model extends FormModel\">\nimport { bem } from '@veltra/utils'\nimport { computed, inject, provide, shallowRef, watch } from 'vue'\n\nimport type {\n BatchEditEmits,\n BatchEditFeature,\n BatchEditProps,\n TableColumnSlotsScope,\n TableExposed,\n TableRow\n} from '../../types'\nimport { DialogDIKey } from '../dialog/di'\nimport type { FormModel } from '../form'\nimport { ULayout } from '../layout'\nimport BatchEditForm from './batch-edit-form.vue'\nimport BatchEditList from './batch-edit-list.vue'\nimport { BatchEditDIKey } from './di'\nimport { useEdit } from './use-edit'\n\ndefineOptions({ name: 'BatchEdit' })\n\nconst props = withDefaults(defineProps<BatchEditProps<Model>>(), {\n cols: () => ['1fr', '420px'],\n mode: 'normal'\n})\n\nconst emit = defineEmits<BatchEditEmits>()\n\nconst staticFeatures = computed(() => {\n const { features } = props\n\n if (Array.isArray(features)) {\n return new Set(features)\n }\n\n const defaultFeatures = new Set<BatchEditFeature>(['create', 'delete', 'update', 'createChild'])\n\n if (!features) {\n return defaultFeatures\n }\n\n // 函数与 false 的特性视为关闭;显式 true 视为开启(即便不在默认集合内)\n Object.entries(features).forEach(([key, value]) => {\n const k = key as BatchEditFeature\n if (typeof value === 'function' || value === false) {\n defaultFeatures.delete(k)\n } else if (value === true) {\n defaultFeatures.add(k)\n }\n })\n return defaultFeatures\n})\n\nconst dynamicFeatures = computed<\n Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n>(() => {\n const { features } = props\n if (!Array.isArray(features) && typeof features === 'object') {\n const ret = Object.entries(features)\n .filter(([_, value]) => {\n return typeof value === 'function'\n })\n .reduce(\n (acc, [key, value]) => {\n acc[key] = value\n return acc\n },\n {} as Record<BatchEditFeature, (row?: TableRow) => boolean>\n )\n return ret\n }\n\n return {} as Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n})\n\nconst slots = defineSlots<\n {\n form?: (props: {\n /** 表单数据 */\n data: Model['data']\n /** 表单模型 */\n model: Model\n /** 当前编辑的层级 */\n depth?: number\n /** 当前编辑的行 */\n row?: TableRow\n /** 当前编辑的行索引 */\n index?: number\n /** 操作的目标行索引路径 */\n indexes?: number[]\n }) => any\n\n header?: () => any\n } & Partial<{\n [key: `column:${string}`]: (props: TableColumnSlotsScope) => any\n }>\n>()\n\nconst cls = bem('batch-edit')\n\nconst tableRef = shallowRef<TableExposed>()\n\nconst editCtx = useEdit({ props, emit, tableRef })\n\nconst { state, handleClose, handleSave, handleDelete, handleCreate } = editCtx\n\nprovide(BatchEditDIKey, {\n cls,\n props,\n emit,\n tableRef,\n staticFeatures,\n dynamicFeatures,\n ...editCtx\n})\n\nconst dialogCtx = inject(DialogDIKey, undefined)\n\ndialogCtx &&\n watch(dialogCtx.visible, (visible) => {\n !visible && editCtx.handleClose()\n })\n\nconst cols = computed(() => {\n return !!state.row || state.visible ? props.cols : undefined\n})\n\n/**\n * 键盘快捷键:\n * - Esc 关闭表单\n * - ⌘/Ctrl + S 保存\n * - ⌘/Ctrl + Backspace 删除当前编辑行\n * - ⌘/Ctrl + N 新增(仅在不在表单中时)\n */\nfunction handleKeydown(e: KeyboardEvent) {\n if (props.readonly && e.key !== 'Escape') return\n\n if (e.key === 'Escape') {\n if (state.visible) {\n e.preventDefault()\n handleClose()\n }\n return\n }\n\n const meta = e.metaKey || e.ctrlKey\n if (!meta) return\n\n const key = e.key.toLowerCase()\n\n if (key === 's' && state.visible) {\n e.preventDefault()\n handleSave()\n return\n }\n\n if (e.key === 'Backspace' && state.row && state.type === 'update') {\n e.preventDefault()\n handleDelete(state.row)\n return\n }\n\n if (key === 'n' && !state.visible) {\n e.preventDefault()\n handleCreate()\n }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAEb,MAAM,iBAAiB,eAAe;GACpC,MAAM,EAAE,aAAa;AAErB,OAAI,MAAM,QAAQ,SAAS,CACzB,QAAO,IAAI,IAAI,SAAQ;GAGzB,MAAM,kBAAkB,IAAI,IAAsB;IAAC;IAAU;IAAU;IAAU;IAAc,CAAA;AAE/F,OAAI,CAAC,SACH,QAAO;AAIT,UAAO,QAAQ,SAAS,CAAC,SAAS,CAAC,KAAK,WAAW;IACjD,MAAM,IAAI;AACV,QAAI,OAAO,UAAU,cAAc,UAAU,MAC3C,iBAAgB,OAAO,EAAC;aACf,UAAU,KACnB,iBAAgB,IAAI,EAAC;KAExB;AACD,UAAO;IACR;EAED,MAAM,kBAAkB,eAEhB;GACN,MAAM,EAAE,aAAa;AACrB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