diff --git a/cypress.config.js b/cypress.config.js index a9e27fcfd..26b7725a5 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -34,6 +34,17 @@ export default defineConfig({ const plugin = await import('cypress-mochawesome-reporter/plugin'); plugin.default(on); + const fs = await import('fs'); + on('task', { + deleteFile(filePath) { + if (fs.existsSync(filePath)) { + fs.unlinkSync(filePath); + return true; + } + return false; + }, + }); + return config; }, viewportWidth: 1280, diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js index cb31391b3..182c51e47 100644 --- a/src/boot/qformMixin.js +++ b/src/boot/qformMixin.js @@ -30,22 +30,5 @@ export default { } catch (error) { console.error(error); } - form.addEventListener('keyup', function (evt) { - if (evt.key === 'Enter' && !that.$attrs['prevent-submit']) { - const input = evt.target; - if (input.type == 'textarea' && evt.shiftKey) { - evt.preventDefault(); - let { selectionStart, selectionEnd } = input; - input.value = - input.value.substring(0, selectionStart) + - '\n' + - input.value.substring(selectionEnd); - selectionStart = selectionEnd = selectionStart + 1; - return; - } - evt.preventDefault(); - that.onSubmit(); - } - }); }, }; diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 633f1254d..04ef13d45 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -1,6 +1,6 @@