flx:优化提示文字

This commit is contained in:
Rain_ 2025-07-01 18:08:04 +08:00
parent 224888eebf
commit cd324c6258
2 changed files with 20 additions and 6 deletions

View File

@ -75,8 +75,8 @@
<style scoped lang="scss">
/* 保持你的样式 */
.scroll-view {
margin: 20rpx 26rpx;
width: calc(100% - 26rpx - 26rpx);
// margin: 10rpx 26rpx;
width: calc(100%);
max-height: 60vh;
border-radius: 6rpx;
background-color: white;

View File

@ -17,7 +17,7 @@
</view>
</view>
<u-dropdown :overlay="true" active-color="#3190F3">
<u-dropdown-item @change="onMenuChage" title="班组" v-model="searchInfo.teamId" :options="teamOptions">
<u-dropdown-item @change="onMenuChage" :title="searchInfo.teamId == '' ? '班组' : dataListUp(teamOptions, searchInfo.teamId)" v-model="searchInfo.teamId" :options="teamOptions">
<view class="slot-content">
<scroll-view scroll-y="true" class="scroll-view">
<view @click="onMenuClick(item, 1)" class="cell-box" v-for="item in teamOptions"
@ -29,11 +29,11 @@
</scroll-view>
</view>
</u-dropdown-item>
<u-dropdown-item :disabled="optsDetail.enterDate == 1" @change="onMenuChage" title="进场日期"
<u-dropdown-item :title="searchInfo.enterDate == '' ? '进场日期' : dataListUp(enterDateList, searchInfo.enterDate)" :disabled="optsDetail.enterDate == 1" @change="onMenuChage"
v-model="searchInfo.enterDate" :options="enterDateList"></u-dropdown-item>
<u-dropdown-item @change="onMenuChage" v-model="searchInfo.inserviceType" :options="inserviceTypeList"
:title="inserviceTypeListUp"></u-dropdown-item>
<u-dropdown-item @change="onMenuChage" title="工种" v-model="searchInfo.workerTypeId"
<u-dropdown-item @change="onMenuChage" :title="searchInfo.enterDate == '' ? '工种' : dataListUp(workerTypeList, searchInfo.workerTypeId)" v-model="searchInfo.workerTypeId"
:options="workerTypeList">
<view class="slot-content">
<scroll-view scroll-y="true" class="scroll-view">
@ -405,6 +405,12 @@
const find = this.inserviceTypeList.find(item => item.value == this.searchInfo.inserviceType);
console.log(112233, find)
return find ? find.text : '--'
},
dataListUp() {
return (dataList, id) => {
const find = dataList.find(item => item.value == id);
return find ? find.text : '--'
}
}
}
}
@ -412,11 +418,19 @@
<style scoped lang="scss">
.scroll-view {
margin: 20rpx 26rpx;
margin: 10rpx 26rpx;
width: calc(100% - 26rpx - 26rpx);
max-height: 60vh;
border-radius: 6rpx;
}
/deep/ .u-dropdown__menu__item__text {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/* 限制为两行 */
overflow: hidden;
}
.cell-box {
display: flex;