-
Notifications
You must be signed in to change notification settings - Fork 48
/
exampleI18N.vue
62 lines (57 loc) · 1.06 KB
/
exampleI18N.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<template>
<div class="example">
<h2>I18n picker example</h2>
<div class="row">Picker with category translations.</div>
<div class="row">
<Picker emoji="department_store" :data="indexI18n" :i18n="i18n" />
</div>
</div>
</template>
<script>
import data from '../data/all.json'
import { Picker, EmojiIndex } from '../src'
const i18n = {
categories: {
search: '搜索结果',
recent: '经常使用',
smileys: '心情',
people: '人物',
nature: '动物 & 大自然',
foods: '食物 & 饮料',
activity: '活动',
places: '旅行 & 地标',
objects: '物体',
symbols: '符号',
flags: '国旗',
custom: '自定义',
},
}
const indexI18n = new EmojiIndex(data, {
exclude: [
'flags',
'symbols',
'objects',
'activity',
'foods',
'people',
'places',
],
})
export default {
props: {
index: {
type: Object,
},
},
data() {
return {
indexI18n: indexI18n,
i18n: i18n,
}
},
components: {
Picker,
},
}
</script>
<style scoped></style>