refs #517 Show icon image in suggest

This commit is contained in:
AkiraFukushima 2018-08-19 14:54:16 +09:00
parent 810a0660aa
commit adb7177d95
1 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,9 @@
@shortkey="insertItem(item)" @shortkey="insertItem(item)"
@mouseover="highlightedIndex = index" @mouseover="highlightedIndex = index"
:class="{'highlighted': highlightedIndex === index}"> :class="{'highlighted': highlightedIndex === index}">
<span v-if="item.image">
<img :src="item.image" class="icon" />
</span>
{{ item.name }} {{ item.name }}
</li> </li>
</ul> </ul>
@ -236,6 +239,13 @@ export default {
line-height: 34px; line-height: 34px;
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
.icon {
display: inline-block;
vertical-align: middle;
width: 20px;
height: 20px;
}
} }
.highlighted { .highlighted {