titles.vue 831 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <section class="head">
  3. <img src="~/static/img/back.png" alt @click="go">
  4. <span>{{tname}}</span>
  5. <!-- <nuxt-link :to="tolink">{{todos}}</nuxt-link> -->
  6. </section>
  7. </template>
  8. <script>
  9. export default {
  10. props: {
  11. tname: String, //定义传值的类型<br>
  12. // todos: String, //定义传值的类型<br>
  13. // tolink 这里有多个值,最好做成数组
  14. },
  15. mounted(){
  16. // 所有数据铺完了。。。忘记了
  17. },
  18. methods: {
  19. go(e) {
  20. this.$router.go(-1)
  21. }
  22. },
  23. watch: {}
  24. }
  25. </script>
  26. <style scoped lang="scss">
  27. .head {
  28. background-color: #fff;
  29. border-bottom: 1px solid #f0f0f0;
  30. box-sizing: border-box;
  31. }
  32. .head img {
  33. float: left;
  34. padding-left: 6px;
  35. }
  36. .head span {
  37. width: auto;
  38. padding: 0;
  39. padding-right: 20px;
  40. }
  41. .head a{
  42. float: right;
  43. }
  44. </style>