<template>
  <div>
    <button @click="openNotepad">打开记事本</button>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods: {
    openNotepad() {
      if (window.electronAPI) {
        console.log('Calling openNotepad');
        window.electronAPI.openNotepad();
      } else {
        console.error('electronAPI is not defined');
      }
    }
  }
}
</script>
