อำเภอ/เขต

<addressinput-district>

Props

store

ประเถท: DataStore

ค่าเริ่มต้น: defaultStore

store สำหรับเก็บข้อมูลที่อยู่

autocompleteMaxHeight

ประเถท: number

ค่าเริ่มต้น: 200

ความสูงสูงสุดของ autocomplete

autocompleteItemCount

ประเถท: number

ค่าเริ่มต้น: 5

จำนวนรายการที่จะให้แสดงใน autocomplete

inputClass

ประเถท: string

CSS class สำหรับ <input> ภายใน component

label

ประเถท: string

ค่าเริ่มต้น: "อำเภอ/เขต"

label ของช่องกรอกที่อยู่

คุณสามารถใช้ attribute ต่างๆของ <input type="text"> กับ component ได้โดยตรง

Events

itemselect

event ที่จะถูกเรียกเมื่อมีการเลือกที่อยู่ใน autocomplete

event นี้จะส่ง parameter กลับมา 1 ตัว ซึ่งก็คือ object ของที่อยู่ที่ถูกเลือก

export default { methods: { onItemSelected({ subdistrict, district, province, zipcode }) { subdistrict; // ตำบล/แขวง district; // อำเภอ/เขต province; // จังหวัด zipcode; // รหัสไปรษณีย์ } } };