diff --git a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue
index 8e1cc69d1b06af34877a6e4000494df8d72183dd..61dbb2d80af75774f016b1f7c855a1d1b58b2e48 100644
--- a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue
+++ b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue
@@ -103,7 +103,7 @@
// this.$emit('update:focus', true);
},
setFocus(state : boolean) {
- const inputEl = this.$refs['input'] as Element
+ const inputEl = this.$refs['input'] as UniElement
if (state) {
inputEl.focus();
} else {
diff --git a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-popup-dialog/uni-id-pages-x-popup-dialog.uvue b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-popup-dialog/uni-id-pages-x-popup-dialog.uvue
index c691f54be16f896b2249710c243f97e0cbaa2c1c..a1a7d188376ce508b3668c2adf6f4dcbec2d5113 100644
--- a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-popup-dialog/uni-id-pages-x-popup-dialog.uvue
+++ b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-popup-dialog/uni-id-pages-x-popup-dialog.uvue
@@ -32,7 +32,7 @@
confirmCallBack = callback;
(this.$refs['popup'] as UniPopupComponentPublicInstance).open();
this.$nextTick(() => {
- (this.$refs['input'] as Element).focus()
+ (this.$refs['input'] as UniElement).focus()
})
},
cancel() {
diff --git a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/fab-sms-code-input.uvue b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/fab-sms-code-input.uvue
index 9ba0d18f2de7930c20067656c184990b5578a9dd..786e509398976c79117461d0e30f4ee30aee63be 100644
--- a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/fab-sms-code-input.uvue
+++ b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/fab-sms-code-input.uvue
@@ -5,8 +5,9 @@
{{title}}
短信验证码已发送至{{mobile}}
-
-
+
+
@@ -23,7 +24,7 @@
emits: ["update:modelValue","reGetSmsCode","blur", "focus" ],
data() {
return {
- smsCodeList: ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"],
+ smsCodeList: ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"],
isOpen: false
}
},
@@ -63,7 +64,7 @@
show() {
(this.$refs['popup'] as UniPopupComponentPublicInstance).open();
this.$nextTick(() => {
- (this.$refs["code-input"] as Element[])[0].focus();
+ (this.$refs["code-input"] as UniElement[])[0].focus();
})
this.isOpen = true
},
@@ -75,28 +76,26 @@
clear() {
this.smsCodeList = ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"];
if (this.isOpen) {
- (this.$refs["code-input"] as Element[])[0].focus();
+ (this.$refs["code-input"] as UniElement[])[0].focus();
// console.log('clear success');
} else {
// console.log('已经关了,不能清空');
}
},
setSmsCode(i : number, e : InputEvent) {
+ // console.log('setSmsCode--',e);
const { value } = e.detail
- // console.log('~~',value,value.length);
-
+ console.log('~~',value,value.length);
// 已满6位数就直接调登录
let $value = value.replace(/\u200b/g, '')
if ($value.length == 6) {
// (this.$refs["code-input"] as Element[])[0].focus();
// console.log('~~~~~', $value, $value.split(''));
$value.split('').forEach((item : string, index : number) => {
- // console.log('index', index, item);
this.smsCodeList[index] = "\u200b" + item
})
return
}
-
// 限制每个空格内的文字不超过2位
if (value.length > 2) {
this.$nextTick(() => {
@@ -105,7 +104,6 @@
this.smsCodeList[i] = newValue
})
}
-
// 被删除完就直接后退一格
if (value.length == 0) {
this.smsCodeList[i] = ""
@@ -113,19 +111,20 @@
this.smsCodeList[i] = '\u200b'
})
if (i != 0) {
- (this.$refs["code-input"] as Element[])[i - 1].focus();
+ (this.$refs["code-input"] as UniElement[])[i - 1].focus();
this.smsCodeList[i - 1] = ""
}
} else if (value != "\u200b") {
this.smsCodeList[i] = value;
if (i != (this.smsCodeList.length - 1)) {
- (this.$refs["code-input"] as Element[])[i + 1].focus();
+ (this.$refs["code-input"] as UniElement[])[i + 1].focus();
} else {
// console.log(i, (this.smsCodeList.length - 1));
}
}
},
onFocus(i : number) {
+ // console.log("onFocus",i);
if (this.smsCodeList[i].length == 0) {
this.smsCodeList[i] = '\u200b'
}
diff --git a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue
index f457a8360402179e34598d0e9b0b413647c8d95a..24d20c58062e8fe557262e67363dccc4245f1add 100644
--- a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue
+++ b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue
@@ -137,12 +137,12 @@
if (state.pendingAgreements) {
// uni.hideKeyboard();
this.sendSmsCaptchaCP!.setFocus(false);
- // web端尚未完全支持
- // (this.$parent as ComponentPublicInstance).$callMethod("showPopupCaptcha", () => {
- // if (!state.pendingAgreements) {
- // this.sendSmsCode()
- // }
- // });
+ // web端有问题
+ // (this.$parent as ComponentPublicInstance).$callMethod("showPopupCaptcha", () => {
+ // if (!state.pendingAgreements) {
+ // this.sendSmsCode()
+ // }
+ // });
// 临时方案
uni.$emit('uni-id-pages-x-loginBySmsCode-showPopupCaptcha',()=>{
if (!state.pendingAgreements) {