<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>
|