feat: import cURL on paste (#2037)

* feat: import cURL on paste

* feat: import cURL on paste

* feat: pasting cURL command on url field does not paste it in

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
Anwarul Islam
2021-12-23 01:57:06 +06:00
committed by GitHub
parent 10586e5288
commit 1eb9eb911e
4 changed files with 46 additions and 2 deletions

View File

@@ -16,6 +16,7 @@
@keyup="$emit('keyup', $event)"
@click="$emit('click', $event)"
@keydown="$emit('keydown', $event)"
@paste="handlePaste"
></div>
</div>
</template>
@@ -113,6 +114,9 @@ export default defineComponent({
},
methods: {
handlePaste(ev) {
this.$emit("paste", { event: ev, previousValue: this.internalValue })
},
handleChange() {
this.debouncedHandler = debounce(function () {
if (this.internalValue !== this.$refs.editor.textContent) {