Ver código fonte

u-picker确认错误

gcz 1 ano atrás
pai
commit
7f692c6199
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      center/invoice.vue

+ 3 - 2
center/invoice.vue

@@ -23,7 +23,7 @@
 						<text>{{formData.invoiceLine}}</text>
 					</view> -->
 				</view>
-				 <u-picker :show="showInvoiceLine" :columns="invoiceLineList" keyName="label" @cancel="cancelInvoiceLine" @confirm="confirmInvoiceLine" ></u-picker>
+				 <u-picker :show="showInvoiceLine" :columns="invoiceLineList" keyName="label" :immediateChange="true" @cancel="cancelInvoiceLine" @confirm="confirmInvoiceLine" ></u-picker>
 				<view class="form-item">
 					<view class="til">
 						<text>*</text>抬头名称 
@@ -181,7 +181,8 @@
 			},
 			confirmInvoiceLine(e){
 				this.showInvoiceLine = false;
-				// console.log('confirmInvoiceLine',e.value[0]);
+				console.log('confirmInvoiceLine id',e.value[0].id);
+				console.log('confirmInvoiceLine label',e.value[0].label);
 				this.formData.invoiceLine = e.value[0].id;
 				this.invoiceLineName = e.value[0].label;
 			}