titles.vue 477 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <section class="head">
  3. <img src="~/static/img/back.png" alt @click="go">
  4. <span>{{tname}}</span>
  5. </section>
  6. </template>
  7. <script>
  8. export default {
  9. props: {
  10. tname: String, //定义传值的类型<br>
  11. required: true
  12. },
  13. methods: {
  14. go(e) {
  15. this.$router.go(-1)
  16. }
  17. },
  18. watch: {}
  19. }
  20. </script>
  21. <style scoped>
  22. .head img {
  23. float: left;
  24. padding-left: 6px;
  25. }
  26. .head span {
  27. width: auto;
  28. padding: 0;
  29. padding-right: 20px;
  30. }
  31. </style>