From d2c57ec06d66b13e3a79cac3ebc1d3dad3679153 Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期五, 23 九月 2022 14:32:49 +0800
Subject: [PATCH] #
---
components/y-input/y-input.vue | 1
components/y-title/y-title.vue | 3 -
components/y-warpper/y-warpper.vue | 2
components/y-input-btn/y-input-btn.vue | 39 +++++++++++++++----
pages/business/business.vue | 18 ---------
5 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/components/y-input-btn/y-input-btn.vue b/components/y-input-btn/y-input-btn.vue
index 6bed5de..1538cd6 100644
--- a/components/y-input-btn/y-input-btn.vue
+++ b/components/y-input-btn/y-input-btn.vue
@@ -2,14 +2,18 @@
<view>
<view class="main">
<y-title />
- <!-- <view class="title" :class="zBig">{{titleText}}</view> -->
<view class="column" :class="zBig">
- <input type="text" :placeholder="placeholderText" @input="input"
- placeholder-style="font-size:22rpx" v-model="val">
- <view class="btn">
- <button class="small-btn" size="mini" type="primary" @click="confrim">{{btnText}}</button>
+ <view style="display: flex;" class="input">
+ <input type="text" :placeholder="placeholderText" @input="input"
+ placeholder-style="font-size:22rpx" v-model="val">
+ <view class="icons" v-if="val.length" @click="clear">
+ <uni-icons type="close"></uni-icons>
</view>
- <slot />
+ </view>
+ <view class="btn">
+ <button class="small-btn" size="mini" type="primary" @click="confrim">{{btnText}}</button>
+ </view>
+ <slot />
</view>
</view>
</view>
@@ -67,19 +71,38 @@
},
confrim() {
this.$emit('confrim');
+ },
+ clear() {
+ this.val = ''
+ this.input()
}
}
}
</script>
<style>
-.main {
+ .main {
width: 96%;
min-height: 100rpx;
background-color: #fff;
margin: 2%;
border-radius: 5rpx;
box-shadow: 0 0 10upx rgba(0, 0, 0, 0.1);
+ }
+ .input{
+ width: 96%;
+ height: 100%;
+ margin-left: 2%;
+ margin-right: 1%;
+ border-radius: 5rpx;
+ color: #606266;
+ background-color: #FAFAFA;
+ font-size: 28rpx;
+ text-indent: 8rpx;
+ /* letter-spacing: 1rpx; */
+ }
+ .icons {
+ margin-right: 2% ;
}
.title {
height: 50rpx;
@@ -96,7 +119,7 @@
}
input{
display: flex;
- width: 70%;
+ width: 96%;
height: 45rpx;
line-height: 50rpx;
margin-left: 2%;
diff --git a/components/y-input/y-input.vue b/components/y-input/y-input.vue
index a398400..ccfe5c5 100644
--- a/components/y-input/y-input.vue
+++ b/components/y-input/y-input.vue
@@ -70,6 +70,7 @@
},
clear() {
this.val = ''
+ this.input()
}
}
diff --git a/components/y-title/y-title.vue b/components/y-title/y-title.vue
index dfbd316..65851bf 100644
--- a/components/y-title/y-title.vue
+++ b/components/y-title/y-title.vue
@@ -1,11 +1,9 @@
<template>
<view>
- <y-warpper>
<view style="display: flex;align-items: center;width: 100%;">
<view class="decorate"></view>
<view class="title">{{titleText}}</view>
</view>
- </y-warpper>
</view>
</template>
@@ -28,6 +26,7 @@
};
}
+
}
</script>
diff --git a/components/y-warpper/y-wrapper.vue b/components/y-warpper/y-warpper.vue
similarity index 94%
rename from components/y-warpper/y-wrapper.vue
rename to components/y-warpper/y-warpper.vue
index 2677a18..d31f0fa 100644
--- a/components/y-warpper/y-wrapper.vue
+++ b/components/y-warpper/y-warpper.vue
@@ -6,7 +6,7 @@
<script>
export default {
- name:"y-wrapper",
+ name:"y-warpper",
data() {
return {
diff --git a/pages/business/business.vue b/pages/business/business.vue
index 3bc5ab6..b5acea6 100644
--- a/pages/business/business.vue
+++ b/pages/business/business.vue
@@ -1,23 +1,5 @@
<template>
<view>
- <scroll-view scroll-y="true" >
- <view style="width: 96%;background-color: #fff;margin: 1% 2% 0 2%;">
- <y-title title="閿�鍞鐞�"></y-title>
- <view style="width: 100%;height: 300rpx;">璺熻釜椤圭洰</view>
- </view>
- <view style="width: 96%;background-color: #fff;margin: 1% 2% 0 2%;">
- <y-title title="椤圭洰绠$悊"></y-title>
- <view style="width: 100%;height: 300rpx;">璺熻釜椤圭洰</view>
- </view>
- <view style="width: 96%;background-color: #fff;margin: 1% 2% 0 2%;">
- <y-title title="椤圭洰璁″垝"></y-title>
- <view style="width: 100%;height: 300rpx;">璺熻釜椤圭洰</view>
- </view>
- <y-wrapper />
- <y-wrapper>
- <view style="width: 100%;height: 100rpx;background-color: blueviolet;"></view>
- </y-wrapper>
- </scroll-view>
</view>
</template>
--
Gitblit v1.9.1