UNPKG

@simoko/tw-zip

Version:

台灣縣市、行政區、郵遞區號(3碼/6碼)查詢工具,支援 React/Vue/Svelte/SolidJS/Angular

47 lines (43 loc) 1.31 kB
import * as vue from 'vue'; import { Zip6Result } from '../zip6/index.cjs'; interface SearchResult { city: string; area: string; road: string; } declare function useTwZip6(): { cities: string[]; areas: vue.Ref<string[], string[]>; roads: vue.Ref<string[], string[]>; city: vue.Ref<string, string>; area: vue.Ref<string, string>; road: vue.Ref<string, string>; number: vue.Ref<number | undefined, number | undefined>; lane: vue.Ref<number | undefined, number | undefined>; alley: vue.Ref<number | undefined, number | undefined>; searchRoads: (keyword: string) => void; searchResults: vue.Ref<{ city: string; area: string; road: string; }[], SearchResult[] | { city: string; area: string; road: string; }[]>; zipCode: vue.ComputedRef<string>; zip3: vue.ComputedRef<string>; result: vue.ComputedRef<Zip6Result | undefined>; }; declare function useTwZip(): { cities: string[]; districts: vue.Ref<{ [key: string]: string; }[], { [key: string]: string; }[]>; city: vue.Ref<string, string>; district: vue.WritableComputedRef<string, string>; zipCode: vue.Ref<string, string>; }; export { type SearchResult, useTwZip as default, useTwZip, useTwZip6 };