解决小bug

This commit is contained in:
许允枞 2024-10-31 14:34:44 +08:00
parent 4afceb2415
commit 466f8f20d2
2 changed files with 6 additions and 4 deletions

View File

@ -29,7 +29,7 @@
</u-form-item>
<!-- @click="brandType = true;"-->
<u-form-item label="车辆品牌" labelWidth="200">
<picker @change="picker($event)" :value="arrayIndex" :range="brandList" range-key="brandName">
<picker @change="picker($event)" :value="arrayIndex" :range="brandList" range-key="brandName" v-if="brandList">
<view class="uni-input">{{ brandList && brandList[arrayIndex] ? brandList[arrayIndex].brandName : '' }}</view>
</picker>
</u-form-item>
@ -41,7 +41,7 @@
></u-input>
</u-form-item>
<u-form-item class="formItem" label="车辆性质" labelWidth="200">
<picker @change="natureChange" :value="natureIndex" :range="natureList" range-key="value">
<picker @change="natureChange" :value="natureIndex" :range="natureList" range-key="value" v-if="natureList">
<view class="uni-input">{{ natureList[natureIndex].value}}</view>
</picker>
</u-form-item>
@ -349,7 +349,9 @@ export default {
async getNatureList() {
this.natureList= getDictByCode('car_nature')
if (this.bo2 == true) {
this.car.carNature = this.natureList[0].value;
// setTimeout(() => {
// this.car.carNature = this.natureList[0].value;
// }, 15000)
} else {
// index
this.natureList.forEach((item, index) => {

View File

@ -20,7 +20,7 @@
<u-input v-model="project.spec" border="none" placeholder="请输入规格"></u-input>
</u-form-item>
<u-form-item borderBottom label="单位" labelWidth="200">
<picker @change="picker($event)" :value="arrayIndex" :range="unitList" range-key="label">
<picker @change="picker($event)" :value="arrayIndex" :range="unitList" range-key="label" v-if="unitList">
<view class="uni-input">{{ unitList[arrayIndex].label }}</view>
</picker>
</u-form-item>