瀏覽代碼

修复三级地址无法选择的问题

lighter 4 月之前
父節點
當前提交
021a45f0ae
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/views/mine/patient-id-cards/CreatePatientCard.vue

+ 6 - 6
src/views/mine/patient-id-cards/CreatePatientCard.vue

@@ -136,13 +136,13 @@ const inputInfo = reactive({
 })
 const showInputDialog = ref(false)
 const showArea = ref(false)
-const onConfirmArea = (values) => {
-  inputInfo.province = values[0].code
-  inputInfo.city = values[1].code
-  inputInfo.district = values[2].code
-  inputInfo.address = values
+const onConfirmArea = ({selectedOptions}) => {
+  inputInfo.province = selectedOptions[0].value
+  inputInfo.city = selectedOptions[1].value
+  inputInfo.district = selectedOptions[2].value
+  inputInfo.address = selectedOptions
       .filter((item) => !!item)
-      .map((item) => item.name)
+      .map((item) => item.text)
       .join('/')
   showArea.value = false
 }