Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Commit 63cb5f1

Browse files
committed
feat: add highlighting
1 parent bc74a7e commit 63cb5f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/ssr/src/Search.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<ais-results>
66
<template scope="{ result }">
77
<li>
8-
{{ result.name }}
8+
<ais-highlight :result="result" attribute-name="name"></ais-highlight>
99
</li>
1010
</template>
1111
</ais-results>
@@ -30,6 +30,8 @@ export default {
3030
3131
store.indexName = 'ikea';
3232
store.query = route.params.query ? route.params.query : '';
33+
store.highlightPreTag = '<mark>';
34+
store.highlightPostTag = '</mark>';
3335
store.start();
3436
3537
return store.waitUntilInSync().then(() => {

0 commit comments

Comments
 (0)