@vunk/form 2.10.3 → 2.10.4

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.
@@ -91,6 +91,14 @@ var _sfc_main = /* @__PURE__ */vue.defineComponent({
91
91
  ...formItemBindProps.value,
92
92
  inline: true,
93
93
  onBlur: handleCheck,
94
+ onKeydown: e => {
95
+ if (e.key === "Enter") {
96
+ handleCheck();
97
+ } else if (e.key === "Escape") {
98
+ handleCancel();
99
+ }
100
+ e.stopPropagation();
101
+ },
94
102
  ...props.edit,
95
103
  prop: prop.value,
96
104
  elRef: e => {
@@ -130,6 +138,7 @@ var _sfc_main = /* @__PURE__ */vue.defineComponent({
130
138
  editable.value = false;
131
139
  }).catch(() => {
132
140
  console.warn("Validation failed, editable text remains open.");
141
+ handleCancel();
133
142
  });
134
143
  } else {
135
144
  editable.value = false;
@@ -87,6 +87,14 @@ var _sfc_main = /* @__PURE__ */defineComponent({
87
87
  ...formItemBindProps.value,
88
88
  inline: true,
89
89
  onBlur: handleCheck,
90
+ onKeydown: e => {
91
+ if (e.key === "Enter") {
92
+ handleCheck();
93
+ } else if (e.key === "Escape") {
94
+ handleCancel();
95
+ }
96
+ e.stopPropagation();
97
+ },
90
98
  ...props.edit,
91
99
  prop: prop.value,
92
100
  elRef: e => {
@@ -126,6 +134,7 @@ var _sfc_main = /* @__PURE__ */defineComponent({
126
134
  editable.value = false;
127
135
  }).catch(() => {
128
136
  console.warn("Validation failed, editable text remains open.");
137
+ handleCancel();
129
138
  });
130
139
  } else {
131
140
  editable.value = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "2.10.3",
3
+ "version": "2.10.4",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {