From 20d63bf572e4d8e2ee94fb038a658a63c609e7ae Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期一, 16 十月 2023 13:38:38 +0800 Subject: [PATCH] # --- components/My-input/My-input.vue | 67 ++++++++++++++++++++++++++++----- 1 files changed, 57 insertions(+), 10 deletions(-) diff --git a/components/My-input/My-input.vue b/components/My-input/My-input.vue index 727b851..515f8c1 100644 --- a/components/My-input/My-input.vue +++ b/components/My-input/My-input.vue @@ -1,31 +1,78 @@ <template> <view class="my-input"> - <uni-icons type="person" size="20" color="#707070" style="margin: 0 8px 0 8px;"></uni-icons> - <view class="box-text">璐﹀彿:</view> - <input type="text" class="input" placeholder="璇疯緭鍏ヨ处鍙�" style="margin-left: 8px;margin-right:8px;flex:1;"> - <uni-icons type="eye" size="20" color="#707070" style="margin-left: auto;margin-right: 8px;"></uni-icons> + <uni-icons class="title-icon" :type="titleIcon" size="20" color="#707070" ></uni-icons> + <view class="box-text">{{title}}:</view> + <input class="input" :type="inputType" :placeholder="placeholder"> + <uni-icons class="opt-icon" :type="optIcon" size="20" color="#707070" v-show="optIconShow"></uni-icons> </view> </template> <script> + export default{ + name: 'My-input', + components: { + + }, + props: { + titleIcon: { + type: String, + default: 'person' + }, + title: { + type: String, + default: '璐﹀彿' + }, + placeholder: { + type: String, + default: '' + }, + inputType: { + type: String, + default: 'text' + }, + optIcon: { + type: String, + default: 'eye' + }, + optIconShow: { + type: Boolean, + default: false + } + }, + data() { + return { + } + } + + } </script> <style lang="scss"> .my-input { width: 100%; - height: 3rem; + height: 45px; display: flex; + color: #606164; align-items: center; background-color: #ECF0F1; - border-radius: 14rpx; - box-shadow: inset 8rpx 8rpx 8rpx rgba(0,0,0,.3), - inset -8rpx -8rpx 8rpx rgba(255,255,255,.7), - -8rpx -8rpx 10rpx rgba(0,0,0,.4); + border-radius: 7px; + box-shadow: inset 4px 4px 4px rgba(0,0,0,.3), + inset -4px -4px 4px rgba(255,255,255,.7), + -4px -4px 5px rgba(0,0,0,.4); + } + .title-icon { + margin: 0 8px 0 8px; } .box-text { line-height: 1; } .input { - // background-color: #ECF0F1; + flex:1; + margin-left: 8px; + margin-right:8px; + } + .opt-icon { + margin-left: auto; + margin-right: 8px; } </style> \ No newline at end of file -- Gitblit v1.9.1