tow.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <div class="tow">
  3. <div class="comTit">{{ tit }}</div>
  4. <div class="comMain sroolStop">
  5. <div class="row" v-for="(item,index) in data" :key="item.id">
  6. <div class="rowLeft">{{ (index+1)<10?`0${index+1}`:index+1 }}</div>
  7. <div class="rowRight">
  8. <div class="sroolStop">{{item.name}}</div>
  9. <p class="sroolStop" v-html="item.txt"></p>
  10. </div>
  11. </div>
  12. </div>
  13. <div class="comBs" @click="$emit('pageNext')"></div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: "tow",
  19. props: {
  20. tit: {
  21. type: String,
  22. },
  23. data: {
  24. type: Array,
  25. default: () => [],
  26. },
  27. },
  28. components: {},
  29. data() {
  30. //这里存放数据
  31. return {};
  32. },
  33. //监听属性 类似于data概念
  34. computed: {},
  35. //监控data中的数据变化
  36. watch: {},
  37. //方法集合
  38. methods: {},
  39. //生命周期 - 创建完成(可以访问当前this实例)
  40. created() {},
  41. //生命周期 - 挂载完成(可以访问DOM元素)
  42. mounted() {},
  43. beforeCreate() {}, //生命周期 - 创建之前
  44. beforeMount() {}, //生命周期 - 挂载之前
  45. beforeUpdate() {}, //生命周期 - 更新之前
  46. updated() {}, //生命周期 - 更新之后
  47. beforeDestroy() {}, //生命周期 - 销毁之前
  48. destroyed() {}, //生命周期 - 销毁完成
  49. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  50. };
  51. </script>
  52. <style lang='less' scoped>
  53. .comMain::-webkit-scrollbar {
  54. /*滚动条整体样式*/
  55. width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
  56. height: 1px;
  57. }
  58. .comMain::-webkit-scrollbar-thumb {
  59. /*滚动条里面小方块*/
  60. border-radius: 10px;
  61. -webkit-box-shadow: inset 0 0 5px transparent;
  62. background: #8a7351;
  63. }
  64. .comMain::-webkit-scrollbar-track {
  65. /*滚动条里面轨道*/
  66. -webkit-box-shadow: inset 0 0 5px transparent;
  67. border-radius: 10px;
  68. background: transparent;
  69. }
  70. .tow {
  71. position: relative;
  72. width: 100%;
  73. height: 100%;
  74. padding-top: 50px;
  75. .comMain {
  76. overflow-y: auto;
  77. width: 100%;
  78. max-height: calc(100% - 140px);
  79. .row {
  80. pointer-events: none;
  81. color: #8a7351;
  82. display: flex;
  83. padding: 20px 20px 0px 0;
  84. .rowLeft {
  85. width: 60px;
  86. padding-bottom: 20px;
  87. border-bottom: 1px solid #bfb094;
  88. font-family: "思源宋体";
  89. font-weight: 700;
  90. font-size: 50px;
  91. }
  92. .rowRight {
  93. flex: 1;
  94. padding-bottom: 20px;
  95. border-bottom: 1px solid #bfb094;
  96. padding-left: 50px;
  97. & > div {
  98. font-size: 24px;
  99. font-family: "思源宋体";
  100. }
  101. & > p {
  102. margin-top: 10px;
  103. font-size: 16px;
  104. }
  105. }
  106. }
  107. }
  108. }
  109. </style>