|
@@ -0,0 +1,155 @@
|
|
|
+<template>
|
|
|
+ <view class="luojigou-board-v2" >
|
|
|
+ <view class="process" >
|
|
|
+ <span>{{process + 1}}</span>/6
|
|
|
+ </view>
|
|
|
+ <view class="board" >
|
|
|
+ <view class="button-list" >
|
|
|
+ <view class="button" v-for="(item, index) in buttonListCpd" :key="item" >
|
|
|
+ <image class="icon" :src="staticImg[item]" alt="" />
|
|
|
+ <image v-if="index < process" class="right-icon" :src="staticImg.rightIcon" alt="" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view :class="['question-card', aniState ? 'question-card-small' : 'question-card-ani']" >
|
|
|
+ <!-- <image :src="staticImg.green" alt="" /> -->
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="answer" >
|
|
|
+ <view class="answer-list" >
|
|
|
+ <view class="answer-item" >
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts" >
|
|
|
+import { useStaticImg, useSchedulerOnce } from '@/hooks'
|
|
|
+import { computed, onMounted, ref } from 'vue';
|
|
|
+
|
|
|
+interface IProps {
|
|
|
+ process: number
|
|
|
+}
|
|
|
+
|
|
|
+const staticImg = useStaticImg()
|
|
|
+
|
|
|
+const aniState = ref<boolean>(false)
|
|
|
+
|
|
|
+const buttonList = ['red', 'green', 'blue', 'orange', 'purple', 'yellow']
|
|
|
+
|
|
|
+const buttonListCpd = computed(() => buttonList.slice(0, props.process + 1))
|
|
|
+
|
|
|
+const props = defineProps<IProps>()
|
|
|
+
|
|
|
+useSchedulerOnce(() => {
|
|
|
+ aniState.value = true
|
|
|
+}, 1900)
|
|
|
+
|
|
|
+
|
|
|
+// 卡片展示的1s动画
|
|
|
+onMounted(() => {
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+<style lang="less" scoped >
|
|
|
+.luojigou-board-v2 {
|
|
|
+ position: relative;
|
|
|
+ .process {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 65rpx;
|
|
|
+ background: #FFC047;
|
|
|
+ position: absolute;
|
|
|
+ top: 61rpx;
|
|
|
+ left: -5rpx;
|
|
|
+ font-size: 10rpx;
|
|
|
+ font-family: PingFang SC-Semibold, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #FFFFFF;
|
|
|
+ white-space: normal;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-top-left-radius: 14rpx;
|
|
|
+ border-bottom-left-radius: 14rpx;
|
|
|
+ span {
|
|
|
+ font-size: 16rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .board {
|
|
|
+ width: 354rpx;
|
|
|
+ height: 354rpx;
|
|
|
+ background: url('@/assets/GameViewV2/board.png') no-repeat top right;
|
|
|
+ .button-list {
|
|
|
+ position: absolute;
|
|
|
+ top: 24rpx;
|
|
|
+ right: 12rpx;
|
|
|
+ .button {
|
|
|
+ width: 36rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ margin-bottom: 11rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ .icon {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .right-icon {
|
|
|
+ width: 20rpx;
|
|
|
+ height: 20rpx;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .question-card {
|
|
|
+ width: 254rpx;
|
|
|
+ height: 284rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ position: absolute;
|
|
|
+ top: 12rpx;
|
|
|
+ left: 41rpx;
|
|
|
+ transform-origin: 100% 0%;
|
|
|
+ image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .question-card-ani {
|
|
|
+ animation: card-ani 1s ease 1s;
|
|
|
+ }
|
|
|
+
|
|
|
+ .question-card-small {
|
|
|
+ scale: 20%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .answer {
|
|
|
+ .answer-list {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+@keyframes card-ani {
|
|
|
+ 0% {
|
|
|
+ scale: 100%;
|
|
|
+ };
|
|
|
+ 100% {
|
|
|
+ scale: 20%;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|