| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <template>
- <view class="question-card__wrap">
- <view class="question-card__head">
- <view class="question-card__head-title">{{ props.datas ? props.datas.title : '' }}</view>
- </view>
- <view class="question-card__body">
- <template v-if="props.datas">
- <view class="question-card__item" v-for="(item, index) in props.datas.faq" :key="index" @click="onQuestionSend(item)">
- <view class="question-card__item-content">
- {{ item }}
- </view>
- </view>
- </template>
- </view>
- </view>
- </template>
- <script setup>
- import { inject } from 'vue'
- const props = defineProps({
- datas: {
- type: Object,
- default() {
- return null
- }
- }
- })
- const onQuestionSend = inject('onQuestionSend');
- </script>
- <style lang="less" scoped>
- .question-card__wrap {
- width: 100%;
- height: auto;
- padding: 16rpx 24rpx;
- border-radius: 20rpx;
- background: #FAFAFA;
- }
- .question-card__head {
- width: 100%;
- height: 44rpx;
-
- .question-card__head-title {
- font-size: 26rpx;
- font-weight: 500;
- color: #000;
- }
- }
- .question-card__body {
- display: flex;
- flex-wrap: wrap;
- margin-top: 8px;
- gap: 20rpx;
-
- .question-card__item {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 16rpx;
- background-color: #fff;
- border-radius: 12rpx;
- border: 1rpx solid #999;
- }
-
-
- .question-card__item-content {
- font-size: 26rpx;
- color: #000;
- }
- }
- </style>
|