Przeglądaj źródła

Signed-off-by: liuboyan <632697560@qq.com>
龙头棍

liuboyan 4 lat temu
rodzic
commit
496fb1a88b

+ 1 - 1
pagesGood/goodForm.vue

@@ -12,7 +12,7 @@
 			</u-cell-item>
 			<u-cell-item title="原价" :arrow="false">
 				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.originalPrice" bg-color="#51A539" color="#ffffff"
-				 :disabled="ifEdit()"></u-number-box>
+				 :disabled="ifEdit()" digit></u-number-box>
 			</u-cell-item>
 			<u-cell-item :title="formType == 1 ? '售价' : '采摘价格'" :arrow="false" v-if="formType != 2">
 				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.bizPrice" bg-color="#51A539" color="#ffffff"

+ 6 - 1
uview-ui/components/u-number-box/u-number-box.vue

@@ -10,7 +10,7 @@
 		</view>
 		<input :disabled="disabledInput || disabled" :cursor-spacing="getCursorSpacing" :class="{ 'u-input-disabled': disabled }"
 		    v-model="inputVal" class="u-number-input" @blur="onBlur"
-		    type="number" :style="{
+		    :type="digit ? 'digit' :'number'" :style="{
 				color: color,
 				fontSize: size + 'rpx',
 				background: bgColor,
@@ -58,6 +58,11 @@
 	export default {
 		name: "u-number-box",
 		props: {
+			// 显示的小数点
+			digit: {
+				type: Boolean,
+				default: false
+			},
 			// 预显示的数字
 			value: {
 				type: Number,