Commit 936a4a3d by 胡悦

style(components): 调整表单元素样式并修复事件冒泡问题

- 为输入框添加圆角和调整高度
- 为占位文本添加行高
- 修复点击事件冒泡问题
- 移除未使用的样式代码
1 parent e7ed1fd6
...@@ -231,6 +231,7 @@ export default { ...@@ -231,6 +231,7 @@ export default {
.placeholder { .placeholder {
color: #999; color: #999;
font-size: toRpx(28); font-size: toRpx(28);
line-height: toRpx(36);
} }
.uni-list-cell { .uni-list-cell {
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<view class="staff-label">施工技师</view> <view class="staff-label">施工技师</view>
<view class="staff-value">{{ orderCardDetail.technicianName }}</view> <view class="staff-value">{{ orderCardDetail.technicianName }}</view>
</view> </view>
<PublishPopup ref="recordOrderPopup" popupClass="recordOrderPopup" type="center" :showClose="true" title="请选择录单入口"> <PublishPopup ref="recordOrderPopup" popupClass="recordOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="请选择录单入口">
<template #content> <template #content>
<view class="modatcontent"> <view class="modatcontent">
<view class="modalbox com" :class="selectType == 1 ? 'act' : ''" @click="changeType(1)"> <view class="modalbox com" :class="selectType == 1 ? 'act' : ''" @click="changeType(1)">
......
...@@ -931,164 +931,6 @@ export default { ...@@ -931,164 +931,6 @@ export default {
padding: 0 toRpx(48); padding: 0 toRpx(48);
} }
.shop-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.shop-item {
display: flex;
align-items: center;
background-color: #f5f7fa;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
padding: toRpx(24);
.right {
flex: 1;
font-size: toRpx(28);
margin-left: toRpx(24);
.shop-name {
color: #ff781f;
}
.alias {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
.front-gear-box {
display: flex;
justify-content: space-between;
margin-top: toRpx(24);
.front-gear-input-box {
display: flex;
align-items: center;
.front-gear-label {
font-size: toRpx(24);
margin-right: toRpx(24);
color: #999999;
}
.front-gear-input {
position: relative;
display: flex;
border: toRpx(2) solid #eff0f2;
background-color: #fff;
font-size: toRpx(28);
height: toRpx(70);
width: toRpx(250);
line-height: toRpx(70);
text-align: right;
.uni-input {
padding: 0 toRpx(32);
height: 100%;
}
.unit {
position: absolute;
top: 50%;
left: toRpx(32);
transform: translateY(-50%);
}
}
}
.control {
display: flex;
align-items: center;
.control-input {
width: toRpx(94);
height: toRpx(74);
background-color: #fff;
border: toRpx(2) solid #eff0f2;
padding: 0 toRpx(10);
text-align: center;
}
.minus,
.add {
width: toRpx(80);
height: toRpx(74);
line-height: toRpx(70);
text-align: center;
background-color: #fff;
border-top: toRpx(2) solid #eff0f2;
border-bottom: toRpx(2) solid #eff0f2;
}
.minus {
border-radius: toRpx(12) 0 0 toRpx(12);
border-left: toRpx(2) solid #eff0f2;
}
.add {
border-radius: 0 toRpx(12) toRpx(12) 0;
border-right: toRpx(2) solid #eff0f2;
}
}
}
.package-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.package-item {
background-color: #f5f7fa;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: toRpx(1.6) solid #dce1e6;
padding: toRpx(24);
&-left {
display: flex;
align-items: center;
font-size: toRpx(28);
.name {
margin-left: toRpx(26);
color: #999;
}
.price {
color: #666;
}
}
}
.goods-item {
padding: toRpx(24);
border-bottom: toRpx(1.6) solid #dce1e6;
&:last-child {
border-bottom: none;
}
.goods-name {
color: #ff781f;
font-size: toRpx(28);
}
.alias-name {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
.total { .total {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<view class="waitinputorder-tab-buttons"> <view class="waitinputorder-tab-buttons">
<view v-for="(item, index) in waitinputorderTabList" :key="index" class="waitinputorder-tab-button" :class="{ active: activeIndex === index }" @click="tabChange(index)"> <view v-for="(item, index) in waitinputorderTabList" :key="index" class="waitinputorder-tab-button" :class="{ active: activeIndex === index }" @click="tabChange(index)">
<text>{{ item.name }}</text> <text>{{ item.name }}</text>
<view v-if="item.showQuestion" class="question-icon" @click="showQuestionPopup()"> <view v-if="item.showQuestion" class="question-icon" @click.self="showQuestionPopup()">
<uni-icons type="help" size="16" color="#999"></uni-icons> <uni-icons type="help" size="16" color="#999"></uni-icons>
</view> </view>
</view> </view>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<view v-else class="value flex align-center"> <view v-else class="value flex align-center">
{{ subItem.type === 'time' ? formatDate(item[subItem.prop]) : item[subItem.prop] }} {{ subItem.type === 'time' ? formatDate(item[subItem.prop]) : item[subItem.prop] }}
<view v-if="subItem.type === 'copy'" class="copy-btn" @click="copyText"> <view v-if="subItem.type === 'copy'" class="copy-btn" @click.stop="copyText(item[subItem.prop])">
<view class="sprite-icon icon-icon-copy copy"></view> <view class="sprite-icon icon-icon-copy copy"></view>
复制 复制
</view> </view>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<view v-else class="value flex align-center"> <view v-else class="value flex align-center">
{{ subItem.type === 'time' ? formatDate(item[subItem.prop]) : item[subItem.prop] }} {{ subItem.type === 'time' ? formatDate(item[subItem.prop]) : item[subItem.prop] }}
<view v-if="subItem.type === 'copy'" class="copy-btn" @click="copyText"> <view v-if="subItem.type === 'copy'" class="copy-btn" @click.stop="copyText(item[subItem.prop])">
<view class="sprite-icon icon-icon-copy copy"></view> <view class="sprite-icon icon-icon-copy copy"></view>
复制 复制
</view> </view>
...@@ -271,6 +271,19 @@ export default { ...@@ -271,6 +271,19 @@ export default {
this.searchObj = val this.searchObj = val
this.search() this.search()
}, },
copyText(e) {
console.log(e)
uni.setClipboardData({
data: e,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'success',
duration: 2000
})
}
})
},
tabChange(index) { tabChange(index) {
this.activeIndex = index this.activeIndex = index
if (!this.normalOrderNoList.length) { if (!this.normalOrderNoList.length) {
......
...@@ -199,10 +199,11 @@ export default { ...@@ -199,10 +199,11 @@ export default {
border: toRpx(2) solid #eff0f2; border: toRpx(2) solid #eff0f2;
background-color: #fff; background-color: #fff;
font-size: toRpx(28); font-size: toRpx(28);
height: toRpx(70); height: toRpx(72);
width: toRpx(250); width: toRpx(250);
line-height: toRpx(70); line-height: toRpx(70);
text-align: right; text-align: right;
border-radius: toRpx(12);
.uni-input { .uni-input {
padding: 0 toRpx(32); padding: 0 toRpx(32);
......
...@@ -227,10 +227,11 @@ export default { ...@@ -227,10 +227,11 @@ export default {
border: toRpx(2) solid #eff0f2; border: toRpx(2) solid #eff0f2;
background-color: #fff; background-color: #fff;
font-size: toRpx(28); font-size: toRpx(28);
height: toRpx(70); height: toRpx(72);
width: toRpx(250); width: toRpx(250);
line-height: toRpx(70); line-height: toRpx(70);
text-align: right; text-align: right;
border-radius: toRpx(12);
.uni-input { .uni-input {
padding: 0 toRpx(32); padding: 0 toRpx(32);
......
...@@ -325,10 +325,11 @@ export default { ...@@ -325,10 +325,11 @@ export default {
border: toRpx(2) solid #eff0f2; border: toRpx(2) solid #eff0f2;
background-color: #fff; background-color: #fff;
font-size: toRpx(28); font-size: toRpx(28);
height: toRpx(70); height: toRpx(72);
width: toRpx(250); width: toRpx(250);
line-height: toRpx(70); line-height: toRpx(70);
text-align: right; text-align: right;
border-radius: toRpx(12);
.uni-input { .uni-input {
padding: 0 toRpx(32); padding: 0 toRpx(32);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!