|
|
@ -24,7 +24,6 @@ |
|
|
|
import util from "@/utils/util.js" |
|
|
|
import viewKeyboard from "@/components/index/keyboard/view_keyboard.vue"; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
onMounted, |
|
|
|
ref |
|
|
@ -58,12 +57,6 @@ |
|
|
|
inputValue.value = i |
|
|
|
} |
|
|
|
|
|
|
|
const getNumBtnClass = (i) => { |
|
|
|
if (i == 11) { |
|
|
|
return "num-btn-last-child" |
|
|
|
} |
|
|
|
return "num-btn" |
|
|
|
} |
|
|
|
// getInputClass |
|
|
|
const getInputClass = () => { |
|
|
|
if (inputValue.value == "") { |
|
|
@ -76,25 +69,6 @@ |
|
|
|
if (i == 10) return "0" |
|
|
|
if (i == 11) return "" //delete |
|
|
|
} |
|
|
|
//click keyboard |
|
|
|
const clickKeyboard = util.debounce((i) => { |
|
|
|
console.log("clickKeyboard:", i) |
|
|
|
// add input react |
|
|
|
activeValue.value = i |
|
|
|
setTimeout(() => { |
|
|
|
activeValue.value = "" |
|
|
|
}, 100) |
|
|
|
|
|
|
|
if (i == 11) { //handle delete input |
|
|
|
inputValue.value = inputValue.value.substring(0, inputValue.value.length - 1) |
|
|
|
} else { |
|
|
|
//limit maxInput |
|
|
|
if (inputValue.value.length >= props.maxInput) { |
|
|
|
return util.showNone(`最大输入${props.maxInput}位`) |
|
|
|
} |
|
|
|
inputValue.value += getNumClick(i) |
|
|
|
} |
|
|
|
}, 20, true) |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
@ -126,11 +100,13 @@ |
|
|
|
align-self: flex-end; |
|
|
|
margin: 21rpx 21rpx 0 0; |
|
|
|
} |
|
|
|
|
|
|
|
.txt-title { |
|
|
|
font-weight: 600; |
|
|
|
font-size: 25rpx; |
|
|
|
color: #333333; |
|
|
|
} |
|
|
|
|
|
|
|
.txt-input { |
|
|
|
@include ctf(flex-start); |
|
|
|
flex-direction: row; |
|
|
@ -141,14 +117,17 @@ |
|
|
|
height: 69.44rpx; |
|
|
|
border: 0.69rpx solid #979797; |
|
|
|
border-radius: 6.94rpx; |
|
|
|
|
|
|
|
.txt { |
|
|
|
font-weight: 700; |
|
|
|
} |
|
|
|
|
|
|
|
.txt-write { |
|
|
|
font-weight: 700; |
|
|
|
font-size: 25rpx; |
|
|
|
color: #333333; |
|
|
|
} |
|
|
|
|
|
|
|
.txt-blank { |
|
|
|
font-size: 22.22rpx; |
|
|
|
color: #999999; |
|
|
@ -190,6 +169,7 @@ |
|
|
|
width: 70.03rpx; |
|
|
|
height: 54.17rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.v-text { |
|
|
|
margin-left: 16rpx; |
|
|
|
font-weight: 400; |
|
|
|