const VueGov = Vue.createApp({ setup() { const govs = ref([]); onMounted(() => { fetch('./data/gov_list.json') .then(res => res.json()) .then(data => { govs.value = data; }) .catch(err => console.error('JSON読み込み失敗:', err)); }); const sortedGovs = computed(() => { return govs.value.slice().sort((a, b) => a.code.localeCompare(b.code)); }); return { sortedGovs }; } }).mount('#govApp');