Un format the last auto format. And fix the preventDefault console err
This commit is contained in:
parent
8c78204602
commit
526c34cd49
1 changed files with 20 additions and 20 deletions
|
|
@ -146,13 +146,13 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
trimOnPaste(evt) {
|
trimOnPaste(evt) {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
preventDefault();
|
|
||||||
|
|
||||||
var data = null;
|
var data = null;
|
||||||
if (evt.type === "paste") {
|
if (evt.type === "paste") {
|
||||||
data = evt.clipboardData || window.clipboardData;
|
data = evt.clipboardData || window.clipboardData;
|
||||||
} else if (evt.type === "drop") {
|
} else if (evt.type === "drop") {
|
||||||
data = evt.dataTransfer;
|
data = evt.dataTransfer;
|
||||||
|
evt.preventDefault();
|
||||||
}
|
}
|
||||||
const value = data.getData("Text")?.trim();
|
const value = data.getData("Text")?.trim();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue