From 9b3f629cb2d15d0e77d7ecd827f84629ddd0c9a9 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 01 十一月 2023 21:50:28 +0800
Subject: [PATCH] #

---
 components/z-input/z-input.vue |   61 +++++++++++++++++++++++-------
 1 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/components/z-input/z-input.vue b/components/z-input/z-input.vue
index c5dc7b8..c401bd5 100644
--- a/components/z-input/z-input.vue
+++ b/components/z-input/z-input.vue
@@ -3,9 +3,24 @@
 		<view class="main">
 			<view class="inner1">{{desc}}</view>
 			<view class="put inner2">
-				<input class="p-input" type="text" :placeholder="placeholder" v-model="data" :focus="focusData">
-				<uni-icons class="p-icon" type="closeempty" size="16" color="#707070" 
-					v-show="data.length" @click="clear">
+				<uni-icons class="p-icon"
+					type="scan" 
+					size="16" 
+					color="#a6a6a6" 
+					>
+				</uni-icons>
+				<input class="p-input" 
+					type="text" 
+					:placeholder="placeholder" 
+					v-model="data" 
+					:focus="focusData" @input="inputVal">
+					
+				<uni-icons class="p-icon" 
+					type="closeempty" 
+					size="16" 
+					color="#b9b9b9" 
+					v-show="data.length" 
+					@click="clear">
 				</uni-icons>
 			</view>
 			<view class="inner3" v-show="btn">
@@ -25,7 +40,15 @@
 			};
 		},
 		props: {
+			index: {
+				type: Number,
+				default: 0
+			},
 			desc: {
+				type: String,
+				default: ''
+			},
+			name: {
 				type: String,
 				default: ''
 			},
@@ -39,7 +62,7 @@
 			},
 			placeholder: {
 				type: String,
-				default: '璇疯緭鍏�'
+				default: '鎵爜 / 褰曞叆'
 			},
 			value: {
 				type: [String,Number],
@@ -69,8 +92,10 @@
 					this.$emit('input',val)
 				}
 			},
+			value(val) {
+				this.data = val
+			},
 			focus(f) {
-				console.log(f);
 				this.focusData = !f
 				setTimeout(()=>{
 					this.focusData = f
@@ -87,6 +112,9 @@
 			},
 			clickBtn() {
 				this.$emit('clickBtn');
+			},
+			inputVal() {
+				this.$emit('inputVal',[this.data,this.name]);
 			}
 		}
 	}
@@ -96,9 +124,8 @@
 	.main {
 		display: flex;
 		align-items: center;
-		min-height: 70rpx;
-		background-color: #FFF;
-		/* border-bottom: 1px solid darkgray; */
+		min-height: 50px;
+		background-color: #fff;
 	}
 	.put {
 		display: flex;
@@ -106,28 +133,32 @@
 	}
 	
 	.inner1 {
-		width: 120rpx;
+		width: 55px;
 		padding-left: 8px;
-		font-weight: 700;
+		color: #606164;
+		font-weight: 900;
 		font-family:'Helvetica Neue';
 	}
 	.inner2 {
-		background-color: aliceblue;
+		background-color: #f8f8f8;
 		flex: 1;
 		display: flex;
 		align-items: center;
 		justify-content: center;
+		border-radius: 5px;
+		margin-right: 32rpx;
+		color: #606266;
 	}
 	.p-input {
 		flex:1;
-		padding-left: 8px;
+		padding: 4px;
 	}
 	.p-icon {
-		margin-left: 8px;
-		margin-right: 8px;
+		margin-left: 4px;
+		margin-right: 4px;
 	}
 	.inner3 {
-		width: 200rpx;
+		width: 90px;
 		display: flex;
 		align-items: center;
 		justify-content: center;

--
Gitblit v1.9.1