ShuangGouSheSeDetail.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <script setup>
  2. import { onMounted } from 'vue'
  3. import { useRouter } from 'vue-router'
  4. import useSizeAdapt from "@/useFunctions/useSizeAdapt"
  5. const router = useRouter()
  6. const goBack = () => {
  7. router.push({
  8. name: 'MoreContent',
  9. query: {
  10. anchorIdx: 0,
  11. }
  12. })
  13. }
  14. const {
  15. windowSizeInCssForRef,
  16. windowSizeWhenDesignForRef,
  17. } = useSizeAdapt()
  18. const reverseArray = (array) => {
  19. return array.slice().reverse()
  20. }
  21. const goPaintingDetail = () =>{
  22. router.push('/shuanggou-painting-detail?idx=0')
  23. }
  24. const x = window.innerWidth / window.innerHeight
  25. onMounted(() => {
  26. console.log('shuchubili', x)
  27. })
  28. const text = [
  29. '设色,国画中晕染彩色的意思,',
  30. '画面中只要出现彩色就可以说是设色作品。',
  31. '双钩,用线条钩描物象的轮廓,通称',
  32. '“勾勒”,因基本上是用左右或上下',
  33. '两笔钩描合拢,沿字的笔迹两边用细',
  34. '劲的墨线钩出轮廓,也叫“双钩”'
  35. ]
  36. </script>
  37. <template>
  38. <div
  39. class="home"
  40. >
  41. <div class="title">
  42. 双钩设色
  43. </div>
  44. <div class="shuanggou-yezi">
  45. <img
  46. src="@/assets/images/shuanggou-top-left.png"
  47. alt=""
  48. >
  49. <HotspotComp
  50. v-show="true"
  51. class="hotspot-1"
  52. @click="goPaintingDetail"
  53. />
  54. </div>
  55. <!-- <img
  56. class="text"
  57. src="@/assets/images/shuanggou-text.png"
  58. alt=""
  59. > -->
  60. <div
  61. class="text"
  62. :style="{top: x> 0.5 ?'auto':'',bottom: x > 0.5 ? '7vh':''}"
  63. >
  64. <div
  65. v-for="(item,index) in reverseArray(text)"
  66. :key="index"
  67. >
  68. {{ item }}
  69. </div>
  70. </div>
  71. <img
  72. class="right-bottom"
  73. src="@/assets/images/right-bottom.png"
  74. alt=""
  75. >
  76. <div class="system-btns">
  77. <BtnBack
  78. color="green"
  79. @click="goBack"
  80. />
  81. <!-- <OperationTip
  82. class="operation-h"
  83. color="green"
  84. text=""
  85. direction="h"
  86. /> -->
  87. </div>
  88. </div>
  89. </template>
  90. <style lang='less' scoped>
  91. .home{
  92. width: 100%;
  93. height: 100%;
  94. position: relative;
  95. background: #ffffff;
  96. .title{
  97. color: #474747;
  98. font-size: calc(48 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  99. line-height: calc(48 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  100. writing-mode: vertical-rl;
  101. font-family: 'KingHwa_OldSong';
  102. position: absolute;
  103. right: 13%;
  104. top: 26%;
  105. letter-spacing: 10px;
  106. }
  107. .shuanggou-yezi{
  108. width: 100%;
  109. animation: fade-in 5s forwards;
  110. position: relative;
  111. z-index:2;
  112. @keyframes fade-in {
  113. 0%{
  114. opacity: 0;
  115. }
  116. 100%{
  117. opacity: 1;
  118. }
  119. }
  120. >img{
  121. width: 100%;
  122. margin-top: -3%;
  123. }
  124. >.hotspot-1{
  125. position: absolute;
  126. bottom: 28%;
  127. left: 17%;
  128. pointer-events: initial;
  129. z-index:3;
  130. }
  131. }
  132. .text{
  133. display: flex;
  134. position: absolute;
  135. right: 30%;
  136. top: 45vh;
  137. // top: calc(50 /v-bind('windowSizeWhenDesignForRef')/v-bind('windowSizeInCssForRef'));
  138. color: #707F48;
  139. font-size: calc(16 /v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  140. line-height: calc(30 /v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  141. font-family: 'KaiTi';
  142. >div{
  143. writing-mode: vertical-rl;
  144. letter-spacing: 2px;
  145. }
  146. }
  147. .right-bottom{
  148. width: 100%;
  149. position: absolute;
  150. bottom: 0;
  151. right: 0;
  152. }
  153. .system-btns {
  154. width: 100%;
  155. padding: 0 calc(20 / v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef));
  156. display: flex;
  157. // flex-direction: column;
  158. justify-content: flex-end;
  159. position: absolute;
  160. bottom: calc(60 /v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef));
  161. z-index: 2;
  162. .operation-h {
  163. width: calc(36 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  164. transition: opacity 0.5s ease-in-out;
  165. }
  166. }
  167. }
  168. </style>