2024-01-16 22:53:42 +08:00

91 lines
2.2 KiB
JavaScript

var e = require("../../common/vendor.js");
Array || e.resolveComponent("uni-popup")();
Math ||
(
e.unref(n) +
function () {
return "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
}
)();
var n = function () {
return "../keyboard/index.js";
},
u = {
__name: "index",
props: {
visible: { type: Boolean, default: !1 },
copyVin: { type: String, default: "" },
},
emits: ["close", "confirm"],
setup: function (n, u) {
var o = u.emit,
t = n,
i = e.ref(null),
l = e.ref(""),
a = e.ref(!1);
e.watch(
function () {
return t.visible;
},
function () {
t.visible
? ((l.value = t.copyVin),
setTimeout(function () {
return (a.value = !0);
}, 100),
i.value.open())
: ((a.value = !1), i.value.close());
}
);
var c = function (e) {
e.show || o("close");
},
r = function () {
o("close");
},
p = function () {
a.value = !1;
},
v = function (e) {
l.value = e.value;
},
s = function () {
l.value = "";
},
f = function () {
(a.value = !1), o("confirm", l.value);
};
return function (n, u) {
return e.e(
{ a: e.o(r), b: 0 === l.value.length },
(l.value.length, {}),
{
c: e.t(l.value),
d: e.o(function (e) {
a.value = !0;
}),
e: l.value.length > 0,
},
l.value.length > 0 ? { f: e.o(s) } : {},
{
g: e.t(l.value.length),
h: e.o(f),
i: e.o(p),
j: e.o(v),
k: e.p({
visible: a.value,
"can-switch": !1,
vin: l.value,
"init-copy": !1,
}),
l: e.sr(i, "665bd5fd-0", { k: "popup" }),
m: e.o(c),
n: e.p({ type: "center", "is-mask-click": !1, animation: !0 }),
}
);
};
},
},
o = e._export_sfc(u, [["__scopeId", "data-v-665bd5fd"]]);
wx.createComponent(o);