RightCard.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <!--
  2. * @since: 2024-12-30
  3. * RightCard.vue
  4. -->
  5. <template>
  6. <div class="right">
  7. <div class="top-head">
  8. 实时效果
  9. <el-tooltip
  10. effect="dark"
  11. content="实例样式仅供参考,最终展示以线上为准"
  12. placement="top-start"
  13. >
  14. <img src="@/assets/icons/info.png" />
  15. </el-tooltip>
  16. </div>
  17. <div class="tabs">
  18. <el-tabs v-model="activeName">
  19. <el-tab-pane label="平台侧" name="platform" class="platform">
  20. <div class="tabs-content">
  21. <div class="title">
  22. <div class="vertical"></div>
  23. <span>卡片页:</span>
  24. </div>
  25. <div class="card">
  26. <div class="card-title"
  27. >系统公告<a>去查看<img src="@/assets/icons/arrow.png" /></a
  28. ></div>
  29. <div class="card-content">
  30. <p style="font-size: 12px; color: #969799">2024年6月25日 16:45:06</p>
  31. <p style="margin-top: 5px; font-size: 13px; color: #646566">
  32. {{ ruleForm.title || title }}
  33. </p>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="tabs-content">
  38. <div class="title">
  39. <div class="vertical"></div>
  40. <span>详情页:</span>
  41. </div>
  42. <div class="info">
  43. <div class="info-title"> {{ ruleForm.title || title }} </div>
  44. <div class="info-content">
  45. <span>{{ ruleForm.introductio || content }}</span>
  46. </div>
  47. </div>
  48. </div>
  49. </el-tab-pane>
  50. <el-tab-pane label="蓝信侧" name="lanxin" class="lanxin">
  51. <div class="tabs-content">
  52. <div class="title">
  53. <div class="vertical"></div>
  54. <span>卡片页:</span>
  55. </div>
  56. <div class="card">
  57. <div class="card-title">系统公告</div>
  58. <div class="card-content">
  59. <p style="margin-top: 5px; font-size: 13px; color: #646566">
  60. {{ ruleForm.title || title }}
  61. </p>
  62. </div>
  63. <img src="@/assets/icons/link_icon.png" />
  64. </div>
  65. </div>
  66. <div class="tabs-content">
  67. <div class="title">
  68. <div class="vertical"></div>
  69. <span>详情页:</span>
  70. </div>
  71. <div class="info">
  72. <div class="info-title"> {{ ruleForm.title || title }} </div>
  73. <div class="info-content">
  74. <span>{{ ruleForm.introductio || content }}</span>
  75. </div>
  76. </div>
  77. </div>
  78. </el-tab-pane>
  79. </el-tabs>
  80. </div>
  81. </div>
  82. </template>
  83. <script setup lang="ts">
  84. import { ref, reactive, onMounted } from 'vue';
  85. import { RuleFormProps } from '../type';
  86. import { title, content } from '../../constant';
  87. const activeName = ref('platform');
  88. interface Props {
  89. ruleForm: RuleFormProps
  90. }
  91. defineProps<Props>()
  92. </script>
  93. <style scoped lang="scss">
  94. .right {
  95. width: 380px;
  96. height: 100%;
  97. padding: 20px 9px 0 20px;
  98. .top-head {
  99. display: flex;
  100. gap: 7px;
  101. align-items: center;
  102. width: 100%;
  103. height: 22px;
  104. font-weight: 600;
  105. font-size: 14px;
  106. color: rgba(0, 0, 0, 0.85);
  107. line-height: 22px;
  108. img {
  109. cursor: pointer;
  110. }
  111. }
  112. .tabs {
  113. margin-top: 14px;
  114. overflow-y: auto;
  115. :deep(.el-tabs__header) {
  116. margin: 0 0 22px;
  117. }
  118. :deep(.is-top) {
  119. font-weight: 550;
  120. font-size: 14px;
  121. line-height: 22px;
  122. }
  123. :deep(.el-tabs__nav-wrap::after) {
  124. height: 0px;
  125. }
  126. .platform {
  127. display: flex;
  128. flex-direction: column;
  129. gap: 24px;
  130. .tabs-content {
  131. width: 100%;
  132. height: auto;
  133. max-height: calc(100vh - 450px);
  134. .title {
  135. display: flex;
  136. align-items: center;
  137. margin-bottom: 12px;
  138. gap: 18px;
  139. width: 100%;
  140. height: 31px;
  141. .vertical {
  142. width: 4px;
  143. height: 12px;
  144. background: #1777ff;
  145. border-radius: 3px;
  146. }
  147. span {
  148. font-weight: 400;
  149. font-size: 14px;
  150. color: #303133;
  151. line-height: 20px;
  152. }
  153. }
  154. .card {
  155. width: 100%;
  156. height: 124px;
  157. padding: 10px 14px 0 12px;
  158. background: #ffffff;
  159. border-radius: 4px;
  160. border: 1px solid rgba(0, 0, 0, 0.06);
  161. .card-title {
  162. display: flex;
  163. justify-content: space-between;
  164. font-weight: 600;
  165. font-size: 15px;
  166. color: #646566;
  167. line-height: 20px;
  168. a {
  169. font-size: 14px;
  170. display: flex;
  171. gap: 8px;
  172. cursor: default;
  173. }
  174. }
  175. .card-content {
  176. margin-top: 15px;
  177. font-weight: 400;
  178. line-height: 20px;
  179. }
  180. }
  181. .info {
  182. width: 100%;
  183. max-height: calc(100vh - 450px - 32px);
  184. background: #ffffff;
  185. border-radius: 4px;
  186. border: 1px solid rgba(0, 0, 0, 0.06);
  187. .info-title {
  188. display: flex;
  189. justify-content: center;
  190. align-items: center;
  191. width: 100%;
  192. height: 41px;
  193. font-weight: 600;
  194. font-size: 14px;
  195. color: rgba(0, 0, 0, 0.85);
  196. line-height: 22px;
  197. border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  198. }
  199. .info-content {
  200. width: 100%;
  201. max-height: calc(100vh - 450px - 32px - 55px);
  202. overflow-y: auto;
  203. padding: 12px 7px 12px 12px;
  204. font-weight: 400;
  205. font-size: 14px;
  206. color: #646566;
  207. line-height: 22px;
  208. word-wrap: break-word;
  209. white-space: pre-wrap;
  210. }
  211. }
  212. }
  213. }
  214. .lanxin {
  215. display: flex;
  216. flex-direction: column;
  217. gap: 24px;
  218. .tabs-content {
  219. width: 100%;
  220. height: auto;
  221. max-height: calc(100vh - 400px);
  222. .title {
  223. display: flex;
  224. align-items: center;
  225. margin-bottom: 12px;
  226. gap: 18px;
  227. width: 100%;
  228. height: 31px;
  229. .vertical {
  230. width: 4px;
  231. height: 12px;
  232. background: #1777ff;
  233. border-radius: 3px;
  234. }
  235. span {
  236. font-weight: 400;
  237. font-size: 14px;
  238. color: #303133;
  239. line-height: 20px;
  240. }
  241. }
  242. .card {
  243. width: 100%;
  244. height: 79px;
  245. padding: 10px 14px 0 12px;
  246. background: #ffffff;
  247. border-radius: 4px;
  248. border: 1px solid rgba(0, 0, 0, 0.06);
  249. position: relative;
  250. .card-title {
  251. display: flex;
  252. justify-content: space-between;
  253. font-weight: 600;
  254. font-size: 15px;
  255. color: #646566;
  256. line-height: 20px;
  257. a {
  258. display: flex;
  259. gap: 8px;
  260. }
  261. }
  262. .card-content {
  263. margin-top: 15px;
  264. font-weight: 400;
  265. line-height: 20px;
  266. }
  267. img {
  268. position: absolute;
  269. top: 10px;
  270. right: 17px;
  271. }
  272. }
  273. .info {
  274. width: 100%;
  275. max-height: calc(100vh - 400px - 50px);
  276. background: #ffffff;
  277. border-radius: 4px;
  278. border: 1px solid rgba(0, 0, 0, 0.06);
  279. .info-title {
  280. display: flex;
  281. justify-content: center;
  282. align-items: center;
  283. width: 100%;
  284. height: 41px;
  285. font-weight: 600;
  286. font-size: 14px;
  287. color: rgba(0, 0, 0, 0.85);
  288. line-height: 22px;
  289. border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  290. }
  291. .info-content {
  292. width: 100%;
  293. max-height: calc(100vh - 400px - 32px - 41px);
  294. overflow-y: auto;
  295. padding: 12px 7px 12px 12px;
  296. font-weight: 400;
  297. font-size: 14px;
  298. color: #646566;
  299. line-height: 22px;
  300. word-wrap: break-word;
  301. white-space: pre-wrap;
  302. }
  303. }
  304. }
  305. }
  306. }
  307. }
  308. </style>