編集モードの初期表示時に入力済みタグが反映されていなかったので、現在のタグを配信させるイベントを定義

This commit is contained in:
shibafu 2019-07-04 22:34:28 +09:00
parent 38eb0348f9
commit f4abb08921
2 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,7 @@
created() {
bus.$on("change-tag", (tags: string[]) => this.tags = tags);
bus.$emit("resend-tag");
}
addTag(tag: string) {

View File

@ -31,6 +31,7 @@
created() {
bus.$on("add-tag", (tag: string) => this.tags.indexOf(tag) === -1 && this.tags.push(tag));
bus.$on("resend-tag", () => bus.$emit("change-tag", this.tags));
}
onKeyDown(event: KeyboardEvent) {