|
@@ -25,7 +25,7 @@ const activeIndex_svg = ref(-1)
|
|
|
|
|
|
const containerWidth_left = 332
|
|
|
const containerHeight_left = 325
|
|
|
-const containerWidth_right = 332
|
|
|
+const containerWidth_right = 302
|
|
|
const svgNum_left = ref([3, 4, 5])
|
|
|
const svgNum_right = ref([
|
|
|
[5, 2, 9],
|
|
@@ -115,9 +115,16 @@ function changeImg(flag: number, index: number) {
|
|
|
activeIndex_svg.value = index
|
|
|
}
|
|
|
else {
|
|
|
- swapElements(coordinateSet.value, tempIndex, index)
|
|
|
- tempIndex = -1
|
|
|
- activeIndex_svg.value = -1
|
|
|
+ if (coordinateSet.value[tempIndex].positionDes.includes('right') && coordinateSet.value[index].positionDes.includes('right')) {
|
|
|
+ tempIndex = index
|
|
|
+ activeIndex_svg.value = index
|
|
|
+ return
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ swapElements(coordinateSet.value, tempIndex, index)
|
|
|
+ tempIndex = -1
|
|
|
+ activeIndex_svg.value = -1
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (flag === 0 || flag === 1) {
|
|
@@ -221,15 +228,15 @@ defineExpose({
|
|
|
<section class="picture-puzzle-child-container relative h-full w-full" @click="resetIndex">
|
|
|
<van-image
|
|
|
:src="imgUrl(showData.tipImg)"
|
|
|
- class="absolute left-[51vh] top-0 h-[21vh] w-[21vh] overflow-hidden rounded-[8px]"
|
|
|
+ class="absolute left-[51vh] top-0 h-[20%] w-[20%] overflow-hidden rounded-[8px]"
|
|
|
/>
|
|
|
<div
|
|
|
- class="tips-center absolute left-[74vh] top-[-46px] z999 h-[80px] w-[24vh] overflow-hidden text-center text-[24px] font-600 line-height-[104px]"
|
|
|
+ class="tips-center absolute right-[10px] top-[-46px] z999 h-[80px] w-[24%] overflow-hidden text-center text-[24px] font-600 line-height-[104px]"
|
|
|
>
|
|
|
当前难度{{ levelStrArr[showData.level! - 1] }}
|
|
|
</div>
|
|
|
<div
|
|
|
- class="absolute left-[76vh] top-[55px] z29 h-[38px] w-[21vh] overflow-hidden text-center text-[19px] font-600 line-height-[38px]"
|
|
|
+ class="absolute left-[75.5%] top-[55px] z29 h-[38px] w-[21vh] overflow-hidden text-center text-[19px] font-600 line-height-[38px]"
|
|
|
>
|
|
|
<PPCountDown
|
|
|
ref="PPCountDownRef"
|
|
@@ -263,7 +270,7 @@ defineExpose({
|
|
|
:key="index"
|
|
|
:src="imgUrl(item)"
|
|
|
:style="coordinateSet[index]"
|
|
|
- :class="{ '!border-[6px]': activeIndex_svg === index }"
|
|
|
+ :class="{ activeImg: activeIndex_svg === index }"
|
|
|
class="z49 m-[4px] cursor-pointer overflow-hidden border-white rounded-[10px] !absolute hover:border-[4px] hover:shadow-2xl"
|
|
|
@click.stop="changeImg(2, index)"
|
|
|
/>
|
|
@@ -284,7 +291,14 @@ defineExpose({
|
|
|
<style scoped lang="less">
|
|
|
.picture-puzzle-child-container {
|
|
|
:deep(.van-image) {
|
|
|
+ &.activeImg {
|
|
|
+ scale: 1.06;
|
|
|
+ border: 4px solid white;
|
|
|
+ box-shadow: 0 0 10px #134fa4;
|
|
|
+ }
|
|
|
+
|
|
|
transition:
|
|
|
+ scale 0.1s linear,
|
|
|
border 0.1s linear,
|
|
|
left 0.35s ease-in-out,
|
|
|
top 0.35s ease-in-out,
|