123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <view
- class="chat-emoji"
- :class="[
- {
- 'is-show': visible
- }
- ]"
- >
- <scroll-view scroll-y class="scroller">
- <cl-row>
- <cl-col :span="4" v-for="(item, index) in emoji" :key="index">
- <view class="block" @tap="select(item)">
- {{item}}
- </view>
- </cl-col>
- </cl-row>
- </scroll-view>
- </view>
- </template>
- <script>
- export default {
- props: {
- visible: Boolean
- },
- data() {
- return {
- };
- },
- methods: {
- select(e) {
- this.$emit("select", e);
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .chat-emoji {
- height: 0;
- box-sizing: border-box;
- transition: height 0.3s;
- &.is-show {
- height: 400rpx;
- padding: 10rpx 0 0 0;
- }
- .scroller {
- height: 100%;
- .block {
- display: flex;
- justify-content: center;
- align-items: center;
- border-radius: 10rpx;
- height: 100rpx;
- &:active {
- background-color: #f7f7f7;
- }
- image {
- display: inline-block;
- height: 60rpx;
- width: 60rpx;
- }
- }
- }
- }
- </style>
|