main.js中引入之后的修改
import FastClick from "fastclick";
FastClick.prototype.focus = function (targetElement) {
let length;
if (
targetElement.setSelectionRange &&
targetElement.type.indexOf("date") !== 0 &&
targetElement.type !== "time" &&
targetElement.type !== "month"
) {
length = targetElement.value.length;
targetElement.focus();
targetElement.setSelectionRange(length, length);
} else {
targetElement.focus();
}
};
————————————————
版权声明:本文为CSDN博主「fanzijianPobo」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/fanzijianPobo/article/details/108053976