| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view>
- <scroll-view scroll-y="true" class="scroll-emoji-box">
- <view
- class="emoji-item"
- v-for="(item, index) in emoji.emojis"
- :key="index"
- @click="handleClick(item)"
- >{{ item }}</view
- >
- </scroll-view>
- </view>
- </template>
- <script>
- import { emoji } from '@/constant';
- export default {
- data() {
- return {
- emoji,
- };
- },
- methods: {
- handleClick(emoji) {
- this.$emit('appendEmojiIcon', emoji);
- },
- },
- };
- </script>
- <style scoped>
- .scroll-emoji-box {
- height: 200px;
- width: 100%;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: space-between;
- align-items: center;
- }
- .emoji-item {
- width: 10%;
- height: 37px;
- font-size: 26px;
- display: inline-block;
- text-align: center;
- line-height: 36px;
- box-sizing: border-box;
- }
- </style>
|