flx:修改样式问题

This commit is contained in:
X_Rian 2024-06-19 11:25:04 +08:00
parent e5033f0b6c
commit 2ec7bdac0a
5 changed files with 59 additions and 21 deletions

View File

@ -17,7 +17,7 @@
<!-- title == '司机姓名' -->
<uni-data-checkbox v-if="formProps.expanding" :map="optionsKeyMap" v-model="__value"
:localdata="dataOptions" />
<picker class="picker" v-else-if="title == '司机姓名'" @cancel="onCancel" @change="ok2" mode="selector"
<picker class="picker" v-else-if="title == '司机姓名'" @cancel="onCancel" @change="ok2" mode="selector" ref="pickerBottom"
:value="index" range-key="name" :range="dataOptions2">
<uni-search-bar v-if="isSearch" bgColor="#fff" v-model="searchValue" class="search" radius="5"
placeholder="请输入" clearButton="auto" cancelButton="none" @input="searchChange" />
@ -25,8 +25,7 @@
<click-input @click="isSearchFn()" :value="(modelValue || []).length > 0 ? dataOptions[index]:null"
index="name" :placeholder="formProps.placeholder || '请选择'" />
</picker>
<picker v-else @change="ok" mode="selector" :value="index" range-key="name"
:range="dataOptions">
<picker v-else @change="ok" mode="selector" :value="index" range-key="name" :range="dataOptions">
<click-input :value="(modelValue || []).length > 0 ? dataOptions[index]:null" index="name"
:placeholder="formProps.placeholder || '请选择'" />
</picker>
@ -160,6 +159,7 @@
//
const isSearch = ref(false);
const searchValue = ref("");
const searchBottom = ref(0);
function searchChange(e) {
console.log(e);
@ -174,7 +174,24 @@
isSearch.value = false;
}
const isSearchFn = () => {
//.boxclassbox使id= 'box' 使'#box'
// uni.createSelectorQuery().in(this).select('.picker').boundingClientRect(data => {
// console.log(JSON.stringify(data))
// console.log(data.height / 100 * window.innerHeight,window.innerHeight)
// console.log(uni.getSystemInfoSync().windowHeight, uni.getSystemInfoSync().windowWidth)
// uni.getSystemInfo({
// success: function (res) {
// console.log(res.screenHeight);
// console.log(res.windowHeight);
// console.log(data.height / 100 * res.screenHeight)
// // data.height / 100 * res.screenHeight - 22
// // searchBottom.value = (45 / 8) + 238;
// }
// });
// // (data.height / 100 * window.innerHeight) * 1.48
// }).exec()
setTimeout(() => {
isSearch.value = true;
}, 500)
@ -311,20 +328,21 @@
}
</script>
<style>
.uni-picker-custom {
:deep(.uni-picker-custom){
height: 480rpx;
}
</style>
<style scoped>
.search {
position: fixed;
bottom: 465rpx;
/* bottom: 465rpx; */
bottom: 400rpx;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
padding:0;
padding: 0;
}
.search /deep/ .uni-searchbar__box {
width: 400rpx;
border: 2rpx solid #f5f5f5;

View File

@ -18554,7 +18554,7 @@ ${i3}
doRequest(dataOptions.value);
}
} catch (e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:124", e2);
formatAppLog("log", "at components/form/SelectPlus.vue:123", e2);
}
}
vue.watch(() => dataOptions, () => {
@ -18585,8 +18585,10 @@ ${i3}
}
const isSearch = vue.ref(false);
const searchValue = vue.ref("");
vue.ref(0);
const pickerBottom = vue.ref(null);
function searchChange(e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:165", e2);
formatAppLog("log", "at components/form/SelectPlus.vue:166", e2);
let findList = dataOptions.value.filter((item) => item.name.includes(e2));
dataOptions2.value = findList;
if (e2 == "") {
@ -18597,6 +18599,19 @@ ${i3}
isSearch.value = false;
};
const isSearchFn = () => {
uni.createSelectorQuery().in(this).select(".picker").boundingClientRect((data) => {
formatAppLog("log", "at components/form/SelectPlus.vue:180", JSON.stringify(data));
formatAppLog("log", "at components/form/SelectPlus.vue:181", data.height / 100 * window.innerHeight, window.innerHeight);
formatAppLog("log", "at components/form/SelectPlus.vue:182", uni.getSystemInfoSync().windowHeight, uni.getSystemInfoSync().windowWidth);
uni.getSystemInfo({
success: function(res) {
formatAppLog("log", "at components/form/SelectPlus.vue:185", res.screenHeight);
formatAppLog("log", "at components/form/SelectPlus.vue:186", res.windowHeight);
formatAppLog("log", "at components/form/SelectPlus.vue:187", data.height / 100 * res.screenHeight);
}
});
}).exec();
formatAppLog("log", "at components/form/SelectPlus.vue:195", pickerBottom.value.offsetHeight);
setTimeout(() => {
isSearch.value = true;
}, 500);
@ -18663,7 +18678,7 @@ ${i3}
try {
preHandlerFuc(params);
} catch (e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:250", e2);
formatAppLog("log", "at components/form/SelectPlus.vue:269", e2);
}
}
}
@ -18710,7 +18725,7 @@ ${i3}
try {
return aftHandlerFuc(rsp) || [];
} catch (e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:307", e2);
formatAppLog("log", "at components/form/SelectPlus.vue:326", e2);
}
}
return [];
@ -18776,6 +18791,8 @@ ${i3}
onCancel,
onChange: ok2,
mode: "selector",
ref_key: "pickerBottom",
ref: pickerBottom,
value: index2.value,
"range-key": "name",
range: dataOptions2.value

View File

@ -3454,18 +3454,19 @@ body[data-v-029c2886] {
}
.uni-picker-custom[data-v-efe1296e] {
height: 15rem;
[data-v-efe1296e] .uni-picker-custom{
height: 15rem
}
.search[data-v-efe1296e] {
position: fixed;
/* bottom: 465rpx; */
bottom: 12.34375rem;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
padding:0;
padding: 0;
}
.search[data-v-efe1296e] .uni-searchbar__box {
width: 12.5rem;

View File

@ -3389,18 +3389,19 @@ body[data-v-029c2886] {
}
.uni-picker-custom[data-v-efe1296e] {
height: 15rem;
[data-v-efe1296e] .uni-picker-custom{
height: 15rem
}
.search[data-v-efe1296e] {
position: fixed;
/* bottom: 465rpx; */
bottom: 12.34375rem;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
padding:0;
padding: 0;
}
.search[data-v-efe1296e] .uni-searchbar__box {
width: 12.5rem;

View File

@ -3455,18 +3455,19 @@ body[data-v-029c2886] {
}
.uni-picker-custom[data-v-efe1296e] {
height: 15rem;
[data-v-efe1296e] .uni-picker-custom{
height: 15rem
}
.search[data-v-efe1296e] {
position: fixed;
/* bottom: 465rpx; */
bottom: 12.34375rem;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
padding:0;
padding: 0;
}
.search[data-v-efe1296e] .uni-searchbar__box {
width: 12.5rem;