fix: 修复小树点问题

share-code
xjs 2026-06-10 17:22:49 +08:00
parent 71a0dff750
commit 6a793de862
4 changed files with 13 additions and 8 deletions

View File

@ -14,6 +14,7 @@ import type { InputType as UniInputType } from '@uni-helper/uni-app-types'
// password, email -
// Compose our input types from the project's InputType and add a couple extra platform-specific keys
type _InputType = UniInputType | 'safe-password' | 'nickname'
type _InputInputMode = "text" | 'numeric' | 'decimal'
const props = defineProps({
value: {
@ -39,6 +40,10 @@ const props = defineProps({
inputDirection: {
type: String as PropType<'text-left' | 'text-right' | 'text-center'>,
default: 'text-left'
},
inputMode:{
type: String as PropType<_InputInputMode>,
default: undefined
}
})
@ -55,7 +60,7 @@ const innerValue = computed({
<template>
<view class="relative w-full" :class="rootClass">
<input :type="type" v-model="innerValue" :placeholder="placeholder" confirm-type="done" :disabled="readonly"
<input :type="type" v-model="innerValue" :input-mode="inputMode" :placeholder="placeholder" confirm-type="done" :disabled="readonly"
:placeholder-style="`color:#C5C8D1;font-size:30rpx;${inputDirection === 'text-right' ? 'text-align:right;' : inputDirection === 'text-center' ? 'text-align:center;' : 'text-align:left;'} `" />
<view class="absolute top-0 left-0 w-full h-full" v-if="readonly"></view>
</view>

View File

@ -215,7 +215,7 @@ onShow(() => {
class="flex items-center text-[30rpx] justify-between mx-[40rpx] py-[34rpx] border-b-1 border-b-[#eaeaea] border-b-solid">
<view class="text-[#404142] text-left min-w-[150rpx] mr-[40rpx] ">身高(cm)</view>
<view class="flex-1 flex items-center">
<input type="number" inputmode="numeric" v-model="userInfo.talentExtend.height"
<input type="digit" input-mode="decimal" v-model="userInfo.talentExtend.height"
placeholder="请填写身高" confirm-type="done"
placeholder-style="color:#C5C8D1;font-size:30rpx;text-align:left;" class="text-left">
</view>
@ -225,7 +225,7 @@ onShow(() => {
class="flex items-center text-[30rpx] justify-between mx-[40rpx] py-[34rpx] border-b-1 border-b-[#eaeaea] border-b-solid">
<view class="text-[#404142] text-left min-w-[150rpx] mr-[40rpx] ">体重(kg)</view>
<view class="flex-1 flex items-center">
<input type="number" inputmode="numeric" v-model="userInfo.talentExtend.weight"
<input type="digit" input-mode="decimal" v-model="userInfo.talentExtend.weight"
placeholder="请填写体重" confirm-type="done"
placeholder-style="color:#C5C8D1;font-size:30rpx;text-align:left;" class="text-left">

View File

@ -147,7 +147,7 @@ onLoad(() => {
<view class="text-[#404142] text-left min-w-[150rpx] mr-[40rpx]">体测成绩<span class="text-[#D42226] text-[30rpx]">*</span>
</view>
<view class="flex-1">
<input type="number" input-mode="numeric" v-model="userInfo.talentExtend.fitnessResult"
<input type="digit" input-mode="decimal" v-model="userInfo.talentExtend.fitnessResult"
placeholder="请填写满分60分" confirm-type="done"
placeholder-style="color:#C5C8D1;font-size:30rpx;text-align:left;" class="text-left">
</view>
@ -160,8 +160,8 @@ onLoad(() => {
</view>
<view class="flex-1 flex items-center">
<view class="flex-1">
<MxInput v-model:value="userInfo.talentExtend.sprint" placeholder="请填写个人百米成绩" type="number"
root-class="text-left" />
<MxInput v-model:value="userInfo.talentExtend.sprint" placeholder="请填写个人百米成绩"
type="digit" input-mode="decimal" root-class="text-left" />
</view>
<view class="w-[32rpx] h-[32rpx] flex items-center ml-auto">
@ -178,7 +178,7 @@ onLoad(() => {
<view class="flex-1 flex items-center">
<view class="flex-1">
<MxInput v-model:value="userInfo.talentExtend.broadJump" placeholder="请填写个人立定跳远成绩"
type="number" root-class="text-left" />
type="digit" input-mode="decimal" root-class="text-left" />
</view>
<view class="w-[32rpx] h-[32rpx] flex items-center ml-auto">

View File

@ -155,7 +155,7 @@ onLoad(() => {
v-for="(val, key) of cToE" :key="key">
<view class="text-[#404142] text-left min-w-[150rpx] mr-[40rpx] ">{{ val }}</view>
<view class="flex-1">
<input type="number" input-mode="numeric" v-model="formData[key]"
<input type="number" inputmode="decimal" v-model="formData[key]"
:placeholder="['chinese', 'math', 'english'].includes(key) ? '满分150分请输入您的分数' : ['physics', 'chemistry'].includes(key) ? '满分100分计算90%分数' : '满分60分'"
confirm-type="done" placeholder-style="color:#C5C8D1;font-size:30rpx;text-align:left;"
class="text-left" @blur="(event) => handleNumberChange(event, key)">