Files
frontend-app/unpackage/dist/dev/mp-weixin/components/code-comm/code-comm.js
T

85 lines
2.5 KiB
JavaScript
Raw Normal View History

2025-03-20 08:46:07 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
common_vendor.ref(null);
const _sfc_main = {
name: "inputComm",
props: ["modelValue", "codeNumberRef", "emptyCountdownRef"],
watch: {
emptyCountdownRef(value, oldValue) {
if (value) {
this.countdown = true;
}
}
},
data() {
return {
countdown: false,
emptyCountdown: this.emptyCountdownRef,
inputCss: {
"height": "80rpx",
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "16px"
}
};
},
emits: ["update:modelValue"],
mounted() {
},
methods: {
getCode(val) {
this.emptyCountdown;
if (val) {
const codeNumber = this.codeNumberRef;
if (codeNumber) {
this.$emit("getCode");
} else {
this.$refs.uToastRef.show({
type: "error",
message: this.$t("login.comm.email")
});
return;
}
} else {
this.$refs.uToastRef.show({
type: "error",
message: this.$t("login.comm.email")
});
}
}
}
};
if (!Array) {
const _easycom_up_count_down2 = common_vendor.resolveComponent("up-count-down");
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
(_easycom_up_count_down2 + _easycom_up_toast2)();
}
const _easycom_up_count_down = () => "../../uni_modules/uview-plus/components/u-count-down/u-count-down.js";
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
if (!Math) {
(_easycom_up_count_down + _easycom_up_toast)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.$t("login.comm.code"),
b: $props.modelValue,
c: common_vendor.o(($event) => _ctx.$emit("update:modelValue", $event.target.value)),
d: $data.countdown
}, $data.countdown ? {
e: common_vendor.o(($event) => $options.getCode(false)),
f: common_vendor.p({
time: 60 * 1e3,
format: "ss"
})
} : {
g: common_vendor.t(_ctx.$t("login.comm.get.code")),
h: common_vendor.o(($event) => $options.getCode(true))
}, {
i: common_vendor.sr("uToastRef", "fa3fd76f-1")
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-fa3fd76f"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/code-comm/code-comm.js.map