inleft
2022-08-30 afab3a98a65f7fb4f342251238ab3c329e4242dd
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<template>
    <div class="OwO fadeIn " style="" v-bind:class="{'OwO-open':open}">
        <div class="OwO-logo" @click="openOwO"><span>OωO</span></div>
        <div class="OwO-body" style="width: 100%">
            <div class="OwO-jio"></div>
 
            <ul class="OwO-items OwO-items-emoticon " style="max-height: 197px;"
                v-for="(packageKey, index ) in packages" v-bind:class="{'OwO-items-show':selectTabIndex==index}">
            <!--     {{myConfig[packageKey].container.length}}
                {{myConfig[packageKey].container}} -->
                
                <li v-if="myConfig[packageKey].type=='image'" class="OwO-item" :data-id="item.data" :title="item.text"
                    v-for="(item,index ) in myConfig[packageKey].container">
                    <img loading="lazy" :class="'biaoqing '+item.data" :src="item.icon">
                </li>
 
                <li v-else class="OwO-item" :data-id="item.data" :title="item.text"
                    v-for="(item,index ) in myConfig[packageKey].container">
                    {{item.icon}}
                </li>
 
                <!-- <li class="OwO-item" data-id="${opackage[i].data}" title="${opackage[i].text}">
                    <img loading="lazy" class="biaoqing ${opackage[i].css}" src="${opackage[i].icon}"></li>`
                </li> -->
            </ul>
 
            <div class="OwO-bar">
                <ul class="OwO-packages">
                    <li v-bind:class="{'OwO-package-active':selectTabIndex==0}" @click="switchTab(0)"><span>颜文字</span>
                    </li>
                    <li v-bind:class="{'OwO-package-active':selectTabIndex==1}" @click="switchTab(1)"><span>Emoji</span>
                    </li>
                    <li v-bind:class="{'OwO-package-active':selectTabIndex==2}" @click="switchTab(2)"><span>蛆音娘</span>
                    </li>
                    <li v-bind:class="{'OwO-package-active':selectTabIndex==3}" @click="switchTab(3)"><span>阿鲁</span>
                    </li>
                    <li v-bind:class="{'OwO-package-active':selectTabIndex==4}" @click="switchTab(4)"><span>泡泡</span>
                    </li>
                    <li v-bind:class="{'OwO-package-active':selectTabIndex==5}" @click="switchTab(5)"><span>Heo</span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</template>
 
<script>
    import OwOjsonConfig from '../../assets/OwO.json'
 
    export default {
        data() {
            return {
                open: true,
                selectTabIndex: 0,
                tabNameList: [],
                packages: null,
                myConfig: OwOjsonConfig,
            }
        },
        mounted() {
            this.init()
        },
        methods: {
            switchTab(index) {
                // this.$message.info(index)
                this.selectTabIndex = index;
            },
            openOwO() {
                this.open = !this.open
                this.init()
            },
            init() {
                if (this.packages != null) {
                    return
                }
                this.packages = Object.keys(OwOjsonConfig);
            }
        }
    }
</script>
 
<style>
</style>