From 66ec61e66cf31508c08b30a28ee0bb64e45f87bb Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期五, 23 九月 2022 00:16:14 +0800
Subject: [PATCH] #

---
 components/y-input/y-input.vue |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/components/y-input/y-input.vue b/components/y-input/y-input.vue
index f7d2a9f..644ea96 100644
--- a/components/y-input/y-input.vue
+++ b/components/y-input/y-input.vue
@@ -3,7 +3,8 @@
 		<view class="main">
 			<view class="title item-height">{{titleText}}</view>
 			<view class="input item-height">
-				<input type="text" :placeholder="placeholderText" placeholder-style="font-size:28rpx" v-model="val">
+				<input type="text" :placeholder="placeholderText" @input="input(val)"
+				placeholder-style="font-size:28rpx" v-model="val">
 			</view>
 		</view>
 	</view>
@@ -17,8 +18,8 @@
 				type: String,
 				default: ''
 			},
-			inputVal: {
-				type: String,
+			value: {
+				type: [String, Number],
 				default: ''
 			}
 		},
@@ -37,6 +38,12 @@
 			return {
 				val:''
 			};
+		},
+		methods: {
+			input(val) {
+				this.val = val
+				this.$emit('input',val);
+			}
 		}
 	}
 </script>

--
Gitblit v1.9.1