learning-1.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div id="learning-1">
  3. <van-row>
  4. <van-col span="24" class="main">
  5. <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
  6. <van-col span="24" class="title textOver">
  7. {{ item.name }}
  8. </van-col>
  9. <van-col span="24" class="other">
  10. <van-col span="24" class="otherInfo">
  11. 单位:<span>{{ item.unit || '暂无' }}</span>
  12. </van-col>
  13. <van-col span="24" class="otherInfo">
  14. 职务:<span>{{ item.job || '暂无' }}</span>
  15. </van-col>
  16. <van-col span="24" class="otherInfo">
  17. 研究方向:<span>{{ item.directionId || '暂无' }}</span>
  18. </van-col>
  19. </van-col>
  20. <!-- <van-col span="24" class="btn">
  21. <van-button type="info" size="small" @click="toView(item)">详细信息</van-button>
  22. </van-col> -->
  23. </van-col>
  24. </van-col>
  25. </van-row>
  26. </div>
  27. </template>
  28. <script>
  29. import { mapState, createNamespacedHelpers } from 'vuex';
  30. export default {
  31. name: 'learning-1',
  32. props: {
  33. list: { type: Array },
  34. },
  35. components: {},
  36. data: function () {
  37. return {};
  38. },
  39. created() {},
  40. methods: {
  41. // 查看详情
  42. toView(data) {
  43. this.$emit('toView', data);
  44. },
  45. },
  46. computed: {
  47. ...mapState(['user']),
  48. },
  49. metaInfo() {
  50. return { title: this.$route.meta.title };
  51. },
  52. watch: {
  53. test: {
  54. deep: true,
  55. immediate: true,
  56. handler(val) {},
  57. },
  58. },
  59. };
  60. </script>
  61. <style lang="less" scoped>
  62. .main {
  63. padding: 0 10px;
  64. .list {
  65. background-color: #fff;
  66. margin: 0 0 8px 0;
  67. padding: 8px;
  68. border-radius: 5px;
  69. border: 1px solid #f1f1f1;
  70. .title {
  71. font-size: 16px;
  72. font-weight: bold;
  73. margin: 0 0 5px 0;
  74. }
  75. .other {
  76. margin: 0 0 5px 0;
  77. .otherInfo {
  78. font-size: 14px;
  79. color: #666;
  80. margin: 0 0 5px 0;
  81. span {
  82. color: #000;
  83. }
  84. }
  85. }
  86. .btn {
  87. text-align: center;
  88. .van-button {
  89. margin: 0 5px;
  90. }
  91. }
  92. }
  93. }
  94. </style>