Skip to content

Commit

Permalink
同じ設定ファイルを複数回読み込めない (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
jp7eph authored Aug 6, 2023
1 parent e2ed6ca commit 0ac1651
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/Options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const templates: Template[] = [];
const templatesRef = ref(templates);
const input = ref();
const inputReset = ref();
const snackbar = ref(false);
const snackbarText = ref("");
Expand Down Expand Up @@ -115,7 +116,8 @@ function importSetting() {
}
};
// FIXME: file input elementがうまく初期化出来ない
// HACK: input elementが初期化出来ないのでresetボタン押下で無理やり初期化
inputReset.value.click();
}
function resetSetting() {
Expand Down Expand Up @@ -213,13 +215,16 @@ function showSnackBar(text: string, color: string) {
<v-icon></v-icon>
<v-tooltip activator="parent">インポート</v-tooltip>
</v-btn>
<input
ref="input"
type="file"
accept="application/json"
style="display: none"
@change="importSetting"
/>
<form>
<input
ref="input"
type="file"
accept="application/json"
style="display: none"
@change="importSetting"
/>
<input ref="inputReset" type="reset" style="display: none" />
</form>
</div>
</v-row>
<v-row no-gutters class="mb-4">
Expand Down

0 comments on commit 0ac1651

Please sign in to comment.