diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-12-16 08:45:10 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-12-16 08:45:10 +0900 |
| commit | b7c5c71c6fdd139406166cff697a4e94bb11384a (patch) | |
| tree | 16a70a2655782dc5f26f858651c494b10ef7771b /src/client/app/common | |
| parent | Format uptimes (#3629) (diff) | |
| download | misskey-b7c5c71c6fdd139406166cff697a4e94bb11384a.tar.gz misskey-b7c5c71c6fdd139406166cff697a4e94bb11384a.tar.bz2 misskey-b7c5c71c6fdd139406166cff697a4e94bb11384a.zip | |
[Client] Resolve #2951
あと検索フォームでサジェストを有効に
Diffstat (limited to 'src/client/app/common')
| -rw-r--r-- | src/client/app/common/views/components/messaging-room.form.vue | 2 | ||||
| -rw-r--r-- | src/client/app/common/views/directives/autocomplete.ts | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/client/app/common/views/components/messaging-room.form.vue b/src/client/app/common/views/components/messaging-room.form.vue index 97e2e16e4b..729ed640be 100644 --- a/src/client/app/common/views/components/messaging-room.form.vue +++ b/src/client/app/common/views/components/messaging-room.form.vue @@ -9,7 +9,7 @@ @keypress="onKeypress" @paste="onPaste" :placeholder="$t('input-message-here')" - v-autocomplete="'text'" + v-autocomplete="{ model: 'text' }" ></textarea> <div class="file" @click="file = null" v-if="file">{{ file.name }}</div> <mk-uploader ref="uploader" @uploaded="onUploaded"/> diff --git a/src/client/app/common/views/directives/autocomplete.ts b/src/client/app/common/views/directives/autocomplete.ts index 4440747e19..355e3bd523 100644 --- a/src/client/app/common/views/directives/autocomplete.ts +++ b/src/client/app/common/views/directives/autocomplete.ts @@ -21,21 +21,23 @@ class Autocomplete { private suggestion: any; private textarea: any; private vm: any; - private model: any; private currentType: string; + private opts: { + model: string; + }; private get text(): string { - return this.vm[this.model]; + return this.vm[this.opts.model]; } private set text(text: string) { - this.vm[this.model] = text; + this.vm[this.opts.model] = text; } /** * 対象のテキストエリアを与えてインスタンスを初期化します。 */ - constructor(textarea, vm, model) { + constructor(textarea, vm, opts) { //#region BIND this.onInput = this.onInput.bind(this); this.complete = this.complete.bind(this); @@ -45,7 +47,7 @@ class Autocomplete { this.suggestion = null; this.textarea = textarea; this.vm = vm; - this.model = model; + this.opts = opts; } /** |