v-nuxt-ui 0.2.0 → 0.2.2
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/module.json
CHANGED
|
@@ -131,8 +131,15 @@ watchEffect(() => {
|
|
|
131
131
|
const isDeleteKey = (event) => {
|
|
132
132
|
return event.key === "Delete" || event.key === "Backspace" || event.code === "Backspace";
|
|
133
133
|
};
|
|
134
|
+
const isEditableTarget = (target) => {
|
|
135
|
+
const element = target instanceof HTMLElement ? target : null;
|
|
136
|
+
if (!element) return false;
|
|
137
|
+
const tagName = element.tagName;
|
|
138
|
+
return element.isContentEditable || tagName === "INPUT" || tagName === "TEXTAREA" || tagName === "SELECT";
|
|
139
|
+
};
|
|
134
140
|
const handleKeyDown = async (event) => {
|
|
135
141
|
if (!isDeleteKey(event)) return;
|
|
142
|
+
if (isEditableTarget(event.target)) return;
|
|
136
143
|
event.preventDefault();
|
|
137
144
|
event.stopPropagation();
|
|
138
145
|
event.stopImmediatePropagation();
|
|
@@ -199,6 +206,7 @@ const isValidConnection = () => true;
|
|
|
199
206
|
:default-edge-options="defaultEdgeOptions"
|
|
200
207
|
:is-valid-connection="isValidConnection"
|
|
201
208
|
:edges-updatable="true"
|
|
209
|
+
fit-view-on-init
|
|
202
210
|
>
|
|
203
211
|
<Background
|
|
204
212
|
v-if="showBackground"
|
|
@@ -59,20 +59,15 @@ function updateNodeInFlow(row, updatedNode) {
|
|
|
59
59
|
updateExpandedFlow(row, updatedFlow);
|
|
60
60
|
}
|
|
61
61
|
async function handleEditNode(row, node) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
await editNodeModal.open({
|
|
63
|
+
model: node,
|
|
64
|
+
onSave: async (newNode) => {
|
|
65
|
+
const { data } = await flowNodeApi.update(newNode);
|
|
66
|
+
if (data.value.data) {
|
|
67
|
+
updateNodeInFlow(row, data.value.data);
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
71
|
-
if (!updatedNode) return;
|
|
72
|
-
const { data } = await flowNodeApi.update(updatedNode);
|
|
73
|
-
if (data.value.data) {
|
|
74
|
-
updateNodeInFlow(row, data.value.data);
|
|
75
|
-
}
|
|
69
|
+
}
|
|
70
|
+
}).result;
|
|
76
71
|
}
|
|
77
72
|
function getExpandVNode(row) {
|
|
78
73
|
return h("div", {
|
package/package.json
CHANGED