增加新模块
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
"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
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"up-count-down": "../../uni_modules/uview-plus/components/u-count-down/u-count-down",
|
||||
"up-toast": "../../uni_modules/uview-plus/components/u-toast/u-toast"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="comm-input-warp data-v-fa3fd76f"><input class="data-v-fa3fd76f" placeholder="{{a}}" border="false" v-model="{{b}}" color="#EEEEEE" type="number" bindinput="{{c}}" style="height:64rpx;width:70%"></input><view wx:if="{{d}}" class="code-warp data-v-fa3fd76f"><up-count-down wx:if="{{f}}" class="data-v-fa3fd76f" bindfinish="{{e}}" u-i="fa3fd76f-0" bind:__l="__l" u-p="{{f}}"></up-count-down><text class="data-v-fa3fd76f" style="margin-left:10rpx">s</text></view><view wx:else class="code-warp data-v-fa3fd76f" bindtap="{{h}}"><view class="data-v-fa3fd76f">{{g}}</view></view><up-toast class="r data-v-fa3fd76f" u-r="uToastRef" u-i="fa3fd76f-1" bind:__l="__l"></up-toast></view>
|
||||
@@ -0,0 +1,9 @@
|
||||
.code-warp.data-v-fa3fd76f {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.wrap.data-v-fa3fd76f {
|
||||
padding: 24rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user