lew-ui 1.7.21 → 1.7.22

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/index.es.js CHANGED
@@ -3796,7 +3796,7 @@ const _sfc_main$x = defineComponent({
3796
3796
  });
3797
3797
  if (props.okByEnter) {
3798
3798
  watch(enter, (v) => {
3799
- if (v) {
3799
+ if (v && state.isFocus && modelValue.value) {
3800
3800
  emit("ok", modelValue.value);
3801
3801
  }
3802
3802
  });
@@ -4138,7 +4138,7 @@ const _sfc_main$w = defineComponent({
4138
4138
  var _a3;
4139
4139
  if (shift.value && enter.value) {
4140
4140
  return;
4141
- } else if (enter.value) {
4141
+ } else if (enter.value && state.isFocus && modelValue.value) {
4142
4142
  (_a3 = lewTextareaRef.value) == null ? void 0 : _a3.blur();
4143
4143
  emit("ok", modelValue.value);
4144
4144
  }