| | |
| | | class="OwO-textarea" /> |
| | | </a-form-item> |
| | | <span class="myTip fadeIn" v-if="showTip">现在你可以发送表情啦</span> |
| | | <div ref="container" class="OwO fadeIn" v-show="init || visitorContent.length>0"></div> |
| | | <div ref="container" class="OwO fadeIn" v-show="init"></div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | watch: { |
| | | visitorContent: function(newValue, oldValue) { |
| | | if (newValue.length > 0) { |
| | | this.init = true; |
| | | this.initOwO(); |
| | | if (!this.showTip) { |
| | | if (!this.init) { |
| | | this.showTip = true; |
| | | setTimeout(() => { |
| | | this.showTip = false; |
| | | }, 5000); |
| | | } |
| | | this.init = true; |
| | | this.initOwO(); |
| | | } |
| | | this.$emit("update:content", newValue) |
| | | }, |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | initOwO() { |
| | | var OwO_demo = new OwO({ |
| | | logo: 'OωO表情', |