xqdl.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <!-- 学前导览 -->
  3. <view class="df jcc aic myComRoot">
  4. <view class="df content-box jcsb">
  5. <view v-for="(item,i) in btn1List" :key="i" class="df jcc aic fdc btn1-box" @click="onClick_Btn1(i)">
  6. <view class="btn1-icon">
  7. <img :src="item.src"></img>
  8. </view>
  9. <view class="btn1-text">{{item.text}}</view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. components: {
  17. },
  18. onLoad() {
  19. },
  20. data() {
  21. return {
  22. btn1List: [{
  23. "src": require("../../assets/topMenu/preludePreparation.png"),
  24. "text": "学习概要"
  25. },
  26. {
  27. "src": require("../../assets/topMenu/learningAndExperiment.png"),
  28. "text": "实验步骤"
  29. },
  30. {
  31. "src": require("../../assets/topMenu/testAndResult.png"),
  32. "text": "实验引导视频"
  33. },
  34. {
  35. "src": require("../../assets/learning/icon_ksxx_05.png"),
  36. "text": "学习资料下载"
  37. }
  38. ],
  39. }
  40. },
  41. methods: {
  42. onClick_Btn1(index){
  43. this.$emit("onClick_Btn1",index);
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. $btnN:4;
  50. .content-box {
  51. width: px2vw(312*$btnN+34*(($btnN)-1));
  52. height: px2vw(367);
  53. }
  54. </style>